import{S as O2,i as D2,s as W2,e as n,k as l,w as m,t as a,M as U2,c as s,d as t,m as c,a as r,x as _,h as i,b as d,F as e,g,y as b,q as k,o as B,B as v}from"../../chunks/vendor-4833417e.js";import{T as J}from"../../chunks/Tip-fffd6df1.js";import{D as F}from"../../chunks/Docstring-4f315ed9.js";import{C as D}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as q}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function Q2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function H2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function V2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function J2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function R2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function G2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function K2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function X2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function Y2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function Z2(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function ex(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function tx(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function ox(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function nx(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function sx(z){let p,T,u,w,$;return{c(){p=n("p"),T=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),w=a("Module"),$=a(`
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(y){p=s(y,"P",{});var f=r(p);T=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(f,"CODE",{});var x=r(u);w=i(x,"Module"),x.forEach(t),$=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(y,f){g(y,p,f),e(p,T),e(p,u),e(u,w),e(p,$)},d(y){y&&t(p)}}}function rx(z){let p,T,u,w,$,y,f,x,qh,Pc,et,Ht,ii,Ko,Mh,di,Eh,jc,Vt,Ph,Xo,jh,Ch,Cc,oa,Ah,Ac,na,li,Lh,Lc,sa,Ih,Ic,U,Yo,Nh,Zo,Sh,Oh,Dh,be,Wh,ci,Uh,Qh,pi,Hh,Vh,hi,Jh,Rh,fi,Gh,Kh,Xh,gi,Yh,Zh,ui,ef,tf,en,of,mi,nf,sf,rf,ra,af,_i,df,Nc,Ce,lf,tn,cf,pf,on,hf,ff,Sc,tt,Jt,bi,nn,gf,ki,uf,Oc,M,sn,mf,ot,_f,aa,bf,kf,rn,Bf,vf,yf,nt,wf,ia,Tf,$f,da,xf,Ff,zf,Bi,qf,Mf,an,Ef,vi,yi,wi,Ti,Pf,jf,$i,xi,dn,Rt,Gt,Fi,ln,Cf,zi,Af,Lf,qi,If,Nf,Mi,Ei,cn,Kt,Xt,Pi,pn,Sf,ji,Of,Df,Ci,Wf,Uf,Ai,Li,Ii,Yt,Zt,Ni,hn,Qf,Si,Hf,Dc,st,eo,Oi,fn,Vf,Di,Jf,Wc,E,gn,Rf,un,Gf,mn,Kf,Xf,Yf,_n,Zf,la,eg,tg,og,Ae,bn,ng,Wi,sg,rg,kn,ca,ag,Ui,ig,dg,pa,lg,Qi,cg,pg,to,Bn,hg,vn,fg,Hi,gg,ug,mg,oo,yn,_g,rt,bg,Vi,kg,Bg,Ji,vg,yg,wg,ha,wn,Uc,at,no,Ri,Tn,Tg,Gi,$g,Qc,Q,$n,xg,Te,Fg,Ki,zg,qg,xn,Mg,Eg,fa,Pg,jg,Cg,Le,Fn,Ag,Xi,Lg,Ig,zn,ga,Ng,Yi,Sg,Og,ua,Dg,Zi,Wg,Ug,we,qn,Qg,ed,Hg,Vg,Mn,Jg,td,Rg,Gg,so,En,Kg,Pn,Xg,od,Yg,Zg,Hc,it,ro,nd,jn,eu,sd,tu,Vc,dt,Cn,ou,An,nu,ma,su,ru,Jc,lt,ao,rd,Ln,au,ad,iu,Rc,H,In,du,Nn,lu,Sn,cu,pu,hu,On,fu,Dn,gu,uu,mu,W,_u,id,bu,ku,dd,Bu,vu,ld,yu,wu,cd,Tu,$u,pd,xu,Fu,hd,zu,qu,Mu,R,Wn,Eu,ct,Pu,_a,ju,Cu,fd,Au,Lu,Iu,io,Nu,gd,Su,Ou,Un,Gc,pt,lo,ud,Qn,Du,md,Wu,Kc,ht,Hn,Uu,G,Vn,Qu,ft,Hu,ba,Vu,Ju,_d,Ru,Gu,Ku,co,Xu,bd,Yu,Zu,Jn,Xc,gt,po,kd,Rn,em,Bd,tm,Yc,$e,Gn,om,ut,nm,vd,sm,rm,Kn,am,im,dm,K,Xn,lm,mt,cm,ka,pm,hm,yd,fm,gm,um,ho,mm,wd,_m,bm,Yn,Zc,_t,fo,Td,Zn,km,$d,Bm,ep,xe,es,vm,bt,ym,xd,wm,Tm,ts,$m,xm,Fm,X,os,zm,kt,qm,Ba,Mm,Em,Fd,Pm,jm,Cm,go,Am,zd,Lm,Im,ns,tp,Bt,uo,qd,ss,Nm,Md,Sm,op,ke,rs,Om,Ed,Dm,Wm,as,Um,is,Qm,Hm,Vm,S,ds,Jm,vt,Rm,va,Gm,Km,Pd,Xm,Ym,Zm,mo,e_,jd,t_,o_,ls,n_,Cd,s_,r_,cs,np,yt,_o,Ad,ps,a_,Ld,i_,sp,Be,hs,d_,Id,l_,c_,fs,p_,gs,h_,f_,g_,Y,us,u_,wt,m_,ya,__,b_,Nd,k_,B_,v_,bo,y_,Sd,w_,T_,ms,rp,Tt,ko,Od,_s,$_,Dd,x_,ap,ve,bs,F_,Wd,z_,q_,ks,M_,Bs,E_,P_,j_,Z,vs,C_,$t,A_,wa,L_,I_,Ud,N_,S_,O_,Bo,D_,Qd,W_,U_,ys,ip,xt,vo,Hd,ws,Q_,Vd,H_,dp,ye,Ts,V_,Ft,J_,Jd,R_,G_,Rd,K_,X_,Y_,$s,Z_,xs,eb,tb,ob,ee,Fs,nb,zt,sb,Ta,rb,ab,Gd,ib,db,lb,yo,cb,Kd,pb,hb,zs,lp,qt,wo,Xd,qs,fb,Yd,gb,cp,P,Ms,ub,Zd,mb,_b,Es,bb,$a,kb,Bb,vb,Ps,yb,js,wb,Tb,$b,el,xb,Fb,Fe,tl,Cs,zb,qb,ol,As,Mb,Eb,nl,Ls,Pb,jb,sl,Is,Cb,Ab,te,Ns,Lb,Mt,Ib,rl,Nb,Sb,al,Ob,Db,Wb,To,Ub,il,Qb,Hb,Ss,pp,Et,$o,dl,Os,Vb,ll,Jb,hp,j,Ds,Rb,Pt,Gb,cl,Kb,Xb,pl,Yb,Zb,ek,Ws,tk,xa,ok,nk,sk,Us,rk,Qs,ak,ik,dk,hl,lk,ck,ze,fl,Hs,pk,hk,gl,Vs,fk,gk,ul,Js,uk,mk,ml,Rs,_k,bk,oe,Gs,kk,jt,Bk,_l,vk,yk,bl,wk,Tk,$k,xo,xk,kl,Fk,zk,Ks,fp,Ct,Fo,Bl,Xs,qk,vl,Mk,gp,C,Ys,Ek,Zs,Pk,yl,jk,Ck,Ak,er,Lk,Fa,Ik,Nk,Sk,tr,Ok,or,Dk,Wk,Uk,wl,Qk,Hk,qe,Tl,nr,Vk,Jk,$l,sr,Rk,Gk,xl,rr,Kk,Xk,Fl,ar,Yk,Zk,ne,ir,eB,At,tB,zl,oB,nB,ql,sB,rB,aB,zo,iB,Ml,dB,lB,dr,up,Lt,qo,El,lr,cB,Pl,pB,mp,A,cr,hB,jl,fB,gB,pr,uB,za,mB,_B,bB,hr,kB,fr,BB,vB,yB,Cl,wB,TB,Me,Al,gr,$B,xB,Ll,ur,FB,zB,Il,mr,qB,MB,Nl,_r,EB,PB,se,br,jB,It,CB,Sl,AB,LB,Ol,IB,NB,SB,Mo,OB,Dl,DB,WB,kr,_p,Nt,Eo,Wl,Br,UB,Ul,QB,bp,L,vr,HB,Ql,VB,JB,yr,RB,qa,GB,KB,XB,wr,YB,Tr,ZB,ev,tv,Hl,ov,nv,Ee,Vl,$r,sv,rv,Jl,xr,av,iv,Rl,Fr,dv,lv,Gl,zr,cv,pv,re,qr,hv,St,fv,Kl,gv,uv,Xl,mv,_v,bv,Po,kv,Yl,Bv,vv,Mr,kp,Ot,jo,Zl,Er,yv,ec,wv,Bp,I,Pr,Tv,tc,$v,xv,jr,Fv,Ma,zv,qv,Mv,Cr,Ev,Ar,Pv,jv,Cv,oc,Av,Lv,Pe,nc,Lr,Iv,Nv,sc,Ir,Sv,Ov,rc,Nr,Dv,Wv,ac,Sr,Uv,Qv,ae,Or,Hv,Dt,Vv,ic,Jv,Rv,dc,Gv,Kv,Xv,Co,Yv,lc,Zv,e1,Dr,vp,Wt,Ao,cc,Wr,t1,pc,o1,yp,N,Ur,n1,Ut,s1,hc,r1,a1,fc,i1,d1,l1,Qr,c1,Ea,p1,h1,f1,Hr,g1,Vr,u1,m1,_1,gc,b1,k1,je,uc,Jr,B1,v1,mc,Rr,y1,w1,_c,Gr,T1,$1,bc,Kr,x1,F1,ie,Xr,z1,Qt,q1,Pa,M1,E1,kc,P1,j1,C1,Lo,A1,Bc,L1,I1,Yr,wp;return y=new q({}),Ko=new q({}),nn=new q({}),sn=new F({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:"is_encoder_decoder",val:" = False"},{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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/configuration_big_bird.py#L31",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/pr_15839/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/pr_15839/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.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"}]}}),an=new D({props:{code:"",highlighted:""}}),ln=new q({}),pn=new q({}),hn=new q({}),fn=new q({}),gn=new F({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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird.py#L47",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"}]}}),bn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird.py#L201",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"}],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>
`}}),Bn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird.py#L226",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"}],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>
`}}),yn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird.py#L253",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"}],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>
`}}),wn=new F({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/pr_15839/src/transformers/models/big_bird/tokenization_big_bird.py#L184"}}),Tn=new q({}),$n=new F({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:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L59",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"}]}}),Fn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L146",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"}],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>
`}}),qn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L202",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"}],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>
`}}),Mn=new D({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,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 |`}}),En=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L171",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"}],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>
`}}),jn=new q({}),Cn=new F({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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L1845",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"}]}}),Ln=new q({}),In=new F({props:{name:"class transformers.BigBirdModel",anchor:"transformers.BigBirdModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L1917",parametersDescription:[{anchor:"transformers.BigBirdModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Wn=new F({props:{name:"forward",anchor:"transformers.BigBirdModel.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"past_key_values",val:" = None"},{name:"use_cache",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L1973",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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>
<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/pr_15839/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),io=new J({props:{$$slots:{default:[Q2]},$$scope:{ctx:z}}}),Un=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdModel
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdModel.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, 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 = BigBirdTokenizer.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`}}),Qn=new q({}),Hn=new F({props:{name:"class transformers.BigBirdForPreTraining",anchor:"transformers.BigBirdForPreTraining",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2256"}}),Vn=new F({props:{name:"forward",anchor:"transformers.BigBirdForPreTraining.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"next_sentence_label",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2272",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/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>
`}}),co=new J({props:{$$slots:{default:[H2]},$$scope:{ctx:z}}}),Jn=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForPreTraining
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForPreTraining.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

prediction_logits = outputs.prediction_logits
seq_relationship_logits = outputs.seq_relationship_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, 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 = BigBirdTokenizer.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`}}),Rn=new q({}),Gn=new F({props:{name:"class transformers.BigBirdForCausalLM",anchor:"transformers.BigBirdForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2463",parametersDescription:[{anchor:"transformers.BigBirdForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Xn=new F({props:{name:"forward",anchor:"transformers.BigBirdForCausalLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"past_key_values",val:" = None"},{name:"labels",val:" = None"},{name:"use_cache",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2485",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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>
<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/pr_15839/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new J({props:{$$slots:{default:[V2]},$$scope:{ctx:z}}}),Yn=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForCausalLM, BigBirdConfig
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
config = BigBirdConfig.from_pretrained("google/bigbird-roberta-base")
config.is_decoder = True
model = BigBirdForCausalLM.from_pretrained("google/bigbird-roberta-base", config=config)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

prediction_logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, BigBirdForCausalLM, BigBirdConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = BigBirdConfig.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>, config=config)

<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.logits`}}),Zn=new q({}),es=new F({props:{name:"class transformers.BigBirdForMaskedLM",anchor:"transformers.BigBirdForMaskedLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2360",parametersDescription:[{anchor:"transformers.BigBirdForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),os=new F({props:{name:"forward",anchor:"transformers.BigBirdForMaskedLM.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2382",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),go=new J({props:{$$slots:{default:[J2]},$$scope:{ctx:z}}}),ns=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForMaskedLM
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForMaskedLM.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="pt")
labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]

outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, BigBirdForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),ss=new q({}),rs=new F({props:{name:"class transformers.BigBirdForSequenceClassification",anchor:"transformers.BigBirdForSequenceClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2640",parametersDescription:[{anchor:"transformers.BigBirdForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ds=new F({props:{name:"forward",anchor:"transformers.BigBirdForSequenceClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2651",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new J({props:{$$slots:{default:[R2]},$$scope:{ctx:z}}}),ls=new D({props:{code:`import torch
from transformers import BigBirdTokenizer, BigBirdForSequenceClassification

torch.manual_seed(0)
tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForSequenceClassification.from_pretrained("google/bigbird-roberta-base", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits
list(logits.shape)
`,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> BigBirdTokenizer, BigBirdForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>, num_labels=<span class="hljs-number">2</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>labels = torch.tensor([<span class="hljs-number">1</span>]).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),cs=new D({props:{code:`import torch
from transformers import BigBirdTokenizer, BigBirdForSequenceClassification

torch.manual_seed(0)
tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForSequenceClassification.from_pretrained("google/bigbird-roberta-base", problem_type="multi_label_classification", num_labels=2)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([[1, 1]], dtype=torch.float)  # need dtype=float for BCEWithLogitsLoss
outputs = model(**inputs, labels=labels)
loss = outputs.loss
list(logits.shape)
`,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> BigBirdTokenizer, BigBirdForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>, num_labels=<span class="hljs-number">2</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>labels = torch.tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>]], dtype=torch.<span class="hljs-built_in">float</span>)  <span class="hljs-comment"># need dtype=float for BCEWithLogitsLoss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
`}}),ps=new q({}),hs=new F({props:{name:"class transformers.BigBirdForMultipleChoice",anchor:"transformers.BigBirdForMultipleChoice",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2736",parametersDescription:[{anchor:"transformers.BigBirdForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),us=new F({props:{name:"forward",anchor:"transformers.BigBirdForMultipleChoice.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2747",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bo=new J({props:{$$slots:{default:[G2]},$$scope:{ctx:z}}}),ms=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForMultipleChoice
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForMultipleChoice.from_pretrained("google/bigbird-roberta-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, 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 = BigBirdTokenizer.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`}}),_s=new q({}),bs=new F({props:{name:"class transformers.BigBirdForTokenClassification",anchor:"transformers.BigBirdForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2830",parametersDescription:[{anchor:"transformers.BigBirdForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),vs=new F({props:{name:"forward",anchor:"transformers.BigBirdForTokenClassification.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2845",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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 + 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/pr_15839/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bo=new J({props:{$$slots:{default:[K2]},$$scope:{ctx:z}}}),ys=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForTokenClassification
import torch

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = BigBirdForTokenClassification.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
labels = torch.tensor([1] * inputs["input_ids"].size(1)).unsqueeze(0)  # Batch size 1

outputs = model(**inputs, labels=labels)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, 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 = BigBirdTokenizer.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-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>labels = torch.tensor([<span class="hljs-number">1</span>] * inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].size(<span class="hljs-number">1</span>)).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),ws=new q({}),Ts=new F({props:{name:"class transformers.BigBirdForQuestionAnswering",anchor:"transformers.BigBirdForQuestionAnswering",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2930",parametersDescription:[{anchor:"transformers.BigBirdForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Fs=new F({props:{name:"forward",anchor:"transformers.BigBirdForQuestionAnswering.forward",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"question_lengths",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"start_positions",val:" = None"},{name:"end_positions",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_big_bird.py#L2944",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_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"}],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/pr_15839/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>
`}}),yo=new J({props:{$$slots:{default:[X2]},$$scope:{ctx:z}}}),zs=new D({props:{code:`from transformers import BigBirdTokenizer, BigBirdForQuestionAnswering
import torch

torch.manual_seed(0)
tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-base-trivia-itc")
model = BigBirdForQuestionAnswering.from_pretrained("google/bigbird-base-trivia-itc")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="pt")
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss
round(loss.item(), 2)


start_scores = outputs.start_logits
list(start_scores.shape)


end_scores = outputs.end_logits
list(end_scores.shape)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, BigBirdForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-base-trivia-itc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/bigbird-base-trivia-itc&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.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-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(start_scores.shape)


<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(end_scores.shape)
`}}),qs=new q({}),Ms=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1560",parametersDescription:[{anchor:"transformers.FlaxBigBirdModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Ns=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),To=new J({props:{$$slots:{default:[Y2]},$$scope:{ctx:z}}}),Ss=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdModel

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdModel.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),Os=new q({}),Ds=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1635",parametersDescription:[{anchor:"transformers.FlaxBigBirdForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Gs=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],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/pr_15839/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>
`}}),xo=new J({props:{$$slots:{default:[Z2]},$$scope:{ctx:z}}}),Ks=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForPreTraining

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForPreTraining.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="np")
outputs = model(**inputs)

prediction_logits = outputs.prediction_logits
seq_relationship_logits = outputs.seq_relationship_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),Xs=new q({}),Ys=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1722",parametersDescription:[{anchor:"transformers.FlaxBigBirdForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),ir=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new J({props:{$$slots:{default:[ex]},$$scope:{ctx:z}}}),dr=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForMaskedLM

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForMaskedLM.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),lr=new q({}),cr=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1811",parametersDescription:[{anchor:"transformers.FlaxBigBirdForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),br=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mo=new J({props:{$$slots:{default:[tx]},$$scope:{ctx:z}}}),kr=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForSequenceClassification

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForSequenceClassification.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),Br=new q({}),vr=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1888",parametersDescription:[{anchor:"transformers.FlaxBigBirdForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),qr=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Po=new J({props:{$$slots:{default:[ox]},$$scope:{ctx:z}}}),Mr=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForMultipleChoice

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForMultipleChoice.from_pretrained("google/bigbird-roberta-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="jax", padding=True)
outputs = model(**{k: v[None, :] for k, v in encoding.items()})

logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),Er=new q({}),Pr=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1980",parametersDescription:[{anchor:"transformers.FlaxBigBirdForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Or=new F({props:{name:"__call__",anchor:"transformers.FlaxBigBirdPreTrainedModel.__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:"params",val:": dict = None"},{name:"dropout_rng",val:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1445",parametersDescription:[{anchor:"transformers.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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.FlaxBigBirdPreTrainedModel.__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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Co=new J({props:{$$slots:{default:[nx]},$$scope:{ctx:z}}}),Dr=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForTokenClassification

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForTokenClassification.from_pretrained("google/bigbird-roberta-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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`}}),Wr=new q({}),Ur=new F({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._src.numpy.lax_numpy.float32'>"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2079",parametersDescription:[{anchor:"transformers.FlaxBigBirdForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/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/pr_15839/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/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}]}}),Xr=new F({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:": 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"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2082",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/pr_15839/en/model_doc/big_bird#transformers.BigBirdTokenizer">BigBirdTokenizer</a>. See <a href="/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_15839/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/pr_15839/en/main_classes/output#transformers.file_utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],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/pr_15839/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>
`}}),Lo=new J({props:{$$slots:{default:[sx]},$$scope:{ctx:z}}}),Yr=new D({props:{code:`from transformers import BigBirdTokenizer, FlaxBigBirdForQuestionAnswering

tokenizer = BigBirdTokenizer.from_pretrained("google/bigbird-roberta-base")
model = FlaxBigBirdForQuestionAnswering.from_pretrained("google/bigbird-roberta-base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
inputs = tokenizer(question, text, return_tensors="jax")

outputs = model(**inputs)
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdTokenizer, FlaxBigBirdForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BigBirdTokenizer.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(){p=n("meta"),T=l(),u=n("h1"),w=n("a"),$=n("span"),m(y.$$.fragment),f=l(),x=n("span"),qh=a("BigBird"),Pc=l(),et=n("h2"),Ht=n("a"),ii=n("span"),m(Ko.$$.fragment),Mh=l(),di=n("span"),Eh=a("Overview"),jc=l(),Vt=n("p"),Ph=a("The BigBird model was proposed in "),Xo=n("a"),jh=a("Big Bird: Transformers for Longer Sequences"),Ch=a(` 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.`),Cc=l(),oa=n("p"),Ah=a("The abstract from the paper is the following:"),Ac=l(),na=n("p"),li=n("em"),Lh=a(`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.`),Lc=l(),sa=n("p"),Ih=a("Tips:"),Ic=l(),U=n("ul"),Yo=n("li"),Nh=a("For an in-detail explanation on how BigBird\u2019s attention works, see "),Zo=n("a"),Sh=a("this blog post"),Oh=a("."),Dh=l(),be=n("li"),Wh=a("BigBird comes with 2 implementations: "),ci=n("strong"),Uh=a("original_full"),Qh=a(" & "),pi=n("strong"),Hh=a("block_sparse"),Vh=a(`. For the sequence length < 1024, using
`),hi=n("strong"),Jh=a("original_full"),Rh=a(" is advised as there is no benefit in using "),fi=n("strong"),Gh=a("block_sparse"),Kh=a(" attention."),Xh=l(),gi=n("li"),Yh=a("The code currently uses window size of 3 blocks and 2 global blocks."),Zh=l(),ui=n("li"),ef=a("Sequence length must be divisible by block size."),tf=l(),en=n("li"),of=a("Current implementation supports only "),mi=n("strong"),nf=a("ITC"),sf=a("."),rf=l(),ra=n("li"),af=a("Current implementation doesn\u2019t support "),_i=n("strong"),df=a("num_random_blocks = 0"),Nc=l(),Ce=n("p"),lf=a("This model was contributed by "),tn=n("a"),cf=a("vasudevgupta"),pf=a(`. The original code can be found
`),on=n("a"),hf=a("here"),ff=a("."),Sc=l(),tt=n("h2"),Jt=n("a"),bi=n("span"),m(nn.$$.fragment),gf=l(),ki=n("span"),uf=a("BigBirdConfig"),Oc=l(),M=n("div"),m(sn.$$.fragment),mf=l(),ot=n("p"),_f=a("This is the configuration class to store the configuration of a "),aa=n("a"),bf=a("BigBirdModel"),kf=a(`. 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
`),rn=n("a"),Bf=a("google/bigbird-roberta-base"),vf=a(" architecture."),yf=l(),nt=n("p"),wf=a("Configuration objects inherit from "),ia=n("a"),Tf=a("PretrainedConfig"),$f=a(` and can be used to control the model outputs. Read the
documentation from `),da=n("a"),xf=a("PretrainedConfig"),Ff=a(" for more information."),zf=l(),Bi=n("p"),qf=a("Example:"),Mf=l(),m(an.$$.fragment),Ef=l(),vi=n("blockquote"),yi=n("blockquote"),wi=n("blockquote"),Ti=n("p"),Pf=a("from transformers import BigBirdModel, BigBirdConfig"),jf=l(),$i=n("blockquote"),xi=n("blockquote"),dn=n("blockquote"),Rt=n("h1"),Gt=n("a"),Fi=n("span"),m(ln.$$.fragment),Cf=l(),zi=n("span"),Af=a("Initializing a BigBird google/bigbird-roberta-base style configuration >>> configuration ="),Lf=l(),qi=n("p"),If=a("BigBirdConfig()"),Nf=l(),Mi=n("blockquote"),Ei=n("blockquote"),cn=n("blockquote"),Kt=n("h1"),Xt=n("a"),Pi=n("span"),m(pn.$$.fragment),Sf=l(),ji=n("span"),Of=a("Initializing a model from the google/bigbird-roberta-base style configuration >>> model ="),Df=l(),Ci=n("p"),Wf=a("BigBirdModel(configuration)"),Uf=l(),Ai=n("blockquote"),Li=n("blockquote"),Ii=n("blockquote"),Yt=n("h1"),Zt=n("a"),Ni=n("span"),m(hn.$$.fragment),Qf=l(),Si=n("span"),Hf=a("Accessing the model configuration >>> configuration = model.config"),Dc=l(),st=n("h2"),eo=n("a"),Oi=n("span"),m(fn.$$.fragment),Vf=l(),Di=n("span"),Jf=a("BigBirdTokenizer"),Wc=l(),E=n("div"),m(gn.$$.fragment),Rf=l(),un=n("p"),Gf=a("Construct a BigBird tokenizer. Based on "),mn=n("a"),Kf=a("SentencePiece"),Xf=a("."),Yf=l(),_n=n("p"),Zf=a("This tokenizer inherits from "),la=n("a"),eg=a("PreTrainedTokenizer"),tg=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),og=l(),Ae=n("div"),m(bn.$$.fragment),ng=l(),Wi=n("p"),sg=a(`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:`),rg=l(),kn=n("ul"),ca=n("li"),ag=a("single sequence: "),Ui=n("code"),ig=a("[CLS] X [SEP]"),dg=l(),pa=n("li"),lg=a("pair of sequences: "),Qi=n("code"),cg=a("[CLS] A [SEP] B [SEP]"),pg=l(),to=n("div"),m(Bn.$$.fragment),hg=l(),vn=n("p"),fg=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Hi=n("code"),gg=a("prepare_for_model"),ug=a(" method."),mg=l(),oo=n("div"),m(yn.$$.fragment),_g=l(),rt=n("p"),bg=a(`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 `),Vi=n("code"),kg=a("token_ids_1"),Bg=a(" is "),Ji=n("code"),vg=a("None"),yg=a(", this method only returns the first portion of the mask (0s)."),wg=l(),ha=n("div"),m(wn.$$.fragment),Uc=l(),at=n("h2"),no=n("a"),Ri=n("span"),m(Tn.$$.fragment),Tg=l(),Gi=n("span"),$g=a("BigBirdTokenizerFast"),Qc=l(),Q=n("div"),m($n.$$.fragment),xg=l(),Te=n("p"),Fg=a("Construct a \u201Cfast\u201D BigBird tokenizer (backed by HuggingFace\u2019s "),Ki=n("em"),zg=a("tokenizers"),qg=a(` library). Based on
`),xn=n("a"),Mg=a("Unigram"),Eg=a(`. This
tokenizer inherits from `),fa=n("a"),Pg=a("PreTrainedTokenizerFast"),jg=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Cg=l(),Le=n("div"),m(Fn.$$.fragment),Ag=l(),Xi=n("p"),Lg=a(`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:`),Ig=l(),zn=n("ul"),ga=n("li"),Ng=a("single sequence: "),Yi=n("code"),Sg=a("[CLS] X [SEP]"),Og=l(),ua=n("li"),Dg=a("pair of sequences: "),Zi=n("code"),Wg=a("[CLS] A [SEP] B [SEP]"),Ug=l(),we=n("div"),m(qn.$$.fragment),Qg=l(),ed=n("p"),Hg=a(`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT
sequence pair mask has the following format:`),Vg=l(),m(Mn.$$.fragment),Jg=l(),td=n("p"),Rg=a("if token_ids_1 is None, only returns the first portion of the mask (0s)."),Gg=l(),so=n("div"),m(En.$$.fragment),Kg=l(),Pn=n("p"),Xg=a(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),od=n("code"),Yg=a("prepare_for_model"),Zg=a(" method."),Hc=l(),it=n("h2"),ro=n("a"),nd=n("span"),m(jn.$$.fragment),eu=l(),sd=n("span"),tu=a("BigBird specific outputs"),Vc=l(),dt=n("div"),m(Cn.$$.fragment),ou=l(),An=n("p"),nu=a("Output type of "),ma=n("a"),su=a("BigBirdForPreTraining"),ru=a("."),Jc=l(),lt=n("h2"),ao=n("a"),rd=n("span"),m(Ln.$$.fragment),au=l(),ad=n("span"),iu=a("BigBirdModel"),Rc=l(),H=n("div"),m(In.$$.fragment),du=l(),Nn=n("p"),lu=a(`The bare BigBird Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Sn=n("a"),cu=a("torch.nn.Module"),pu=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),hu=l(),On=n("p"),fu=a(`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 `),Dn=n("a"),gu=a(`Attention is
all you need`),uu=a(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),mu=l(),W=n("p"),_u=a("To behave as an decoder the model needs to be initialized with the "),id=n("code"),bu=a("is_decoder"),ku=a(` argument of the configuration set
to `),dd=n("code"),Bu=a("True"),vu=a(". To be used in a Seq2Seq model, the model needs to initialized with both "),ld=n("code"),yu=a("is_decoder"),wu=a(` argument and
`),cd=n("code"),Tu=a("add_cross_attention"),$u=a(" set to "),pd=n("code"),xu=a("True"),Fu=a("; an "),hd=n("code"),zu=a("encoder_hidden_states"),qu=a(" is then expected as an input to the forward pass."),Mu=l(),R=n("div"),m(Wn.$$.fragment),Eu=l(),ct=n("p"),Pu=a("The "),_a=n("a"),ju=a("BigBirdModel"),Cu=a(" forward method, overrides the "),fd=n("code"),Au=a("__call__"),Lu=a(" special method."),Iu=l(),m(io.$$.fragment),Nu=l(),gd=n("p"),Su=a("Example:"),Ou=l(),m(Un.$$.fragment),Gc=l(),pt=n("h2"),lo=n("a"),ud=n("span"),m(Qn.$$.fragment),Du=l(),md=n("span"),Wu=a("BigBirdForPreTraining"),Kc=l(),ht=n("div"),m(Hn.$$.fragment),Uu=l(),G=n("div"),m(Vn.$$.fragment),Qu=l(),ft=n("p"),Hu=a("The "),ba=n("a"),Vu=a("BigBirdForPreTraining"),Ju=a(" forward method, overrides the "),_d=n("code"),Ru=a("__call__"),Gu=a(" special method."),Ku=l(),m(co.$$.fragment),Xu=l(),bd=n("p"),Yu=a("Example:"),Zu=l(),m(Jn.$$.fragment),Xc=l(),gt=n("h2"),po=n("a"),kd=n("span"),m(Rn.$$.fragment),em=l(),Bd=n("span"),tm=a("BigBirdForCausalLM"),Yc=l(),$e=n("div"),m(Gn.$$.fragment),om=l(),ut=n("p"),nm=a("BigBird Model with a "),vd=n("code"),sm=a("language modeling"),rm=a(` head on top for CLM fine-tuning.
This model is a PyTorch `),Kn=n("a"),am=a("torch.nn.Module"),im=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dm=l(),K=n("div"),m(Xn.$$.fragment),lm=l(),mt=n("p"),cm=a("The "),ka=n("a"),pm=a("BigBirdForCausalLM"),hm=a(" forward method, overrides the "),yd=n("code"),fm=a("__call__"),gm=a(" special method."),um=l(),m(ho.$$.fragment),mm=l(),wd=n("p"),_m=a("Example:"),bm=l(),m(Yn.$$.fragment),Zc=l(),_t=n("h2"),fo=n("a"),Td=n("span"),m(Zn.$$.fragment),km=l(),$d=n("span"),Bm=a("BigBirdForMaskedLM"),ep=l(),xe=n("div"),m(es.$$.fragment),vm=l(),bt=n("p"),ym=a("BigBird Model with a "),xd=n("code"),wm=a("language modeling"),Tm=a(` head on top.
This model is a PyTorch `),ts=n("a"),$m=a("torch.nn.Module"),xm=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fm=l(),X=n("div"),m(os.$$.fragment),zm=l(),kt=n("p"),qm=a("The "),Ba=n("a"),Mm=a("BigBirdForMaskedLM"),Em=a(" forward method, overrides the "),Fd=n("code"),Pm=a("__call__"),jm=a(" special method."),Cm=l(),m(go.$$.fragment),Am=l(),zd=n("p"),Lm=a("Example:"),Im=l(),m(ns.$$.fragment),tp=l(),Bt=n("h2"),uo=n("a"),qd=n("span"),m(ss.$$.fragment),Nm=l(),Md=n("span"),Sm=a("BigBirdForSequenceClassification"),op=l(),ke=n("div"),m(rs.$$.fragment),Om=l(),Ed=n("p"),Dm=a(`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.`),Wm=l(),as=n("p"),Um=a("This model is a PyTorch "),is=n("a"),Qm=a("torch.nn.Module"),Hm=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Vm=l(),S=n("div"),m(ds.$$.fragment),Jm=l(),vt=n("p"),Rm=a("The "),va=n("a"),Gm=a("BigBirdForSequenceClassification"),Km=a(" forward method, overrides the "),Pd=n("code"),Xm=a("__call__"),Ym=a(" special method."),Zm=l(),m(mo.$$.fragment),e_=l(),jd=n("p"),t_=a("Example of single-label classification:"),o_=l(),m(ls.$$.fragment),n_=l(),Cd=n("p"),s_=a("Example of multi-label classification:"),r_=l(),m(cs.$$.fragment),np=l(),yt=n("h2"),_o=n("a"),Ad=n("span"),m(ps.$$.fragment),a_=l(),Ld=n("span"),i_=a("BigBirdForMultipleChoice"),sp=l(),Be=n("div"),m(hs.$$.fragment),d_=l(),Id=n("p"),l_=a(`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.`),c_=l(),fs=n("p"),p_=a("This model is a PyTorch "),gs=n("a"),h_=a("torch.nn.Module"),f_=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),g_=l(),Y=n("div"),m(us.$$.fragment),u_=l(),wt=n("p"),m_=a("The "),ya=n("a"),__=a("BigBirdForMultipleChoice"),b_=a(" forward method, overrides the "),Nd=n("code"),k_=a("__call__"),B_=a(" special method."),v_=l(),m(bo.$$.fragment),y_=l(),Sd=n("p"),w_=a("Example:"),T_=l(),m(ms.$$.fragment),rp=l(),Tt=n("h2"),ko=n("a"),Od=n("span"),m(_s.$$.fragment),$_=l(),Dd=n("span"),x_=a("BigBirdForTokenClassification"),ap=l(),ve=n("div"),m(bs.$$.fragment),F_=l(),Wd=n("p"),z_=a(`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.`),q_=l(),ks=n("p"),M_=a("This model is a PyTorch "),Bs=n("a"),E_=a("torch.nn.Module"),P_=a(` 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_=l(),Z=n("div"),m(vs.$$.fragment),C_=l(),$t=n("p"),A_=a("The "),wa=n("a"),L_=a("BigBirdForTokenClassification"),I_=a(" forward method, overrides the "),Ud=n("code"),N_=a("__call__"),S_=a(" special method."),O_=l(),m(Bo.$$.fragment),D_=l(),Qd=n("p"),W_=a("Example:"),U_=l(),m(ys.$$.fragment),ip=l(),xt=n("h2"),vo=n("a"),Hd=n("span"),m(ws.$$.fragment),Q_=l(),Vd=n("span"),H_=a("BigBirdForQuestionAnswering"),dp=l(),ye=n("div"),m(Ts.$$.fragment),V_=l(),Ft=n("p"),J_=a(`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 `),Jd=n("code"),R_=a("span start logits"),G_=a(" and "),Rd=n("code"),K_=a("span end logits"),X_=a(")."),Y_=l(),$s=n("p"),Z_=a("This model is a PyTorch "),xs=n("a"),eb=a("torch.nn.Module"),tb=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ob=l(),ee=n("div"),m(Fs.$$.fragment),nb=l(),zt=n("p"),sb=a("The "),Ta=n("a"),rb=a("BigBirdForQuestionAnswering"),ab=a(" forward method, overrides the "),Gd=n("code"),ib=a("__call__"),db=a(" special method."),lb=l(),m(yo.$$.fragment),cb=l(),Kd=n("p"),pb=a("Example:"),hb=l(),m(zs.$$.fragment),lp=l(),qt=n("h2"),wo=n("a"),Xd=n("span"),m(qs.$$.fragment),fb=l(),Yd=n("span"),gb=a("FlaxBigBirdModel"),cp=l(),P=n("div"),m(Ms.$$.fragment),ub=l(),Zd=n("p"),mb=a("The bare BigBird Model transformer outputting raw hidden-states without any specific head on top."),_b=l(),Es=n("p"),bb=a("This model inherits from "),$a=n("a"),kb=a("FlaxPreTrainedModel"),Bb=a(`. 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)`),vb=l(),Ps=n("p"),yb=a("This model is also a Flax Linen "),js=n("a"),wb=a("flax.linen.Module"),Tb=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$b=l(),el=n("p"),xb=a("Finally, this model supports inherent JAX features such as:"),Fb=l(),Fe=n("ul"),tl=n("li"),Cs=n("a"),zb=a("Just-In-Time (JIT) compilation"),qb=l(),ol=n("li"),As=n("a"),Mb=a("Automatic Differentiation"),Eb=l(),nl=n("li"),Ls=n("a"),Pb=a("Vectorization"),jb=l(),sl=n("li"),Is=n("a"),Cb=a("Parallelization"),Ab=l(),te=n("div"),m(Ns.$$.fragment),Lb=l(),Mt=n("p"),Ib=a("The "),rl=n("code"),Nb=a("FlaxBigBirdPreTrainedModel"),Sb=a("forward method, overrides the "),al=n("code"),Ob=a("__call__"),Db=a(" special method."),Wb=l(),m(To.$$.fragment),Ub=l(),il=n("p"),Qb=a("Example:"),Hb=l(),m(Ss.$$.fragment),pp=l(),Et=n("h2"),$o=n("a"),dl=n("span"),m(Os.$$.fragment),Vb=l(),ll=n("span"),Jb=a("FlaxBigBirdForPreTraining"),hp=l(),j=n("div"),m(Ds.$$.fragment),Rb=l(),Pt=n("p"),Gb=a("BigBird Model with two heads on top as done during the pretraining: a "),cl=n("code"),Kb=a("masked language modeling"),Xb=a(" head and a "),pl=n("code"),Yb=a("next sentence prediction (classification)"),Zb=a(" head."),ek=l(),Ws=n("p"),tk=a("This model inherits from "),xa=n("a"),ok=a("FlaxPreTrainedModel"),nk=a(`. 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)`),sk=l(),Us=n("p"),rk=a("This model is also a Flax Linen "),Qs=n("a"),ak=a("flax.linen.Module"),ik=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),dk=l(),hl=n("p"),lk=a("Finally, this model supports inherent JAX features such as:"),ck=l(),ze=n("ul"),fl=n("li"),Hs=n("a"),pk=a("Just-In-Time (JIT) compilation"),hk=l(),gl=n("li"),Vs=n("a"),fk=a("Automatic Differentiation"),gk=l(),ul=n("li"),Js=n("a"),uk=a("Vectorization"),mk=l(),ml=n("li"),Rs=n("a"),_k=a("Parallelization"),bk=l(),oe=n("div"),m(Gs.$$.fragment),kk=l(),jt=n("p"),Bk=a("The "),_l=n("code"),vk=a("FlaxBigBirdPreTrainedModel"),yk=a("forward method, overrides the "),bl=n("code"),wk=a("__call__"),Tk=a(" special method."),$k=l(),m(xo.$$.fragment),xk=l(),kl=n("p"),Fk=a("Example:"),zk=l(),m(Ks.$$.fragment),fp=l(),Ct=n("h2"),Fo=n("a"),Bl=n("span"),m(Xs.$$.fragment),qk=l(),vl=n("span"),Mk=a("FlaxBigBirdForMaskedLM"),gp=l(),C=n("div"),m(Ys.$$.fragment),Ek=l(),Zs=n("p"),Pk=a("BigBird Model with a "),yl=n("code"),jk=a("language modeling"),Ck=a(" head on top."),Ak=l(),er=n("p"),Lk=a("This model inherits from "),Fa=n("a"),Ik=a("FlaxPreTrainedModel"),Nk=a(`. 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)`),Sk=l(),tr=n("p"),Ok=a("This model is also a Flax Linen "),or=n("a"),Dk=a("flax.linen.Module"),Wk=a(`
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=l(),wl=n("p"),Qk=a("Finally, this model supports inherent JAX features such as:"),Hk=l(),qe=n("ul"),Tl=n("li"),nr=n("a"),Vk=a("Just-In-Time (JIT) compilation"),Jk=l(),$l=n("li"),sr=n("a"),Rk=a("Automatic Differentiation"),Gk=l(),xl=n("li"),rr=n("a"),Kk=a("Vectorization"),Xk=l(),Fl=n("li"),ar=n("a"),Yk=a("Parallelization"),Zk=l(),ne=n("div"),m(ir.$$.fragment),eB=l(),At=n("p"),tB=a("The "),zl=n("code"),oB=a("FlaxBigBirdPreTrainedModel"),nB=a("forward method, overrides the "),ql=n("code"),sB=a("__call__"),rB=a(" special method."),aB=l(),m(zo.$$.fragment),iB=l(),Ml=n("p"),dB=a("Example:"),lB=l(),m(dr.$$.fragment),up=l(),Lt=n("h2"),qo=n("a"),El=n("span"),m(lr.$$.fragment),cB=l(),Pl=n("span"),pB=a("FlaxBigBirdForSequenceClassification"),mp=l(),A=n("div"),m(cr.$$.fragment),hB=l(),jl=n("p"),fB=a(`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.`),gB=l(),pr=n("p"),uB=a("This model inherits from "),za=n("a"),mB=a("FlaxPreTrainedModel"),_B=a(`. 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)`),bB=l(),hr=n("p"),kB=a("This model is also a Flax Linen "),fr=n("a"),BB=a("flax.linen.Module"),vB=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),yB=l(),Cl=n("p"),wB=a("Finally, this model supports inherent JAX features such as:"),TB=l(),Me=n("ul"),Al=n("li"),gr=n("a"),$B=a("Just-In-Time (JIT) compilation"),xB=l(),Ll=n("li"),ur=n("a"),FB=a("Automatic Differentiation"),zB=l(),Il=n("li"),mr=n("a"),qB=a("Vectorization"),MB=l(),Nl=n("li"),_r=n("a"),EB=a("Parallelization"),PB=l(),se=n("div"),m(br.$$.fragment),jB=l(),It=n("p"),CB=a("The "),Sl=n("code"),AB=a("FlaxBigBirdPreTrainedModel"),LB=a("forward method, overrides the "),Ol=n("code"),IB=a("__call__"),NB=a(" special method."),SB=l(),m(Mo.$$.fragment),OB=l(),Dl=n("p"),DB=a("Example:"),WB=l(),m(kr.$$.fragment),_p=l(),Nt=n("h2"),Eo=n("a"),Wl=n("span"),m(Br.$$.fragment),UB=l(),Ul=n("span"),QB=a("FlaxBigBirdForMultipleChoice"),bp=l(),L=n("div"),m(vr.$$.fragment),HB=l(),Ql=n("p"),VB=a(`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.`),JB=l(),yr=n("p"),RB=a("This model inherits from "),qa=n("a"),GB=a("FlaxPreTrainedModel"),KB=a(`. 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)`),XB=l(),wr=n("p"),YB=a("This model is also a Flax Linen "),Tr=n("a"),ZB=a("flax.linen.Module"),ev=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tv=l(),Hl=n("p"),ov=a("Finally, this model supports inherent JAX features such as:"),nv=l(),Ee=n("ul"),Vl=n("li"),$r=n("a"),sv=a("Just-In-Time (JIT) compilation"),rv=l(),Jl=n("li"),xr=n("a"),av=a("Automatic Differentiation"),iv=l(),Rl=n("li"),Fr=n("a"),dv=a("Vectorization"),lv=l(),Gl=n("li"),zr=n("a"),cv=a("Parallelization"),pv=l(),re=n("div"),m(qr.$$.fragment),hv=l(),St=n("p"),fv=a("The "),Kl=n("code"),gv=a("FlaxBigBirdPreTrainedModel"),uv=a("forward method, overrides the "),Xl=n("code"),mv=a("__call__"),_v=a(" special method."),bv=l(),m(Po.$$.fragment),kv=l(),Yl=n("p"),Bv=a("Example:"),vv=l(),m(Mr.$$.fragment),kp=l(),Ot=n("h2"),jo=n("a"),Zl=n("span"),m(Er.$$.fragment),yv=l(),ec=n("span"),wv=a("FlaxBigBirdForTokenClassification"),Bp=l(),I=n("div"),m(Pr.$$.fragment),Tv=l(),tc=n("p"),$v=a(`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.`),xv=l(),jr=n("p"),Fv=a("This model inherits from "),Ma=n("a"),zv=a("FlaxPreTrainedModel"),qv=a(`. 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)`),Mv=l(),Cr=n("p"),Ev=a("This model is also a Flax Linen "),Ar=n("a"),Pv=a("flax.linen.Module"),jv=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Cv=l(),oc=n("p"),Av=a("Finally, this model supports inherent JAX features such as:"),Lv=l(),Pe=n("ul"),nc=n("li"),Lr=n("a"),Iv=a("Just-In-Time (JIT) compilation"),Nv=l(),sc=n("li"),Ir=n("a"),Sv=a("Automatic Differentiation"),Ov=l(),rc=n("li"),Nr=n("a"),Dv=a("Vectorization"),Wv=l(),ac=n("li"),Sr=n("a"),Uv=a("Parallelization"),Qv=l(),ae=n("div"),m(Or.$$.fragment),Hv=l(),Dt=n("p"),Vv=a("The "),ic=n("code"),Jv=a("FlaxBigBirdPreTrainedModel"),Rv=a("forward method, overrides the "),dc=n("code"),Gv=a("__call__"),Kv=a(" special method."),Xv=l(),m(Co.$$.fragment),Yv=l(),lc=n("p"),Zv=a("Example:"),e1=l(),m(Dr.$$.fragment),vp=l(),Wt=n("h2"),Ao=n("a"),cc=n("span"),m(Wr.$$.fragment),t1=l(),pc=n("span"),o1=a("FlaxBigBirdForQuestionAnswering"),yp=l(),N=n("div"),m(Ur.$$.fragment),n1=l(),Ut=n("p"),s1=a(`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 `),hc=n("code"),r1=a("span start logits"),a1=a(" and "),fc=n("code"),i1=a("span end logits"),d1=a(")."),l1=l(),Qr=n("p"),c1=a("This model inherits from "),Ea=n("a"),p1=a("FlaxPreTrainedModel"),h1=a(`. 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)`),f1=l(),Hr=n("p"),g1=a("This model is also a Flax Linen "),Vr=n("a"),u1=a("flax.linen.Module"),m1=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),_1=l(),gc=n("p"),b1=a("Finally, this model supports inherent JAX features such as:"),k1=l(),je=n("ul"),uc=n("li"),Jr=n("a"),B1=a("Just-In-Time (JIT) compilation"),v1=l(),mc=n("li"),Rr=n("a"),y1=a("Automatic Differentiation"),w1=l(),_c=n("li"),Gr=n("a"),T1=a("Vectorization"),$1=l(),bc=n("li"),Kr=n("a"),x1=a("Parallelization"),F1=l(),ie=n("div"),m(Xr.$$.fragment),z1=l(),Qt=n("p"),q1=a("The "),Pa=n("a"),M1=a("FlaxBigBirdForQuestionAnswering"),E1=a(" forward method, overrides the "),kc=n("code"),P1=a("__call__"),j1=a(" special method."),C1=l(),m(Lo.$$.fragment),A1=l(),Bc=n("p"),L1=a("Example:"),I1=l(),m(Yr.$$.fragment),this.h()},l(o){const h=U2('[data-svelte="svelte-1phssyn"]',document.head);p=s(h,"META",{name:!0,content:!0}),h.forEach(t),T=c(o),u=s(o,"H1",{class:!0});var Zr=r(u);w=s(Zr,"A",{id:!0,class:!0,href:!0});var vc=r(w);$=s(vc,"SPAN",{});var yc=r($);_(y.$$.fragment,yc),yc.forEach(t),vc.forEach(t),f=c(Zr),x=s(Zr,"SPAN",{});var wc=r(x);qh=i(wc,"BigBird"),wc.forEach(t),Zr.forEach(t),Pc=c(o),et=s(o,"H2",{class:!0});var ea=r(et);Ht=s(ea,"A",{id:!0,class:!0,href:!0});var Tc=r(Ht);ii=s(Tc,"SPAN",{});var $c=r(ii);_(Ko.$$.fragment,$c),$c.forEach(t),Tc.forEach(t),Mh=c(ea),di=s(ea,"SPAN",{});var xc=r(di);Eh=i(xc,"Overview"),xc.forEach(t),ea.forEach(t),jc=c(o),Vt=s(o,"P",{});var ta=r(Vt);Ph=i(ta,"The BigBird model was proposed in "),Xo=s(ta,"A",{href:!0,rel:!0});var Fc=r(Xo);jh=i(Fc,"Big Bird: Transformers for Longer Sequences"),Fc.forEach(t),Ch=i(ta,` 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.`),ta.forEach(t),Cc=c(o),oa=s(o,"P",{});var zc=r(oa);Ah=i(zc,"The abstract from the paper is the following:"),zc.forEach(t),Ac=c(o),na=s(o,"P",{});var qc=r(na);li=s(qc,"EM",{});var Mc=r(li);Lh=i(Mc,`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.`),Mc.forEach(t),qc.forEach(t),Lc=c(o),sa=s(o,"P",{});var Ec=r(sa);Ih=i(Ec,"Tips:"),Ec.forEach(t),Ic=c(o),U=s(o,"UL",{});var V=r(U);Yo=s(V,"LI",{});var Tp=r(Yo);Nh=i(Tp,"For an in-detail explanation on how BigBird\u2019s attention works, see "),Zo=s(Tp,"A",{href:!0,rel:!0});var U1=r(Zo);Sh=i(U1,"this blog post"),U1.forEach(t),Oh=i(Tp,"."),Tp.forEach(t),Dh=c(V),be=s(V,"LI",{});var Ie=r(be);Wh=i(Ie,"BigBird comes with 2 implementations: "),ci=s(Ie,"STRONG",{});var Q1=r(ci);Uh=i(Q1,"original_full"),Q1.forEach(t),Qh=i(Ie," & "),pi=s(Ie,"STRONG",{});var H1=r(pi);Hh=i(H1,"block_sparse"),H1.forEach(t),Vh=i(Ie,`. For the sequence length < 1024, using
`),hi=s(Ie,"STRONG",{});var V1=r(hi);Jh=i(V1,"original_full"),V1.forEach(t),Rh=i(Ie," is advised as there is no benefit in using "),fi=s(Ie,"STRONG",{});var J1=r(fi);Gh=i(J1,"block_sparse"),J1.forEach(t),Kh=i(Ie," attention."),Ie.forEach(t),Xh=c(V),gi=s(V,"LI",{});var R1=r(gi);Yh=i(R1,"The code currently uses window size of 3 blocks and 2 global blocks."),R1.forEach(t),Zh=c(V),ui=s(V,"LI",{});var G1=r(ui);ef=i(G1,"Sequence length must be divisible by block size."),G1.forEach(t),tf=c(V),en=s(V,"LI",{});var $p=r(en);of=i($p,"Current implementation supports only "),mi=s($p,"STRONG",{});var K1=r(mi);nf=i(K1,"ITC"),K1.forEach(t),sf=i($p,"."),$p.forEach(t),rf=c(V),ra=s(V,"LI",{});var N1=r(ra);af=i(N1,"Current implementation doesn\u2019t support "),_i=s(N1,"STRONG",{});var X1=r(_i);df=i(X1,"num_random_blocks = 0"),X1.forEach(t),N1.forEach(t),V.forEach(t),Nc=c(o),Ce=s(o,"P",{});var ja=r(Ce);lf=i(ja,"This model was contributed by "),tn=s(ja,"A",{href:!0,rel:!0});var Y1=r(tn);cf=i(Y1,"vasudevgupta"),Y1.forEach(t),pf=i(ja,`. The original code can be found
`),on=s(ja,"A",{href:!0,rel:!0});var Z1=r(on);hf=i(Z1,"here"),Z1.forEach(t),ff=i(ja,"."),ja.forEach(t),Sc=c(o),tt=s(o,"H2",{class:!0});var xp=r(tt);Jt=s(xp,"A",{id:!0,class:!0,href:!0});var ey=r(Jt);bi=s(ey,"SPAN",{});var ty=r(bi);_(nn.$$.fragment,ty),ty.forEach(t),ey.forEach(t),gf=c(xp),ki=s(xp,"SPAN",{});var oy=r(ki);uf=i(oy,"BigBirdConfig"),oy.forEach(t),xp.forEach(t),Oc=c(o),M=s(o,"DIV",{class:!0});var O=r(M);_(sn.$$.fragment,O),mf=c(O),ot=s(O,"P",{});var Ca=r(ot);_f=i(Ca,"This is the configuration class to store the configuration of a "),aa=s(Ca,"A",{href:!0});var ny=r(aa);bf=i(ny,"BigBirdModel"),ny.forEach(t),kf=i(Ca,`. 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
`),rn=s(Ca,"A",{href:!0,rel:!0});var sy=r(rn);Bf=i(sy,"google/bigbird-roberta-base"),sy.forEach(t),vf=i(Ca," architecture."),Ca.forEach(t),yf=c(O),nt=s(O,"P",{});var Aa=r(nt);wf=i(Aa,"Configuration objects inherit from "),ia=s(Aa,"A",{href:!0});var ry=r(ia);Tf=i(ry,"PretrainedConfig"),ry.forEach(t),$f=i(Aa,` and can be used to control the model outputs. Read the
documentation from `),da=s(Aa,"A",{href:!0});var ay=r(da);xf=i(ay,"PretrainedConfig"),ay.forEach(t),Ff=i(Aa," for more information."),Aa.forEach(t),zf=c(O),Bi=s(O,"P",{});var iy=r(Bi);qf=i(iy,"Example:"),iy.forEach(t),Mf=c(O),_(an.$$.fragment,O),Ef=c(O),vi=s(O,"BLOCKQUOTE",{});var dy=r(vi);yi=s(dy,"BLOCKQUOTE",{});var ly=r(yi);wi=s(ly,"BLOCKQUOTE",{});var cy=r(wi);Ti=s(cy,"P",{});var py=r(Ti);Pf=i(py,"from transformers import BigBirdModel, BigBirdConfig"),py.forEach(t),cy.forEach(t),ly.forEach(t),dy.forEach(t),jf=c(O),$i=s(O,"BLOCKQUOTE",{});var hy=r($i);xi=s(hy,"BLOCKQUOTE",{});var fy=r(xi);dn=s(fy,"BLOCKQUOTE",{});var Fp=r(dn);Rt=s(Fp,"H1",{class:!0});var zp=r(Rt);Gt=s(zp,"A",{id:!0,class:!0,href:!0});var gy=r(Gt);Fi=s(gy,"SPAN",{});var uy=r(Fi);_(ln.$$.fragment,uy),uy.forEach(t),gy.forEach(t),Cf=c(zp),zi=s(zp,"SPAN",{});var my=r(zi);Af=i(my,"Initializing a BigBird google/bigbird-roberta-base style configuration >>> configuration ="),my.forEach(t),zp.forEach(t),Lf=c(Fp),qi=s(Fp,"P",{});var _y=r(qi);If=i(_y,"BigBirdConfig()"),_y.forEach(t),Fp.forEach(t),fy.forEach(t),hy.forEach(t),Nf=c(O),Mi=s(O,"BLOCKQUOTE",{});var by=r(Mi);Ei=s(by,"BLOCKQUOTE",{});var ky=r(Ei);cn=s(ky,"BLOCKQUOTE",{});var qp=r(cn);Kt=s(qp,"H1",{class:!0});var Mp=r(Kt);Xt=s(Mp,"A",{id:!0,class:!0,href:!0});var By=r(Xt);Pi=s(By,"SPAN",{});var vy=r(Pi);_(pn.$$.fragment,vy),vy.forEach(t),By.forEach(t),Sf=c(Mp),ji=s(Mp,"SPAN",{});var yy=r(ji);Of=i(yy,"Initializing a model from the google/bigbird-roberta-base style configuration >>> model ="),yy.forEach(t),Mp.forEach(t),Df=c(qp),Ci=s(qp,"P",{});var wy=r(Ci);Wf=i(wy,"BigBirdModel(configuration)"),wy.forEach(t),qp.forEach(t),ky.forEach(t),by.forEach(t),Uf=c(O),Ai=s(O,"BLOCKQUOTE",{});var Ty=r(Ai);Li=s(Ty,"BLOCKQUOTE",{});var $y=r(Li);Ii=s($y,"BLOCKQUOTE",{});var xy=r(Ii);Yt=s(xy,"H1",{class:!0});var Ep=r(Yt);Zt=s(Ep,"A",{id:!0,class:!0,href:!0});var Fy=r(Zt);Ni=s(Fy,"SPAN",{});var zy=r(Ni);_(hn.$$.fragment,zy),zy.forEach(t),Fy.forEach(t),Qf=c(Ep),Si=s(Ep,"SPAN",{});var qy=r(Si);Hf=i(qy,"Accessing the model configuration >>> configuration = model.config"),qy.forEach(t),Ep.forEach(t),xy.forEach(t),$y.forEach(t),Ty.forEach(t),O.forEach(t),Dc=c(o),st=s(o,"H2",{class:!0});var Pp=r(st);eo=s(Pp,"A",{id:!0,class:!0,href:!0});var My=r(eo);Oi=s(My,"SPAN",{});var Ey=r(Oi);_(fn.$$.fragment,Ey),Ey.forEach(t),My.forEach(t),Vf=c(Pp),Di=s(Pp,"SPAN",{});var Py=r(Di);Jf=i(Py,"BigBirdTokenizer"),Py.forEach(t),Pp.forEach(t),Wc=c(o),E=s(o,"DIV",{class:!0});var de=r(E);_(gn.$$.fragment,de),Rf=c(de),un=s(de,"P",{});var jp=r(un);Gf=i(jp,"Construct a BigBird tokenizer. Based on "),mn=s(jp,"A",{href:!0,rel:!0});var jy=r(mn);Kf=i(jy,"SentencePiece"),jy.forEach(t),Xf=i(jp,"."),jp.forEach(t),Yf=c(de),_n=s(de,"P",{});var Cp=r(_n);Zf=i(Cp,"This tokenizer inherits from "),la=s(Cp,"A",{href:!0});var Cy=r(la);eg=i(Cy,"PreTrainedTokenizer"),Cy.forEach(t),tg=i(Cp,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Cp.forEach(t),og=c(de),Ae=s(de,"DIV",{class:!0});var La=r(Ae);_(bn.$$.fragment,La),ng=c(La),Wi=s(La,"P",{});var Ay=r(Wi);sg=i(Ay,`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:`),Ay.forEach(t),rg=c(La),kn=s(La,"UL",{});var Ap=r(kn);ca=s(Ap,"LI",{});var S1=r(ca);ag=i(S1,"single sequence: "),Ui=s(S1,"CODE",{});var Ly=r(Ui);ig=i(Ly,"[CLS] X [SEP]"),Ly.forEach(t),S1.forEach(t),dg=c(Ap),pa=s(Ap,"LI",{});var O1=r(pa);lg=i(O1,"pair of sequences: "),Qi=s(O1,"CODE",{});var Iy=r(Qi);cg=i(Iy,"[CLS] A [SEP] B [SEP]"),Iy.forEach(t),O1.forEach(t),Ap.forEach(t),La.forEach(t),pg=c(de),to=s(de,"DIV",{class:!0});var Lp=r(to);_(Bn.$$.fragment,Lp),hg=c(Lp),vn=s(Lp,"P",{});var Ip=r(vn);fg=i(Ip,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Hi=s(Ip,"CODE",{});var Ny=r(Hi);gg=i(Ny,"prepare_for_model"),Ny.forEach(t),ug=i(Ip," method."),Ip.forEach(t),Lp.forEach(t),mg=c(de),oo=s(de,"DIV",{class:!0});var Np=r(oo);_(yn.$$.fragment,Np),_g=c(Np),rt=s(Np,"P",{});var Ia=r(rt);bg=i(Ia,`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 `),Vi=s(Ia,"CODE",{});var Sy=r(Vi);kg=i(Sy,"token_ids_1"),Sy.forEach(t),Bg=i(Ia," is "),Ji=s(Ia,"CODE",{});var Oy=r(Ji);vg=i(Oy,"None"),Oy.forEach(t),yg=i(Ia,", this method only returns the first portion of the mask (0s)."),Ia.forEach(t),Np.forEach(t),wg=c(de),ha=s(de,"DIV",{class:!0});var Dy=r(ha);_(wn.$$.fragment,Dy),Dy.forEach(t),de.forEach(t),Uc=c(o),at=s(o,"H2",{class:!0});var Sp=r(at);no=s(Sp,"A",{id:!0,class:!0,href:!0});var Wy=r(no);Ri=s(Wy,"SPAN",{});var Uy=r(Ri);_(Tn.$$.fragment,Uy),Uy.forEach(t),Wy.forEach(t),Tg=c(Sp),Gi=s(Sp,"SPAN",{});var Qy=r(Gi);$g=i(Qy,"BigBirdTokenizerFast"),Qy.forEach(t),Sp.forEach(t),Qc=c(o),Q=s(o,"DIV",{class:!0});var Ne=r(Q);_($n.$$.fragment,Ne),xg=c(Ne),Te=s(Ne,"P",{});var Io=r(Te);Fg=i(Io,"Construct a \u201Cfast\u201D BigBird tokenizer (backed by HuggingFace\u2019s "),Ki=s(Io,"EM",{});var Hy=r(Ki);zg=i(Hy,"tokenizers"),Hy.forEach(t),qg=i(Io,` library). Based on
`),xn=s(Io,"A",{href:!0,rel:!0});var Vy=r(xn);Mg=i(Vy,"Unigram"),Vy.forEach(t),Eg=i(Io,`. This
tokenizer inherits from `),fa=s(Io,"A",{href:!0});var Jy=r(fa);Pg=i(Jy,"PreTrainedTokenizerFast"),Jy.forEach(t),jg=i(Io,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Io.forEach(t),Cg=c(Ne),Le=s(Ne,"DIV",{class:!0});var Na=r(Le);_(Fn.$$.fragment,Na),Ag=c(Na),Xi=s(Na,"P",{});var Ry=r(Xi);Lg=i(Ry,`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:`),Ry.forEach(t),Ig=c(Na),zn=s(Na,"UL",{});var Op=r(zn);ga=s(Op,"LI",{});var D1=r(ga);Ng=i(D1,"single sequence: "),Yi=s(D1,"CODE",{});var Gy=r(Yi);Sg=i(Gy,"[CLS] X [SEP]"),Gy.forEach(t),D1.forEach(t),Og=c(Op),ua=s(Op,"LI",{});var W1=r(ua);Dg=i(W1,"pair of sequences: "),Zi=s(W1,"CODE",{});var Ky=r(Zi);Wg=i(Ky,"[CLS] A [SEP] B [SEP]"),Ky.forEach(t),W1.forEach(t),Op.forEach(t),Na.forEach(t),Ug=c(Ne),we=s(Ne,"DIV",{class:!0});var No=r(we);_(qn.$$.fragment,No),Qg=c(No),ed=s(No,"P",{});var Xy=r(ed);Hg=i(Xy,`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT
sequence pair mask has the following format:`),Xy.forEach(t),Vg=c(No),_(Mn.$$.fragment,No),Jg=c(No),td=s(No,"P",{});var Yy=r(td);Rg=i(Yy,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),Yy.forEach(t),No.forEach(t),Gg=c(Ne),so=s(Ne,"DIV",{class:!0});var Dp=r(so);_(En.$$.fragment,Dp),Kg=c(Dp),Pn=s(Dp,"P",{});var Wp=r(Pn);Xg=i(Wp,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),od=s(Wp,"CODE",{});var Zy=r(od);Yg=i(Zy,"prepare_for_model"),Zy.forEach(t),Zg=i(Wp," method."),Wp.forEach(t),Dp.forEach(t),Ne.forEach(t),Hc=c(o),it=s(o,"H2",{class:!0});var Up=r(it);ro=s(Up,"A",{id:!0,class:!0,href:!0});var ew=r(ro);nd=s(ew,"SPAN",{});var tw=r(nd);_(jn.$$.fragment,tw),tw.forEach(t),ew.forEach(t),eu=c(Up),sd=s(Up,"SPAN",{});var ow=r(sd);tu=i(ow,"BigBird specific outputs"),ow.forEach(t),Up.forEach(t),Vc=c(o),dt=s(o,"DIV",{class:!0});var Qp=r(dt);_(Cn.$$.fragment,Qp),ou=c(Qp),An=s(Qp,"P",{});var Hp=r(An);nu=i(Hp,"Output type of "),ma=s(Hp,"A",{href:!0});var nw=r(ma);su=i(nw,"BigBirdForPreTraining"),nw.forEach(t),ru=i(Hp,"."),Hp.forEach(t),Qp.forEach(t),Jc=c(o),lt=s(o,"H2",{class:!0});var Vp=r(lt);ao=s(Vp,"A",{id:!0,class:!0,href:!0});var sw=r(ao);rd=s(sw,"SPAN",{});var rw=r(rd);_(Ln.$$.fragment,rw),rw.forEach(t),sw.forEach(t),au=c(Vp),ad=s(Vp,"SPAN",{});var aw=r(ad);iu=i(aw,"BigBirdModel"),aw.forEach(t),Vp.forEach(t),Rc=c(o),H=s(o,"DIV",{class:!0});var Se=r(H);_(In.$$.fragment,Se),du=c(Se),Nn=s(Se,"P",{});var Jp=r(Nn);lu=i(Jp,`The bare BigBird Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Sn=s(Jp,"A",{href:!0,rel:!0});var iw=r(Sn);cu=i(iw,"torch.nn.Module"),iw.forEach(t),pu=i(Jp,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Jp.forEach(t),hu=c(Se),On=s(Se,"P",{});var Rp=r(On);fu=i(Rp,`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 `),Dn=s(Rp,"A",{href:!0,rel:!0});var dw=r(Dn);gu=i(dw,`Attention is
all you need`),dw.forEach(t),uu=i(Rp,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Rp.forEach(t),mu=c(Se),W=s(Se,"P",{});var le=r(W);_u=i(le,"To behave as an decoder the model needs to be initialized with the "),id=s(le,"CODE",{});var lw=r(id);bu=i(lw,"is_decoder"),lw.forEach(t),ku=i(le,` argument of the configuration set
to `),dd=s(le,"CODE",{});var cw=r(dd);Bu=i(cw,"True"),cw.forEach(t),vu=i(le,". To be used in a Seq2Seq model, the model needs to initialized with both "),ld=s(le,"CODE",{});var pw=r(ld);yu=i(pw,"is_decoder"),pw.forEach(t),wu=i(le,` argument and
`),cd=s(le,"CODE",{});var hw=r(cd);Tu=i(hw,"add_cross_attention"),hw.forEach(t),$u=i(le," set to "),pd=s(le,"CODE",{});var fw=r(pd);xu=i(fw,"True"),fw.forEach(t),Fu=i(le,"; an "),hd=s(le,"CODE",{});var gw=r(hd);zu=i(gw,"encoder_hidden_states"),gw.forEach(t),qu=i(le," is then expected as an input to the forward pass."),le.forEach(t),Mu=c(Se),R=s(Se,"DIV",{class:!0});var Oe=r(R);_(Wn.$$.fragment,Oe),Eu=c(Oe),ct=s(Oe,"P",{});var Sa=r(ct);Pu=i(Sa,"The "),_a=s(Sa,"A",{href:!0});var uw=r(_a);ju=i(uw,"BigBirdModel"),uw.forEach(t),Cu=i(Sa," forward method, overrides the "),fd=s(Sa,"CODE",{});var mw=r(fd);Au=i(mw,"__call__"),mw.forEach(t),Lu=i(Sa," special method."),Sa.forEach(t),Iu=c(Oe),_(io.$$.fragment,Oe),Nu=c(Oe),gd=s(Oe,"P",{});var _w=r(gd);Su=i(_w,"Example:"),_w.forEach(t),Ou=c(Oe),_(Un.$$.fragment,Oe),Oe.forEach(t),Se.forEach(t),Gc=c(o),pt=s(o,"H2",{class:!0});var Gp=r(pt);lo=s(Gp,"A",{id:!0,class:!0,href:!0});var bw=r(lo);ud=s(bw,"SPAN",{});var kw=r(ud);_(Qn.$$.fragment,kw),kw.forEach(t),bw.forEach(t),Du=c(Gp),md=s(Gp,"SPAN",{});var Bw=r(md);Wu=i(Bw,"BigBirdForPreTraining"),Bw.forEach(t),Gp.forEach(t),Kc=c(o),ht=s(o,"DIV",{class:!0});var Kp=r(ht);_(Hn.$$.fragment,Kp),Uu=c(Kp),G=s(Kp,"DIV",{class:!0});var De=r(G);_(Vn.$$.fragment,De),Qu=c(De),ft=s(De,"P",{});var Oa=r(ft);Hu=i(Oa,"The "),ba=s(Oa,"A",{href:!0});var vw=r(ba);Vu=i(vw,"BigBirdForPreTraining"),vw.forEach(t),Ju=i(Oa," forward method, overrides the "),_d=s(Oa,"CODE",{});var yw=r(_d);Ru=i(yw,"__call__"),yw.forEach(t),Gu=i(Oa," special method."),Oa.forEach(t),Ku=c(De),_(co.$$.fragment,De),Xu=c(De),bd=s(De,"P",{});var ww=r(bd);Yu=i(ww,"Example:"),ww.forEach(t),Zu=c(De),_(Jn.$$.fragment,De),De.forEach(t),Kp.forEach(t),Xc=c(o),gt=s(o,"H2",{class:!0});var Xp=r(gt);po=s(Xp,"A",{id:!0,class:!0,href:!0});var Tw=r(po);kd=s(Tw,"SPAN",{});var $w=r(kd);_(Rn.$$.fragment,$w),$w.forEach(t),Tw.forEach(t),em=c(Xp),Bd=s(Xp,"SPAN",{});var xw=r(Bd);tm=i(xw,"BigBirdForCausalLM"),xw.forEach(t),Xp.forEach(t),Yc=c(o),$e=s(o,"DIV",{class:!0});var Da=r($e);_(Gn.$$.fragment,Da),om=c(Da),ut=s(Da,"P",{});var Wa=r(ut);nm=i(Wa,"BigBird Model with a "),vd=s(Wa,"CODE",{});var Fw=r(vd);sm=i(Fw,"language modeling"),Fw.forEach(t),rm=i(Wa,` head on top for CLM fine-tuning.
This model is a PyTorch `),Kn=s(Wa,"A",{href:!0,rel:!0});var zw=r(Kn);am=i(zw,"torch.nn.Module"),zw.forEach(t),im=i(Wa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wa.forEach(t),dm=c(Da),K=s(Da,"DIV",{class:!0});var We=r(K);_(Xn.$$.fragment,We),lm=c(We),mt=s(We,"P",{});var Ua=r(mt);cm=i(Ua,"The "),ka=s(Ua,"A",{href:!0});var qw=r(ka);pm=i(qw,"BigBirdForCausalLM"),qw.forEach(t),hm=i(Ua," forward method, overrides the "),yd=s(Ua,"CODE",{});var Mw=r(yd);fm=i(Mw,"__call__"),Mw.forEach(t),gm=i(Ua," special method."),Ua.forEach(t),um=c(We),_(ho.$$.fragment,We),mm=c(We),wd=s(We,"P",{});var Ew=r(wd);_m=i(Ew,"Example:"),Ew.forEach(t),bm=c(We),_(Yn.$$.fragment,We),We.forEach(t),Da.forEach(t),Zc=c(o),_t=s(o,"H2",{class:!0});var Yp=r(_t);fo=s(Yp,"A",{id:!0,class:!0,href:!0});var Pw=r(fo);Td=s(Pw,"SPAN",{});var jw=r(Td);_(Zn.$$.fragment,jw),jw.forEach(t),Pw.forEach(t),km=c(Yp),$d=s(Yp,"SPAN",{});var Cw=r($d);Bm=i(Cw,"BigBirdForMaskedLM"),Cw.forEach(t),Yp.forEach(t),ep=c(o),xe=s(o,"DIV",{class:!0});var Qa=r(xe);_(es.$$.fragment,Qa),vm=c(Qa),bt=s(Qa,"P",{});var Ha=r(bt);ym=i(Ha,"BigBird Model with a "),xd=s(Ha,"CODE",{});var Aw=r(xd);wm=i(Aw,"language modeling"),Aw.forEach(t),Tm=i(Ha,` head on top.
This model is a PyTorch `),ts=s(Ha,"A",{href:!0,rel:!0});var Lw=r(ts);$m=i(Lw,"torch.nn.Module"),Lw.forEach(t),xm=i(Ha,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ha.forEach(t),Fm=c(Qa),X=s(Qa,"DIV",{class:!0});var Ue=r(X);_(os.$$.fragment,Ue),zm=c(Ue),kt=s(Ue,"P",{});var Va=r(kt);qm=i(Va,"The "),Ba=s(Va,"A",{href:!0});var Iw=r(Ba);Mm=i(Iw,"BigBirdForMaskedLM"),Iw.forEach(t),Em=i(Va," forward method, overrides the "),Fd=s(Va,"CODE",{});var Nw=r(Fd);Pm=i(Nw,"__call__"),Nw.forEach(t),jm=i(Va," special method."),Va.forEach(t),Cm=c(Ue),_(go.$$.fragment,Ue),Am=c(Ue),zd=s(Ue,"P",{});var Sw=r(zd);Lm=i(Sw,"Example:"),Sw.forEach(t),Im=c(Ue),_(ns.$$.fragment,Ue),Ue.forEach(t),Qa.forEach(t),tp=c(o),Bt=s(o,"H2",{class:!0});var Zp=r(Bt);uo=s(Zp,"A",{id:!0,class:!0,href:!0});var Ow=r(uo);qd=s(Ow,"SPAN",{});var Dw=r(qd);_(ss.$$.fragment,Dw),Dw.forEach(t),Ow.forEach(t),Nm=c(Zp),Md=s(Zp,"SPAN",{});var Ww=r(Md);Sm=i(Ww,"BigBirdForSequenceClassification"),Ww.forEach(t),Zp.forEach(t),op=c(o),ke=s(o,"DIV",{class:!0});var So=r(ke);_(rs.$$.fragment,So),Om=c(So),Ed=s(So,"P",{});var Uw=r(Ed);Dm=i(Uw,`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.`),Uw.forEach(t),Wm=c(So),as=s(So,"P",{});var eh=r(as);Um=i(eh,"This model is a PyTorch "),is=s(eh,"A",{href:!0,rel:!0});var Qw=r(is);Qm=i(Qw,"torch.nn.Module"),Qw.forEach(t),Hm=i(eh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),eh.forEach(t),Vm=c(So),S=s(So,"DIV",{class:!0});var ce=r(S);_(ds.$$.fragment,ce),Jm=c(ce),vt=s(ce,"P",{});var Ja=r(vt);Rm=i(Ja,"The "),va=s(Ja,"A",{href:!0});var Hw=r(va);Gm=i(Hw,"BigBirdForSequenceClassification"),Hw.forEach(t),Km=i(Ja," forward method, overrides the "),Pd=s(Ja,"CODE",{});var Vw=r(Pd);Xm=i(Vw,"__call__"),Vw.forEach(t),Ym=i(Ja," special method."),Ja.forEach(t),Zm=c(ce),_(mo.$$.fragment,ce),e_=c(ce),jd=s(ce,"P",{});var Jw=r(jd);t_=i(Jw,"Example of single-label classification:"),Jw.forEach(t),o_=c(ce),_(ls.$$.fragment,ce),n_=c(ce),Cd=s(ce,"P",{});var Rw=r(Cd);s_=i(Rw,"Example of multi-label classification:"),Rw.forEach(t),r_=c(ce),_(cs.$$.fragment,ce),ce.forEach(t),So.forEach(t),np=c(o),yt=s(o,"H2",{class:!0});var th=r(yt);_o=s(th,"A",{id:!0,class:!0,href:!0});var Gw=r(_o);Ad=s(Gw,"SPAN",{});var Kw=r(Ad);_(ps.$$.fragment,Kw),Kw.forEach(t),Gw.forEach(t),a_=c(th),Ld=s(th,"SPAN",{});var Xw=r(Ld);i_=i(Xw,"BigBirdForMultipleChoice"),Xw.forEach(t),th.forEach(t),sp=c(o),Be=s(o,"DIV",{class:!0});var Oo=r(Be);_(hs.$$.fragment,Oo),d_=c(Oo),Id=s(Oo,"P",{});var Yw=r(Id);l_=i(Yw,`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.`),Yw.forEach(t),c_=c(Oo),fs=s(Oo,"P",{});var oh=r(fs);p_=i(oh,"This model is a PyTorch "),gs=s(oh,"A",{href:!0,rel:!0});var Zw=r(gs);h_=i(Zw,"torch.nn.Module"),Zw.forEach(t),f_=i(oh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),oh.forEach(t),g_=c(Oo),Y=s(Oo,"DIV",{class:!0});var Qe=r(Y);_(us.$$.fragment,Qe),u_=c(Qe),wt=s(Qe,"P",{});var Ra=r(wt);m_=i(Ra,"The "),ya=s(Ra,"A",{href:!0});var eT=r(ya);__=i(eT,"BigBirdForMultipleChoice"),eT.forEach(t),b_=i(Ra," forward method, overrides the "),Nd=s(Ra,"CODE",{});var tT=r(Nd);k_=i(tT,"__call__"),tT.forEach(t),B_=i(Ra," special method."),Ra.forEach(t),v_=c(Qe),_(bo.$$.fragment,Qe),y_=c(Qe),Sd=s(Qe,"P",{});var oT=r(Sd);w_=i(oT,"Example:"),oT.forEach(t),T_=c(Qe),_(ms.$$.fragment,Qe),Qe.forEach(t),Oo.forEach(t),rp=c(o),Tt=s(o,"H2",{class:!0});var nh=r(Tt);ko=s(nh,"A",{id:!0,class:!0,href:!0});var nT=r(ko);Od=s(nT,"SPAN",{});var sT=r(Od);_(_s.$$.fragment,sT),sT.forEach(t),nT.forEach(t),$_=c(nh),Dd=s(nh,"SPAN",{});var rT=r(Dd);x_=i(rT,"BigBirdForTokenClassification"),rT.forEach(t),nh.forEach(t),ap=c(o),ve=s(o,"DIV",{class:!0});var Do=r(ve);_(bs.$$.fragment,Do),F_=c(Do),Wd=s(Do,"P",{});var aT=r(Wd);z_=i(aT,`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.`),aT.forEach(t),q_=c(Do),ks=s(Do,"P",{});var sh=r(ks);M_=i(sh,"This model is a PyTorch "),Bs=s(sh,"A",{href:!0,rel:!0});var iT=r(Bs);E_=i(iT,"torch.nn.Module"),iT.forEach(t),P_=i(sh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sh.forEach(t),j_=c(Do),Z=s(Do,"DIV",{class:!0});var He=r(Z);_(vs.$$.fragment,He),C_=c(He),$t=s(He,"P",{});var Ga=r($t);A_=i(Ga,"The "),wa=s(Ga,"A",{href:!0});var dT=r(wa);L_=i(dT,"BigBirdForTokenClassification"),dT.forEach(t),I_=i(Ga," forward method, overrides the "),Ud=s(Ga,"CODE",{});var lT=r(Ud);N_=i(lT,"__call__"),lT.forEach(t),S_=i(Ga," special method."),Ga.forEach(t),O_=c(He),_(Bo.$$.fragment,He),D_=c(He),Qd=s(He,"P",{});var cT=r(Qd);W_=i(cT,"Example:"),cT.forEach(t),U_=c(He),_(ys.$$.fragment,He),He.forEach(t),Do.forEach(t),ip=c(o),xt=s(o,"H2",{class:!0});var rh=r(xt);vo=s(rh,"A",{id:!0,class:!0,href:!0});var pT=r(vo);Hd=s(pT,"SPAN",{});var hT=r(Hd);_(ws.$$.fragment,hT),hT.forEach(t),pT.forEach(t),Q_=c(rh),Vd=s(rh,"SPAN",{});var fT=r(Vd);H_=i(fT,"BigBirdForQuestionAnswering"),fT.forEach(t),rh.forEach(t),dp=c(o),ye=s(o,"DIV",{class:!0});var Wo=r(ye);_(Ts.$$.fragment,Wo),V_=c(Wo),Ft=s(Wo,"P",{});var Ka=r(Ft);J_=i(Ka,`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 `),Jd=s(Ka,"CODE",{});var gT=r(Jd);R_=i(gT,"span start logits"),gT.forEach(t),G_=i(Ka," and "),Rd=s(Ka,"CODE",{});var uT=r(Rd);K_=i(uT,"span end logits"),uT.forEach(t),X_=i(Ka,")."),Ka.forEach(t),Y_=c(Wo),$s=s(Wo,"P",{});var ah=r($s);Z_=i(ah,"This model is a PyTorch "),xs=s(ah,"A",{href:!0,rel:!0});var mT=r(xs);eb=i(mT,"torch.nn.Module"),mT.forEach(t),tb=i(ah,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ah.forEach(t),ob=c(Wo),ee=s(Wo,"DIV",{class:!0});var Ve=r(ee);_(Fs.$$.fragment,Ve),nb=c(Ve),zt=s(Ve,"P",{});var Xa=r(zt);sb=i(Xa,"The "),Ta=s(Xa,"A",{href:!0});var _T=r(Ta);rb=i(_T,"BigBirdForQuestionAnswering"),_T.forEach(t),ab=i(Xa," forward method, overrides the "),Gd=s(Xa,"CODE",{});var bT=r(Gd);ib=i(bT,"__call__"),bT.forEach(t),db=i(Xa," special method."),Xa.forEach(t),lb=c(Ve),_(yo.$$.fragment,Ve),cb=c(Ve),Kd=s(Ve,"P",{});var kT=r(Kd);pb=i(kT,"Example:"),kT.forEach(t),hb=c(Ve),_(zs.$$.fragment,Ve),Ve.forEach(t),Wo.forEach(t),lp=c(o),qt=s(o,"H2",{class:!0});var ih=r(qt);wo=s(ih,"A",{id:!0,class:!0,href:!0});var BT=r(wo);Xd=s(BT,"SPAN",{});var vT=r(Xd);_(qs.$$.fragment,vT),vT.forEach(t),BT.forEach(t),fb=c(ih),Yd=s(ih,"SPAN",{});var yT=r(Yd);gb=i(yT,"FlaxBigBirdModel"),yT.forEach(t),ih.forEach(t),cp=c(o),P=s(o,"DIV",{class:!0});var pe=r(P);_(Ms.$$.fragment,pe),ub=c(pe),Zd=s(pe,"P",{});var wT=r(Zd);mb=i(wT,"The bare BigBird Model transformer outputting raw hidden-states without any specific head on top."),wT.forEach(t),_b=c(pe),Es=s(pe,"P",{});var dh=r(Es);bb=i(dh,"This model inherits from "),$a=s(dh,"A",{href:!0});var TT=r($a);kb=i(TT,"FlaxPreTrainedModel"),TT.forEach(t),Bb=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),vb=c(pe),Ps=s(pe,"P",{});var lh=r(Ps);yb=i(lh,"This model is also a Flax Linen "),js=s(lh,"A",{href:!0,rel:!0});var $T=r(js);wb=i($T,"flax.linen.Module"),$T.forEach(t),Tb=i(lh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),lh.forEach(t),$b=c(pe),el=s(pe,"P",{});var xT=r(el);xb=i(xT,"Finally, this model supports inherent JAX features such as:"),xT.forEach(t),Fb=c(pe),Fe=s(pe,"UL",{});var Uo=r(Fe);tl=s(Uo,"LI",{});var FT=r(tl);Cs=s(FT,"A",{href:!0,rel:!0});var zT=r(Cs);zb=i(zT,"Just-In-Time (JIT) compilation"),zT.forEach(t),FT.forEach(t),qb=c(Uo),ol=s(Uo,"LI",{});var qT=r(ol);As=s(qT,"A",{href:!0,rel:!0});var MT=r(As);Mb=i(MT,"Automatic Differentiation"),MT.forEach(t),qT.forEach(t),Eb=c(Uo),nl=s(Uo,"LI",{});var ET=r(nl);Ls=s(ET,"A",{href:!0,rel:!0});var PT=r(Ls);Pb=i(PT,"Vectorization"),PT.forEach(t),ET.forEach(t),jb=c(Uo),sl=s(Uo,"LI",{});var jT=r(sl);Is=s(jT,"A",{href:!0,rel:!0});var CT=r(Is);Cb=i(CT,"Parallelization"),CT.forEach(t),jT.forEach(t),Uo.forEach(t),Ab=c(pe),te=s(pe,"DIV",{class:!0});var Je=r(te);_(Ns.$$.fragment,Je),Lb=c(Je),Mt=s(Je,"P",{});var Ya=r(Mt);Ib=i(Ya,"The "),rl=s(Ya,"CODE",{});var AT=r(rl);Nb=i(AT,"FlaxBigBirdPreTrainedModel"),AT.forEach(t),Sb=i(Ya,"forward method, overrides the "),al=s(Ya,"CODE",{});var LT=r(al);Ob=i(LT,"__call__"),LT.forEach(t),Db=i(Ya," special method."),Ya.forEach(t),Wb=c(Je),_(To.$$.fragment,Je),Ub=c(Je),il=s(Je,"P",{});var IT=r(il);Qb=i(IT,"Example:"),IT.forEach(t),Hb=c(Je),_(Ss.$$.fragment,Je),Je.forEach(t),pe.forEach(t),pp=c(o),Et=s(o,"H2",{class:!0});var ch=r(Et);$o=s(ch,"A",{id:!0,class:!0,href:!0});var NT=r($o);dl=s(NT,"SPAN",{});var ST=r(dl);_(Os.$$.fragment,ST),ST.forEach(t),NT.forEach(t),Vb=c(ch),ll=s(ch,"SPAN",{});var OT=r(ll);Jb=i(OT,"FlaxBigBirdForPreTraining"),OT.forEach(t),ch.forEach(t),hp=c(o),j=s(o,"DIV",{class:!0});var he=r(j);_(Ds.$$.fragment,he),Rb=c(he),Pt=s(he,"P",{});var Za=r(Pt);Gb=i(Za,"BigBird Model with two heads on top as done during the pretraining: a "),cl=s(Za,"CODE",{});var DT=r(cl);Kb=i(DT,"masked language modeling"),DT.forEach(t),Xb=i(Za," head and a "),pl=s(Za,"CODE",{});var WT=r(pl);Yb=i(WT,"next sentence prediction (classification)"),WT.forEach(t),Zb=i(Za," head."),Za.forEach(t),ek=c(he),Ws=s(he,"P",{});var ph=r(Ws);tk=i(ph,"This model inherits from "),xa=s(ph,"A",{href:!0});var UT=r(xa);ok=i(UT,"FlaxPreTrainedModel"),UT.forEach(t),nk=i(ph,`. 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)`),ph.forEach(t),sk=c(he),Us=s(he,"P",{});var hh=r(Us);rk=i(hh,"This model is also a Flax Linen "),Qs=s(hh,"A",{href:!0,rel:!0});var QT=r(Qs);ak=i(QT,"flax.linen.Module"),QT.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),dk=c(he),hl=s(he,"P",{});var HT=r(hl);lk=i(HT,"Finally, this model supports inherent JAX features such as:"),HT.forEach(t),ck=c(he),ze=s(he,"UL",{});var Qo=r(ze);fl=s(Qo,"LI",{});var VT=r(fl);Hs=s(VT,"A",{href:!0,rel:!0});var JT=r(Hs);pk=i(JT,"Just-In-Time (JIT) compilation"),JT.forEach(t),VT.forEach(t),hk=c(Qo),gl=s(Qo,"LI",{});var RT=r(gl);Vs=s(RT,"A",{href:!0,rel:!0});var GT=r(Vs);fk=i(GT,"Automatic Differentiation"),GT.forEach(t),RT.forEach(t),gk=c(Qo),ul=s(Qo,"LI",{});var KT=r(ul);Js=s(KT,"A",{href:!0,rel:!0});var XT=r(Js);uk=i(XT,"Vectorization"),XT.forEach(t),KT.forEach(t),mk=c(Qo),ml=s(Qo,"LI",{});var YT=r(ml);Rs=s(YT,"A",{href:!0,rel:!0});var ZT=r(Rs);_k=i(ZT,"Parallelization"),ZT.forEach(t),YT.forEach(t),Qo.forEach(t),bk=c(he),oe=s(he,"DIV",{class:!0});var Re=r(oe);_(Gs.$$.fragment,Re),kk=c(Re),jt=s(Re,"P",{});var ei=r(jt);Bk=i(ei,"The "),_l=s(ei,"CODE",{});var e$=r(_l);vk=i(e$,"FlaxBigBirdPreTrainedModel"),e$.forEach(t),yk=i(ei,"forward method, overrides the "),bl=s(ei,"CODE",{});var t$=r(bl);wk=i(t$,"__call__"),t$.forEach(t),Tk=i(ei," special method."),ei.forEach(t),$k=c(Re),_(xo.$$.fragment,Re),xk=c(Re),kl=s(Re,"P",{});var o$=r(kl);Fk=i(o$,"Example:"),o$.forEach(t),zk=c(Re),_(Ks.$$.fragment,Re),Re.forEach(t),he.forEach(t),fp=c(o),Ct=s(o,"H2",{class:!0});var fh=r(Ct);Fo=s(fh,"A",{id:!0,class:!0,href:!0});var n$=r(Fo);Bl=s(n$,"SPAN",{});var s$=r(Bl);_(Xs.$$.fragment,s$),s$.forEach(t),n$.forEach(t),qk=c(fh),vl=s(fh,"SPAN",{});var r$=r(vl);Mk=i(r$,"FlaxBigBirdForMaskedLM"),r$.forEach(t),fh.forEach(t),gp=c(o),C=s(o,"DIV",{class:!0});var fe=r(C);_(Ys.$$.fragment,fe),Ek=c(fe),Zs=s(fe,"P",{});var gh=r(Zs);Pk=i(gh,"BigBird Model with a "),yl=s(gh,"CODE",{});var a$=r(yl);jk=i(a$,"language modeling"),a$.forEach(t),Ck=i(gh," head on top."),gh.forEach(t),Ak=c(fe),er=s(fe,"P",{});var uh=r(er);Lk=i(uh,"This model inherits from "),Fa=s(uh,"A",{href:!0});var i$=r(Fa);Ik=i(i$,"FlaxPreTrainedModel"),i$.forEach(t),Nk=i(uh,`. 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)`),uh.forEach(t),Sk=c(fe),tr=s(fe,"P",{});var mh=r(tr);Ok=i(mh,"This model is also a Flax Linen "),or=s(mh,"A",{href:!0,rel:!0});var d$=r(or);Dk=i(d$,"flax.linen.Module"),d$.forEach(t),Wk=i(mh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),mh.forEach(t),Uk=c(fe),wl=s(fe,"P",{});var l$=r(wl);Qk=i(l$,"Finally, this model supports inherent JAX features such as:"),l$.forEach(t),Hk=c(fe),qe=s(fe,"UL",{});var Ho=r(qe);Tl=s(Ho,"LI",{});var c$=r(Tl);nr=s(c$,"A",{href:!0,rel:!0});var p$=r(nr);Vk=i(p$,"Just-In-Time (JIT) compilation"),p$.forEach(t),c$.forEach(t),Jk=c(Ho),$l=s(Ho,"LI",{});var h$=r($l);sr=s(h$,"A",{href:!0,rel:!0});var f$=r(sr);Rk=i(f$,"Automatic Differentiation"),f$.forEach(t),h$.forEach(t),Gk=c(Ho),xl=s(Ho,"LI",{});var g$=r(xl);rr=s(g$,"A",{href:!0,rel:!0});var u$=r(rr);Kk=i(u$,"Vectorization"),u$.forEach(t),g$.forEach(t),Xk=c(Ho),Fl=s(Ho,"LI",{});var m$=r(Fl);ar=s(m$,"A",{href:!0,rel:!0});var _$=r(ar);Yk=i(_$,"Parallelization"),_$.forEach(t),m$.forEach(t),Ho.forEach(t),Zk=c(fe),ne=s(fe,"DIV",{class:!0});var Ge=r(ne);_(ir.$$.fragment,Ge),eB=c(Ge),At=s(Ge,"P",{});var ti=r(At);tB=i(ti,"The "),zl=s(ti,"CODE",{});var b$=r(zl);oB=i(b$,"FlaxBigBirdPreTrainedModel"),b$.forEach(t),nB=i(ti,"forward method, overrides the "),ql=s(ti,"CODE",{});var k$=r(ql);sB=i(k$,"__call__"),k$.forEach(t),rB=i(ti," special method."),ti.forEach(t),aB=c(Ge),_(zo.$$.fragment,Ge),iB=c(Ge),Ml=s(Ge,"P",{});var B$=r(Ml);dB=i(B$,"Example:"),B$.forEach(t),lB=c(Ge),_(dr.$$.fragment,Ge),Ge.forEach(t),fe.forEach(t),up=c(o),Lt=s(o,"H2",{class:!0});var _h=r(Lt);qo=s(_h,"A",{id:!0,class:!0,href:!0});var v$=r(qo);El=s(v$,"SPAN",{});var y$=r(El);_(lr.$$.fragment,y$),y$.forEach(t),v$.forEach(t),cB=c(_h),Pl=s(_h,"SPAN",{});var w$=r(Pl);pB=i(w$,"FlaxBigBirdForSequenceClassification"),w$.forEach(t),_h.forEach(t),mp=c(o),A=s(o,"DIV",{class:!0});var ge=r(A);_(cr.$$.fragment,ge),hB=c(ge),jl=s(ge,"P",{});var T$=r(jl);fB=i(T$,`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.`),T$.forEach(t),gB=c(ge),pr=s(ge,"P",{});var bh=r(pr);uB=i(bh,"This model inherits from "),za=s(bh,"A",{href:!0});var $$=r(za);mB=i($$,"FlaxPreTrainedModel"),$$.forEach(t),_B=i(bh,`. 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)`),bh.forEach(t),bB=c(ge),hr=s(ge,"P",{});var kh=r(hr);kB=i(kh,"This model is also a Flax Linen "),fr=s(kh,"A",{href:!0,rel:!0});var x$=r(fr);BB=i(x$,"flax.linen.Module"),x$.forEach(t),vB=i(kh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),kh.forEach(t),yB=c(ge),Cl=s(ge,"P",{});var F$=r(Cl);wB=i(F$,"Finally, this model supports inherent JAX features such as:"),F$.forEach(t),TB=c(ge),Me=s(ge,"UL",{});var Vo=r(Me);Al=s(Vo,"LI",{});var z$=r(Al);gr=s(z$,"A",{href:!0,rel:!0});var q$=r(gr);$B=i(q$,"Just-In-Time (JIT) compilation"),q$.forEach(t),z$.forEach(t),xB=c(Vo),Ll=s(Vo,"LI",{});var M$=r(Ll);ur=s(M$,"A",{href:!0,rel:!0});var E$=r(ur);FB=i(E$,"Automatic Differentiation"),E$.forEach(t),M$.forEach(t),zB=c(Vo),Il=s(Vo,"LI",{});var P$=r(Il);mr=s(P$,"A",{href:!0,rel:!0});var j$=r(mr);qB=i(j$,"Vectorization"),j$.forEach(t),P$.forEach(t),MB=c(Vo),Nl=s(Vo,"LI",{});var C$=r(Nl);_r=s(C$,"A",{href:!0,rel:!0});var A$=r(_r);EB=i(A$,"Parallelization"),A$.forEach(t),C$.forEach(t),Vo.forEach(t),PB=c(ge),se=s(ge,"DIV",{class:!0});var Ke=r(se);_(br.$$.fragment,Ke),jB=c(Ke),It=s(Ke,"P",{});var oi=r(It);CB=i(oi,"The "),Sl=s(oi,"CODE",{});var L$=r(Sl);AB=i(L$,"FlaxBigBirdPreTrainedModel"),L$.forEach(t),LB=i(oi,"forward method, overrides the "),Ol=s(oi,"CODE",{});var I$=r(Ol);IB=i(I$,"__call__"),I$.forEach(t),NB=i(oi," special method."),oi.forEach(t),SB=c(Ke),_(Mo.$$.fragment,Ke),OB=c(Ke),Dl=s(Ke,"P",{});var N$=r(Dl);DB=i(N$,"Example:"),N$.forEach(t),WB=c(Ke),_(kr.$$.fragment,Ke),Ke.forEach(t),ge.forEach(t),_p=c(o),Nt=s(o,"H2",{class:!0});var Bh=r(Nt);Eo=s(Bh,"A",{id:!0,class:!0,href:!0});var S$=r(Eo);Wl=s(S$,"SPAN",{});var O$=r(Wl);_(Br.$$.fragment,O$),O$.forEach(t),S$.forEach(t),UB=c(Bh),Ul=s(Bh,"SPAN",{});var D$=r(Ul);QB=i(D$,"FlaxBigBirdForMultipleChoice"),D$.forEach(t),Bh.forEach(t),bp=c(o),L=s(o,"DIV",{class:!0});var ue=r(L);_(vr.$$.fragment,ue),HB=c(ue),Ql=s(ue,"P",{});var W$=r(Ql);VB=i(W$,`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.`),W$.forEach(t),JB=c(ue),yr=s(ue,"P",{});var vh=r(yr);RB=i(vh,"This model inherits from "),qa=s(vh,"A",{href:!0});var U$=r(qa);GB=i(U$,"FlaxPreTrainedModel"),U$.forEach(t),KB=i(vh,`. 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)`),vh.forEach(t),XB=c(ue),wr=s(ue,"P",{});var yh=r(wr);YB=i(yh,"This model is also a Flax Linen "),Tr=s(yh,"A",{href:!0,rel:!0});var Q$=r(Tr);ZB=i(Q$,"flax.linen.Module"),Q$.forEach(t),ev=i(yh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),yh.forEach(t),tv=c(ue),Hl=s(ue,"P",{});var H$=r(Hl);ov=i(H$,"Finally, this model supports inherent JAX features such as:"),H$.forEach(t),nv=c(ue),Ee=s(ue,"UL",{});var Jo=r(Ee);Vl=s(Jo,"LI",{});var V$=r(Vl);$r=s(V$,"A",{href:!0,rel:!0});var J$=r($r);sv=i(J$,"Just-In-Time (JIT) compilation"),J$.forEach(t),V$.forEach(t),rv=c(Jo),Jl=s(Jo,"LI",{});var R$=r(Jl);xr=s(R$,"A",{href:!0,rel:!0});var G$=r(xr);av=i(G$,"Automatic Differentiation"),G$.forEach(t),R$.forEach(t),iv=c(Jo),Rl=s(Jo,"LI",{});var K$=r(Rl);Fr=s(K$,"A",{href:!0,rel:!0});var X$=r(Fr);dv=i(X$,"Vectorization"),X$.forEach(t),K$.forEach(t),lv=c(Jo),Gl=s(Jo,"LI",{});var Y$=r(Gl);zr=s(Y$,"A",{href:!0,rel:!0});var Z$=r(zr);cv=i(Z$,"Parallelization"),Z$.forEach(t),Y$.forEach(t),Jo.forEach(t),pv=c(ue),re=s(ue,"DIV",{class:!0});var Xe=r(re);_(qr.$$.fragment,Xe),hv=c(Xe),St=s(Xe,"P",{});var ni=r(St);fv=i(ni,"The "),Kl=s(ni,"CODE",{});var e2=r(Kl);gv=i(e2,"FlaxBigBirdPreTrainedModel"),e2.forEach(t),uv=i(ni,"forward method, overrides the "),Xl=s(ni,"CODE",{});var t2=r(Xl);mv=i(t2,"__call__"),t2.forEach(t),_v=i(ni," special method."),ni.forEach(t),bv=c(Xe),_(Po.$$.fragment,Xe),kv=c(Xe),Yl=s(Xe,"P",{});var o2=r(Yl);Bv=i(o2,"Example:"),o2.forEach(t),vv=c(Xe),_(Mr.$$.fragment,Xe),Xe.forEach(t),ue.forEach(t),kp=c(o),Ot=s(o,"H2",{class:!0});var wh=r(Ot);jo=s(wh,"A",{id:!0,class:!0,href:!0});var n2=r(jo);Zl=s(n2,"SPAN",{});var s2=r(Zl);_(Er.$$.fragment,s2),s2.forEach(t),n2.forEach(t),yv=c(wh),ec=s(wh,"SPAN",{});var r2=r(ec);wv=i(r2,"FlaxBigBirdForTokenClassification"),r2.forEach(t),wh.forEach(t),Bp=c(o),I=s(o,"DIV",{class:!0});var me=r(I);_(Pr.$$.fragment,me),Tv=c(me),tc=s(me,"P",{});var a2=r(tc);$v=i(a2,`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.`),a2.forEach(t),xv=c(me),jr=s(me,"P",{});var Th=r(jr);Fv=i(Th,"This model inherits from "),Ma=s(Th,"A",{href:!0});var i2=r(Ma);zv=i(i2,"FlaxPreTrainedModel"),i2.forEach(t),qv=i(Th,`. 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)`),Th.forEach(t),Mv=c(me),Cr=s(me,"P",{});var $h=r(Cr);Ev=i($h,"This model is also a Flax Linen "),Ar=s($h,"A",{href:!0,rel:!0});var d2=r(Ar);Pv=i(d2,"flax.linen.Module"),d2.forEach(t),jv=i($h,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$h.forEach(t),Cv=c(me),oc=s(me,"P",{});var l2=r(oc);Av=i(l2,"Finally, this model supports inherent JAX features such as:"),l2.forEach(t),Lv=c(me),Pe=s(me,"UL",{});var Ro=r(Pe);nc=s(Ro,"LI",{});var c2=r(nc);Lr=s(c2,"A",{href:!0,rel:!0});var p2=r(Lr);Iv=i(p2,"Just-In-Time (JIT) compilation"),p2.forEach(t),c2.forEach(t),Nv=c(Ro),sc=s(Ro,"LI",{});var h2=r(sc);Ir=s(h2,"A",{href:!0,rel:!0});var f2=r(Ir);Sv=i(f2,"Automatic Differentiation"),f2.forEach(t),h2.forEach(t),Ov=c(Ro),rc=s(Ro,"LI",{});var g2=r(rc);Nr=s(g2,"A",{href:!0,rel:!0});var u2=r(Nr);Dv=i(u2,"Vectorization"),u2.forEach(t),g2.forEach(t),Wv=c(Ro),ac=s(Ro,"LI",{});var m2=r(ac);Sr=s(m2,"A",{href:!0,rel:!0});var _2=r(Sr);Uv=i(_2,"Parallelization"),_2.forEach(t),m2.forEach(t),Ro.forEach(t),Qv=c(me),ae=s(me,"DIV",{class:!0});var Ye=r(ae);_(Or.$$.fragment,Ye),Hv=c(Ye),Dt=s(Ye,"P",{});var si=r(Dt);Vv=i(si,"The "),ic=s(si,"CODE",{});var b2=r(ic);Jv=i(b2,"FlaxBigBirdPreTrainedModel"),b2.forEach(t),Rv=i(si,"forward method, overrides the "),dc=s(si,"CODE",{});var k2=r(dc);Gv=i(k2,"__call__"),k2.forEach(t),Kv=i(si," special method."),si.forEach(t),Xv=c(Ye),_(Co.$$.fragment,Ye),Yv=c(Ye),lc=s(Ye,"P",{});var B2=r(lc);Zv=i(B2,"Example:"),B2.forEach(t),e1=c(Ye),_(Dr.$$.fragment,Ye),Ye.forEach(t),me.forEach(t),vp=c(o),Wt=s(o,"H2",{class:!0});var xh=r(Wt);Ao=s(xh,"A",{id:!0,class:!0,href:!0});var v2=r(Ao);cc=s(v2,"SPAN",{});var y2=r(cc);_(Wr.$$.fragment,y2),y2.forEach(t),v2.forEach(t),t1=c(xh),pc=s(xh,"SPAN",{});var w2=r(pc);o1=i(w2,"FlaxBigBirdForQuestionAnswering"),w2.forEach(t),xh.forEach(t),yp=c(o),N=s(o,"DIV",{class:!0});var _e=r(N);_(Ur.$$.fragment,_e),n1=c(_e),Ut=s(_e,"P",{});var ri=r(Ut);s1=i(ri,`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 `),hc=s(ri,"CODE",{});var T2=r(hc);r1=i(T2,"span start logits"),T2.forEach(t),a1=i(ri," and "),fc=s(ri,"CODE",{});var $2=r(fc);i1=i($2,"span end logits"),$2.forEach(t),d1=i(ri,")."),ri.forEach(t),l1=c(_e),Qr=s(_e,"P",{});var Fh=r(Qr);c1=i(Fh,"This model inherits from "),Ea=s(Fh,"A",{href:!0});var x2=r(Ea);p1=i(x2,"FlaxPreTrainedModel"),x2.forEach(t),h1=i(Fh,`. 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)`),Fh.forEach(t),f1=c(_e),Hr=s(_e,"P",{});var zh=r(Hr);g1=i(zh,"This model is also a Flax Linen "),Vr=s(zh,"A",{href:!0,rel:!0});var F2=r(Vr);u1=i(F2,"flax.linen.Module"),F2.forEach(t),m1=i(zh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zh.forEach(t),_1=c(_e),gc=s(_e,"P",{});var z2=r(gc);b1=i(z2,"Finally, this model supports inherent JAX features such as:"),z2.forEach(t),k1=c(_e),je=s(_e,"UL",{});var Go=r(je);uc=s(Go,"LI",{});var q2=r(uc);Jr=s(q2,"A",{href:!0,rel:!0});var M2=r(Jr);B1=i(M2,"Just-In-Time (JIT) compilation"),M2.forEach(t),q2.forEach(t),v1=c(Go),mc=s(Go,"LI",{});var E2=r(mc);Rr=s(E2,"A",{href:!0,rel:!0});var P2=r(Rr);y1=i(P2,"Automatic Differentiation"),P2.forEach(t),E2.forEach(t),w1=c(Go),_c=s(Go,"LI",{});var j2=r(_c);Gr=s(j2,"A",{href:!0,rel:!0});var C2=r(Gr);T1=i(C2,"Vectorization"),C2.forEach(t),j2.forEach(t),$1=c(Go),bc=s(Go,"LI",{});var A2=r(bc);Kr=s(A2,"A",{href:!0,rel:!0});var L2=r(Kr);x1=i(L2,"Parallelization"),L2.forEach(t),A2.forEach(t),Go.forEach(t),F1=c(_e),ie=s(_e,"DIV",{class:!0});var Ze=r(ie);_(Xr.$$.fragment,Ze),z1=c(Ze),Qt=s(Ze,"P",{});var ai=r(Qt);q1=i(ai,"The "),Pa=s(ai,"A",{href:!0});var I2=r(Pa);M1=i(I2,"FlaxBigBirdForQuestionAnswering"),I2.forEach(t),E1=i(ai," forward method, overrides the "),kc=s(ai,"CODE",{});var N2=r(kc);P1=i(N2,"__call__"),N2.forEach(t),j1=i(ai," special method."),ai.forEach(t),C1=c(Ze),_(Lo.$$.fragment,Ze),A1=c(Ze),Bc=s(Ze,"P",{});var S2=r(Bc);L1=i(S2,"Example:"),S2.forEach(t),I1=c(Ze),_(Yr.$$.fragment,Ze),Ze.forEach(t),_e.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(ax)),d(w,"id","bigbird"),d(w,"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"),d(w,"href","#bigbird"),d(u,"class","relative group"),d(Ht,"id","overview"),d(Ht,"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"),d(Ht,"href","#overview"),d(et,"class","relative group"),d(Xo,"href","https://arxiv.org/abs/2007.14062"),d(Xo,"rel","nofollow"),d(Zo,"href","https://huggingface.co/blog/big-bird"),d(Zo,"rel","nofollow"),d(tn,"href","https://huggingface.co/vasudevgupta"),d(tn,"rel","nofollow"),d(on,"href","https://github.com/google-research/bigbird"),d(on,"rel","nofollow"),d(Jt,"id","transformers.BigBirdConfig"),d(Jt,"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"),d(Jt,"href","#transformers.BigBirdConfig"),d(tt,"class","relative group"),d(aa,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdModel"),d(rn,"href","https://huggingface.co/google/bigbird-roberta-base"),d(rn,"rel","nofollow"),d(ia,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),d(da,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),d(Gt,"id","initializing-a-bigbird-google/bigbird-roberta-base-style-configuration->>>-configuration-="),d(Gt,"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"),d(Gt,"href","#initializing-a-bigbird-google/bigbird-roberta-base-style-configuration->>>-configuration-="),d(Rt,"class","relative group"),d(Xt,"id","initializing-a-model-from-the-google/bigbird-roberta-base-style-configuration->>>-model-="),d(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"),d(Xt,"href","#initializing-a-model-from-the-google/bigbird-roberta-base-style-configuration->>>-model-="),d(Kt,"class","relative group"),d(Zt,"id","accessing-the-model-configuration->>>-configuration-=-model.config"),d(Zt,"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"),d(Zt,"href","#accessing-the-model-configuration->>>-configuration-=-model.config"),d(Yt,"class","relative group"),d(M,"class","docstring"),d(eo,"id","transformers.BigBirdTokenizer"),d(eo,"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"),d(eo,"href","#transformers.BigBirdTokenizer"),d(st,"class","relative group"),d(mn,"href","https://github.com/google/sentencepiece"),d(mn,"rel","nofollow"),d(la,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(Ae,"class","docstring"),d(to,"class","docstring"),d(oo,"class","docstring"),d(ha,"class","docstring"),d(E,"class","docstring"),d(no,"id","transformers.BigBirdTokenizerFast"),d(no,"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"),d(no,"href","#transformers.BigBirdTokenizerFast"),d(at,"class","relative group"),d(xn,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),d(xn,"rel","nofollow"),d(fa,"href","/docs/transformers/pr_15839/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),d(Le,"class","docstring"),d(we,"class","docstring"),d(so,"class","docstring"),d(Q,"class","docstring"),d(ro,"id","transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"),d(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"),d(ro,"href","#transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"),d(it,"class","relative group"),d(ma,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForPreTraining"),d(dt,"class","docstring"),d(ao,"id","transformers.BigBirdModel"),d(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"),d(ao,"href","#transformers.BigBirdModel"),d(lt,"class","relative group"),d(Sn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Sn,"rel","nofollow"),d(Dn,"href","https://arxiv.org/abs/1706.03762"),d(Dn,"rel","nofollow"),d(_a,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdModel"),d(R,"class","docstring"),d(H,"class","docstring"),d(lo,"id","transformers.BigBirdForPreTraining"),d(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"),d(lo,"href","#transformers.BigBirdForPreTraining"),d(pt,"class","relative group"),d(ba,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForPreTraining"),d(G,"class","docstring"),d(ht,"class","docstring"),d(po,"id","transformers.BigBirdForCausalLM"),d(po,"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"),d(po,"href","#transformers.BigBirdForCausalLM"),d(gt,"class","relative group"),d(Kn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Kn,"rel","nofollow"),d(ka,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForCausalLM"),d(K,"class","docstring"),d($e,"class","docstring"),d(fo,"id","transformers.BigBirdForMaskedLM"),d(fo,"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"),d(fo,"href","#transformers.BigBirdForMaskedLM"),d(_t,"class","relative group"),d(ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ts,"rel","nofollow"),d(Ba,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForMaskedLM"),d(X,"class","docstring"),d(xe,"class","docstring"),d(uo,"id","transformers.BigBirdForSequenceClassification"),d(uo,"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"),d(uo,"href","#transformers.BigBirdForSequenceClassification"),d(Bt,"class","relative group"),d(is,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(is,"rel","nofollow"),d(va,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForSequenceClassification"),d(S,"class","docstring"),d(ke,"class","docstring"),d(_o,"id","transformers.BigBirdForMultipleChoice"),d(_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"),d(_o,"href","#transformers.BigBirdForMultipleChoice"),d(yt,"class","relative group"),d(gs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(gs,"rel","nofollow"),d(ya,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForMultipleChoice"),d(Y,"class","docstring"),d(Be,"class","docstring"),d(ko,"id","transformers.BigBirdForTokenClassification"),d(ko,"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"),d(ko,"href","#transformers.BigBirdForTokenClassification"),d(Tt,"class","relative group"),d(Bs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Bs,"rel","nofollow"),d(wa,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForTokenClassification"),d(Z,"class","docstring"),d(ve,"class","docstring"),d(vo,"id","transformers.BigBirdForQuestionAnswering"),d(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"),d(vo,"href","#transformers.BigBirdForQuestionAnswering"),d(xt,"class","relative group"),d(xs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(xs,"rel","nofollow"),d(Ta,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.BigBirdForQuestionAnswering"),d(ee,"class","docstring"),d(ye,"class","docstring"),d(wo,"id","transformers.FlaxBigBirdModel"),d(wo,"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"),d(wo,"href","#transformers.FlaxBigBirdModel"),d(qt,"class","relative group"),d($a,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(js,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(js,"rel","nofollow"),d(Cs,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Cs,"rel","nofollow"),d(As,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(As,"rel","nofollow"),d(Ls,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Ls,"rel","nofollow"),d(Is,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Is,"rel","nofollow"),d(te,"class","docstring"),d(P,"class","docstring"),d($o,"id","transformers.FlaxBigBirdForPreTraining"),d($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"),d($o,"href","#transformers.FlaxBigBirdForPreTraining"),d(Et,"class","relative group"),d(xa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Qs,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Qs,"rel","nofollow"),d(Hs,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Hs,"rel","nofollow"),d(Vs,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Vs,"rel","nofollow"),d(Js,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Js,"rel","nofollow"),d(Rs,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Rs,"rel","nofollow"),d(oe,"class","docstring"),d(j,"class","docstring"),d(Fo,"id","transformers.FlaxBigBirdForMaskedLM"),d(Fo,"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"),d(Fo,"href","#transformers.FlaxBigBirdForMaskedLM"),d(Ct,"class","relative group"),d(Fa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(or,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(or,"rel","nofollow"),d(nr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(nr,"rel","nofollow"),d(sr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(sr,"rel","nofollow"),d(rr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(rr,"rel","nofollow"),d(ar,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(ar,"rel","nofollow"),d(ne,"class","docstring"),d(C,"class","docstring"),d(qo,"id","transformers.FlaxBigBirdForSequenceClassification"),d(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"),d(qo,"href","#transformers.FlaxBigBirdForSequenceClassification"),d(Lt,"class","relative group"),d(za,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(fr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(fr,"rel","nofollow"),d(gr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(gr,"rel","nofollow"),d(ur,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(ur,"rel","nofollow"),d(mr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(mr,"rel","nofollow"),d(_r,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(_r,"rel","nofollow"),d(se,"class","docstring"),d(A,"class","docstring"),d(Eo,"id","transformers.FlaxBigBirdForMultipleChoice"),d(Eo,"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"),d(Eo,"href","#transformers.FlaxBigBirdForMultipleChoice"),d(Nt,"class","relative group"),d(qa,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Tr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Tr,"rel","nofollow"),d($r,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d($r,"rel","nofollow"),d(xr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(xr,"rel","nofollow"),d(Fr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Fr,"rel","nofollow"),d(zr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(zr,"rel","nofollow"),d(re,"class","docstring"),d(L,"class","docstring"),d(jo,"id","transformers.FlaxBigBirdForTokenClassification"),d(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"),d(jo,"href","#transformers.FlaxBigBirdForTokenClassification"),d(Ot,"class","relative group"),d(Ma,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Ar,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Ar,"rel","nofollow"),d(Lr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Lr,"rel","nofollow"),d(Ir,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Ir,"rel","nofollow"),d(Nr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Nr,"rel","nofollow"),d(Sr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Sr,"rel","nofollow"),d(ae,"class","docstring"),d(I,"class","docstring"),d(Ao,"id","transformers.FlaxBigBirdForQuestionAnswering"),d(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"),d(Ao,"href","#transformers.FlaxBigBirdForQuestionAnswering"),d(Wt,"class","relative group"),d(Ea,"href","/docs/transformers/pr_15839/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(Vr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),d(Vr,"rel","nofollow"),d(Jr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Jr,"rel","nofollow"),d(Rr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(Rr,"rel","nofollow"),d(Gr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Gr,"rel","nofollow"),d(Kr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Kr,"rel","nofollow"),d(Pa,"href","/docs/transformers/pr_15839/en/model_doc/big_bird#transformers.FlaxBigBirdForQuestionAnswering"),d(ie,"class","docstring"),d(N,"class","docstring")},m(o,h){e(document.head,p),g(o,T,h),g(o,u,h),e(u,w),e(w,$),b(y,$,null),e(u,f),e(u,x),e(x,qh),g(o,Pc,h),g(o,et,h),e(et,Ht),e(Ht,ii),b(Ko,ii,null),e(et,Mh),e(et,di),e(di,Eh),g(o,jc,h),g(o,Vt,h),e(Vt,Ph),e(Vt,Xo),e(Xo,jh),e(Vt,Ch),g(o,Cc,h),g(o,oa,h),e(oa,Ah),g(o,Ac,h),g(o,na,h),e(na,li),e(li,Lh),g(o,Lc,h),g(o,sa,h),e(sa,Ih),g(o,Ic,h),g(o,U,h),e(U,Yo),e(Yo,Nh),e(Yo,Zo),e(Zo,Sh),e(Yo,Oh),e(U,Dh),e(U,be),e(be,Wh),e(be,ci),e(ci,Uh),e(be,Qh),e(be,pi),e(pi,Hh),e(be,Vh),e(be,hi),e(hi,Jh),e(be,Rh),e(be,fi),e(fi,Gh),e(be,Kh),e(U,Xh),e(U,gi),e(gi,Yh),e(U,Zh),e(U,ui),e(ui,ef),e(U,tf),e(U,en),e(en,of),e(en,mi),e(mi,nf),e(en,sf),e(U,rf),e(U,ra),e(ra,af),e(ra,_i),e(_i,df),g(o,Nc,h),g(o,Ce,h),e(Ce,lf),e(Ce,tn),e(tn,cf),e(Ce,pf),e(Ce,on),e(on,hf),e(Ce,ff),g(o,Sc,h),g(o,tt,h),e(tt,Jt),e(Jt,bi),b(nn,bi,null),e(tt,gf),e(tt,ki),e(ki,uf),g(o,Oc,h),g(o,M,h),b(sn,M,null),e(M,mf),e(M,ot),e(ot,_f),e(ot,aa),e(aa,bf),e(ot,kf),e(ot,rn),e(rn,Bf),e(ot,vf),e(M,yf),e(M,nt),e(nt,wf),e(nt,ia),e(ia,Tf),e(nt,$f),e(nt,da),e(da,xf),e(nt,Ff),e(M,zf),e(M,Bi),e(Bi,qf),e(M,Mf),b(an,M,null),e(M,Ef),e(M,vi),e(vi,yi),e(yi,wi),e(wi,Ti),e(Ti,Pf),e(M,jf),e(M,$i),e($i,xi),e(xi,dn),e(dn,Rt),e(Rt,Gt),e(Gt,Fi),b(ln,Fi,null),e(Rt,Cf),e(Rt,zi),e(zi,Af),e(dn,Lf),e(dn,qi),e(qi,If),e(M,Nf),e(M,Mi),e(Mi,Ei),e(Ei,cn),e(cn,Kt),e(Kt,Xt),e(Xt,Pi),b(pn,Pi,null),e(Kt,Sf),e(Kt,ji),e(ji,Of),e(cn,Df),e(cn,Ci),e(Ci,Wf),e(M,Uf),e(M,Ai),e(Ai,Li),e(Li,Ii),e(Ii,Yt),e(Yt,Zt),e(Zt,Ni),b(hn,Ni,null),e(Yt,Qf),e(Yt,Si),e(Si,Hf),g(o,Dc,h),g(o,st,h),e(st,eo),e(eo,Oi),b(fn,Oi,null),e(st,Vf),e(st,Di),e(Di,Jf),g(o,Wc,h),g(o,E,h),b(gn,E,null),e(E,Rf),e(E,un),e(un,Gf),e(un,mn),e(mn,Kf),e(un,Xf),e(E,Yf),e(E,_n),e(_n,Zf),e(_n,la),e(la,eg),e(_n,tg),e(E,og),e(E,Ae),b(bn,Ae,null),e(Ae,ng),e(Ae,Wi),e(Wi,sg),e(Ae,rg),e(Ae,kn),e(kn,ca),e(ca,ag),e(ca,Ui),e(Ui,ig),e(kn,dg),e(kn,pa),e(pa,lg),e(pa,Qi),e(Qi,cg),e(E,pg),e(E,to),b(Bn,to,null),e(to,hg),e(to,vn),e(vn,fg),e(vn,Hi),e(Hi,gg),e(vn,ug),e(E,mg),e(E,oo),b(yn,oo,null),e(oo,_g),e(oo,rt),e(rt,bg),e(rt,Vi),e(Vi,kg),e(rt,Bg),e(rt,Ji),e(Ji,vg),e(rt,yg),e(E,wg),e(E,ha),b(wn,ha,null),g(o,Uc,h),g(o,at,h),e(at,no),e(no,Ri),b(Tn,Ri,null),e(at,Tg),e(at,Gi),e(Gi,$g),g(o,Qc,h),g(o,Q,h),b($n,Q,null),e(Q,xg),e(Q,Te),e(Te,Fg),e(Te,Ki),e(Ki,zg),e(Te,qg),e(Te,xn),e(xn,Mg),e(Te,Eg),e(Te,fa),e(fa,Pg),e(Te,jg),e(Q,Cg),e(Q,Le),b(Fn,Le,null),e(Le,Ag),e(Le,Xi),e(Xi,Lg),e(Le,Ig),e(Le,zn),e(zn,ga),e(ga,Ng),e(ga,Yi),e(Yi,Sg),e(zn,Og),e(zn,ua),e(ua,Dg),e(ua,Zi),e(Zi,Wg),e(Q,Ug),e(Q,we),b(qn,we,null),e(we,Qg),e(we,ed),e(ed,Hg),e(we,Vg),b(Mn,we,null),e(we,Jg),e(we,td),e(td,Rg),e(Q,Gg),e(Q,so),b(En,so,null),e(so,Kg),e(so,Pn),e(Pn,Xg),e(Pn,od),e(od,Yg),e(Pn,Zg),g(o,Hc,h),g(o,it,h),e(it,ro),e(ro,nd),b(jn,nd,null),e(it,eu),e(it,sd),e(sd,tu),g(o,Vc,h),g(o,dt,h),b(Cn,dt,null),e(dt,ou),e(dt,An),e(An,nu),e(An,ma),e(ma,su),e(An,ru),g(o,Jc,h),g(o,lt,h),e(lt,ao),e(ao,rd),b(Ln,rd,null),e(lt,au),e(lt,ad),e(ad,iu),g(o,Rc,h),g(o,H,h),b(In,H,null),e(H,du),e(H,Nn),e(Nn,lu),e(Nn,Sn),e(Sn,cu),e(Nn,pu),e(H,hu),e(H,On),e(On,fu),e(On,Dn),e(Dn,gu),e(On,uu),e(H,mu),e(H,W),e(W,_u),e(W,id),e(id,bu),e(W,ku),e(W,dd),e(dd,Bu),e(W,vu),e(W,ld),e(ld,yu),e(W,wu),e(W,cd),e(cd,Tu),e(W,$u),e(W,pd),e(pd,xu),e(W,Fu),e(W,hd),e(hd,zu),e(W,qu),e(H,Mu),e(H,R),b(Wn,R,null),e(R,Eu),e(R,ct),e(ct,Pu),e(ct,_a),e(_a,ju),e(ct,Cu),e(ct,fd),e(fd,Au),e(ct,Lu),e(R,Iu),b(io,R,null),e(R,Nu),e(R,gd),e(gd,Su),e(R,Ou),b(Un,R,null),g(o,Gc,h),g(o,pt,h),e(pt,lo),e(lo,ud),b(Qn,ud,null),e(pt,Du),e(pt,md),e(md,Wu),g(o,Kc,h),g(o,ht,h),b(Hn,ht,null),e(ht,Uu),e(ht,G),b(Vn,G,null),e(G,Qu),e(G,ft),e(ft,Hu),e(ft,ba),e(ba,Vu),e(ft,Ju),e(ft,_d),e(_d,Ru),e(ft,Gu),e(G,Ku),b(co,G,null),e(G,Xu),e(G,bd),e(bd,Yu),e(G,Zu),b(Jn,G,null),g(o,Xc,h),g(o,gt,h),e(gt,po),e(po,kd),b(Rn,kd,null),e(gt,em),e(gt,Bd),e(Bd,tm),g(o,Yc,h),g(o,$e,h),b(Gn,$e,null),e($e,om),e($e,ut),e(ut,nm),e(ut,vd),e(vd,sm),e(ut,rm),e(ut,Kn),e(Kn,am),e(ut,im),e($e,dm),e($e,K),b(Xn,K,null),e(K,lm),e(K,mt),e(mt,cm),e(mt,ka),e(ka,pm),e(mt,hm),e(mt,yd),e(yd,fm),e(mt,gm),e(K,um),b(ho,K,null),e(K,mm),e(K,wd),e(wd,_m),e(K,bm),b(Yn,K,null),g(o,Zc,h),g(o,_t,h),e(_t,fo),e(fo,Td),b(Zn,Td,null),e(_t,km),e(_t,$d),e($d,Bm),g(o,ep,h),g(o,xe,h),b(es,xe,null),e(xe,vm),e(xe,bt),e(bt,ym),e(bt,xd),e(xd,wm),e(bt,Tm),e(bt,ts),e(ts,$m),e(bt,xm),e(xe,Fm),e(xe,X),b(os,X,null),e(X,zm),e(X,kt),e(kt,qm),e(kt,Ba),e(Ba,Mm),e(kt,Em),e(kt,Fd),e(Fd,Pm),e(kt,jm),e(X,Cm),b(go,X,null),e(X,Am),e(X,zd),e(zd,Lm),e(X,Im),b(ns,X,null),g(o,tp,h),g(o,Bt,h),e(Bt,uo),e(uo,qd),b(ss,qd,null),e(Bt,Nm),e(Bt,Md),e(Md,Sm),g(o,op,h),g(o,ke,h),b(rs,ke,null),e(ke,Om),e(ke,Ed),e(Ed,Dm),e(ke,Wm),e(ke,as),e(as,Um),e(as,is),e(is,Qm),e(as,Hm),e(ke,Vm),e(ke,S),b(ds,S,null),e(S,Jm),e(S,vt),e(vt,Rm),e(vt,va),e(va,Gm),e(vt,Km),e(vt,Pd),e(Pd,Xm),e(vt,Ym),e(S,Zm),b(mo,S,null),e(S,e_),e(S,jd),e(jd,t_),e(S,o_),b(ls,S,null),e(S,n_),e(S,Cd),e(Cd,s_),e(S,r_),b(cs,S,null),g(o,np,h),g(o,yt,h),e(yt,_o),e(_o,Ad),b(ps,Ad,null),e(yt,a_),e(yt,Ld),e(Ld,i_),g(o,sp,h),g(o,Be,h),b(hs,Be,null),e(Be,d_),e(Be,Id),e(Id,l_),e(Be,c_),e(Be,fs),e(fs,p_),e(fs,gs),e(gs,h_),e(fs,f_),e(Be,g_),e(Be,Y),b(us,Y,null),e(Y,u_),e(Y,wt),e(wt,m_),e(wt,ya),e(ya,__),e(wt,b_),e(wt,Nd),e(Nd,k_),e(wt,B_),e(Y,v_),b(bo,Y,null),e(Y,y_),e(Y,Sd),e(Sd,w_),e(Y,T_),b(ms,Y,null),g(o,rp,h),g(o,Tt,h),e(Tt,ko),e(ko,Od),b(_s,Od,null),e(Tt,$_),e(Tt,Dd),e(Dd,x_),g(o,ap,h),g(o,ve,h),b(bs,ve,null),e(ve,F_),e(ve,Wd),e(Wd,z_),e(ve,q_),e(ve,ks),e(ks,M_),e(ks,Bs),e(Bs,E_),e(ks,P_),e(ve,j_),e(ve,Z),b(vs,Z,null),e(Z,C_),e(Z,$t),e($t,A_),e($t,wa),e(wa,L_),e($t,I_),e($t,Ud),e(Ud,N_),e($t,S_),e(Z,O_),b(Bo,Z,null),e(Z,D_),e(Z,Qd),e(Qd,W_),e(Z,U_),b(ys,Z,null),g(o,ip,h),g(o,xt,h),e(xt,vo),e(vo,Hd),b(ws,Hd,null),e(xt,Q_),e(xt,Vd),e(Vd,H_),g(o,dp,h),g(o,ye,h),b(Ts,ye,null),e(ye,V_),e(ye,Ft),e(Ft,J_),e(Ft,Jd),e(Jd,R_),e(Ft,G_),e(Ft,Rd),e(Rd,K_),e(Ft,X_),e(ye,Y_),e(ye,$s),e($s,Z_),e($s,xs),e(xs,eb),e($s,tb),e(ye,ob),e(ye,ee),b(Fs,ee,null),e(ee,nb),e(ee,zt),e(zt,sb),e(zt,Ta),e(Ta,rb),e(zt,ab),e(zt,Gd),e(Gd,ib),e(zt,db),e(ee,lb),b(yo,ee,null),e(ee,cb),e(ee,Kd),e(Kd,pb),e(ee,hb),b(zs,ee,null),g(o,lp,h),g(o,qt,h),e(qt,wo),e(wo,Xd),b(qs,Xd,null),e(qt,fb),e(qt,Yd),e(Yd,gb),g(o,cp,h),g(o,P,h),b(Ms,P,null),e(P,ub),e(P,Zd),e(Zd,mb),e(P,_b),e(P,Es),e(Es,bb),e(Es,$a),e($a,kb),e(Es,Bb),e(P,vb),e(P,Ps),e(Ps,yb),e(Ps,js),e(js,wb),e(Ps,Tb),e(P,$b),e(P,el),e(el,xb),e(P,Fb),e(P,Fe),e(Fe,tl),e(tl,Cs),e(Cs,zb),e(Fe,qb),e(Fe,ol),e(ol,As),e(As,Mb),e(Fe,Eb),e(Fe,nl),e(nl,Ls),e(Ls,Pb),e(Fe,jb),e(Fe,sl),e(sl,Is),e(Is,Cb),e(P,Ab),e(P,te),b(Ns,te,null),e(te,Lb),e(te,Mt),e(Mt,Ib),e(Mt,rl),e(rl,Nb),e(Mt,Sb),e(Mt,al),e(al,Ob),e(Mt,Db),e(te,Wb),b(To,te,null),e(te,Ub),e(te,il),e(il,Qb),e(te,Hb),b(Ss,te,null),g(o,pp,h),g(o,Et,h),e(Et,$o),e($o,dl),b(Os,dl,null),e(Et,Vb),e(Et,ll),e(ll,Jb),g(o,hp,h),g(o,j,h),b(Ds,j,null),e(j,Rb),e(j,Pt),e(Pt,Gb),e(Pt,cl),e(cl,Kb),e(Pt,Xb),e(Pt,pl),e(pl,Yb),e(Pt,Zb),e(j,ek),e(j,Ws),e(Ws,tk),e(Ws,xa),e(xa,ok),e(Ws,nk),e(j,sk),e(j,Us),e(Us,rk),e(Us,Qs),e(Qs,ak),e(Us,ik),e(j,dk),e(j,hl),e(hl,lk),e(j,ck),e(j,ze),e(ze,fl),e(fl,Hs),e(Hs,pk),e(ze,hk),e(ze,gl),e(gl,Vs),e(Vs,fk),e(ze,gk),e(ze,ul),e(ul,Js),e(Js,uk),e(ze,mk),e(ze,ml),e(ml,Rs),e(Rs,_k),e(j,bk),e(j,oe),b(Gs,oe,null),e(oe,kk),e(oe,jt),e(jt,Bk),e(jt,_l),e(_l,vk),e(jt,yk),e(jt,bl),e(bl,wk),e(jt,Tk),e(oe,$k),b(xo,oe,null),e(oe,xk),e(oe,kl),e(kl,Fk),e(oe,zk),b(Ks,oe,null),g(o,fp,h),g(o,Ct,h),e(Ct,Fo),e(Fo,Bl),b(Xs,Bl,null),e(Ct,qk),e(Ct,vl),e(vl,Mk),g(o,gp,h),g(o,C,h),b(Ys,C,null),e(C,Ek),e(C,Zs),e(Zs,Pk),e(Zs,yl),e(yl,jk),e(Zs,Ck),e(C,Ak),e(C,er),e(er,Lk),e(er,Fa),e(Fa,Ik),e(er,Nk),e(C,Sk),e(C,tr),e(tr,Ok),e(tr,or),e(or,Dk),e(tr,Wk),e(C,Uk),e(C,wl),e(wl,Qk),e(C,Hk),e(C,qe),e(qe,Tl),e(Tl,nr),e(nr,Vk),e(qe,Jk),e(qe,$l),e($l,sr),e(sr,Rk),e(qe,Gk),e(qe,xl),e(xl,rr),e(rr,Kk),e(qe,Xk),e(qe,Fl),e(Fl,ar),e(ar,Yk),e(C,Zk),e(C,ne),b(ir,ne,null),e(ne,eB),e(ne,At),e(At,tB),e(At,zl),e(zl,oB),e(At,nB),e(At,ql),e(ql,sB),e(At,rB),e(ne,aB),b(zo,ne,null),e(ne,iB),e(ne,Ml),e(Ml,dB),e(ne,lB),b(dr,ne,null),g(o,up,h),g(o,Lt,h),e(Lt,qo),e(qo,El),b(lr,El,null),e(Lt,cB),e(Lt,Pl),e(Pl,pB),g(o,mp,h),g(o,A,h),b(cr,A,null),e(A,hB),e(A,jl),e(jl,fB),e(A,gB),e(A,pr),e(pr,uB),e(pr,za),e(za,mB),e(pr,_B),e(A,bB),e(A,hr),e(hr,kB),e(hr,fr),e(fr,BB),e(hr,vB),e(A,yB),e(A,Cl),e(Cl,wB),e(A,TB),e(A,Me),e(Me,Al),e(Al,gr),e(gr,$B),e(Me,xB),e(Me,Ll),e(Ll,ur),e(ur,FB),e(Me,zB),e(Me,Il),e(Il,mr),e(mr,qB),e(Me,MB),e(Me,Nl),e(Nl,_r),e(_r,EB),e(A,PB),e(A,se),b(br,se,null),e(se,jB),e(se,It),e(It,CB),e(It,Sl),e(Sl,AB),e(It,LB),e(It,Ol),e(Ol,IB),e(It,NB),e(se,SB),b(Mo,se,null),e(se,OB),e(se,Dl),e(Dl,DB),e(se,WB),b(kr,se,null),g(o,_p,h),g(o,Nt,h),e(Nt,Eo),e(Eo,Wl),b(Br,Wl,null),e(Nt,UB),e(Nt,Ul),e(Ul,QB),g(o,bp,h),g(o,L,h),b(vr,L,null),e(L,HB),e(L,Ql),e(Ql,VB),e(L,JB),e(L,yr),e(yr,RB),e(yr,qa),e(qa,GB),e(yr,KB),e(L,XB),e(L,wr),e(wr,YB),e(wr,Tr),e(Tr,ZB),e(wr,ev),e(L,tv),e(L,Hl),e(Hl,ov),e(L,nv),e(L,Ee),e(Ee,Vl),e(Vl,$r),e($r,sv),e(Ee,rv),e(Ee,Jl),e(Jl,xr),e(xr,av),e(Ee,iv),e(Ee,Rl),e(Rl,Fr),e(Fr,dv),e(Ee,lv),e(Ee,Gl),e(Gl,zr),e(zr,cv),e(L,pv),e(L,re),b(qr,re,null),e(re,hv),e(re,St),e(St,fv),e(St,Kl),e(Kl,gv),e(St,uv),e(St,Xl),e(Xl,mv),e(St,_v),e(re,bv),b(Po,re,null),e(re,kv),e(re,Yl),e(Yl,Bv),e(re,vv),b(Mr,re,null),g(o,kp,h),g(o,Ot,h),e(Ot,jo),e(jo,Zl),b(Er,Zl,null),e(Ot,yv),e(Ot,ec),e(ec,wv),g(o,Bp,h),g(o,I,h),b(Pr,I,null),e(I,Tv),e(I,tc),e(tc,$v),e(I,xv),e(I,jr),e(jr,Fv),e(jr,Ma),e(Ma,zv),e(jr,qv),e(I,Mv),e(I,Cr),e(Cr,Ev),e(Cr,Ar),e(Ar,Pv),e(Cr,jv),e(I,Cv),e(I,oc),e(oc,Av),e(I,Lv),e(I,Pe),e(Pe,nc),e(nc,Lr),e(Lr,Iv),e(Pe,Nv),e(Pe,sc),e(sc,Ir),e(Ir,Sv),e(Pe,Ov),e(Pe,rc),e(rc,Nr),e(Nr,Dv),e(Pe,Wv),e(Pe,ac),e(ac,Sr),e(Sr,Uv),e(I,Qv),e(I,ae),b(Or,ae,null),e(ae,Hv),e(ae,Dt),e(Dt,Vv),e(Dt,ic),e(ic,Jv),e(Dt,Rv),e(Dt,dc),e(dc,Gv),e(Dt,Kv),e(ae,Xv),b(Co,ae,null),e(ae,Yv),e(ae,lc),e(lc,Zv),e(ae,e1),b(Dr,ae,null),g(o,vp,h),g(o,Wt,h),e(Wt,Ao),e(Ao,cc),b(Wr,cc,null),e(Wt,t1),e(Wt,pc),e(pc,o1),g(o,yp,h),g(o,N,h),b(Ur,N,null),e(N,n1),e(N,Ut),e(Ut,s1),e(Ut,hc),e(hc,r1),e(Ut,a1),e(Ut,fc),e(fc,i1),e(Ut,d1),e(N,l1),e(N,Qr),e(Qr,c1),e(Qr,Ea),e(Ea,p1),e(Qr,h1),e(N,f1),e(N,Hr),e(Hr,g1),e(Hr,Vr),e(Vr,u1),e(Hr,m1),e(N,_1),e(N,gc),e(gc,b1),e(N,k1),e(N,je),e(je,uc),e(uc,Jr),e(Jr,B1),e(je,v1),e(je,mc),e(mc,Rr),e(Rr,y1),e(je,w1),e(je,_c),e(_c,Gr),e(Gr,T1),e(je,$1),e(je,bc),e(bc,Kr),e(Kr,x1),e(N,F1),e(N,ie),b(Xr,ie,null),e(ie,z1),e(ie,Qt),e(Qt,q1),e(Qt,Pa),e(Pa,M1),e(Qt,E1),e(Qt,kc),e(kc,P1),e(Qt,j1),e(ie,C1),b(Lo,ie,null),e(ie,A1),e(ie,Bc),e(Bc,L1),e(ie,I1),b(Yr,ie,null),wp=!0},p(o,[h]){const Zr={};h&2&&(Zr.$$scope={dirty:h,ctx:o}),io.$set(Zr);const vc={};h&2&&(vc.$$scope={dirty:h,ctx:o}),co.$set(vc);const yc={};h&2&&(yc.$$scope={dirty:h,ctx:o}),ho.$set(yc);const wc={};h&2&&(wc.$$scope={dirty:h,ctx:o}),go.$set(wc);const ea={};h&2&&(ea.$$scope={dirty:h,ctx:o}),mo.$set(ea);const Tc={};h&2&&(Tc.$$scope={dirty:h,ctx:o}),bo.$set(Tc);const $c={};h&2&&($c.$$scope={dirty:h,ctx:o}),Bo.$set($c);const xc={};h&2&&(xc.$$scope={dirty:h,ctx:o}),yo.$set(xc);const ta={};h&2&&(ta.$$scope={dirty:h,ctx:o}),To.$set(ta);const Fc={};h&2&&(Fc.$$scope={dirty:h,ctx:o}),xo.$set(Fc);const zc={};h&2&&(zc.$$scope={dirty:h,ctx:o}),zo.$set(zc);const qc={};h&2&&(qc.$$scope={dirty:h,ctx:o}),Mo.$set(qc);const Mc={};h&2&&(Mc.$$scope={dirty:h,ctx:o}),Po.$set(Mc);const Ec={};h&2&&(Ec.$$scope={dirty:h,ctx:o}),Co.$set(Ec);const V={};h&2&&(V.$$scope={dirty:h,ctx:o}),Lo.$set(V)},i(o){wp||(k(y.$$.fragment,o),k(Ko.$$.fragment,o),k(nn.$$.fragment,o),k(sn.$$.fragment,o),k(an.$$.fragment,o),k(ln.$$.fragment,o),k(pn.$$.fragment,o),k(hn.$$.fragment,o),k(fn.$$.fragment,o),k(gn.$$.fragment,o),k(bn.$$.fragment,o),k(Bn.$$.fragment,o),k(yn.$$.fragment,o),k(wn.$$.fragment,o),k(Tn.$$.fragment,o),k($n.$$.fragment,o),k(Fn.$$.fragment,o),k(qn.$$.fragment,o),k(Mn.$$.fragment,o),k(En.$$.fragment,o),k(jn.$$.fragment,o),k(Cn.$$.fragment,o),k(Ln.$$.fragment,o),k(In.$$.fragment,o),k(Wn.$$.fragment,o),k(io.$$.fragment,o),k(Un.$$.fragment,o),k(Qn.$$.fragment,o),k(Hn.$$.fragment,o),k(Vn.$$.fragment,o),k(co.$$.fragment,o),k(Jn.$$.fragment,o),k(Rn.$$.fragment,o),k(Gn.$$.fragment,o),k(Xn.$$.fragment,o),k(ho.$$.fragment,o),k(Yn.$$.fragment,o),k(Zn.$$.fragment,o),k(es.$$.fragment,o),k(os.$$.fragment,o),k(go.$$.fragment,o),k(ns.$$.fragment,o),k(ss.$$.fragment,o),k(rs.$$.fragment,o),k(ds.$$.fragment,o),k(mo.$$.fragment,o),k(ls.$$.fragment,o),k(cs.$$.fragment,o),k(ps.$$.fragment,o),k(hs.$$.fragment,o),k(us.$$.fragment,o),k(bo.$$.fragment,o),k(ms.$$.fragment,o),k(_s.$$.fragment,o),k(bs.$$.fragment,o),k(vs.$$.fragment,o),k(Bo.$$.fragment,o),k(ys.$$.fragment,o),k(ws.$$.fragment,o),k(Ts.$$.fragment,o),k(Fs.$$.fragment,o),k(yo.$$.fragment,o),k(zs.$$.fragment,o),k(qs.$$.fragment,o),k(Ms.$$.fragment,o),k(Ns.$$.fragment,o),k(To.$$.fragment,o),k(Ss.$$.fragment,o),k(Os.$$.fragment,o),k(Ds.$$.fragment,o),k(Gs.$$.fragment,o),k(xo.$$.fragment,o),k(Ks.$$.fragment,o),k(Xs.$$.fragment,o),k(Ys.$$.fragment,o),k(ir.$$.fragment,o),k(zo.$$.fragment,o),k(dr.$$.fragment,o),k(lr.$$.fragment,o),k(cr.$$.fragment,o),k(br.$$.fragment,o),k(Mo.$$.fragment,o),k(kr.$$.fragment,o),k(Br.$$.fragment,o),k(vr.$$.fragment,o),k(qr.$$.fragment,o),k(Po.$$.fragment,o),k(Mr.$$.fragment,o),k(Er.$$.fragment,o),k(Pr.$$.fragment,o),k(Or.$$.fragment,o),k(Co.$$.fragment,o),k(Dr.$$.fragment,o),k(Wr.$$.fragment,o),k(Ur.$$.fragment,o),k(Xr.$$.fragment,o),k(Lo.$$.fragment,o),k(Yr.$$.fragment,o),wp=!0)},o(o){B(y.$$.fragment,o),B(Ko.$$.fragment,o),B(nn.$$.fragment,o),B(sn.$$.fragment,o),B(an.$$.fragment,o),B(ln.$$.fragment,o),B(pn.$$.fragment,o),B(hn.$$.fragment,o),B(fn.$$.fragment,o),B(gn.$$.fragment,o),B(bn.$$.fragment,o),B(Bn.$$.fragment,o),B(yn.$$.fragment,o),B(wn.$$.fragment,o),B(Tn.$$.fragment,o),B($n.$$.fragment,o),B(Fn.$$.fragment,o),B(qn.$$.fragment,o),B(Mn.$$.fragment,o),B(En.$$.fragment,o),B(jn.$$.fragment,o),B(Cn.$$.fragment,o),B(Ln.$$.fragment,o),B(In.$$.fragment,o),B(Wn.$$.fragment,o),B(io.$$.fragment,o),B(Un.$$.fragment,o),B(Qn.$$.fragment,o),B(Hn.$$.fragment,o),B(Vn.$$.fragment,o),B(co.$$.fragment,o),B(Jn.$$.fragment,o),B(Rn.$$.fragment,o),B(Gn.$$.fragment,o),B(Xn.$$.fragment,o),B(ho.$$.fragment,o),B(Yn.$$.fragment,o),B(Zn.$$.fragment,o),B(es.$$.fragment,o),B(os.$$.fragment,o),B(go.$$.fragment,o),B(ns.$$.fragment,o),B(ss.$$.fragment,o),B(rs.$$.fragment,o),B(ds.$$.fragment,o),B(mo.$$.fragment,o),B(ls.$$.fragment,o),B(cs.$$.fragment,o),B(ps.$$.fragment,o),B(hs.$$.fragment,o),B(us.$$.fragment,o),B(bo.$$.fragment,o),B(ms.$$.fragment,o),B(_s.$$.fragment,o),B(bs.$$.fragment,o),B(vs.$$.fragment,o),B(Bo.$$.fragment,o),B(ys.$$.fragment,o),B(ws.$$.fragment,o),B(Ts.$$.fragment,o),B(Fs.$$.fragment,o),B(yo.$$.fragment,o),B(zs.$$.fragment,o),B(qs.$$.fragment,o),B(Ms.$$.fragment,o),B(Ns.$$.fragment,o),B(To.$$.fragment,o),B(Ss.$$.fragment,o),B(Os.$$.fragment,o),B(Ds.$$.fragment,o),B(Gs.$$.fragment,o),B(xo.$$.fragment,o),B(Ks.$$.fragment,o),B(Xs.$$.fragment,o),B(Ys.$$.fragment,o),B(ir.$$.fragment,o),B(zo.$$.fragment,o),B(dr.$$.fragment,o),B(lr.$$.fragment,o),B(cr.$$.fragment,o),B(br.$$.fragment,o),B(Mo.$$.fragment,o),B(kr.$$.fragment,o),B(Br.$$.fragment,o),B(vr.$$.fragment,o),B(qr.$$.fragment,o),B(Po.$$.fragment,o),B(Mr.$$.fragment,o),B(Er.$$.fragment,o),B(Pr.$$.fragment,o),B(Or.$$.fragment,o),B(Co.$$.fragment,o),B(Dr.$$.fragment,o),B(Wr.$$.fragment,o),B(Ur.$$.fragment,o),B(Xr.$$.fragment,o),B(Lo.$$.fragment,o),B(Yr.$$.fragment,o),wp=!1},d(o){t(p),o&&t(T),o&&t(u),v(y),o&&t(Pc),o&&t(et),v(Ko),o&&t(jc),o&&t(Vt),o&&t(Cc),o&&t(oa),o&&t(Ac),o&&t(na),o&&t(Lc),o&&t(sa),o&&t(Ic),o&&t(U),o&&t(Nc),o&&t(Ce),o&&t(Sc),o&&t(tt),v(nn),o&&t(Oc),o&&t(M),v(sn),v(an),v(ln),v(pn),v(hn),o&&t(Dc),o&&t(st),v(fn),o&&t(Wc),o&&t(E),v(gn),v(bn),v(Bn),v(yn),v(wn),o&&t(Uc),o&&t(at),v(Tn),o&&t(Qc),o&&t(Q),v($n),v(Fn),v(qn),v(Mn),v(En),o&&t(Hc),o&&t(it),v(jn),o&&t(Vc),o&&t(dt),v(Cn),o&&t(Jc),o&&t(lt),v(Ln),o&&t(Rc),o&&t(H),v(In),v(Wn),v(io),v(Un),o&&t(Gc),o&&t(pt),v(Qn),o&&t(Kc),o&&t(ht),v(Hn),v(Vn),v(co),v(Jn),o&&t(Xc),o&&t(gt),v(Rn),o&&t(Yc),o&&t($e),v(Gn),v(Xn),v(ho),v(Yn),o&&t(Zc),o&&t(_t),v(Zn),o&&t(ep),o&&t(xe),v(es),v(os),v(go),v(ns),o&&t(tp),o&&t(Bt),v(ss),o&&t(op),o&&t(ke),v(rs),v(ds),v(mo),v(ls),v(cs),o&&t(np),o&&t(yt),v(ps),o&&t(sp),o&&t(Be),v(hs),v(us),v(bo),v(ms),o&&t(rp),o&&t(Tt),v(_s),o&&t(ap),o&&t(ve),v(bs),v(vs),v(Bo),v(ys),o&&t(ip),o&&t(xt),v(ws),o&&t(dp),o&&t(ye),v(Ts),v(Fs),v(yo),v(zs),o&&t(lp),o&&t(qt),v(qs),o&&t(cp),o&&t(P),v(Ms),v(Ns),v(To),v(Ss),o&&t(pp),o&&t(Et),v(Os),o&&t(hp),o&&t(j),v(Ds),v(Gs),v(xo),v(Ks),o&&t(fp),o&&t(Ct),v(Xs),o&&t(gp),o&&t(C),v(Ys),v(ir),v(zo),v(dr),o&&t(up),o&&t(Lt),v(lr),o&&t(mp),o&&t(A),v(cr),v(br),v(Mo),v(kr),o&&t(_p),o&&t(Nt),v(Br),o&&t(bp),o&&t(L),v(vr),v(qr),v(Po),v(Mr),o&&t(kp),o&&t(Ot),v(Er),o&&t(Bp),o&&t(I),v(Pr),v(Or),v(Co),v(Dr),o&&t(vp),o&&t(Wt),v(Wr),o&&t(yp),o&&t(N),v(Ur),v(Xr),v(Lo),v(Yr)}}}const ax={local:"bigbird",sections:[{local:"overview",title:"Overview"},{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.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 ix(z,p,T){let{fw:u}=p;return z.$$set=w=>{"fw"in w&&T(0,u=w.fw)},[u]}class gx extends O2{constructor(p){super();D2(this,p,ix,rx,W2,{fw:0})}}export{gx as default,ax as metadata};
