import{S as r3,i as o3,s as n3,e as o,k as c,w as f,t as a,M as s3,c as n,d as r,m as l,a as s,x as g,h as i,b as d,G as t,g as m,y as h,q as u,o as _,B as b,v as a3,L as Ey}from"../../chunks/vendor-hf-doc-builder.js";import{T as t3}from"../../chunks/Tip-hf-doc-builder.js";import{D as v}from"../../chunks/Docstring-hf-doc-builder.js";import{C as dp}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ly}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function i3(H){let $,w;return $=new dp({props:{code:"Y29tcGxldGVkJTIwJTNEJTIwRmFsc2UlMEF3aGlsZSUyMG5vdCUyMGNvbXBsZXRlZCUzQSUwQSUyMCUyMCUyMCUyMF8lMkMlMjBjb21wbGV0ZWQlMjAlM0QlMjBjb25zdHJhaW50LnVwZGF0ZShjb25zdHJhaW50LmFkdmFuY2UoKSk=",highlighted:`completed = <span class="hljs-literal">False</span>
<span class="hljs-keyword">while</span> <span class="hljs-keyword">not</span> completed:
    _, completed = constraint.update(constraint.advance())`}}),{c(){f($.$$.fragment)},l(T){g($.$$.fragment,T)},m(T,k){h($,T,k),w=!0},p:Ey,i(T){w||(u($.$$.fragment,T),w=!0)},o(T){_($.$$.fragment,T),w=!1},d(T){b($,T)}}}function c3(H){let $,w;return{c(){$=o("p"),w=a("The API for the streamer classes is still under development and may change in the future.")},l(T){$=n(T,"P",{});var k=s($);w=i(k,"The API for the streamer classes is still under development and may change in the future."),k.forEach(r)},m(T,k){m(T,$,k),t($,w)},d(T){T&&r($)}}}function l3(H){let $,w,T,k,B;return k=new dp({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMFRleHRTdHJlYW1lciUwQSUwQXRvayUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ3B0MiUyMiklMEFpbnB1dHMlMjAlM0QlMjB0b2soJTVCJTIyQW4lMjBpbmNyZWFzaW5nJTIwc2VxdWVuY2UlM0ElMjBvbmUlMkMlMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXN0cmVhbWVyJTIwJTNEJTIwVGV4dFN0cmVhbWVyKHRvayklMEElMEElMjMlMjBEZXNwaXRlJTIwcmV0dXJuaW5nJTIwdGhlJTIwdXN1YWwlMjBvdXRwdXQlMkMlMjB0aGUlMjBzdHJlYW1lciUyMHdpbGwlMjBhbHNvJTIwcHJpbnQlMjB0aGUlMjBnZW5lcmF0ZWQlMjB0ZXh0JTIwdG8lMjBzdGRvdXQuJTBBXyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwc3RyZWFtZXIlM0RzdHJlYW1lciUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMjAp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, TextStreamer

<span class="hljs-meta">&gt;&gt;&gt; </span>tok = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tok([<span class="hljs-string">&quot;An increasing sequence: one,&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>streamer = TextStreamer(tok)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Despite returning the usual output, the streamer will also print the generated text to stdout.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>_ = model.generate(**inputs, streamer=streamer, max_new_tokens=<span class="hljs-number">20</span>)
An increasing sequence: one, two, three, four, five, six, seven, eight, nine, ten, eleven,`}}),{c(){$=o("p"),w=a("Examples:"),T=c(),f(k.$$.fragment)},l(y){$=n(y,"P",{});var D=s($);w=i(D,"Examples:"),D.forEach(r),T=l(y),g(k.$$.fragment,y)},m(y,D){m(y,$,D),t($,w),m(y,T,D),h(k,y,D),B=!0},p:Ey,i(y){B||(u(k.$$.fragment,y),B=!0)},o(y){_(k.$$.fragment,y),B=!1},d(y){y&&r($),y&&r(T),b(k,y)}}}function d3(H){let $,w;return{c(){$=o("p"),w=a("The API for the streamer classes is still under development and may change in the future.")},l(T){$=n(T,"P",{});var k=s($);w=i(k,"The API for the streamer classes is still under development and may change in the future."),k.forEach(r)},m(T,k){m(T,$,k),t($,w)},d(T){T&&r($)}}}function p3(H){let $,w,T,k,B;return k=new dp({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUyQyUyMFRleHRJdGVyYXRvclN0cmVhbWVyJTBBZnJvbSUyMHRocmVhZGluZyUyMGltcG9ydCUyMFRocmVhZCUwQSUwQXRvayUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ3B0MiUyMiklMEFpbnB1dHMlMjAlM0QlMjB0b2soJTVCJTIyQW4lMjBpbmNyZWFzaW5nJTIwc2VxdWVuY2UlM0ElMjBvbmUlMkMlMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXN0cmVhbWVyJTIwJTNEJTIwVGV4dEl0ZXJhdG9yU3RyZWFtZXIodG9rKSUwQSUwQSUyMyUyMFJ1biUyMHRoZSUyMGdlbmVyYXRpb24lMjBpbiUyMGElMjBzZXBhcmF0ZSUyMHRocmVhZCUyQyUyMHNvJTIwdGhhdCUyMHdlJTIwY2FuJTIwZmV0Y2glMjB0aGUlMjBnZW5lcmF0ZWQlMjB0ZXh0JTIwaW4lMjBhJTIwbm9uLWJsb2NraW5nJTIwd2F5LiUwQWdlbmVyYXRpb25fa3dhcmdzJTIwJTNEJTIwZGljdChpbnB1dHMlMkMlMjBzdHJlYW1lciUzRHN0cmVhbWVyJTJDJTIwbWF4X25ld190b2tlbnMlM0QyMCklMEF0aHJlYWQlMjAlM0QlMjBUaHJlYWQodGFyZ2V0JTNEbW9kZWwuZ2VuZXJhdGUlMkMlMjBrd2FyZ3MlM0RnZW5lcmF0aW9uX2t3YXJncyklMEF0aHJlYWQuc3RhcnQoKSUwQWdlbmVyYXRlZF90ZXh0JTIwJTNEJTIwJTIyJTIyJTBBZm9yJTIwbmV3X3RleHQlMjBpbiUyMHN0cmVhbWVyJTNBJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdGVkX3RleHQlMjAlMkIlM0QlMjBuZXdfdGV4dCUwQWdlbmVyYXRlZF90ZXh0",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> threading <span class="hljs-keyword">import</span> Thread

<span class="hljs-meta">&gt;&gt;&gt; </span>tok = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tok([<span class="hljs-string">&quot;An increasing sequence: one,&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>streamer = TextIteratorStreamer(tok)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Run the generation in a separate thread, so that we can fetch the generated text in a non-blocking way.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generation_kwargs = <span class="hljs-built_in">dict</span>(inputs, streamer=streamer, max_new_tokens=<span class="hljs-number">20</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>thread = Thread(target=model.generate, kwargs=generation_kwargs)
<span class="hljs-meta">&gt;&gt;&gt; </span>thread.start()
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> new_text <span class="hljs-keyword">in</span> streamer:
<span class="hljs-meta">... </span>    generated_text += new_text
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text
<span class="hljs-string">&#x27;An increasing sequence: one, two, three, four, five, six, seven, eight, nine, ten, eleven,&#x27;</span>`}}),{c(){$=o("p"),w=a("Examples:"),T=c(),f(k.$$.fragment)},l(y){$=n(y,"P",{});var D=s($);w=i(D,"Examples:"),D.forEach(r),T=l(y),g(k.$$.fragment,y)},m(y,D){m(y,$,D),t($,w),m(y,T,D),h(k,y,D),B=!0},p:Ey,i(y){B||(u(k.$$.fragment,y),B=!0)},o(y){_(k.$$.fragment,y),B=!1},d(y){y&&r($),y&&r(T),b(k,y)}}}function m3(H){let $,w,T,k,B,y,D,Uc,Rf,pp,E,Zf,Ts,Hf,Xf,ys,Qf,Yf,ks,Kf,eg,xs,tg,rg,ws,og,ng,Ls,sg,ag,Es,ig,cg,Ps,lg,dg,mp,Fs,pg,fp,rt,Lt,Gc,xr,mg,Jc,fg,gp,X,gg,Ss,hg,ug,Ds,_g,bg,zs,vg,$g,hp,qs,Tg,up,wr,_p,Re,yg,Rc,kg,xg,Is,wg,Lg,bp,Q,Os,Zc,Eg,Pg,Fg,Bs,Hc,Sg,Dg,zg,Ms,Xc,qg,Ig,Og,Ws,Qc,Bg,Mg,vp,S,Wg,Yc,Vg,Cg,Kc,Ng,Ag,el,jg,Ug,tl,Gg,Jg,rl,Rg,Zg,ol,Hg,Xg,$p,W,Qg,nl,Yg,Kg,sl,eh,th,al,rh,oh,il,nh,sh,Tp,V,ah,cl,ih,ch,ll,lh,dh,dl,ph,mh,pl,fh,gh,yp,Lr,kp,Et,hh,ml,uh,_h,xp,C,bh,fl,vh,$h,gl,Th,yh,hl,kh,xh,ul,wh,Lh,wp,Vs,Eh,Lp,ot,Pt,_l,Er,Ph,bl,Fh,Ep,nt,Pr,Sh,vl,Dh,Pp,st,Fr,zh,$l,qh,Fp,te,Sr,Ih,Tl,Oh,Bh,Ft,Dr,Mh,yl,Wh,Sp,at,St,kl,zr,Vh,xl,Ch,Dp,it,qr,Nh,wl,Ah,zp,ct,Ir,jh,Ll,Uh,qp,re,Or,Gh,El,Jh,Rh,Dt,Br,Zh,Pl,Hh,Ip,lt,zt,Fl,Mr,Xh,Sl,Qh,Op,dt,Wr,Yh,Dl,Kh,Bp,pt,Vr,eu,zl,tu,Mp,mt,qt,ql,Cr,ru,Il,ou,Wp,ft,Nr,nu,Ol,su,Vp,gt,Ar,au,Bl,iu,Cp,ht,It,Ml,jr,cu,Wl,lu,Np,Ot,du,Cs,pu,mu,Ap,oe,Ur,fu,Vl,gu,hu,Bt,Gr,uu,Cl,_u,jp,ne,Jr,bu,z,vu,Ns,$u,Tu,As,yu,ku,Nl,xu,wu,Al,jl,Lu,Eu,js,Pu,Fu,Us,Su,Du,zu,Gs,Rr,Up,se,Zr,qu,Ul,Iu,Ou,Mt,Hr,Bu,Gl,Mu,Gp,ae,Xr,Wu,Js,Rs,Vu,Cu,Nu,Zs,Qr,Jp,ie,Yr,Au,Hs,Xs,ju,Uu,Gu,Qs,Kr,Rp,ce,eo,Ju,Ys,Ks,Ru,Zu,Hu,ea,to,Zp,le,ro,Xu,ta,ra,Qu,Yu,Ku,oa,oo,Hp,de,no,e_,na,sa,t_,r_,o_,aa,so,Xp,pe,ao,n_,ia,ca,s_,a_,i_,la,io,Qp,me,co,c_,Wt,da,l_,d_,lo,p_,m_,f_,pa,po,Yp,fe,mo,g_,Vt,ma,h_,u_,fo,__,b_,v_,fa,go,Kp,ge,ho,$_,ga,ha,T_,y_,k_,ua,uo,em,he,_o,x_,Ct,_a,w_,L_,bo,E_,P_,F_,ba,vo,tm,ue,$o,S_,Ze,va,D_,z_,$a,q_,I_,To,O_,B_,M_,Ta,yo,rm,_e,ko,W_,ya,ka,V_,C_,N_,xa,xo,om,be,wo,A_,Nt,wa,j_,U_,Jl,G_,J_,R_,La,Lo,nm,ve,Eo,Z_,He,Ea,H_,X_,Rl,Q_,Y_,Zl,K_,eb,tb,Pa,Po,sm,$e,Fo,rb,Hl,ob,nb,At,So,sb,Xl,ab,am,Te,Do,ib,G,cb,Fa,lb,db,Ql,pb,mb,Yl,Kl,fb,gb,Sa,hb,ub,_b,Da,zo,im,ye,qo,bb,ed,vb,$b,jt,Io,Tb,td,yb,cm,ke,Oo,kb,za,qa,xb,wb,Lb,Ia,Bo,lm,xe,Mo,Eb,Oa,Ba,Pb,Fb,Sb,Ma,Wo,dm,we,Vo,Db,Wa,Va,zb,qb,Ib,Ca,Co,pm,Le,No,Ob,Na,Aa,Bb,Mb,Wb,ja,Ao,mm,Ee,jo,Vb,Ua,Ga,Cb,Nb,Ab,Ja,Uo,fm,Pe,Go,jb,Ut,Ra,Ub,Gb,Jo,Jb,Rb,Zb,Za,Ro,gm,Fe,Zo,Hb,Ha,Xa,Xb,Qb,Yb,Qa,Ho,hm,Se,Xo,Kb,Ya,Ka,ev,tv,rv,ei,Qo,um,De,Yo,ov,Gt,ti,nv,sv,rd,av,iv,cv,ri,Ko,_m,ze,en,lv,od,dv,pv,Jt,tn,mv,nd,fv,bm,qe,rn,gv,q,hv,oi,uv,_v,ni,bv,vv,sd,$v,Tv,ad,id,yv,kv,si,xv,wv,ai,Lv,Ev,Pv,ii,on,vm,Ie,nn,Fv,cd,Sv,Dv,Rt,sn,zv,ld,qv,$m,Oe,an,Iv,ci,li,Ov,Bv,Mv,di,cn,Tm,Be,ln,Wv,pi,mi,Vv,Cv,Nv,fi,dn,ym,Me,pn,Av,gi,hi,jv,Uv,Gv,ui,mn,km,We,fn,Jv,_i,bi,Rv,Zv,Hv,vi,gn,xm,Ve,hn,Xv,Zt,$i,Qv,Yv,dd,Kv,e0,t0,Ti,un,wm,Ce,_n,r0,yi,ki,o0,n0,s0,xi,bn,Lm,ut,Ht,pd,vn,a0,md,i0,Em,Xt,c0,wi,l0,d0,Pm,Ne,$n,p0,fd,m0,f0,Li,Tn,Fm,_t,yn,g0,Ei,kn,Sm,Ae,xn,h0,wn,u0,gd,_0,b0,v0,Pi,Ln,Dm,je,En,$0,Pn,T0,hd,y0,k0,x0,Fi,Fn,zm,bt,Qt,ud,Sn,w0,_d,L0,qm,Yt,E0,Si,P0,F0,Im,x,Dn,S0,bd,D0,z0,vd,q0,I0,Kt,O0,$d,B0,M0,er,zn,W0,Td,V0,C0,tr,qn,N0,yd,A0,j0,rr,In,U0,kd,G0,J0,or,On,R0,Bn,Z0,xd,H0,X0,Q0,nr,Mn,Y0,wd,K0,e$,sr,Wn,t$,Ld,r$,o$,Xe,Vn,n$,Cn,s$,Ed,a$,i$,c$,Pd,l$,Om,vt,Nn,d$,Di,zi,p$,m$,Bm,$t,An,f$,jn,g$,qi,h$,u$,Mm,J,Un,_$,Fd,b$,v$,O,Gn,$$,Sd,T$,y$,Tt,k$,Dd,x$,w$,zd,L$,E$,P$,qd,Id,F$,S$,Ue,D$,Od,z$,q$,Bd,I$,O$,Md,B$,M$,W$,Wd,V$,C$,ar,Jn,N$,Vd,A$,Wm,yt,ir,Cd,Rn,j$,Nd,U$,Vm,R,Zn,G$,kt,J$,Ii,R$,Z$,Oi,H$,X$,Q$,Bi,Hn,Y$,Mi,Xn,Cm,I,Qn,K$,Wi,Vi,eT,tT,rT,Yn,oT,Kn,nT,sT,aT,Ci,iT,es,cT,lT,Ni,ts,dT,Ai,rs,Nm,Z,os,pT,ji,Ui,mT,fT,gT,Gi,ns,hT,Ji,ss,Am,xt,cr,Ad,as,uT,jd,_T,jm,Ge,is,bT,Ud,vT,$T,Ri,TT,cs,yT,Um,Je,ls,kT,Gd,xT,wT,Zi,LT,ds,ET,Gm,wt,lr,Jd,ps,PT,Rd,FT,Jm,F,ms,ST,Zd,DT,zT,dr,qT,pr,IT,mr,fs,OT,Hd,BT,MT,fr,gs,WT,Xd,VT,CT,gr,hs,NT,Qd,AT,Rm,M,us,jT,Yd,UT,GT,hr,JT,ur,RT,_r,_s,ZT,Kd,HT,Zm;return y=new ee({}),xr=new ee({}),wr=new dp({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVDJUb2tlbml6ZXIlMkMlMjBHUFQyTE1IZWFkTW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBHUFQyVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJncHQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUMkxNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJncHQyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIwYW5kJTIwJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFnZW5lcmF0aW9uX291dHB1dCUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwcmV0dXJuX2RpY3RfaW5fZ2VuZXJhdGUlM0RUcnVlJTJDJTIwb3V0cHV0X3Njb3JlcyUzRFRydWUp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPT2Tokenizer, GPT2LMHeadModel

tokenizer = GPT2Tokenizer.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
model = GPT2LMHeadModel.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)

inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute and &quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
generation_output = model.generate(**inputs, return_dict_in_generate=<span class="hljs-literal">True</span>, output_scores=<span class="hljs-literal">True</span>)`}}),Lr=new dp({props:{code:"Z2VuZXJhdGlvbl9vdXRwdXQlNUIlM0EyJTVE",highlighted:'generation_output[:<span class="hljs-number">2</span>]'}}),Er=new ee({}),Pr=new v({props:{name:"class transformers.generation.GreedySearchDecoderOnlyOutput",anchor:"transformers.generation.GreedySearchDecoderOnlyOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.GreedySearchDecoderOnlyOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.GreedySearchDecoderOnlyOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Processed prediction scores of the language modeling head (scores for each vocabulary token before SoftMax)
at each generation step. Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for
each generated token), with each tensor of shape <code>(batch_size, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.GreedySearchDecoderOnlyOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"attentions"},{anchor:"transformers.generation.GreedySearchDecoderOnlyOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, generated_length, hidden_size)</code>.`,name:"hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L83"}}),Fr=new v({props:{name:"class transformers.generation.GreedySearchEncoderDecoderOutput",anchor:"transformers.generation.GreedySearchEncoderDecoderOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"decoder_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"cross_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Processed prediction scores of the language modeling head (scores for each vocabulary token before SoftMax)
at each generation step. Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for
each generated token), with each tensor of shape <code>(batch_size, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.encoder_attentions",description:`<strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer of the decoder) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.`,name:"encoder_attentions"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.encoder_hidden_states",description:`<strong>encoder_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>.`,name:"encoder_hidden_states"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.decoder_attentions",description:`<strong>decoder_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"decoder_attentions"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.cross_attentions",description:`<strong>cross_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"cross_attentions"},{anchor:"transformers.generation.GreedySearchEncoderDecoderOutput.decoder_hidden_states",description:`<strong>decoder_hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, generated_length, hidden_size)</code>.`,name:"decoder_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L179"}}),Sr=new v({props:{name:"class transformers.generation.FlaxGreedySearchOutput",anchor:"transformers.generation.FlaxGreedySearchOutput",parameters:[{name:"sequences",val:": ndarray = None"}],parametersDescription:[{anchor:"transformers.generation.FlaxGreedySearchOutput.sequences",description:`<strong>sequences</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, max_length)</code>) &#x2014;
The generated sequences.`,name:"sequences"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_utils.py#L55"}}),Dr=new v({props:{name:"replace",anchor:"transformers.generation.FlaxGreedySearchOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/flax/struct.py#L108"}}),zr=new ee({}),qr=new v({props:{name:"class transformers.generation.SampleDecoderOnlyOutput",anchor:"transformers.generation.SampleDecoderOnlyOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.SampleDecoderOnlyOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_return_sequences, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.SampleDecoderOnlyOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Processed prediction scores of the language modeling head (scores for each vocabulary token before SoftMax)
at each generation step. Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for
each generated token), with each tensor of shape <code>(batch_size*num_return_sequences, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.SampleDecoderOnlyOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(num_return_sequences*batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"attentions"},{anchor:"transformers.generation.SampleDecoderOnlyOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(num_return_sequences*batch_size, generated_length, hidden_size)</code>.`,name:"hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L221"}}),Ir=new v({props:{name:"class transformers.generation.SampleEncoderDecoderOutput",anchor:"transformers.generation.SampleEncoderDecoderOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"decoder_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"cross_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.SampleEncoderDecoderOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_return_sequences, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Processed prediction scores of the language modeling head (scores for each vocabulary token before SoftMax)
at each generation step. Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for
each generated token), with each tensor of shape <code>(batch_size*num_return_sequences, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.encoder_attentions",description:`<strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer of the decoder) of shape
<code>(batch_size*num_return_sequences, num_heads, sequence_length, sequence_length)</code>.`,name:"encoder_attentions"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.encoder_hidden_states",description:`<strong>encoder_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*num_return_sequences, sequence_length, hidden_size)</code>.`,name:"encoder_hidden_states"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.decoder_attentions",description:`<strong>decoder_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_return_sequences, num_heads, generated_length, sequence_length)</code>.`,name:"decoder_attentions"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.cross_attentions",description:`<strong>cross_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"cross_attentions"},{anchor:"transformers.generation.SampleEncoderDecoderOutput.decoder_hidden_states",description:`<strong>decoder_hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_return_sequences, generated_length, hidden_size)</code>.`,name:"decoder_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L250"}}),Or=new v({props:{name:"class transformers.generation.FlaxSampleOutput",anchor:"transformers.generation.FlaxSampleOutput",parameters:[{name:"sequences",val:": ndarray = None"}],parametersDescription:[{anchor:"transformers.generation.FlaxSampleOutput.sequences",description:`<strong>sequences</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, max_length)</code>) &#x2014;
The generated sequences.`,name:"sequences"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_utils.py#L69"}}),Br=new v({props:{name:"replace",anchor:"transformers.generation.FlaxSampleOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/flax/struct.py#L108"}}),Mr=new ee({}),Wr=new v({props:{name:"class transformers.generation.BeamSearchDecoderOnlyOutput",anchor:"transformers.generation.BeamSearchDecoderOnlyOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"sequences_scores",val:": typing.Optional[torch.FloatTensor] = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_return_sequences, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.sequences_scores",description:`<strong>sequences_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size*num_return_sequences)</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Final beam scores of the generated <code>sequences</code>.`,name:"sequences_scores"},{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam transition scores for each vocabulary token at each generation step. Beam transition scores consisting
of log probabilities of tokens conditioned on log softmax of previously generated tokens in this beam.
Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for each generated token),
with each tensor of shape <code>(batch_size*num_beams*num_return_sequences, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>torch.LongTensor</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam indices of generated token id at each generation step. <code>torch.LongTensor</code> of shape
<code>(batch_size*num_return_sequences, sequence_length)</code>.`,name:"beam_indices"},{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams, num_heads, generated_length, sequence_length)</code>.`,name:"attentions"},{anchor:"transformers.generation.BeamSearchDecoderOnlyOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams*num_return_sequences, generated_length, hidden_size)</code>.`,name:"hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L293"}}),Vr=new v({props:{name:"class transformers.generation.BeamSearchEncoderDecoderOutput",anchor:"transformers.generation.BeamSearchEncoderDecoderOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"sequences_scores",val:": typing.Optional[torch.FloatTensor] = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"decoder_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"cross_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_return_sequences, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.sequences_scores",description:`<strong>sequences_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size*num_return_sequences)</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Final beam scores of the generated <code>sequences</code>.`,name:"sequences_scores"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam transition scores for each vocabulary token at each generation step. Beam transition scores consisting
of log probabilities of tokens conditioned on log softmax of previously generated tokens in this beam.
Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for each generated token),
with each tensor of shape <code>(batch_size*num_beams, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>torch.LongTensor</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam indices of generated token id at each generation step. <code>torch.LongTensor</code> of shape
<code>(batch_size*num_return_sequences, sequence_length)</code>.`,name:"beam_indices"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.encoder_attentions",description:`<strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer of the decoder) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.`,name:"encoder_attentions"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.encoder_hidden_states",description:`<strong>encoder_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*num_beams*num_return_sequences, sequence_length, hidden_size)</code>.`,name:"encoder_hidden_states"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.decoder_attentions",description:`<strong>decoder_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams*num_return_sequences, num_heads, generated_length, sequence_length)</code>.`,name:"decoder_attentions"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.cross_attentions",description:`<strong>cross_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"cross_attentions"},{anchor:"transformers.generation.BeamSearchEncoderDecoderOutput.decoder_hidden_states",description:`<strong>decoder_hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams*num_return_sequences, generated_length, hidden_size)</code>.`,name:"decoder_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L328"}}),Cr=new ee({}),Nr=new v({props:{name:"class transformers.generation.BeamSampleDecoderOnlyOutput",anchor:"transformers.generation.BeamSampleDecoderOnlyOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"sequences_scores",val:": typing.Optional[torch.FloatTensor] = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_return_sequences, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.sequences_scores",description:`<strong>sequences_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_return_sequence)</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Final beam scores of the generated <code>sequences</code>.`,name:"sequences_scores"},{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam transition scores for each vocabulary token at each generation step. Beam transition scores consisting
of log probabilities of tokens conditioned on log softmax of previously generated tokens in this beam.
Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for each generated token),
with each tensor of shape <code>(batch_size*num_beams*num_return_sequences, config.vocab_size)</code>.`,name:"scores"},{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>torch.LongTensor</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam indices of generated token id at each generation step. <code>torch.LongTensor</code> of shape
<code>(batch_size*num_return_sequences, sequence_length)</code>.`,name:"beam_indices"},{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams, num_heads, generated_length, sequence_length)</code>.`,name:"attentions"},{anchor:"transformers.generation.BeamSampleDecoderOnlyOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams, generated_length, hidden_size)</code>.`,name:"hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L378"}}),Ar=new v({props:{name:"class transformers.generation.BeamSampleEncoderDecoderOutput",anchor:"transformers.generation.BeamSampleEncoderDecoderOutput",parameters:[{name:"sequences",val:": LongTensor = None"},{name:"sequences_scores",val:": typing.Optional[torch.FloatTensor] = None"},{name:"scores",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"encoder_hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"decoder_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"cross_attentions",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_hidden_states",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"}],parametersDescription:[{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.sequences",description:`<strong>sequences</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size*num_beams, sequence_length)</code>) &#x2014;
The generated sequences. The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter
if all batches finished early due to the <code>eos_token_id</code>.`,name:"sequences"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.sequences_scores",description:`<strong>sequences_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_return_sequence)</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Final beam scores of the generated <code>sequences</code>.`,name:"sequences_scores"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.scores",description:`<strong>scores</strong> (<code>tuple(torch.FloatTensor)</code> <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam transition scores for each vocabulary token at each generation step. Beam transition scores consisting
of log probabilities of tokens conditioned on log softmax of previously generated tokens in this beam.
Tuple of <code>torch.FloatTensor</code> with up to <code>max_new_tokens</code> elements (one element for each generated token),
with each tensor of shape <code>(batch_size*num_beams, config.vocab_size)</code>).`,name:"scores"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>torch.LongTensor</code>, <em>optional</em>, returned when <code>output_scores=True</code> is passed or when <code>config.output_scores=True</code>) &#x2014;
Beam indices of generated token id at each generation step. <code>torch.LongTensor</code> of shape
<code>(batch_size*num_return_sequences, sequence_length)</code>.`,name:"beam_indices"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.encoder_attentions",description:`<strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer of the decoder) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.`,name:"encoder_attentions"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.encoder_hidden_states",description:`<strong>encoder_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*num_beams, sequence_length, hidden_size)</code>.`,name:"encoder_hidden_states"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.decoder_attentions",description:`<strong>decoder_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams, num_heads, generated_length, sequence_length)</code>.`,name:"decoder_attentions"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.cross_attentions",description:`<strong>cross_attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or <code>config.output_attentions=True</code>) &#x2014;
Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size, num_heads, generated_length, sequence_length)</code>.`,name:"cross_attentions"},{anchor:"transformers.generation.BeamSampleEncoderDecoderOutput.decoder_hidden_states",description:`<strong>decoder_hidden_states</strong> (<code>tuple(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 (one element for each generated token) of tuples (one element for each layer of the decoder) of
<code>torch.FloatTensor</code> of shape <code>(batch_size*num_beams, generated_length, hidden_size)</code>.`,name:"decoder_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L413"}}),jr=new ee({}),Ur=new v({props:{name:"class transformers.LogitsProcessor",anchor:"transformers.LogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L51"}}),Gr=new v({props:{name:"__call__",anchor:"transformers.LogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.LogitsProcessor.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LogitsProcessor.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L54",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),Jr=new v({props:{name:"class transformers.LogitsProcessorList",anchor:"transformers.LogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L73"}}),Rr=new v({props:{name:"__call__",anchor:"transformers.LogitsProcessorList.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LogitsProcessorList.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LogitsProcessorList.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L80",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),Zr=new v({props:{name:"class transformers.LogitsWarper",anchor:"transformers.LogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L62"}}),Hr=new v({props:{name:"__call__",anchor:"transformers.LogitsWarper.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.LogitsWarper.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LogitsWarper.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L65",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),Xr=new v({props:{name:"class transformers.MinLengthLogitsProcessor",anchor:"transformers.MinLengthLogitsProcessor",parameters:[{name:"min_length",val:": int"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int]]"}],parametersDescription:[{anchor:"transformers.MinLengthLogitsProcessor.min_length",description:`<strong>min_length</strong> (<code>int</code>) &#x2014;
The minimum length below which the score of <code>eos_token_id</code> is set to <code>-float(&quot;Inf&quot;)</code>.`,name:"min_length"},{anchor:"transformers.MinLengthLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L96"}}),Qr=new v({props:{name:"__call__",anchor:"transformers.MinLengthLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L119"}}),Yr=new v({props:{name:"class transformers.MinNewTokensLengthLogitsProcessor",anchor:"transformers.MinNewTokensLengthLogitsProcessor",parameters:[{name:"prompt_length_to_skip",val:": int"},{name:"min_new_tokens",val:": int"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int]]"}],parametersDescription:[{anchor:"transformers.MinNewTokensLengthLogitsProcessor.prompt_length_to_skip",description:`<strong>prompt_length_to_skip</strong> (<code>int</code>) &#x2014;
The input tokens length.`,name:"prompt_length_to_skip"},{anchor:"transformers.MinNewTokensLengthLogitsProcessor.min_new_tokens",description:`<strong>min_new_tokens</strong> (<code>int</code>) &#x2014;
The minimum <em>new</em> tokens length below which the score of <code>eos_token_id</code> is set to <code>-float(&quot;Inf&quot;)</code>.`,name:"min_new_tokens"},{anchor:"transformers.MinNewTokensLengthLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L127"}}),Kr=new v({props:{name:"__call__",anchor:"transformers.MinNewTokensLengthLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L157"}}),eo=new v({props:{name:"class transformers.TemperatureLogitsWarper",anchor:"transformers.TemperatureLogitsWarper",parameters:[{name:"temperature",val:": float"}],parametersDescription:[{anchor:"transformers.TemperatureLogitsWarper.temperature",description:`<strong>temperature</strong> (<code>float</code>) &#x2014;
The value used to module the logits distribution.`,name:"temperature"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L166"}}),to=new v({props:{name:"__call__",anchor:"transformers.TemperatureLogitsWarper.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L181"}}),ro=new v({props:{name:"class transformers.RepetitionPenaltyLogitsProcessor",anchor:"transformers.RepetitionPenaltyLogitsProcessor",parameters:[{name:"penalty",val:": float"}],parametersDescription:[{anchor:"transformers.RepetitionPenaltyLogitsProcessor.repetition_penalty",description:`<strong>repetition_penalty</strong> (<code>float</code>) &#x2014;
The parameter for repetition penalty. 1.0 means no penalty. See <a href="https://arxiv.org/pdf/1909.05858.pdf" rel="nofollow">this
paper</a> for more details.`,name:"repetition_penalty"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L186"}}),oo=new v({props:{name:"__call__",anchor:"transformers.RepetitionPenaltyLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L202"}}),no=new v({props:{name:"class transformers.TopPLogitsWarper",anchor:"transformers.TopPLogitsWarper",parameters:[{name:"top_p",val:": float"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.TopPLogitsWarper.top_p",description:`<strong>top_p</strong> (<code>float</code>) &#x2014;
If set to &lt; 1, only the smallest set of most probable tokens with probabilities that add up to <code>top_p</code> or
higher are kept for generation.`,name:"top_p"},{anchor:"transformers.TopPLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.TopPLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L240"}}),so=new v({props:{name:"__call__",anchor:"transformers.TopPLogitsWarper.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L263"}}),ao=new v({props:{name:"class transformers.TopKLogitsWarper",anchor:"transformers.TopKLogitsWarper",parameters:[{name:"top_k",val:": int"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.TopKLogitsWarper.top_k",description:`<strong>top_k</strong> (<code>int</code>) &#x2014;
The number of highest probability vocabulary tokens to keep for top-k-filtering.`,name:"top_k"},{anchor:"transformers.TopKLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.TopKLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L279"}}),io=new v({props:{name:"__call__",anchor:"transformers.TopKLogitsWarper.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L299"}}),co=new v({props:{name:"class transformers.TypicalLogitsWarper",anchor:"transformers.TypicalLogitsWarper",parameters:[{name:"mass",val:": float = 0.9"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.TypicalLogitsWarper.mass",description:`<strong>mass</strong> (<code>float</code>) &#x2014;
Value of typical_p between 0 and 1 inclusive, defaults to 0.9.`,name:"mass"},{anchor:"transformers.TypicalLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.TypicalLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L307"}}),po=new v({props:{name:"__call__",anchor:"transformers.TypicalLogitsWarper.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L330"}}),mo=new v({props:{name:"class transformers.NoRepeatNGramLogitsProcessor",anchor:"transformers.NoRepeatNGramLogitsProcessor",parameters:[{name:"ngram_size",val:": int"}],parametersDescription:[{anchor:"transformers.NoRepeatNGramLogitsProcessor.ngram_size",description:`<strong>ngram_size</strong> (<code>int</code>) &#x2014;
All ngrams of size <code>ngram_size</code> can only occur once.`,name:"ngram_size"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L474"}}),go=new v({props:{name:"__call__",anchor:"transformers.NoRepeatNGramLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L489"}}),ho=new v({props:{name:"class transformers.NoBadWordsLogitsProcessor",anchor:"transformers.NoBadWordsLogitsProcessor",parameters:[{name:"bad_words_ids",val:": typing.List[typing.List[int]]"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int]]"}],parametersDescription:[{anchor:"transformers.NoBadWordsLogitsProcessor.bad_words_ids",description:`<strong>bad_words_ids</strong> (<code>List[List[int]]</code>) &#x2014;
List of list of token ids that are not allowed to be generated. In order to get the token ids of the words
that should not appear in the generated text, use <code>tokenizer(bad_words, add_prefix_space=True, add_special_tokens=False).input_ids</code>.`,name:"bad_words_ids"},{anchor:"transformers.NoBadWordsLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L541"}}),uo=new v({props:{name:"__call__",anchor:"transformers.NoBadWordsLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L589"}}),_o=new v({props:{name:"class transformers.PrefixConstrainedLogitsProcessor",anchor:"transformers.PrefixConstrainedLogitsProcessor",parameters:[{name:"prefix_allowed_tokens_fn",val:": typing.Callable[[int, torch.Tensor], typing.List[int]]"},{name:"num_beams",val:": int"}],parametersDescription:[{anchor:"transformers.PrefixConstrainedLogitsProcessor.prefix_allowed_tokens_fn",description:`<strong>prefix_allowed_tokens_fn</strong> (<code>Callable[[int, torch.Tensor], List[int]]</code>) &#x2014;
This function constraints the beam search to allowed tokens only at each step. This function takes 2
arguments <code>inputs_ids</code> and the batch ID <code>batch_id</code>. It has to return a list with the allowed tokens for the
next generation step conditioned on the previously generated tokens <code>inputs_ids</code> and the batch ID
<code>batch_id</code>.`,name:"prefix_allowed_tokens_fn"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L675"}}),vo=new v({props:{name:"__call__",anchor:"transformers.PrefixConstrainedLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L692"}}),$o=new v({props:{name:"class transformers.HammingDiversityLogitsProcessor",anchor:"transformers.HammingDiversityLogitsProcessor",parameters:[{name:"diversity_penalty",val:": float"},{name:"num_beams",val:": int"},{name:"num_beam_groups",val:": int"}],parametersDescription:[{anchor:"transformers.HammingDiversityLogitsProcessor.diversity_penalty",description:`<strong>diversity_penalty</strong> (<code>float</code>) &#x2014;
This value is subtracted from a beam&#x2019;s score if it generates a token same as any beam from other group at a
particular time. Note that <code>diversity_penalty</code> is only effective if <code>group beam search</code> is enabled.`,name:"diversity_penalty"},{anchor:"transformers.HammingDiversityLogitsProcessor.num_beams",description:`<strong>num_beams</strong> (<code>int</code>) &#x2014;
Number of beams used for group beam search. See <a href="https://arxiv.org/pdf/1610.02424.pdf" rel="nofollow">this paper</a> for more
details.`,name:"num_beams"},{anchor:"transformers.HammingDiversityLogitsProcessor.num_beam_groups",description:`<strong>num_beam_groups</strong> (<code>int</code>) &#x2014;
Number of groups to divide <code>num_beams</code> into in order to ensure diversity among different groups of beams.
See <a href="https://arxiv.org/pdf/1610.02424.pdf" rel="nofollow">this paper</a> for more details.`,name:"num_beam_groups"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L701"}}),yo=new v({props:{name:"__call__",anchor:"transformers.HammingDiversityLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"current_tokens",val:": LongTensor"},{name:"beam_group_idx",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L732"}}),ko=new v({props:{name:"class transformers.ForcedBOSTokenLogitsProcessor",anchor:"transformers.ForcedBOSTokenLogitsProcessor",parameters:[{name:"bos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.ForcedBOSTokenLogitsProcessor.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>) &#x2014;
The id of the token to force as the first generated token.`,name:"bos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L761"}}),xo=new v({props:{name:"__call__",anchor:"transformers.ForcedBOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L773"}}),wo=new v({props:{name:"class transformers.ForcedEOSTokenLogitsProcessor",anchor:"transformers.ForcedEOSTokenLogitsProcessor",parameters:[{name:"max_length",val:": int"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int]]"}],parametersDescription:[{anchor:"transformers.ForcedEOSTokenLogitsProcessor.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum length of the sequence to be generated.`,name:"max_length"},{anchor:"transformers.ForcedEOSTokenLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Optionally, use a
list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L782"}}),Lo=new v({props:{name:"__call__",anchor:"transformers.ForcedEOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L800"}}),Eo=new v({props:{name:"class transformers.InfNanRemoveLogitsProcessor",anchor:"transformers.InfNanRemoveLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L810"}}),Po=new v({props:{name:"__call__",anchor:"transformers.InfNanRemoveLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/logits_process.py#L816"}}),Fo=new v({props:{name:"class transformers.TFLogitsProcessor",anchor:"transformers.TFLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L53"}}),So=new v({props:{name:"__call__",anchor:"transformers.TFLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],parametersDescription:[{anchor:"transformers.TFLogitsProcessor.__call__.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLogitsProcessor.__call__.scores",description:`<strong>scores</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search.`,name:"scores"},{anchor:"transformers.TFLogitsProcessor.__call__.cur_len",description:`<strong>cur_len</strong> (<code>int</code>) &#x2014;
The current length of valid input sequence tokens. In the TF implementation, the input_ids&#x2019; sequence length
is the maximum length generate can produce, and we need to know which of its tokens are valid.
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"cur_len"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L56",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),Do=new v({props:{name:"class transformers.TFLogitsProcessorList",anchor:"transformers.TFLogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L75"}}),zo=new v({props:{name:"__call__",anchor:"transformers.TFLogitsProcessorList.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLogitsProcessorList.__call__.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLogitsProcessorList.__call__.scores",description:`<strong>scores</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search.`,name:"scores"},{anchor:"transformers.TFLogitsProcessorList.__call__.cur_len",description:`<strong>cur_len</strong> (<code>int</code>) &#x2014;
The current length of valid input sequence tokens. In the TF implementation, the input_ids&#x2019; sequence length
is the maximum length generate can produce, and we need to know which of its tokens are valid.
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"cur_len"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L82",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),qo=new v({props:{name:"class transformers.TFLogitsWarper",anchor:"transformers.TFLogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L64"}}),Io=new v({props:{name:"__call__",anchor:"transformers.TFLogitsWarper.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],parametersDescription:[{anchor:"transformers.TFLogitsWarper.__call__.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLogitsWarper.__call__.scores",description:`<strong>scores</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search.`,name:"scores"},{anchor:"transformers.TFLogitsWarper.__call__.cur_len",description:`<strong>cur_len</strong> (<code>int</code>) &#x2014;
The current length of valid input sequence tokens. In the TF implementation, the input_ids&#x2019; sequence length
is the maximum length generate can produce, and we need to know which of its tokens are valid.
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"cur_len"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L67",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>tf.Tensor</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),Oo=new v({props:{name:"class transformers.TFTemperatureLogitsWarper",anchor:"transformers.TFTemperatureLogitsWarper",parameters:[{name:"temperature",val:": float"}],parametersDescription:[{anchor:"transformers.TFTemperatureLogitsWarper.temperature",description:`<strong>temperature</strong> (<code>float</code>) &#x2014;
The value used to module the logits distribution.`,name:"temperature"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L98"}}),Bo=new v({props:{name:"__call__",anchor:"transformers.TFTemperatureLogitsWarper.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L113"}}),Mo=new v({props:{name:"class transformers.TFTopPLogitsWarper",anchor:"transformers.TFTopPLogitsWarper",parameters:[{name:"top_p",val:": float"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.TFTopPLogitsWarper.top_p",description:`<strong>top_p</strong> (<code>float</code>) &#x2014;
If set to &lt; 1, only the smallest set of most probable tokens with probabilities that add up to <code>top_p</code> or
higher are kept for generation.`,name:"top_p"},{anchor:"transformers.TFTopPLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.TFTopPLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L146"}}),Wo=new v({props:{name:"__call__",anchor:"transformers.TFTopPLogitsWarper.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L168"}}),Vo=new v({props:{name:"class transformers.TFTopKLogitsWarper",anchor:"transformers.TFTopKLogitsWarper",parameters:[{name:"top_k",val:": int"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.TFTopKLogitsWarper.top_k",description:`<strong>top_k</strong> (<code>int</code>) &#x2014;
The number of highest probability vocabulary tokens to keep for top-k-filtering.`,name:"top_k"},{anchor:"transformers.TFTopKLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.TFTopKLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L118"}}),Co=new v({props:{name:"__call__",anchor:"transformers.TFTopKLogitsWarper.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L138"}}),No=new v({props:{name:"class transformers.TFMinLengthLogitsProcessor",anchor:"transformers.TFMinLengthLogitsProcessor",parameters:[{name:"min_length",val:": int"},{name:"eos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.TFMinLengthLogitsProcessor.min_length",description:`<strong>min_length</strong> (<code>int</code>) &#x2014;
The minimum length below which the score of <code>eos_token_id</code> is set to <code>-float(&quot;Inf&quot;)</code>.`,name:"min_length"},{anchor:"transformers.TFMinLengthLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L200"}}),Ao=new v({props:{name:"__call__",anchor:"transformers.TFMinLengthLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L226"}}),jo=new v({props:{name:"class transformers.TFNoBadWordsLogitsProcessor",anchor:"transformers.TFNoBadWordsLogitsProcessor",parameters:[{name:"bad_words_ids",val:": typing.List[typing.List[int]]"},{name:"eos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.TFNoBadWordsLogitsProcessor.bad_words_ids",description:`<strong>bad_words_ids</strong> (<code>List[List[int]]</code>) &#x2014;
List of list of token ids that are not allowed to be generated. In order to get the tokens of the words
that should not appear in the generated text, use <code>tokenizer(bad_word, add_prefix_space=True).input_ids</code>.`,name:"bad_words_ids"},{anchor:"transformers.TFNoBadWordsLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L286"}}),Uo=new v({props:{name:"__call__",anchor:"transformers.TFNoBadWordsLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L362"}}),Go=new v({props:{name:"class transformers.TFNoRepeatNGramLogitsProcessor",anchor:"transformers.TFNoRepeatNGramLogitsProcessor",parameters:[{name:"ngram_size",val:": int"}],parametersDescription:[{anchor:"transformers.TFNoRepeatNGramLogitsProcessor.ngram_size",description:`<strong>ngram_size</strong> (<code>int</code>) &#x2014;
All ngrams of size <code>ngram_size</code> can only occur once.`,name:"ngram_size"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L383"}}),Ro=new v({props:{name:"__call__",anchor:"transformers.TFNoRepeatNGramLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L422"}}),Zo=new v({props:{name:"class transformers.TFRepetitionPenaltyLogitsProcessor",anchor:"transformers.TFRepetitionPenaltyLogitsProcessor",parameters:[{name:"penalty",val:": float"}],parametersDescription:[{anchor:"transformers.TFRepetitionPenaltyLogitsProcessor.repetition_penalty",description:`<strong>repetition_penalty</strong> (<code>float</code>) &#x2014;
The parameter for repetition penalty. 1.0 means no penalty. See <a href="https://arxiv.org/pdf/1909.05858.pdf" rel="nofollow">this
paper</a> for more details.`,name:"repetition_penalty"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L236"}}),Ho=new v({props:{name:"__call__",anchor:"transformers.TFRepetitionPenaltyLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L278"}}),Xo=new v({props:{name:"class transformers.TFForcedBOSTokenLogitsProcessor",anchor:"transformers.TFForcedBOSTokenLogitsProcessor",parameters:[{name:"bos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.TFForcedBOSTokenLogitsProcessor.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>) &#x2014;
The id of the token to force as the first generated token.`,name:"bos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L443"}}),Qo=new v({props:{name:"__call__",anchor:"transformers.TFForcedBOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L457"}}),Yo=new v({props:{name:"class transformers.TFForcedEOSTokenLogitsProcessor",anchor:"transformers.TFForcedEOSTokenLogitsProcessor",parameters:[{name:"max_length",val:": int"},{name:"eos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.TFForcedEOSTokenLogitsProcessor.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum length of the sequence to be generated.`,name:"max_length"},{anchor:"transformers.TFForcedEOSTokenLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L473"}}),Ko=new v({props:{name:"__call__",anchor:"transformers.TFForcedEOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": Tensor"},{name:"scores",val:": Tensor"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_logits_process.py#L490"}}),en=new v({props:{name:"class transformers.FlaxLogitsProcessor",anchor:"transformers.FlaxLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L50"}}),tn=new v({props:{name:"__call__",anchor:"transformers.FlaxLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"}],parametersDescription:[{anchor:"transformers.FlaxLogitsProcessor.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxLogitsProcessor.__call__.scores",description:`<strong>scores</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L53",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),rn=new v({props:{name:"class transformers.FlaxLogitsProcessorList",anchor:"transformers.FlaxLogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L72"}}),on=new v({props:{name:"__call__",anchor:"transformers.FlaxLogitsProcessorList.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxLogitsProcessorList.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxLogitsProcessorList.__call__.scores",description:`<strong>scores</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L79",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),nn=new v({props:{name:"class transformers.FlaxLogitsWarper",anchor:"transformers.FlaxLogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L61"}}),sn=new v({props:{name:"__call__",anchor:"transformers.FlaxLogitsWarper.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"}],parametersDescription:[{anchor:"transformers.FlaxLogitsWarper.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxLogitsWarper.__call__.scores",description:`<strong>scores</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be logits for each vocabulary when not using beam
search or log softmax for each vocabulary token when using beam search
kwargs &#x2014;
Additional logits processor specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L64",returnDescription:`
<p>The processed prediction scores.</p>
`,returnType:`
<p><code>jnp.ndarray</code> of shape <code>(batch_size, config.vocab_size)</code></p>
`}}),an=new v({props:{name:"class transformers.FlaxTemperatureLogitsWarper",anchor:"transformers.FlaxTemperatureLogitsWarper",parameters:[{name:"temperature",val:": float"}],parametersDescription:[{anchor:"transformers.FlaxTemperatureLogitsWarper.temperature",description:`<strong>temperature</strong> (<code>float</code>) &#x2014;
The value used to module the logits distribution.`,name:"temperature"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L95"}}),cn=new v({props:{name:"__call__",anchor:"transformers.FlaxTemperatureLogitsWarper.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L110"}}),ln=new v({props:{name:"class transformers.FlaxTopPLogitsWarper",anchor:"transformers.FlaxTopPLogitsWarper",parameters:[{name:"top_p",val:": float"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.FlaxTopPLogitsWarper.top_p",description:`<strong>top_p</strong> (<code>float</code>) &#x2014;
If set to &lt; 1, only the smallest set of most probable tokens with probabilities that add up to <code>top_p</code> or
higher are kept for generation.`,name:"top_p"},{anchor:"transformers.FlaxTopPLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.FlaxTopPLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L115"}}),dn=new v({props:{name:"__call__",anchor:"transformers.FlaxTopPLogitsWarper.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L137"}}),pn=new v({props:{name:"class transformers.FlaxTopKLogitsWarper",anchor:"transformers.FlaxTopKLogitsWarper",parameters:[{name:"top_k",val:": int"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.FlaxTopKLogitsWarper.top_k",description:`<strong>top_k</strong> (<code>int</code>) &#x2014;
The number of highest probability vocabulary tokens to keep for top-k-filtering.`,name:"top_k"},{anchor:"transformers.FlaxTopKLogitsWarper.filter_value",description:`<strong>filter_value</strong> (<code>float</code>, <em>optional</em>, defaults to <code>-float(&quot;Inf&quot;)</code>) &#x2014;
All filtered values will be set to this float value.`,name:"filter_value"},{anchor:"transformers.FlaxTopKLogitsWarper.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimum number of tokens that cannot be filtered.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L157"}}),mn=new v({props:{name:"__call__",anchor:"transformers.FlaxTopKLogitsWarper.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L177"}}),fn=new v({props:{name:"class transformers.FlaxForcedBOSTokenLogitsProcessor",anchor:"transformers.FlaxForcedBOSTokenLogitsProcessor",parameters:[{name:"bos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.FlaxForcedBOSTokenLogitsProcessor.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>) &#x2014;
The id of the token to force as the first generated token.`,name:"bos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L192"}}),gn=new v({props:{name:"__call__",anchor:"transformers.FlaxForcedBOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L204"}}),hn=new v({props:{name:"class transformers.FlaxForcedEOSTokenLogitsProcessor",anchor:"transformers.FlaxForcedEOSTokenLogitsProcessor",parameters:[{name:"max_length",val:": int"},{name:"eos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.FlaxForcedEOSTokenLogitsProcessor.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum length of the sequence to be generated.`,name:"max_length"},{anchor:"transformers.FlaxForcedEOSTokenLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L214"}}),un=new v({props:{name:"__call__",anchor:"transformers.FlaxForcedEOSTokenLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L229"}}),_n=new v({props:{name:"class transformers.FlaxMinLengthLogitsProcessor",anchor:"transformers.FlaxMinLengthLogitsProcessor",parameters:[{name:"min_length",val:": int"},{name:"eos_token_id",val:": int"}],parametersDescription:[{anchor:"transformers.FlaxMinLengthLogitsProcessor.min_length",description:`<strong>min_length</strong> (<code>int</code>) &#x2014;
The minimum length below which the score of <code>eos_token_id</code> is set to <code>-float(&quot;Inf&quot;)</code>.`,name:"min_length"},{anchor:"transformers.FlaxMinLengthLogitsProcessor.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L239"}}),bn=new v({props:{name:"__call__",anchor:"transformers.FlaxMinLengthLogitsProcessor.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"cur_len",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/flax_logits_process.py#L260"}}),vn=new ee({}),$n=new v({props:{name:"class transformers.StoppingCriteria",anchor:"transformers.StoppingCriteria",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L33"}}),Tn=new v({props:{name:"__call__",anchor:"transformers.StoppingCriteria.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.StoppingCriteria.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.StoppingCriteria.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be scores for each vocabulary token before SoftMax
or scores for each vocabulary token after SoftMax.
kwargs &#x2014;
Additional stopping criteria specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L36",returnDescription:`
<p><code>bool</code>. <code>False</code> indicates we should continue, <code>True</code> indicates we should stop.</p>
`}}),yn=new v({props:{name:"class transformers.StoppingCriteriaList",anchor:"transformers.StoppingCriteriaList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L110"}}),kn=new v({props:{name:"__call__",anchor:"transformers.StoppingCriteriaList.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.StoppingCriteriaList.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.StoppingCriteriaList.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be scores for each vocabulary token before SoftMax
or scores for each vocabulary token after SoftMax.
kwargs &#x2014;
Additional stopping criteria specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L111",returnDescription:`
<p><code>bool</code>. <code>False</code> indicates we should continue, <code>True</code> indicates we should stop.</p>
`}}),xn=new v({props:{name:"class transformers.MaxLengthCriteria",anchor:"transformers.MaxLengthCriteria",parameters:[{name:"max_length",val:": int"}],parametersDescription:[{anchor:"transformers.MaxLengthCriteria.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum length that the output sequence can have in number of tokens.`,name:"max_length"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L41"}}),Ln=new v({props:{name:"__call__",anchor:"transformers.MaxLengthCriteria.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MaxLengthCriteria.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MaxLengthCriteria.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be scores for each vocabulary token before SoftMax
or scores for each vocabulary token after SoftMax.
kwargs &#x2014;
Additional stopping criteria specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L54",returnDescription:`
<p><code>bool</code>. <code>False</code> indicates we should continue, <code>True</code> indicates we should stop.</p>
`}}),En=new v({props:{name:"class transformers.MaxTimeCriteria",anchor:"transformers.MaxTimeCriteria",parameters:[{name:"max_time",val:": float"},{name:"initial_timestamp",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"transformers.MaxTimeCriteria.max_time",description:`<strong>max_time</strong> (<code>float</code>) &#x2014;
The maximum allowed time in seconds for the generation.`,name:"max_time"},{anchor:"transformers.MaxTimeCriteria.initial_time",description:`<strong>initial_time</strong> (<code>float</code>, <em>optional</em>, defaults to <code>time.time()</code>) &#x2014;
The start of the generation allowed time.`,name:"initial_time"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L88"}}),Fn=new v({props:{name:"__call__",anchor:"transformers.MaxTimeCriteria.__call__",parameters:[{name:"input_ids",val:": LongTensor"},{name:"scores",val:": FloatTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MaxTimeCriteria.__call__.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MaxTimeCriteria.__call__.scores",description:`<strong>scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.vocab_size)</code>) &#x2014;
Prediction scores of a language modeling head. These can be scores for each vocabulary token before SoftMax
or scores for each vocabulary token after SoftMax.
kwargs &#x2014;
Additional stopping criteria specific kwargs.`,name:"scores"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/stopping_criteria.py#L105",returnDescription:`
<p><code>bool</code>. <code>False</code> indicates we should continue, <code>True</code> indicates we should stop.</p>
`}}),Sn=new ee({}),Dn=new v({props:{name:"class transformers.Constraint",anchor:"transformers.Constraint",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L5"}}),Kt=new Ly({props:{anchor:"transformers.Constraint.example",$$slots:{default:[i3]},$$scope:{ctx:H}}}),zn=new v({props:{name:"advance",anchor:"transformers.Constraint.advance",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L48",returnDescription:`
<p>Must be a tensor of a list of indexable tokens, not some integer.</p>
`,returnType:`
<p>token_ids(<code>torch.tensor</code>)</p>
`}}),qn=new v({props:{name:"copy",anchor:"transformers.Constraint.copy",parameters:[{name:"stateful",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L113",returnDescription:`
<p>The same constraint as the one being called from.</p>
`,returnType:`
<p>constraint(<code>Constraint</code>)</p>
`}}),In=new v({props:{name:"does_advance",anchor:"transformers.Constraint.does_advance",parameters:[{name:"token_id",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L60"}}),On=new v({props:{name:"remaining",anchor:"transformers.Constraint.remaining",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L104"}}),Mn=new v({props:{name:"reset",anchor:"transformers.Constraint.reset",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L94"}}),Wn=new v({props:{name:"test",anchor:"transformers.Constraint.test",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L24"}}),Vn=new v({props:{name:"update",anchor:"transformers.Constraint.update",parameters:[{name:"token_id",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L69",returnDescription:`
<p>Whether this constraint has become one step closer to being fulfuilled.
completed(<code>bool</code>):
Whether this constraint has been completely fulfilled by this token being generated.
reset (<code>bool</code>):
Whether this constraint has reset its progress by this token being generated.</p>
`,returnType:`
<p>stepped(<code>bool</code>)</p>
`}}),Nn=new v({props:{name:"class transformers.PhrasalConstraint",anchor:"transformers.PhrasalConstraint",parameters:[{name:"token_ids",val:": typing.List[int]"}],parametersDescription:[{anchor:"transformers.PhrasalConstraint.token_ids",description:`<strong>token_ids</strong> (<code>List[int]</code>) &#x2014;
The id of the token that must be generated by the output.`,name:"token_ids"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L129"}}),An=new v({props:{name:"class transformers.DisjunctiveConstraint",anchor:"transformers.DisjunctiveConstraint",parameters:[{name:"nested_token_ids",val:": typing.List[typing.List[int]]"}],parametersDescription:[{anchor:"transformers.DisjunctiveConstraint.nested_token_ids",description:"<strong>nested_token_ids</strong> (<code>List[List[int]]</code>) &#x2014; a list of words, where each word is a list of ids. This constraint",name:"nested_token_ids"},{anchor:"transformers.DisjunctiveConstraint.is",description:"<strong>is</strong> fulfilled by generating just one from the list of words. &#x2014;",name:"is"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L261"}}),Un=new v({props:{name:"class transformers.ConstraintListState",anchor:"transformers.ConstraintListState",parameters:[{name:"constraints",val:": typing.List[transformers.generation.beam_constraints.Constraint]"}],parametersDescription:[{anchor:"transformers.ConstraintListState.constraints",description:`<strong>constraints</strong> (<code>List[Constraint]</code>) &#x2014;
A list of <a href="/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.Constraint">Constraint</a> objects that must be fulfilled by the beam scorer.`,name:"constraints"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L350"}}),Gn=new v({props:{name:"advance",anchor:"transformers.ConstraintListState.advance",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L382"}}),Jn=new v({props:{name:"reset",anchor:"transformers.ConstraintListState.reset",parameters:[{name:"token_ids",val:": typing.Optional[typing.List[int]]"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_constraints.py#L417"}}),Rn=new ee({}),Zn=new v({props:{name:"class transformers.BeamScorer",anchor:"transformers.BeamScorer",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L87"}}),Hn=new v({props:{name:"process",anchor:"transformers.BeamScorer.process",parameters:[{name:"input_ids",val:": LongTensor"},{name:"next_scores",val:": FloatTensor"},{name:"next_tokens",val:": LongTensor"},{name:"next_indices",val:": LongTensor"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeamScorer.process.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_beams, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using any class inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BeamScorer.process.next_scores",description:`<strong>next_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
Current scores of the top <code>2 * num_beams</code> non-finished beam hypotheses.`,name:"next_scores"},{anchor:"transformers.BeamScorer.process.next_tokens",description:`<strong>next_tokens</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
<code>input_ids</code> of the tokens corresponding to the top <code>2 * num_beams</code> non-finished beam hypotheses.`,name:"next_tokens"},{anchor:"transformers.BeamScorer.process.next_indices",description:`<strong>next_indices</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
Beam indices indicating to which beam hypothesis the <code>next_tokens</code> correspond.`,name:"next_indices"},{anchor:"transformers.BeamScorer.process.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the <em>padding</em> token.`,name:"pad_token_id"},{anchor:"transformers.BeamScorer.process.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L93",returnDescription:`
<p>A dictionary composed of the fields as defined above:</p>
<ul>
<li><strong>next_beam_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Updated scores of all
non-finished beams.</li>
<li><strong>next_beam_tokens</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Next tokens to be added
to the non-finished beam_hypotheses.</li>
<li><strong>next_beam_indices</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Beam indices
indicating to which beam the next tokens shall be added.</li>
</ul>
`,returnType:`
<p><code>UserDict</code></p>
`}}),Xn=new v({props:{name:"finalize",anchor:"transformers.BeamScorer.finalize",parameters:[{name:"input_ids",val:": LongTensor"},{name:"next_scores",val:": FloatTensor"},{name:"next_tokens",val:": LongTensor"},{name:"next_indices",val:": LongTensor"},{name:"max_length",val:": int"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BeamScorer.finalize.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_beams, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using any class inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BeamScorer.finalize.final_beam_scores",description:`<strong>final_beam_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) &#x2014;
The final scores of all non-finished beams.`,name:"final_beam_scores"},{anchor:"transformers.BeamScorer.finalize.final_beam_tokens",description:`<strong>final_beam_tokens</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) &#x2014;
The last tokens to be added to the non-finished beam_hypotheses.`,name:"final_beam_tokens"},{anchor:"transformers.BeamScorer.finalize.final_beam_indices",description:`<strong>final_beam_indices</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) &#x2014;
The beam indices indicating to which beam the <code>final_beam_tokens</code> shall be added.`,name:"final_beam_indices"},{anchor:"transformers.BeamScorer.finalize.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the <em>padding</em> token.`,name:"pad_token_id"},{anchor:"transformers.BeamScorer.finalize.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L105",returnDescription:`
<p>The generated sequences.
The second dimension (sequence_length) is either equal to <code>max_length</code> or shorter if all batches finished early
due to the <code>eos_token_id</code>.</p>
`,returnType:`
<p><code>torch.LongTensor</code> of shape <code>(batch_size * num_return_sequences, sequence_length)</code></p>
`}}),Qn=new v({props:{name:"class transformers.BeamSearchScorer",anchor:"transformers.BeamSearchScorer",parameters:[{name:"batch_size",val:": int"},{name:"num_beams",val:": int"},{name:"device",val:": device"},{name:"length_penalty",val:": typing.Optional[float] = 1.0"},{name:"do_early_stopping",val:": typing.Union[bool, str, NoneType] = False"},{name:"num_beam_hyps_to_keep",val:": typing.Optional[int] = 1"},{name:"num_beam_groups",val:": typing.Optional[int] = 1"},{name:"max_length",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BeamSearchScorer.batch_size",description:`<strong>batch_size</strong> (<code>int</code>) &#x2014;
Batch Size of <code>input_ids</code> for which standard beam search decoding is run in parallel.`,name:"batch_size"},{anchor:"transformers.BeamSearchScorer.num_beams",description:`<strong>num_beams</strong> (<code>int</code>) &#x2014;
Number of beams for beam search.`,name:"num_beams"},{anchor:"transformers.BeamSearchScorer.device",description:`<strong>device</strong> (<code>torch.device</code>) &#x2014;
Defines the device type (<em>e.g.</em>, <code>&quot;cpu&quot;</code> or <code>&quot;cuda&quot;</code>) on which this instance of <code>BeamSearchScorer</code> will be
allocated.`,name:"device"},{anchor:"transformers.BeamSearchScorer.length_penalty",description:`<strong>length_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Exponential penalty to the length that is used with beam-based generation. It is applied as an exponent to
the sequence length, which in turn is used to divide the score of the sequence. Since the score is the log
likelihood of the sequence (i.e. negative), <code>length_penalty</code> &gt; 0.0 promotes longer sequences, while
<code>length_penalty</code> &lt; 0.0 encourages shorter sequences.`,name:"length_penalty"},{anchor:"transformers.BeamSearchScorer.do_early_stopping",description:`<strong>do_early_stopping</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Controls the stopping condition for beam-based methods, like beam-search. It accepts the following values:
<code>True</code>, where the generation stops as soon as there are <code>num_beams</code> complete candidates; <code>False</code>, where an
heuristic is applied and the generation stops when is it very unlikely to find better candidates;
<code>&quot;never&quot;</code>, where the beam search procedure only stops when there cannot be better candidates (canonical
beam search algorithm).`,name:"do_early_stopping"},{anchor:"transformers.BeamSearchScorer.num_beam_hyps_to_keep",description:`<strong>num_beam_hyps_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of beam hypotheses that shall be returned upon calling
<code>~transformer.BeamSearchScorer.finalize</code>.`,name:"num_beam_hyps_to_keep"},{anchor:"transformers.BeamSearchScorer.num_beam_groups",description:`<strong>num_beam_groups</strong> (<code>int</code>) &#x2014;
Number of groups to divide <code>num_beams</code> into in order to ensure diversity among different groups of beams.
See <a href="https://arxiv.org/pdf/1610.02424.pdf" rel="nofollow">this paper</a> for more details.`,name:"num_beam_groups"},{anchor:"transformers.BeamSearchScorer.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length of the sequence to be generated.`,name:"max_length"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L119"}}),ts=new v({props:{name:"process",anchor:"transformers.BeamSearchScorer.process",parameters:[{name:"input_ids",val:": LongTensor"},{name:"next_scores",val:": FloatTensor"},{name:"next_tokens",val:": LongTensor"},{name:"next_indices",val:": LongTensor"},{name:"pad_token_id",val:": typing.Optional[int] = None"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int], NoneType] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L205"}}),rs=new v({props:{name:"finalize",anchor:"transformers.BeamSearchScorer.finalize",parameters:[{name:"input_ids",val:": LongTensor"},{name:"final_beam_scores",val:": FloatTensor"},{name:"final_beam_tokens",val:": LongTensor"},{name:"final_beam_indices",val:": LongTensor"},{name:"max_length",val:": int"},{name:"pad_token_id",val:": typing.Optional[int] = None"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int], NoneType] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L302"}}),os=new v({props:{name:"class transformers.ConstrainedBeamSearchScorer",anchor:"transformers.ConstrainedBeamSearchScorer",parameters:[{name:"batch_size",val:": int"},{name:"num_beams",val:": int"},{name:"constraints",val:": typing.List[transformers.generation.beam_constraints.Constraint]"},{name:"device",val:": device"},{name:"length_penalty",val:": typing.Optional[float] = 1.0"},{name:"do_early_stopping",val:": typing.Union[bool, str, NoneType] = False"},{name:"num_beam_hyps_to_keep",val:": typing.Optional[int] = 1"},{name:"num_beam_groups",val:": typing.Optional[int] = 1"},{name:"max_length",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.ConstrainedBeamSearchScorer.batch_size",description:`<strong>batch_size</strong> (<code>int</code>) &#x2014;
Batch Size of <code>input_ids</code> for which standard beam search decoding is run in parallel.`,name:"batch_size"},{anchor:"transformers.ConstrainedBeamSearchScorer.num_beams",description:`<strong>num_beams</strong> (<code>int</code>) &#x2014;
Number of beams for beam search.`,name:"num_beams"},{anchor:"transformers.ConstrainedBeamSearchScorer.constraints",description:`<strong>constraints</strong> (<code>List[Constraint]</code>) &#x2014;
A list of positive constraints represented as <code>Constraint</code> objects that must be fulfilled in the generation
output. For more information, the documentation of <a href="/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.Constraint">Constraint</a> should be read.`,name:"constraints"},{anchor:"transformers.ConstrainedBeamSearchScorer.device",description:`<strong>device</strong> (<code>torch.device</code>) &#x2014;
Defines the device type (<em>e.g.</em>, <code>&quot;cpu&quot;</code> or <code>&quot;cuda&quot;</code>) on which this instance of <code>BeamSearchScorer</code> will be
allocated.`,name:"device"},{anchor:"transformers.ConstrainedBeamSearchScorer.length_penalty",description:`<strong>length_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Exponential penalty to the length that is used with beam-based generation. It is applied as an exponent to
the sequence length, which in turn is used to divide the score of the sequence. Since the score is the log
likelihood of the sequence (i.e. negative), <code>length_penalty</code> &gt; 0.0 promotes longer sequences, while
<code>length_penalty</code> &lt; 0.0 encourages shorter sequences.`,name:"length_penalty"},{anchor:"transformers.ConstrainedBeamSearchScorer.do_early_stopping",description:`<strong>do_early_stopping</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Controls the stopping condition for beam-based methods, like beam-search. It accepts the following values:
<code>True</code>, where the generation stops as soon as there are <code>num_beams</code> complete candidates; <code>False</code>, where an
heuristic is applied and the generation stops when is it very unlikely to find better candidates;
<code>&quot;never&quot;</code>, where the beam search procedure only stops when there cannot be better candidates (canonical
beam search algorithm).`,name:"do_early_stopping"},{anchor:"transformers.ConstrainedBeamSearchScorer.num_beam_hyps_to_keep",description:`<strong>num_beam_hyps_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of beam hypotheses that shall be returned upon calling
<code>~transformer.BeamSearchScorer.finalize</code>.`,name:"num_beam_hyps_to_keep"},{anchor:"transformers.ConstrainedBeamSearchScorer.num_beam_groups",description:`<strong>num_beam_groups</strong> (<code>int</code>) &#x2014;
Number of groups to divide <code>num_beams</code> into in order to ensure diversity among different groups of beams.
See <a href="https://arxiv.org/pdf/1610.02424.pdf" rel="nofollow">this paper</a> for more details.`,name:"num_beam_groups"},{anchor:"transformers.ConstrainedBeamSearchScorer.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length of the sequence to be generated.`,name:"max_length"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L394"}}),ns=new v({props:{name:"process",anchor:"transformers.ConstrainedBeamSearchScorer.process",parameters:[{name:"input_ids",val:": LongTensor"},{name:"next_scores",val:": FloatTensor"},{name:"next_tokens",val:": LongTensor"},{name:"next_indices",val:": LongTensor"},{name:"scores_for_all_vocab",val:": FloatTensor"},{name:"pad_token_id",val:": typing.Optional[int] = None"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int], NoneType] = None"}],parametersDescription:[{anchor:"transformers.ConstrainedBeamSearchScorer.process.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_beams, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using any class inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.next_scores",description:`<strong>next_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
Current scores of the top <code>2 * num_beams</code> non-finished beam hypotheses.`,name:"next_scores"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.next_tokens",description:`<strong>next_tokens</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
<code>input_ids</code> of the tokens corresponding to the top <code>2 * num_beams</code> non-finished beam hypotheses.`,name:"next_tokens"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.next_indices",description:`<strong>next_indices</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, 2 * num_beams)</code>) &#x2014;
Beam indices indicating to which beam hypothesis the <code>next_tokens</code> correspond.`,name:"next_indices"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.scores_for_all_vocab",description:`<strong>scores_for_all_vocab</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams, sequence_length)</code>) &#x2014;
The scores of all tokens in the vocabulary for each of the beam hypotheses.`,name:"scores_for_all_vocab"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the <em>padding</em> token.`,name:"pad_token_id"},{anchor:"transformers.ConstrainedBeamSearchScorer.process.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, List[int]]</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token. Optionally, use a list to set multiple <em>end-of-sequence</em> tokens.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L488",returnDescription:`
<p>A dictionary composed of the fields as defined above:</p>
<ul>
<li>
<p><strong>next_beam_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Updated scores of
all
non-finished beams.</p>
</li>
<li>
<p><strong>next_beam_tokens</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Next tokens to be
added
to the non-finished beam_hypotheses.</p>
</li>
<li>
<p><strong>next_beam_indices</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_beams)</code>) \u2014 Beam indices
indicating to which beam the next tokens shall be added.</p>
</li>
</ul>
`,returnType:`
<p><code>UserDict</code></p>
`}}),ss=new v({props:{name:"finalize",anchor:"transformers.ConstrainedBeamSearchScorer.finalize",parameters:[{name:"input_ids",val:": LongTensor"},{name:"final_beam_scores",val:": FloatTensor"},{name:"final_beam_tokens",val:": LongTensor"},{name:"final_beam_indices",val:": LongTensor"},{name:"max_length",val:": int"},{name:"pad_token_id",val:": typing.Optional[int] = None"},{name:"eos_token_id",val:": typing.Union[int, typing.List[int], NoneType] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/beam_search.py#L772"}}),as=new ee({}),is=new v({props:{name:"transformers.top_k_top_p_filtering",anchor:"transformers.top_k_top_p_filtering",parameters:[{name:"logits",val:": FloatTensor"},{name:"top_k",val:": int = 0"},{name:"top_p",val:": float = 1.0"},{name:"filter_value",val:": float = -inf"},{name:"min_tokens_to_keep",val:": int = 1"}],parametersDescription:[{anchor:"transformers.top_k_top_p_filtering.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If &gt; 0, only keep the top k tokens with highest probability (top-k filtering)`,name:"top_k"},{anchor:"transformers.top_k_top_p_filtering.top_p",description:`<strong>top_p</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
If &lt; 1.0, only keep the top tokens with cumulative probability &gt;= top_p (nucleus filtering). Nucleus
filtering is described in Holtzman et al. (<a href="http://arxiv.org/abs/1904.09751" rel="nofollow">http://arxiv.org/abs/1904.09751</a>)`,name:"top_p"},{anchor:"transformers.top_k_top_p_filtering.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimumber of tokens we keep per batch example in the output.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/utils.py#L4565"}}),ls=new v({props:{name:"transformers.tf_top_k_top_p_filtering",anchor:"transformers.tf_top_k_top_p_filtering",parameters:[{name:"logits",val:""},{name:"top_k",val:" = 0"},{name:"top_p",val:" = 1.0"},{name:"filter_value",val:" = -inf"},{name:"min_tokens_to_keep",val:" = 1"}],parametersDescription:[{anchor:"transformers.tf_top_k_top_p_filtering.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If &gt; 0, only keep the top k tokens with highest probability (top-k filtering)`,name:"top_k"},{anchor:"transformers.tf_top_k_top_p_filtering.top_p",description:`<strong>top_p</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
If &lt; 1.0, only keep the top tokens with cumulative probability &gt;= top_p (nucleus filtering). Nucleus
filtering is described in Holtzman et al. (<a href="http://arxiv.org/abs/1904.09751" rel="nofollow">http://arxiv.org/abs/1904.09751</a>)`,name:"top_p"},{anchor:"transformers.tf_top_k_top_p_filtering.min_tokens_to_keep",description:`<strong>min_tokens_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Minimumber of tokens we keep per batch example in the output.`,name:"min_tokens_to_keep"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/tf_utils.py#L3080"}}),ps=new ee({}),ms=new v({props:{name:"class transformers.TextStreamer",anchor:"transformers.TextStreamer",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"skip_prompt",val:": bool = False"},{name:"**decode_kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextStreamer.tokenizer",description:`<strong>tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;
The tokenized used to decode the tokens.`,name:"tokenizer"},{anchor:"transformers.TextStreamer.skip_prompt",description:`<strong>skip_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to skip the prompt to <code>.generate()</code> or not. Useful e.g. for chatbots.`,name:"skip_prompt"},{anchor:"transformers.TextStreamer.decode_kwargs",description:`<strong>decode_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the tokenizer&#x2019;s <code>decode</code> method.`,name:"decode_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L38"}}),dr=new t3({props:{warning:!0,$$slots:{default:[c3]},$$scope:{ctx:H}}}),pr=new Ly({props:{anchor:"transformers.TextStreamer.example",$$slots:{default:[l3]},$$scope:{ctx:H}}}),fs=new v({props:{name:"end",anchor:"transformers.TextStreamer.end",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L116"}}),gs=new v({props:{name:"on_finalized_text",anchor:"transformers.TextStreamer.on_finalized_text",parameters:[{name:"text",val:": str"},{name:"stream_end",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L130"}}),hs=new v({props:{name:"put",anchor:"transformers.TextStreamer.put",parameters:[{name:"value",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L82"}}),us=new v({props:{name:"class transformers.TextIteratorStreamer",anchor:"transformers.TextIteratorStreamer",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"skip_prompt",val:": bool = False"},{name:"timeout",val:": typing.Optional[float] = None"},{name:"**decode_kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextIteratorStreamer.tokenizer",description:`<strong>tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;
The tokenized used to decode the tokens.`,name:"tokenizer"},{anchor:"transformers.TextIteratorStreamer.skip_prompt",description:`<strong>skip_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to skip the prompt to <code>.generate()</code> or not. Useful e.g. for chatbots.`,name:"skip_prompt"},{anchor:"transformers.TextIteratorStreamer.timeout",description:`<strong>timeout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The timeout for the text queue. If <code>None</code>, the queue will block indefinitely. Useful to handle exceptions
in <code>.generate()</code>, when it is called in a separate thread.`,name:"timeout"},{anchor:"transformers.TextIteratorStreamer.decode_kwargs",description:`<strong>decode_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the tokenizer&#x2019;s <code>decode</code> method.`,name:"decode_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L159"}}),hr=new t3({props:{warning:!0,$$slots:{default:[d3]},$$scope:{ctx:H}}}),ur=new Ly({props:{anchor:"transformers.TextIteratorStreamer.example",$$slots:{default:[p3]},$$scope:{ctx:H}}}),_s=new v({props:{name:"on_finalized_text",anchor:"transformers.TextIteratorStreamer.on_finalized_text",parameters:[{name:"text",val:": str"},{name:"stream_end",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/generation/streamers.py#L213"}}),{c(){$=o("meta"),w=c(),T=o("h1"),k=o("a"),B=o("span"),f(y.$$.fragment),D=c(),Uc=o("span"),Rf=a("Utilities for Generation"),pp=c(),E=o("p"),Zf=a("This page lists all the utility functions used by "),Ts=o("a"),Hf=a("generate()"),Xf=a(`,
`),ys=o("a"),Qf=a("greedy_search()"),Yf=a(`,
`),ks=o("a"),Kf=a("contrastive_search()"),eg=a(`,
`),xs=o("a"),tg=a("sample()"),rg=a(`,
`),ws=o("a"),og=a("beam_search()"),ng=a(`,
`),Ls=o("a"),sg=a("beam_sample()"),ag=a(`,
`),Es=o("a"),ig=a("group_beam_search()"),cg=a(`, and
`),Ps=o("a"),lg=a("constrained_beam_search()"),dg=a("."),mp=c(),Fs=o("p"),pg=a("Most of those are only useful if you are studying the code of the generate methods in the library."),fp=c(),rt=o("h2"),Lt=o("a"),Gc=o("span"),f(xr.$$.fragment),mg=c(),Jc=o("span"),fg=a("Generate Outputs"),gp=c(),X=o("p"),gg=a("The output of "),Ss=o("a"),hg=a("generate()"),ug=a(` is an instance of a subclass of
`),Ds=o("a"),_g=a("ModelOutput"),bg=a(`. This output is a data structure containing all the information returned
by `),zs=o("a"),vg=a("generate()"),$g=a(", but that can also be used as tuple or dictionary."),hp=c(),qs=o("p"),Tg=a("Here\u2019s an example:"),up=c(),f(wr.$$.fragment),_p=c(),Re=o("p"),yg=a("The "),Rc=o("code"),kg=a("generation_output"),xg=a(" object is a "),Is=o("a"),wg=a("GreedySearchDecoderOnlyOutput"),Lg=a(`, as we can
see in the documentation of that class below, it means it has the following attributes:`),bp=c(),Q=o("ul"),Os=o("li"),Zc=o("code"),Eg=a("sequences"),Pg=a(": the generated sequences of tokens"),Fg=c(),Bs=o("li"),Hc=o("code"),Sg=a("scores"),Dg=a(" (optional): the prediction scores of the language modelling head, for each generation step"),zg=c(),Ms=o("li"),Xc=o("code"),qg=a("hidden_states"),Ig=a(" (optional): the hidden states of the model, for each generation step"),Og=c(),Ws=o("li"),Qc=o("code"),Bg=a("attentions"),Mg=a(" (optional): the attention weights of the model, for each generation step"),vp=c(),S=o("p"),Wg=a("Here we have the "),Yc=o("code"),Vg=a("scores"),Cg=a(" since we passed along "),Kc=o("code"),Ng=a("output_scores=True"),Ag=a(", but we don\u2019t have "),el=o("code"),jg=a("hidden_states"),Ug=a(` and
`),tl=o("code"),Gg=a("attentions"),Jg=a(" because we didn\u2019t pass "),rl=o("code"),Rg=a("output_hidden_states=True"),Zg=a(" or "),ol=o("code"),Hg=a("output_attentions=True"),Xg=a("."),$p=c(),W=o("p"),Qg=a(`You can access each attribute as you would usually do, and if that attribute has not been returned by the model, you
will get `),nl=o("code"),Yg=a("None"),Kg=a(". Here for instance "),sl=o("code"),eh=a("generation_output.scores"),th=a(` are all the generated prediction scores of the
language modeling head, and `),al=o("code"),rh=a("generation_output.attentions"),oh=a(" is "),il=o("code"),nh=a("None"),sh=a("."),Tp=c(),V=o("p"),ah=a("When using our "),cl=o("code"),ih=a("generation_output"),ch=a(" object as a tuple, it only keeps the attributes that don\u2019t have "),ll=o("code"),lh=a("None"),dh=a(` values.
Here, for instance, it has two elements, `),dl=o("code"),ph=a("loss"),mh=a(" then "),pl=o("code"),fh=a("logits"),gh=a(", so"),yp=c(),f(Lr.$$.fragment),kp=c(),Et=o("p"),hh=a("will return the tuple "),ml=o("code"),uh=a("(generation_output.sequences, generation_output.scores)"),_h=a(" for instance."),xp=c(),C=o("p"),bh=a("When using our "),fl=o("code"),vh=a("generation_output"),$h=a(" object as a dictionary, it only keeps the attributes that don\u2019t have "),gl=o("code"),Th=a("None"),yh=a(`
values. Here, for instance, it has two keys that are `),hl=o("code"),kh=a("sequences"),xh=a(" and "),ul=o("code"),wh=a("scores"),Lh=a("."),wp=c(),Vs=o("p"),Eh=a("We document here all output types."),Lp=c(),ot=o("h3"),Pt=o("a"),_l=o("span"),f(Er.$$.fragment),Ph=c(),bl=o("span"),Fh=a("GreedySearchOutput"),Ep=c(),nt=o("div"),f(Pr.$$.fragment),Sh=c(),vl=o("p"),Dh=a("Base class for outputs of decoder-only generation models using greedy search."),Pp=c(),st=o("div"),f(Fr.$$.fragment),zh=c(),$l=o("p"),qh=a(`Base class for outputs of encoder-decoder generation models using greedy search. Hidden states and attention
weights of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the
encoder_hidden_states attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),Fp=c(),te=o("div"),f(Sr.$$.fragment),Ih=c(),Tl=o("p"),Oh=a("Flax Base class for outputs of decoder-only generation models using greedy search."),Bh=c(),Ft=o("div"),f(Dr.$$.fragment),Mh=c(),yl=o("p"),Wh=a("\u201CReturns a new object replacing the specified fields with new values."),Sp=c(),at=o("h3"),St=o("a"),kl=o("span"),f(zr.$$.fragment),Vh=c(),xl=o("span"),Ch=a("SampleOutput"),Dp=c(),it=o("div"),f(qr.$$.fragment),Nh=c(),wl=o("p"),Ah=a("Base class for outputs of decoder-only generation models using sampling."),zp=c(),ct=o("div"),f(Ir.$$.fragment),jh=c(),Ll=o("p"),Uh=a(`Base class for outputs of encoder-decoder generation models using sampling. Hidden states and attention weights of
the decoder (respectively the encoder) can be accessed via the encoder_attentions and the encoder_hidden_states
attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),qp=c(),re=o("div"),f(Or.$$.fragment),Gh=c(),El=o("p"),Jh=a("Flax Base class for outputs of decoder-only generation models using sampling."),Rh=c(),Dt=o("div"),f(Br.$$.fragment),Zh=c(),Pl=o("p"),Hh=a("\u201CReturns a new object replacing the specified fields with new values."),Ip=c(),lt=o("h3"),zt=o("a"),Fl=o("span"),f(Mr.$$.fragment),Xh=c(),Sl=o("span"),Qh=a("BeamSearchOutput"),Op=c(),dt=o("div"),f(Wr.$$.fragment),Yh=c(),Dl=o("p"),Kh=a("Base class for outputs of decoder-only generation models using beam search."),Bp=c(),pt=o("div"),f(Vr.$$.fragment),eu=c(),zl=o("p"),tu=a(`Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights
of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the encoder_hidden_states
attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),Mp=c(),mt=o("h3"),qt=o("a"),ql=o("span"),f(Cr.$$.fragment),ru=c(),Il=o("span"),ou=a("BeamSampleOutput"),Wp=c(),ft=o("div"),f(Nr.$$.fragment),nu=c(),Ol=o("p"),su=a("Base class for outputs of decoder-only generation models using beam sample."),Vp=c(),gt=o("div"),f(Ar.$$.fragment),au=c(),Bl=o("p"),iu=a(`Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention
weights of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the
encoder_hidden_states attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),Cp=c(),ht=o("h2"),It=o("a"),Ml=o("span"),f(jr.$$.fragment),cu=c(),Wl=o("span"),lu=a("LogitsProcessor"),Np=c(),Ot=o("p"),du=a("A "),Cs=o("a"),pu=a("LogitsProcessor"),mu=a(` can be used to modify the prediction scores of a language model head for
generation.`),Ap=c(),oe=o("div"),f(Ur.$$.fragment),fu=c(),Vl=o("p"),gu=a("Abstract base class for all logit processors that can be applied during generation."),hu=c(),Bt=o("div"),f(Gr.$$.fragment),uu=c(),Cl=o("p"),_u=a("Torch method for processing logits."),jp=c(),ne=o("div"),f(Jr.$$.fragment),bu=c(),z=o("p"),vu=a("This class can be used to create a list of "),Ns=o("a"),$u=a("LogitsProcessor"),Tu=a(" or "),As=o("a"),yu=a("LogitsWarper"),ku=a(` to subsequently process a
`),Nl=o("code"),xu=a("scores"),wu=a(" input tensor. This class inherits from list and adds a specific "),Al=o("em"),jl=o("strong"),Lu=a("call"),Eu=a(` method to apply each
`),js=o("a"),Pu=a("LogitsProcessor"),Fu=a(" or "),Us=o("a"),Su=a("LogitsWarper"),Du=a(" to the inputs."),zu=c(),Gs=o("div"),f(Rr.$$.fragment),Up=c(),se=o("div"),f(Zr.$$.fragment),qu=c(),Ul=o("p"),Iu=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),Ou=c(),Mt=o("div"),f(Hr.$$.fragment),Bu=c(),Gl=o("p"),Mu=a("Torch method for warping logits."),Gp=c(),ae=o("div"),f(Xr.$$.fragment),Wu=c(),Js=o("p"),Rs=o("a"),Vu=a("LogitsProcessor"),Cu=a(" enforcing a min-length by setting EOS probability to 0."),Nu=c(),Zs=o("div"),f(Qr.$$.fragment),Jp=c(),ie=o("div"),f(Yr.$$.fragment),Au=c(),Hs=o("p"),Xs=o("a"),ju=a("LogitsProcessor"),Uu=a(" enforcing a min-length of new tokens by setting EOS (End-Of-Sequence) token probability to 0."),Gu=c(),Qs=o("div"),f(Kr.$$.fragment),Rp=c(),ce=o("div"),f(eo.$$.fragment),Ju=c(),Ys=o("p"),Ks=o("a"),Ru=a("LogitsWarper"),Zu=a(" for temperature (exponential scaling output probability distribution)."),Hu=c(),ea=o("div"),f(to.$$.fragment),Zp=c(),le=o("div"),f(ro.$$.fragment),Xu=c(),ta=o("p"),ra=o("a"),Qu=a("LogitsProcessor"),Yu=a(" enforcing an exponential penalty on repeated sequences."),Ku=c(),oa=o("div"),f(oo.$$.fragment),Hp=c(),de=o("div"),f(no.$$.fragment),e_=c(),na=o("p"),sa=o("a"),t_=a("LogitsWarper"),r_=a(" that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),o_=c(),aa=o("div"),f(so.$$.fragment),Xp=c(),pe=o("div"),f(ao.$$.fragment),n_=c(),ia=o("p"),ca=o("a"),s_=a("LogitsWarper"),a_=a(" that performs top-k, i.e. restricting to the k highest probability elements."),i_=c(),la=o("div"),f(io.$$.fragment),Qp=c(),me=o("div"),f(co.$$.fragment),c_=c(),Wt=o("p"),da=o("a"),l_=a("LogitsWarper"),d_=a(" that performs typical decoding. See "),lo=o("a"),p_=a(`Typical Decoding for Natural Language
Generation`),m_=a(" for more information."),f_=c(),pa=o("div"),f(po.$$.fragment),Yp=c(),fe=o("div"),f(mo.$$.fragment),g_=c(),Vt=o("p"),ma=o("a"),h_=a("LogitsProcessor"),u_=a(` that enforces no repetition of n-grams. See
`),fo=o("a"),__=a("Fairseq"),b_=a("."),v_=c(),fa=o("div"),f(go.$$.fragment),Kp=c(),ge=o("div"),f(ho.$$.fragment),$_=c(),ga=o("p"),ha=o("a"),T_=a("LogitsProcessor"),y_=a(" that enforces that specified sequences will never be sampled."),k_=c(),ua=o("div"),f(uo.$$.fragment),em=c(),he=o("div"),f(_o.$$.fragment),x_=c(),Ct=o("p"),_a=o("a"),w_=a("LogitsProcessor"),L_=a(` that enforces constrained generation and is useful for prefix-conditioned constrained
generation. See `),bo=o("a"),E_=a("Autoregressive Entity Retrieval"),P_=a(" for more information."),F_=c(),ba=o("div"),f(vo.$$.fragment),tm=c(),ue=o("div"),f($o.$$.fragment),S_=c(),Ze=o("p"),va=o("a"),D_=a("LogitsProcessor"),z_=a(` that enforces diverse beam search. Note that this logits processor is only effective for
`),$a=o("a"),q_=a("PreTrainedModel.group_beam_search()"),I_=a(". See "),To=o("a"),O_=a(`Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence
Models`),B_=a(" for more details."),M_=c(),Ta=o("div"),f(yo.$$.fragment),rm=c(),_e=o("div"),f(ko.$$.fragment),W_=c(),ya=o("p"),ka=o("a"),V_=a("LogitsProcessor"),C_=a(" that enforces the specified token as the first generated token."),N_=c(),xa=o("div"),f(xo.$$.fragment),om=c(),be=o("div"),f(wo.$$.fragment),A_=c(),Nt=o("p"),wa=o("a"),j_=a("LogitsProcessor"),U_=a(" that enforces the specified token as the last generated token when "),Jl=o("code"),G_=a("max_length"),J_=a(" is reached."),R_=c(),La=o("div"),f(Lo.$$.fragment),nm=c(),ve=o("div"),f(Eo.$$.fragment),Z_=c(),He=o("p"),Ea=o("a"),H_=a("LogitsProcessor"),X_=a(" that removes all "),Rl=o("code"),Q_=a("nan"),Y_=a(" and "),Zl=o("code"),K_=a("inf"),eb=a(` values to avoid the generation method to fail. Note that using
the logits processor should only be used if necessary since it can slow down the generation method.`),tb=c(),Pa=o("div"),f(Po.$$.fragment),sm=c(),$e=o("div"),f(Fo.$$.fragment),rb=c(),Hl=o("p"),ob=a("Abstract base class for all logit processors that can be applied during generation."),nb=c(),At=o("div"),f(So.$$.fragment),sb=c(),Xl=o("p"),ab=a("TF method for processing logits."),am=c(),Te=o("div"),f(Do.$$.fragment),ib=c(),G=o("p"),cb=a("This class can be used to create a list of "),Fa=o("a"),lb=a("TFLogitsProcessor"),db=a(" to subsequently process a "),Ql=o("code"),pb=a("scores"),mb=a(` input tensor.
This class inherits from list and adds a specific `),Yl=o("em"),Kl=o("strong"),fb=a("call"),gb=a(" method to apply each "),Sa=o("a"),hb=a("TFLogitsProcessor"),ub=a(` to the
inputs.`),_b=c(),Da=o("div"),f(zo.$$.fragment),im=c(),ye=o("div"),f(qo.$$.fragment),bb=c(),ed=o("p"),vb=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),$b=c(),jt=o("div"),f(Io.$$.fragment),Tb=c(),td=o("p"),yb=a("TF method for warping logits."),cm=c(),ke=o("div"),f(Oo.$$.fragment),kb=c(),za=o("p"),qa=o("a"),xb=a("TFLogitsWarper"),wb=a(" for temperature (exponential scaling output probability distribution)."),Lb=c(),Ia=o("div"),f(Bo.$$.fragment),lm=c(),xe=o("div"),f(Mo.$$.fragment),Eb=c(),Oa=o("p"),Ba=o("a"),Pb=a("TFLogitsWarper"),Fb=a(" that performs top-p, i.e. restricting to top tokens summing to <= prob_cut_off."),Sb=c(),Ma=o("div"),f(Wo.$$.fragment),dm=c(),we=o("div"),f(Vo.$$.fragment),Db=c(),Wa=o("p"),Va=o("a"),zb=a("TFLogitsWarper"),qb=a(" that performs top-k, i.e. restricting to the k highest probability elements."),Ib=c(),Ca=o("div"),f(Co.$$.fragment),pm=c(),Le=o("div"),f(No.$$.fragment),Ob=c(),Na=o("p"),Aa=o("a"),Bb=a("TFLogitsProcessor"),Mb=a(" enforcing a min-length by setting EOS probability to 0."),Wb=c(),ja=o("div"),f(Ao.$$.fragment),mm=c(),Ee=o("div"),f(jo.$$.fragment),Vb=c(),Ua=o("p"),Ga=o("a"),Cb=a("TFLogitsProcessor"),Nb=a(" that enforces that specified sequences will never be sampled."),Ab=c(),Ja=o("div"),f(Uo.$$.fragment),fm=c(),Pe=o("div"),f(Go.$$.fragment),jb=c(),Ut=o("p"),Ra=o("a"),Ub=a("TFLogitsProcessor"),Gb=a(` that enforces no repetition of n-grams. See
`),Jo=o("a"),Jb=a("Fairseq"),Rb=a("."),Zb=c(),Za=o("div"),f(Ro.$$.fragment),gm=c(),Fe=o("div"),f(Zo.$$.fragment),Hb=c(),Ha=o("p"),Xa=o("a"),Xb=a("TFLogitsProcessor"),Qb=a(" enforcing an exponential penalty on repeated sequences."),Yb=c(),Qa=o("div"),f(Ho.$$.fragment),hm=c(),Se=o("div"),f(Xo.$$.fragment),Kb=c(),Ya=o("p"),Ka=o("a"),ev=a("TFLogitsProcessor"),tv=a(" that enforces the specified token as the first generated token."),rv=c(),ei=o("div"),f(Qo.$$.fragment),um=c(),De=o("div"),f(Yo.$$.fragment),ov=c(),Gt=o("p"),ti=o("a"),nv=a("TFLogitsProcessor"),sv=a(" that enforces the specified token as the last generated token when "),rd=o("code"),av=a("max_length"),iv=a(" is reached."),cv=c(),ri=o("div"),f(Ko.$$.fragment),_m=c(),ze=o("div"),f(en.$$.fragment),lv=c(),od=o("p"),dv=a("Abstract base class for all logit processors that can be applied during generation."),pv=c(),Jt=o("div"),f(tn.$$.fragment),mv=c(),nd=o("p"),fv=a("Flax method for processing logits."),bm=c(),qe=o("div"),f(rn.$$.fragment),gv=c(),q=o("p"),hv=a("This class can be used to create a list of "),oi=o("a"),uv=a("FlaxLogitsProcessor"),_v=a(" or "),ni=o("a"),bv=a("FlaxLogitsWarper"),vv=a(` to subsequently process
a `),sd=o("code"),$v=a("scores"),Tv=a(" input tensor. This class inherits from list and adds a specific "),ad=o("em"),id=o("strong"),yv=a("call"),kv=a(` method to apply each
`),si=o("a"),xv=a("FlaxLogitsProcessor"),wv=a(" or "),ai=o("a"),Lv=a("FlaxLogitsWarper"),Ev=a(" to the inputs."),Pv=c(),ii=o("div"),f(on.$$.fragment),vm=c(),Ie=o("div"),f(nn.$$.fragment),Fv=c(),cd=o("p"),Sv=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),Dv=c(),Rt=o("div"),f(sn.$$.fragment),zv=c(),ld=o("p"),qv=a("Flax method for warping logits."),$m=c(),Oe=o("div"),f(an.$$.fragment),Iv=c(),ci=o("p"),li=o("a"),Ov=a("FlaxLogitsWarper"),Bv=a(" for temperature (exponential scaling output probability distribution)."),Mv=c(),di=o("div"),f(cn.$$.fragment),Tm=c(),Be=o("div"),f(ln.$$.fragment),Wv=c(),pi=o("p"),mi=o("a"),Vv=a("FlaxLogitsWarper"),Cv=a(" that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),Nv=c(),fi=o("div"),f(dn.$$.fragment),ym=c(),Me=o("div"),f(pn.$$.fragment),Av=c(),gi=o("p"),hi=o("a"),jv=a("FlaxLogitsWarper"),Uv=a(" that performs top-k, i.e. restricting to the k highest probability elements."),Gv=c(),ui=o("div"),f(mn.$$.fragment),km=c(),We=o("div"),f(fn.$$.fragment),Jv=c(),_i=o("p"),bi=o("a"),Rv=a("FlaxLogitsProcessor"),Zv=a(" that enforces the specified token as the first generated token."),Hv=c(),vi=o("div"),f(gn.$$.fragment),xm=c(),Ve=o("div"),f(hn.$$.fragment),Xv=c(),Zt=o("p"),$i=o("a"),Qv=a("FlaxLogitsProcessor"),Yv=a(" that enforces the specified token as the last generated token when "),dd=o("code"),Kv=a("max_length"),e0=a(" is reached."),t0=c(),Ti=o("div"),f(un.$$.fragment),wm=c(),Ce=o("div"),f(_n.$$.fragment),r0=c(),yi=o("p"),ki=o("a"),o0=a("FlaxLogitsProcessor"),n0=a(" enforcing a min-length by setting EOS probability to 0."),s0=c(),xi=o("div"),f(bn.$$.fragment),Lm=c(),ut=o("h2"),Ht=o("a"),pd=o("span"),f(vn.$$.fragment),a0=c(),md=o("span"),i0=a("StoppingCriteria"),Em=c(),Xt=o("p"),c0=a("A "),wi=o("a"),l0=a("StoppingCriteria"),d0=a(" can be used to change when to stop generation (other than EOS token)."),Pm=c(),Ne=o("div"),f($n.$$.fragment),p0=c(),fd=o("p"),m0=a("Abstract base class for all stopping criteria that can be applied during generation."),f0=c(),Li=o("div"),f(Tn.$$.fragment),Fm=c(),_t=o("div"),f(yn.$$.fragment),g0=c(),Ei=o("div"),f(kn.$$.fragment),Sm=c(),Ae=o("div"),f(xn.$$.fragment),h0=c(),wn=o("p"),u0=a("This class can be used to stop generation whenever the full generated number of tokens exceeds "),gd=o("code"),_0=a("max_length"),b0=a(`. Keep
in mind for decoder-only type of transformers, this will include the initial prompted tokens.`),v0=c(),Pi=o("div"),f(Ln.$$.fragment),Dm=c(),je=o("div"),f(En.$$.fragment),$0=c(),Pn=o("p"),T0=a(`This class can be used to stop generation whenever the full generation exceeds some amount of time. By default, the
time will start being counted when you initialize this function. You can override this by passing an
`),hd=o("code"),y0=a("initial_time"),k0=a("."),x0=c(),Fi=o("div"),f(Fn.$$.fragment),zm=c(),bt=o("h2"),Qt=o("a"),ud=o("span"),f(Sn.$$.fragment),w0=c(),_d=o("span"),L0=a("Constraints"),qm=c(),Yt=o("p"),E0=a("A "),Si=o("a"),P0=a("Constraint"),F0=a(" can be used to force the generation to include specific tokens or sequences in the output."),Im=c(),x=o("div"),f(Dn.$$.fragment),S0=c(),bd=o("p"),D0=a(`Abstract base class for all constraints that can be applied during generation.
It must define how the constraint can be satisfied.`),z0=c(),vd=o("p"),q0=a("All classes that inherit Constraint must follow the requirement that"),I0=c(),f(Kt.$$.fragment),O0=c(),$d=o("p"),B0=a("will always terminate (halt)."),M0=c(),er=o("div"),f(zn.$$.fragment),W0=c(),Td=o("p"),V0=a("When called, returns the token that would take this constraint one step closer to being fulfilled."),C0=c(),tr=o("div"),f(qn.$$.fragment),N0=c(),yd=o("p"),A0=a("Creates a new instance of this constraint."),j0=c(),rr=o("div"),f(In.$$.fragment),U0=c(),kd=o("p"),G0=a("Reads in a token and returns whether it creates progress."),J0=c(),or=o("div"),f(On.$$.fragment),R0=c(),Bn=o("p"),Z0=a("Returns the number of remaining steps of "),xd=o("code"),H0=a("advance()"),X0=a(" in order to complete this constraint."),Q0=c(),nr=o("div"),f(Mn.$$.fragment),Y0=c(),wd=o("p"),K0=a(`Resets the state of this constraint to its initialization. We would call this in cases where the fulfillment of
a constraint is abrupted by an unwanted token.`),e$=c(),sr=o("div"),f(Wn.$$.fragment),t$=c(),Ld=o("p"),r$=a("Tests whether this constraint has been properly defined."),o$=c(),Xe=o("div"),f(Vn.$$.fragment),n$=c(),Cn=o("p"),s$=a(`Reads in a token and returns booleans that indicate the progress made by it. This function will update the
state of this object unlikes `),Ed=o("code"),a$=a("does_advance(self, token_id: int)"),i$=a("."),c$=c(),Pd=o("p"),l$=a(`This isn\u2019t to test whether a certain token will advance the progress; it\u2019s to update its state as if it has
been generated. This becomes important if token_id != desired token (refer to else statement in
PhrasalConstraint)`),Om=c(),vt=o("div"),f(Nn.$$.fragment),d$=c(),Di=o("p"),zi=o("a"),p$=a("Constraint"),m$=a(" enforcing that an ordered sequence of tokens is included in the output."),Bm=c(),$t=o("div"),f(An.$$.fragment),f$=c(),jn=o("p"),g$=a("A special "),qi=o("a"),h$=a("Constraint"),u$=a(" that is fulfilled by fulfilling just one of several constraints."),Mm=c(),J=o("div"),f(Un.$$.fragment),_$=c(),Fd=o("p"),b$=a("A class for beam scorers to track its progress through a list of constraints."),v$=c(),O=o("div"),f(Gn.$$.fragment),$$=c(),Sd=o("p"),T$=a(`The list of tokens to generate such that we can make progress.
By \u201Clist\u201D we don\u2019t mean the list of token that will fully fulfill a constraint.`),y$=c(),Tt=o("p"),k$=a("Given constraints "),Dd=o("code"),x$=a("c_i = {t_ij | j == # of tokens}"),w$=a(`, If we\u2019re not in the middle of progressing through a
specific constraint `),zd=o("code"),L$=a("c_i"),E$=a(", we return:"),P$=c(),qd=o("p"),Id=o("code"),F$=a("[t_k1 for k in indices of unfulfilled constraints]"),S$=c(),Ue=o("p"),D$=a(`If we are in the middle of a constraint, then we return:
`),Od=o("code"),z$=a("[t_ij]"),q$=a(", where "),Bd=o("code"),I$=a("i"),O$=a(" is the index of the inprogress constraint, "),Md=o("code"),B$=a("j"),M$=a(" is the next step for the constraint."),W$=c(),Wd=o("p"),V$=a(`Though we don\u2019t care which constraint is fulfilled first, if we are in the progress of fulfilling a constraint,
that\u2019s the only one we\u2019ll return.`),C$=c(),ar=o("div"),f(Jn.$$.fragment),N$=c(),Vd=o("p"),A$=a("token_ids: the tokens generated thus far to reset the state of the progress through constraints."),Wm=c(),yt=o("h2"),ir=o("a"),Cd=o("span"),f(Rn.$$.fragment),j$=c(),Nd=o("span"),U$=a("BeamSearch"),Vm=c(),R=o("div"),f(Zn.$$.fragment),G$=c(),kt=o("p"),J$=a("Abstract base class for all beam scorers that are used for "),Ii=o("a"),R$=a("beam_search()"),Z$=a(` and
`),Oi=o("a"),H$=a("beam_sample()"),X$=a("."),Q$=c(),Bi=o("div"),f(Hn.$$.fragment),Y$=c(),Mi=o("div"),f(Xn.$$.fragment),Cm=c(),I=o("div"),f(Qn.$$.fragment),K$=c(),Wi=o("p"),Vi=o("a"),eT=a("BeamScorer"),tT=a(" implementing standard beam search decoding."),rT=c(),Yn=o("p"),oT=a("Adapted in part from "),Kn=o("a"),nT=a(`Facebook\u2019s XLM beam search
code`),sT=a("."),aT=c(),Ci=o("p"),iT=a("Reference for the diverse beam search algorithm and implementation "),es=o("a"),cT=a(`Ashwin Kalyan\u2019s DBS
implementation`),lT=c(),Ni=o("div"),f(ts.$$.fragment),dT=c(),Ai=o("div"),f(rs.$$.fragment),Nm=c(),Z=o("div"),f(os.$$.fragment),pT=c(),ji=o("p"),Ui=o("a"),mT=a("BeamScorer"),fT=a(" implementing constrained beam search decoding."),gT=c(),Gi=o("div"),f(ns.$$.fragment),hT=c(),Ji=o("div"),f(ss.$$.fragment),Am=c(),xt=o("h2"),cr=o("a"),Ad=o("span"),f(as.$$.fragment),uT=c(),jd=o("span"),_T=a("Utilities"),jm=c(),Ge=o("div"),f(is.$$.fragment),bT=c(),Ud=o("p"),vT=a("Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),$T=c(),Ri=o("p"),TT=a("From: "),cs=o("a"),yT=a("https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),Um=c(),Je=o("div"),f(ls.$$.fragment),kT=c(),Gd=o("p"),xT=a("Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),wT=c(),Zi=o("p"),LT=a("From: "),ds=o("a"),ET=a("https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),Gm=c(),wt=o("h2"),lr=o("a"),Jd=o("span"),f(ps.$$.fragment),PT=c(),Rd=o("span"),FT=a("Streamers"),Jm=c(),F=o("div"),f(ms.$$.fragment),ST=c(),Zd=o("p"),DT=a("Simple text streamer that prints the token(s) to stdout as soon as entire words are formed."),zT=c(),f(dr.$$.fragment),qT=c(),f(pr.$$.fragment),IT=c(),mr=o("div"),f(fs.$$.fragment),OT=c(),Hd=o("p"),BT=a("Flushes any remaining cache and prints a newline to stdout."),MT=c(),fr=o("div"),f(gs.$$.fragment),WT=c(),Xd=o("p"),VT=a("Prints the new text to stdout. If the stream is ending, also prints a newline."),CT=c(),gr=o("div"),f(hs.$$.fragment),NT=c(),Qd=o("p"),AT=a("Recives tokens, decodes them, and prints them to stdout as soon as they form entire words."),Rm=c(),M=o("div"),f(us.$$.fragment),jT=c(),Yd=o("p"),UT=a(`Streamer that stores print-ready text in a queue, to be used by a downstream application as an iterator. This is
useful for applications that benefit from acessing the generated text in a non-blocking way (e.g. in an interactive
Gradio demo).`),GT=c(),f(hr.$$.fragment),JT=c(),f(ur.$$.fragment),RT=c(),_r=o("div"),f(_s.$$.fragment),ZT=c(),Kd=o("p"),HT=a("Put the new text in the queue. If the stream is ending, also put a stop signal in the queue."),this.h()},l(e){const p=s3('[data-svelte="svelte-1phssyn"]',document.head);$=n(p,"META",{name:!0,content:!0}),p.forEach(r),w=l(e),T=n(e,"H1",{class:!0});var bs=s(T);k=n(bs,"A",{id:!0,class:!0,href:!0});var ep=s(k);B=n(ep,"SPAN",{});var tp=s(B);g(y.$$.fragment,tp),tp.forEach(r),ep.forEach(r),D=l(bs),Uc=n(bs,"SPAN",{});var rp=s(Uc);Rf=i(rp,"Utilities for Generation"),rp.forEach(r),bs.forEach(r),pp=l(e),E=n(e,"P",{});var P=s(E);Zf=i(P,"This page lists all the utility functions used by "),Ts=n(P,"A",{href:!0});var Py=s(Ts);Hf=i(Py,"generate()"),Py.forEach(r),Xf=i(P,`,
`),ys=n(P,"A",{href:!0});var Fy=s(ys);Qf=i(Fy,"greedy_search()"),Fy.forEach(r),Yf=i(P,`,
`),ks=n(P,"A",{href:!0});var Sy=s(ks);Kf=i(Sy,"contrastive_search()"),Sy.forEach(r),eg=i(P,`,
`),xs=n(P,"A",{href:!0});var Dy=s(xs);tg=i(Dy,"sample()"),Dy.forEach(r),rg=i(P,`,
`),ws=n(P,"A",{href:!0});var zy=s(ws);og=i(zy,"beam_search()"),zy.forEach(r),ng=i(P,`,
`),Ls=n(P,"A",{href:!0});var qy=s(Ls);sg=i(qy,"beam_sample()"),qy.forEach(r),ag=i(P,`,
`),Es=n(P,"A",{href:!0});var Iy=s(Es);ig=i(Iy,"group_beam_search()"),Iy.forEach(r),cg=i(P,`, and
`),Ps=n(P,"A",{href:!0});var Oy=s(Ps);lg=i(Oy,"constrained_beam_search()"),Oy.forEach(r),dg=i(P,"."),P.forEach(r),mp=l(e),Fs=n(e,"P",{});var By=s(Fs);pg=i(By,"Most of those are only useful if you are studying the code of the generate methods in the library."),By.forEach(r),fp=l(e),rt=n(e,"H2",{class:!0});var Hm=s(rt);Lt=n(Hm,"A",{id:!0,class:!0,href:!0});var My=s(Lt);Gc=n(My,"SPAN",{});var Wy=s(Gc);g(xr.$$.fragment,Wy),Wy.forEach(r),My.forEach(r),mg=l(Hm),Jc=n(Hm,"SPAN",{});var Vy=s(Jc);fg=i(Vy,"Generate Outputs"),Vy.forEach(r),Hm.forEach(r),gp=l(e),X=n(e,"P",{});var br=s(X);gg=i(br,"The output of "),Ss=n(br,"A",{href:!0});var Cy=s(Ss);hg=i(Cy,"generate()"),Cy.forEach(r),ug=i(br,` is an instance of a subclass of
`),Ds=n(br,"A",{href:!0});var Ny=s(Ds);_g=i(Ny,"ModelOutput"),Ny.forEach(r),bg=i(br,`. This output is a data structure containing all the information returned
by `),zs=n(br,"A",{href:!0});var Ay=s(zs);vg=i(Ay,"generate()"),Ay.forEach(r),$g=i(br,", but that can also be used as tuple or dictionary."),br.forEach(r),hp=l(e),qs=n(e,"P",{});var jy=s(qs);Tg=i(jy,"Here\u2019s an example:"),jy.forEach(r),up=l(e),g(wr.$$.fragment,e),_p=l(e),Re=n(e,"P",{});var Hi=s(Re);yg=i(Hi,"The "),Rc=n(Hi,"CODE",{});var Uy=s(Rc);kg=i(Uy,"generation_output"),Uy.forEach(r),xg=i(Hi," object is a "),Is=n(Hi,"A",{href:!0});var Gy=s(Is);wg=i(Gy,"GreedySearchDecoderOnlyOutput"),Gy.forEach(r),Lg=i(Hi,`, as we can
see in the documentation of that class below, it means it has the following attributes:`),Hi.forEach(r),bp=l(e),Q=n(e,"UL",{});var vr=s(Q);Os=n(vr,"LI",{});var XT=s(Os);Zc=n(XT,"CODE",{});var Jy=s(Zc);Eg=i(Jy,"sequences"),Jy.forEach(r),Pg=i(XT,": the generated sequences of tokens"),XT.forEach(r),Fg=l(vr),Bs=n(vr,"LI",{});var QT=s(Bs);Hc=n(QT,"CODE",{});var Ry=s(Hc);Sg=i(Ry,"scores"),Ry.forEach(r),Dg=i(QT," (optional): the prediction scores of the language modelling head, for each generation step"),QT.forEach(r),zg=l(vr),Ms=n(vr,"LI",{});var YT=s(Ms);Xc=n(YT,"CODE",{});var Zy=s(Xc);qg=i(Zy,"hidden_states"),Zy.forEach(r),Ig=i(YT," (optional): the hidden states of the model, for each generation step"),YT.forEach(r),Og=l(vr),Ws=n(vr,"LI",{});var KT=s(Ws);Qc=n(KT,"CODE",{});var Hy=s(Qc);Bg=i(Hy,"attentions"),Hy.forEach(r),Mg=i(KT," (optional): the attention weights of the model, for each generation step"),KT.forEach(r),vr.forEach(r),vp=l(e),S=n(e,"P",{});var N=s(S);Wg=i(N,"Here we have the "),Yc=n(N,"CODE",{});var Xy=s(Yc);Vg=i(Xy,"scores"),Xy.forEach(r),Cg=i(N," since we passed along "),Kc=n(N,"CODE",{});var Qy=s(Kc);Ng=i(Qy,"output_scores=True"),Qy.forEach(r),Ag=i(N,", but we don\u2019t have "),el=n(N,"CODE",{});var Yy=s(el);jg=i(Yy,"hidden_states"),Yy.forEach(r),Ug=i(N,` and
`),tl=n(N,"CODE",{});var Ky=s(tl);Gg=i(Ky,"attentions"),Ky.forEach(r),Jg=i(N," because we didn\u2019t pass "),rl=n(N,"CODE",{});var e1=s(rl);Rg=i(e1,"output_hidden_states=True"),e1.forEach(r),Zg=i(N," or "),ol=n(N,"CODE",{});var t1=s(ol);Hg=i(t1,"output_attentions=True"),t1.forEach(r),Xg=i(N,"."),N.forEach(r),$p=l(e),W=n(e,"P",{});var Qe=s(W);Qg=i(Qe,`You can access each attribute as you would usually do, and if that attribute has not been returned by the model, you
will get `),nl=n(Qe,"CODE",{});var r1=s(nl);Yg=i(r1,"None"),r1.forEach(r),Kg=i(Qe,". Here for instance "),sl=n(Qe,"CODE",{});var o1=s(sl);eh=i(o1,"generation_output.scores"),o1.forEach(r),th=i(Qe,` are all the generated prediction scores of the
language modeling head, and `),al=n(Qe,"CODE",{});var n1=s(al);rh=i(n1,"generation_output.attentions"),n1.forEach(r),oh=i(Qe," is "),il=n(Qe,"CODE",{});var s1=s(il);nh=i(s1,"None"),s1.forEach(r),sh=i(Qe,"."),Qe.forEach(r),Tp=l(e),V=n(e,"P",{});var Ye=s(V);ah=i(Ye,"When using our "),cl=n(Ye,"CODE",{});var a1=s(cl);ih=i(a1,"generation_output"),a1.forEach(r),ch=i(Ye," object as a tuple, it only keeps the attributes that don\u2019t have "),ll=n(Ye,"CODE",{});var i1=s(ll);lh=i(i1,"None"),i1.forEach(r),dh=i(Ye,` values.
Here, for instance, it has two elements, `),dl=n(Ye,"CODE",{});var c1=s(dl);ph=i(c1,"loss"),c1.forEach(r),mh=i(Ye," then "),pl=n(Ye,"CODE",{});var l1=s(pl);fh=i(l1,"logits"),l1.forEach(r),gh=i(Ye,", so"),Ye.forEach(r),yp=l(e),g(Lr.$$.fragment,e),kp=l(e),Et=n(e,"P",{});var Xm=s(Et);hh=i(Xm,"will return the tuple "),ml=n(Xm,"CODE",{});var d1=s(ml);uh=i(d1,"(generation_output.sequences, generation_output.scores)"),d1.forEach(r),_h=i(Xm," for instance."),Xm.forEach(r),xp=l(e),C=n(e,"P",{});var Ke=s(C);bh=i(Ke,"When using our "),fl=n(Ke,"CODE",{});var p1=s(fl);vh=i(p1,"generation_output"),p1.forEach(r),$h=i(Ke," object as a dictionary, it only keeps the attributes that don\u2019t have "),gl=n(Ke,"CODE",{});var m1=s(gl);Th=i(m1,"None"),m1.forEach(r),yh=i(Ke,`
values. Here, for instance, it has two keys that are `),hl=n(Ke,"CODE",{});var f1=s(hl);kh=i(f1,"sequences"),f1.forEach(r),xh=i(Ke," and "),ul=n(Ke,"CODE",{});var g1=s(ul);wh=i(g1,"scores"),g1.forEach(r),Lh=i(Ke,"."),Ke.forEach(r),wp=l(e),Vs=n(e,"P",{});var h1=s(Vs);Eh=i(h1,"We document here all output types."),h1.forEach(r),Lp=l(e),ot=n(e,"H3",{class:!0});var Qm=s(ot);Pt=n(Qm,"A",{id:!0,class:!0,href:!0});var u1=s(Pt);_l=n(u1,"SPAN",{});var _1=s(_l);g(Er.$$.fragment,_1),_1.forEach(r),u1.forEach(r),Ph=l(Qm),bl=n(Qm,"SPAN",{});var b1=s(bl);Fh=i(b1,"GreedySearchOutput"),b1.forEach(r),Qm.forEach(r),Ep=l(e),nt=n(e,"DIV",{class:!0});var Ym=s(nt);g(Pr.$$.fragment,Ym),Sh=l(Ym),vl=n(Ym,"P",{});var v1=s(vl);Dh=i(v1,"Base class for outputs of decoder-only generation models using greedy search."),v1.forEach(r),Ym.forEach(r),Pp=l(e),st=n(e,"DIV",{class:!0});var Km=s(st);g(Fr.$$.fragment,Km),zh=l(Km),$l=n(Km,"P",{});var $1=s($l);qh=i($1,`Base class for outputs of encoder-decoder generation models using greedy search. Hidden states and attention
weights of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the
encoder_hidden_states attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),$1.forEach(r),Km.forEach(r),Fp=l(e),te=n(e,"DIV",{class:!0});var Xi=s(te);g(Sr.$$.fragment,Xi),Ih=l(Xi),Tl=n(Xi,"P",{});var T1=s(Tl);Oh=i(T1,"Flax Base class for outputs of decoder-only generation models using greedy search."),T1.forEach(r),Bh=l(Xi),Ft=n(Xi,"DIV",{class:!0});var ef=s(Ft);g(Dr.$$.fragment,ef),Mh=l(ef),yl=n(ef,"P",{});var y1=s(yl);Wh=i(y1,"\u201CReturns a new object replacing the specified fields with new values."),y1.forEach(r),ef.forEach(r),Xi.forEach(r),Sp=l(e),at=n(e,"H3",{class:!0});var tf=s(at);St=n(tf,"A",{id:!0,class:!0,href:!0});var k1=s(St);kl=n(k1,"SPAN",{});var x1=s(kl);g(zr.$$.fragment,x1),x1.forEach(r),k1.forEach(r),Vh=l(tf),xl=n(tf,"SPAN",{});var w1=s(xl);Ch=i(w1,"SampleOutput"),w1.forEach(r),tf.forEach(r),Dp=l(e),it=n(e,"DIV",{class:!0});var rf=s(it);g(qr.$$.fragment,rf),Nh=l(rf),wl=n(rf,"P",{});var L1=s(wl);Ah=i(L1,"Base class for outputs of decoder-only generation models using sampling."),L1.forEach(r),rf.forEach(r),zp=l(e),ct=n(e,"DIV",{class:!0});var of=s(ct);g(Ir.$$.fragment,of),jh=l(of),Ll=n(of,"P",{});var E1=s(Ll);Uh=i(E1,`Base class for outputs of encoder-decoder generation models using sampling. Hidden states and attention weights of
the decoder (respectively the encoder) can be accessed via the encoder_attentions and the encoder_hidden_states
attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),E1.forEach(r),of.forEach(r),qp=l(e),re=n(e,"DIV",{class:!0});var Qi=s(re);g(Or.$$.fragment,Qi),Gh=l(Qi),El=n(Qi,"P",{});var P1=s(El);Jh=i(P1,"Flax Base class for outputs of decoder-only generation models using sampling."),P1.forEach(r),Rh=l(Qi),Dt=n(Qi,"DIV",{class:!0});var nf=s(Dt);g(Br.$$.fragment,nf),Zh=l(nf),Pl=n(nf,"P",{});var F1=s(Pl);Hh=i(F1,"\u201CReturns a new object replacing the specified fields with new values."),F1.forEach(r),nf.forEach(r),Qi.forEach(r),Ip=l(e),lt=n(e,"H3",{class:!0});var sf=s(lt);zt=n(sf,"A",{id:!0,class:!0,href:!0});var S1=s(zt);Fl=n(S1,"SPAN",{});var D1=s(Fl);g(Mr.$$.fragment,D1),D1.forEach(r),S1.forEach(r),Xh=l(sf),Sl=n(sf,"SPAN",{});var z1=s(Sl);Qh=i(z1,"BeamSearchOutput"),z1.forEach(r),sf.forEach(r),Op=l(e),dt=n(e,"DIV",{class:!0});var af=s(dt);g(Wr.$$.fragment,af),Yh=l(af),Dl=n(af,"P",{});var q1=s(Dl);Kh=i(q1,"Base class for outputs of decoder-only generation models using beam search."),q1.forEach(r),af.forEach(r),Bp=l(e),pt=n(e,"DIV",{class:!0});var cf=s(pt);g(Vr.$$.fragment,cf),eu=l(cf),zl=n(cf,"P",{});var I1=s(zl);tu=i(I1,`Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights
of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the encoder_hidden_states
attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),I1.forEach(r),cf.forEach(r),Mp=l(e),mt=n(e,"H3",{class:!0});var lf=s(mt);qt=n(lf,"A",{id:!0,class:!0,href:!0});var O1=s(qt);ql=n(O1,"SPAN",{});var B1=s(ql);g(Cr.$$.fragment,B1),B1.forEach(r),O1.forEach(r),ru=l(lf),Il=n(lf,"SPAN",{});var M1=s(Il);ou=i(M1,"BeamSampleOutput"),M1.forEach(r),lf.forEach(r),Wp=l(e),ft=n(e,"DIV",{class:!0});var df=s(ft);g(Nr.$$.fragment,df),nu=l(df),Ol=n(df,"P",{});var W1=s(Ol);su=i(W1,"Base class for outputs of decoder-only generation models using beam sample."),W1.forEach(r),df.forEach(r),Vp=l(e),gt=n(e,"DIV",{class:!0});var pf=s(gt);g(Ar.$$.fragment,pf),au=l(pf),Bl=n(pf,"P",{});var V1=s(Bl);iu=i(V1,`Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention
weights of the decoder (respectively the encoder) can be accessed via the encoder_attentions and the
encoder_hidden_states attributes (respectively the decoder_attentions and the decoder_hidden_states attributes)`),V1.forEach(r),pf.forEach(r),Cp=l(e),ht=n(e,"H2",{class:!0});var mf=s(ht);It=n(mf,"A",{id:!0,class:!0,href:!0});var C1=s(It);Ml=n(C1,"SPAN",{});var N1=s(Ml);g(jr.$$.fragment,N1),N1.forEach(r),C1.forEach(r),cu=l(mf),Wl=n(mf,"SPAN",{});var A1=s(Wl);lu=i(A1,"LogitsProcessor"),A1.forEach(r),mf.forEach(r),Np=l(e),Ot=n(e,"P",{});var ff=s(Ot);du=i(ff,"A "),Cs=n(ff,"A",{href:!0});var j1=s(Cs);pu=i(j1,"LogitsProcessor"),j1.forEach(r),mu=i(ff,` can be used to modify the prediction scores of a language model head for
generation.`),ff.forEach(r),Ap=l(e),oe=n(e,"DIV",{class:!0});var Yi=s(oe);g(Ur.$$.fragment,Yi),fu=l(Yi),Vl=n(Yi,"P",{});var U1=s(Vl);gu=i(U1,"Abstract base class for all logit processors that can be applied during generation."),U1.forEach(r),hu=l(Yi),Bt=n(Yi,"DIV",{class:!0});var gf=s(Bt);g(Gr.$$.fragment,gf),uu=l(gf),Cl=n(gf,"P",{});var G1=s(Cl);_u=i(G1,"Torch method for processing logits."),G1.forEach(r),gf.forEach(r),Yi.forEach(r),jp=l(e),ne=n(e,"DIV",{class:!0});var Ki=s(ne);g(Jr.$$.fragment,Ki),bu=l(Ki),z=n(Ki,"P",{});var A=s(z);vu=i(A,"This class can be used to create a list of "),Ns=n(A,"A",{href:!0});var J1=s(Ns);$u=i(J1,"LogitsProcessor"),J1.forEach(r),Tu=i(A," or "),As=n(A,"A",{href:!0});var R1=s(As);yu=i(R1,"LogitsWarper"),R1.forEach(r),ku=i(A,` to subsequently process a
`),Nl=n(A,"CODE",{});var Z1=s(Nl);xu=i(Z1,"scores"),Z1.forEach(r),wu=i(A," input tensor. This class inherits from list and adds a specific "),Al=n(A,"EM",{});var H1=s(Al);jl=n(H1,"STRONG",{});var X1=s(jl);Lu=i(X1,"call"),X1.forEach(r),H1.forEach(r),Eu=i(A,` method to apply each
`),js=n(A,"A",{href:!0});var Q1=s(js);Pu=i(Q1,"LogitsProcessor"),Q1.forEach(r),Fu=i(A," or "),Us=n(A,"A",{href:!0});var Y1=s(Us);Su=i(Y1,"LogitsWarper"),Y1.forEach(r),Du=i(A," to the inputs."),A.forEach(r),zu=l(Ki),Gs=n(Ki,"DIV",{class:!0});var K1=s(Gs);g(Rr.$$.fragment,K1),K1.forEach(r),Ki.forEach(r),Up=l(e),se=n(e,"DIV",{class:!0});var ec=s(se);g(Zr.$$.fragment,ec),qu=l(ec),Ul=n(ec,"P",{});var e2=s(Ul);Iu=i(e2,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),e2.forEach(r),Ou=l(ec),Mt=n(ec,"DIV",{class:!0});var hf=s(Mt);g(Hr.$$.fragment,hf),Bu=l(hf),Gl=n(hf,"P",{});var t2=s(Gl);Mu=i(t2,"Torch method for warping logits."),t2.forEach(r),hf.forEach(r),ec.forEach(r),Gp=l(e),ae=n(e,"DIV",{class:!0});var tc=s(ae);g(Xr.$$.fragment,tc),Wu=l(tc),Js=n(tc,"P",{});var ey=s(Js);Rs=n(ey,"A",{href:!0});var r2=s(Rs);Vu=i(r2,"LogitsProcessor"),r2.forEach(r),Cu=i(ey," enforcing a min-length by setting EOS probability to 0."),ey.forEach(r),Nu=l(tc),Zs=n(tc,"DIV",{class:!0});var o2=s(Zs);g(Qr.$$.fragment,o2),o2.forEach(r),tc.forEach(r),Jp=l(e),ie=n(e,"DIV",{class:!0});var rc=s(ie);g(Yr.$$.fragment,rc),Au=l(rc),Hs=n(rc,"P",{});var ty=s(Hs);Xs=n(ty,"A",{href:!0});var n2=s(Xs);ju=i(n2,"LogitsProcessor"),n2.forEach(r),Uu=i(ty," enforcing a min-length of new tokens by setting EOS (End-Of-Sequence) token probability to 0."),ty.forEach(r),Gu=l(rc),Qs=n(rc,"DIV",{class:!0});var s2=s(Qs);g(Kr.$$.fragment,s2),s2.forEach(r),rc.forEach(r),Rp=l(e),ce=n(e,"DIV",{class:!0});var oc=s(ce);g(eo.$$.fragment,oc),Ju=l(oc),Ys=n(oc,"P",{});var ry=s(Ys);Ks=n(ry,"A",{href:!0});var a2=s(Ks);Ru=i(a2,"LogitsWarper"),a2.forEach(r),Zu=i(ry," for temperature (exponential scaling output probability distribution)."),ry.forEach(r),Hu=l(oc),ea=n(oc,"DIV",{class:!0});var i2=s(ea);g(to.$$.fragment,i2),i2.forEach(r),oc.forEach(r),Zp=l(e),le=n(e,"DIV",{class:!0});var nc=s(le);g(ro.$$.fragment,nc),Xu=l(nc),ta=n(nc,"P",{});var oy=s(ta);ra=n(oy,"A",{href:!0});var c2=s(ra);Qu=i(c2,"LogitsProcessor"),c2.forEach(r),Yu=i(oy," enforcing an exponential penalty on repeated sequences."),oy.forEach(r),Ku=l(nc),oa=n(nc,"DIV",{class:!0});var l2=s(oa);g(oo.$$.fragment,l2),l2.forEach(r),nc.forEach(r),Hp=l(e),de=n(e,"DIV",{class:!0});var sc=s(de);g(no.$$.fragment,sc),e_=l(sc),na=n(sc,"P",{});var ny=s(na);sa=n(ny,"A",{href:!0});var d2=s(sa);t_=i(d2,"LogitsWarper"),d2.forEach(r),r_=i(ny," that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),ny.forEach(r),o_=l(sc),aa=n(sc,"DIV",{class:!0});var p2=s(aa);g(so.$$.fragment,p2),p2.forEach(r),sc.forEach(r),Xp=l(e),pe=n(e,"DIV",{class:!0});var ac=s(pe);g(ao.$$.fragment,ac),n_=l(ac),ia=n(ac,"P",{});var sy=s(ia);ca=n(sy,"A",{href:!0});var m2=s(ca);s_=i(m2,"LogitsWarper"),m2.forEach(r),a_=i(sy," that performs top-k, i.e. restricting to the k highest probability elements."),sy.forEach(r),i_=l(ac),la=n(ac,"DIV",{class:!0});var f2=s(la);g(io.$$.fragment,f2),f2.forEach(r),ac.forEach(r),Qp=l(e),me=n(e,"DIV",{class:!0});var ic=s(me);g(co.$$.fragment,ic),c_=l(ic),Wt=n(ic,"P",{});var op=s(Wt);da=n(op,"A",{href:!0});var g2=s(da);l_=i(g2,"LogitsWarper"),g2.forEach(r),d_=i(op," that performs typical decoding. See "),lo=n(op,"A",{href:!0,rel:!0});var h2=s(lo);p_=i(h2,`Typical Decoding for Natural Language
Generation`),h2.forEach(r),m_=i(op," for more information."),op.forEach(r),f_=l(ic),pa=n(ic,"DIV",{class:!0});var u2=s(pa);g(po.$$.fragment,u2),u2.forEach(r),ic.forEach(r),Yp=l(e),fe=n(e,"DIV",{class:!0});var cc=s(fe);g(mo.$$.fragment,cc),g_=l(cc),Vt=n(cc,"P",{});var np=s(Vt);ma=n(np,"A",{href:!0});var _2=s(ma);h_=i(_2,"LogitsProcessor"),_2.forEach(r),u_=i(np,` that enforces no repetition of n-grams. See
`),fo=n(np,"A",{href:!0,rel:!0});var b2=s(fo);__=i(b2,"Fairseq"),b2.forEach(r),b_=i(np,"."),np.forEach(r),v_=l(cc),fa=n(cc,"DIV",{class:!0});var v2=s(fa);g(go.$$.fragment,v2),v2.forEach(r),cc.forEach(r),Kp=l(e),ge=n(e,"DIV",{class:!0});var lc=s(ge);g(ho.$$.fragment,lc),$_=l(lc),ga=n(lc,"P",{});var ay=s(ga);ha=n(ay,"A",{href:!0});var $2=s(ha);T_=i($2,"LogitsProcessor"),$2.forEach(r),y_=i(ay," that enforces that specified sequences will never be sampled."),ay.forEach(r),k_=l(lc),ua=n(lc,"DIV",{class:!0});var T2=s(ua);g(uo.$$.fragment,T2),T2.forEach(r),lc.forEach(r),em=l(e),he=n(e,"DIV",{class:!0});var dc=s(he);g(_o.$$.fragment,dc),x_=l(dc),Ct=n(dc,"P",{});var sp=s(Ct);_a=n(sp,"A",{href:!0});var y2=s(_a);w_=i(y2,"LogitsProcessor"),y2.forEach(r),L_=i(sp,` that enforces constrained generation and is useful for prefix-conditioned constrained
generation. See `),bo=n(sp,"A",{href:!0,rel:!0});var k2=s(bo);E_=i(k2,"Autoregressive Entity Retrieval"),k2.forEach(r),P_=i(sp," for more information."),sp.forEach(r),F_=l(dc),ba=n(dc,"DIV",{class:!0});var x2=s(ba);g(vo.$$.fragment,x2),x2.forEach(r),dc.forEach(r),tm=l(e),ue=n(e,"DIV",{class:!0});var pc=s(ue);g($o.$$.fragment,pc),S_=l(pc),Ze=n(pc,"P",{});var vs=s(Ze);va=n(vs,"A",{href:!0});var w2=s(va);D_=i(w2,"LogitsProcessor"),w2.forEach(r),z_=i(vs,` that enforces diverse beam search. Note that this logits processor is only effective for
`),$a=n(vs,"A",{href:!0});var L2=s($a);q_=i(L2,"PreTrainedModel.group_beam_search()"),L2.forEach(r),I_=i(vs,". See "),To=n(vs,"A",{href:!0,rel:!0});var E2=s(To);O_=i(E2,`Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence
Models`),E2.forEach(r),B_=i(vs," for more details."),vs.forEach(r),M_=l(pc),Ta=n(pc,"DIV",{class:!0});var P2=s(Ta);g(yo.$$.fragment,P2),P2.forEach(r),pc.forEach(r),rm=l(e),_e=n(e,"DIV",{class:!0});var mc=s(_e);g(ko.$$.fragment,mc),W_=l(mc),ya=n(mc,"P",{});var iy=s(ya);ka=n(iy,"A",{href:!0});var F2=s(ka);V_=i(F2,"LogitsProcessor"),F2.forEach(r),C_=i(iy," that enforces the specified token as the first generated token."),iy.forEach(r),N_=l(mc),xa=n(mc,"DIV",{class:!0});var S2=s(xa);g(xo.$$.fragment,S2),S2.forEach(r),mc.forEach(r),om=l(e),be=n(e,"DIV",{class:!0});var fc=s(be);g(wo.$$.fragment,fc),A_=l(fc),Nt=n(fc,"P",{});var ap=s(Nt);wa=n(ap,"A",{href:!0});var D2=s(wa);j_=i(D2,"LogitsProcessor"),D2.forEach(r),U_=i(ap," that enforces the specified token as the last generated token when "),Jl=n(ap,"CODE",{});var z2=s(Jl);G_=i(z2,"max_length"),z2.forEach(r),J_=i(ap," is reached."),ap.forEach(r),R_=l(fc),La=n(fc,"DIV",{class:!0});var q2=s(La);g(Lo.$$.fragment,q2),q2.forEach(r),fc.forEach(r),nm=l(e),ve=n(e,"DIV",{class:!0});var gc=s(ve);g(Eo.$$.fragment,gc),Z_=l(gc),He=n(gc,"P",{});var $s=s(He);Ea=n($s,"A",{href:!0});var I2=s(Ea);H_=i(I2,"LogitsProcessor"),I2.forEach(r),X_=i($s," that removes all "),Rl=n($s,"CODE",{});var O2=s(Rl);Q_=i(O2,"nan"),O2.forEach(r),Y_=i($s," and "),Zl=n($s,"CODE",{});var B2=s(Zl);K_=i(B2,"inf"),B2.forEach(r),eb=i($s,` values to avoid the generation method to fail. Note that using
the logits processor should only be used if necessary since it can slow down the generation method.`),$s.forEach(r),tb=l(gc),Pa=n(gc,"DIV",{class:!0});var M2=s(Pa);g(Po.$$.fragment,M2),M2.forEach(r),gc.forEach(r),sm=l(e),$e=n(e,"DIV",{class:!0});var hc=s($e);g(Fo.$$.fragment,hc),rb=l(hc),Hl=n(hc,"P",{});var W2=s(Hl);ob=i(W2,"Abstract base class for all logit processors that can be applied during generation."),W2.forEach(r),nb=l(hc),At=n(hc,"DIV",{class:!0});var uf=s(At);g(So.$$.fragment,uf),sb=l(uf),Xl=n(uf,"P",{});var V2=s(Xl);ab=i(V2,"TF method for processing logits."),V2.forEach(r),uf.forEach(r),hc.forEach(r),am=l(e),Te=n(e,"DIV",{class:!0});var uc=s(Te);g(Do.$$.fragment,uc),ib=l(uc),G=n(uc,"P",{});var et=s(G);cb=i(et,"This class can be used to create a list of "),Fa=n(et,"A",{href:!0});var C2=s(Fa);lb=i(C2,"TFLogitsProcessor"),C2.forEach(r),db=i(et," to subsequently process a "),Ql=n(et,"CODE",{});var N2=s(Ql);pb=i(N2,"scores"),N2.forEach(r),mb=i(et,` input tensor.
This class inherits from list and adds a specific `),Yl=n(et,"EM",{});var A2=s(Yl);Kl=n(A2,"STRONG",{});var j2=s(Kl);fb=i(j2,"call"),j2.forEach(r),A2.forEach(r),gb=i(et," method to apply each "),Sa=n(et,"A",{href:!0});var U2=s(Sa);hb=i(U2,"TFLogitsProcessor"),U2.forEach(r),ub=i(et,` to the
inputs.`),et.forEach(r),_b=l(uc),Da=n(uc,"DIV",{class:!0});var G2=s(Da);g(zo.$$.fragment,G2),G2.forEach(r),uc.forEach(r),im=l(e),ye=n(e,"DIV",{class:!0});var _c=s(ye);g(qo.$$.fragment,_c),bb=l(_c),ed=n(_c,"P",{});var J2=s(ed);vb=i(J2,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),J2.forEach(r),$b=l(_c),jt=n(_c,"DIV",{class:!0});var _f=s(jt);g(Io.$$.fragment,_f),Tb=l(_f),td=n(_f,"P",{});var R2=s(td);yb=i(R2,"TF method for warping logits."),R2.forEach(r),_f.forEach(r),_c.forEach(r),cm=l(e),ke=n(e,"DIV",{class:!0});var bc=s(ke);g(Oo.$$.fragment,bc),kb=l(bc),za=n(bc,"P",{});var cy=s(za);qa=n(cy,"A",{href:!0});var Z2=s(qa);xb=i(Z2,"TFLogitsWarper"),Z2.forEach(r),wb=i(cy," for temperature (exponential scaling output probability distribution)."),cy.forEach(r),Lb=l(bc),Ia=n(bc,"DIV",{class:!0});var H2=s(Ia);g(Bo.$$.fragment,H2),H2.forEach(r),bc.forEach(r),lm=l(e),xe=n(e,"DIV",{class:!0});var vc=s(xe);g(Mo.$$.fragment,vc),Eb=l(vc),Oa=n(vc,"P",{});var ly=s(Oa);Ba=n(ly,"A",{href:!0});var X2=s(Ba);Pb=i(X2,"TFLogitsWarper"),X2.forEach(r),Fb=i(ly," that performs top-p, i.e. restricting to top tokens summing to <= prob_cut_off."),ly.forEach(r),Sb=l(vc),Ma=n(vc,"DIV",{class:!0});var Q2=s(Ma);g(Wo.$$.fragment,Q2),Q2.forEach(r),vc.forEach(r),dm=l(e),we=n(e,"DIV",{class:!0});var $c=s(we);g(Vo.$$.fragment,$c),Db=l($c),Wa=n($c,"P",{});var dy=s(Wa);Va=n(dy,"A",{href:!0});var Y2=s(Va);zb=i(Y2,"TFLogitsWarper"),Y2.forEach(r),qb=i(dy," that performs top-k, i.e. restricting to the k highest probability elements."),dy.forEach(r),Ib=l($c),Ca=n($c,"DIV",{class:!0});var K2=s(Ca);g(Co.$$.fragment,K2),K2.forEach(r),$c.forEach(r),pm=l(e),Le=n(e,"DIV",{class:!0});var Tc=s(Le);g(No.$$.fragment,Tc),Ob=l(Tc),Na=n(Tc,"P",{});var py=s(Na);Aa=n(py,"A",{href:!0});var e4=s(Aa);Bb=i(e4,"TFLogitsProcessor"),e4.forEach(r),Mb=i(py," enforcing a min-length by setting EOS probability to 0."),py.forEach(r),Wb=l(Tc),ja=n(Tc,"DIV",{class:!0});var t4=s(ja);g(Ao.$$.fragment,t4),t4.forEach(r),Tc.forEach(r),mm=l(e),Ee=n(e,"DIV",{class:!0});var yc=s(Ee);g(jo.$$.fragment,yc),Vb=l(yc),Ua=n(yc,"P",{});var my=s(Ua);Ga=n(my,"A",{href:!0});var r4=s(Ga);Cb=i(r4,"TFLogitsProcessor"),r4.forEach(r),Nb=i(my," that enforces that specified sequences will never be sampled."),my.forEach(r),Ab=l(yc),Ja=n(yc,"DIV",{class:!0});var o4=s(Ja);g(Uo.$$.fragment,o4),o4.forEach(r),yc.forEach(r),fm=l(e),Pe=n(e,"DIV",{class:!0});var kc=s(Pe);g(Go.$$.fragment,kc),jb=l(kc),Ut=n(kc,"P",{});var ip=s(Ut);Ra=n(ip,"A",{href:!0});var n4=s(Ra);Ub=i(n4,"TFLogitsProcessor"),n4.forEach(r),Gb=i(ip,` that enforces no repetition of n-grams. See
`),Jo=n(ip,"A",{href:!0,rel:!0});var s4=s(Jo);Jb=i(s4,"Fairseq"),s4.forEach(r),Rb=i(ip,"."),ip.forEach(r),Zb=l(kc),Za=n(kc,"DIV",{class:!0});var a4=s(Za);g(Ro.$$.fragment,a4),a4.forEach(r),kc.forEach(r),gm=l(e),Fe=n(e,"DIV",{class:!0});var xc=s(Fe);g(Zo.$$.fragment,xc),Hb=l(xc),Ha=n(xc,"P",{});var fy=s(Ha);Xa=n(fy,"A",{href:!0});var i4=s(Xa);Xb=i(i4,"TFLogitsProcessor"),i4.forEach(r),Qb=i(fy," enforcing an exponential penalty on repeated sequences."),fy.forEach(r),Yb=l(xc),Qa=n(xc,"DIV",{class:!0});var c4=s(Qa);g(Ho.$$.fragment,c4),c4.forEach(r),xc.forEach(r),hm=l(e),Se=n(e,"DIV",{class:!0});var wc=s(Se);g(Xo.$$.fragment,wc),Kb=l(wc),Ya=n(wc,"P",{});var gy=s(Ya);Ka=n(gy,"A",{href:!0});var l4=s(Ka);ev=i(l4,"TFLogitsProcessor"),l4.forEach(r),tv=i(gy," that enforces the specified token as the first generated token."),gy.forEach(r),rv=l(wc),ei=n(wc,"DIV",{class:!0});var d4=s(ei);g(Qo.$$.fragment,d4),d4.forEach(r),wc.forEach(r),um=l(e),De=n(e,"DIV",{class:!0});var Lc=s(De);g(Yo.$$.fragment,Lc),ov=l(Lc),Gt=n(Lc,"P",{});var cp=s(Gt);ti=n(cp,"A",{href:!0});var p4=s(ti);nv=i(p4,"TFLogitsProcessor"),p4.forEach(r),sv=i(cp," that enforces the specified token as the last generated token when "),rd=n(cp,"CODE",{});var m4=s(rd);av=i(m4,"max_length"),m4.forEach(r),iv=i(cp," is reached."),cp.forEach(r),cv=l(Lc),ri=n(Lc,"DIV",{class:!0});var f4=s(ri);g(Ko.$$.fragment,f4),f4.forEach(r),Lc.forEach(r),_m=l(e),ze=n(e,"DIV",{class:!0});var Ec=s(ze);g(en.$$.fragment,Ec),lv=l(Ec),od=n(Ec,"P",{});var g4=s(od);dv=i(g4,"Abstract base class for all logit processors that can be applied during generation."),g4.forEach(r),pv=l(Ec),Jt=n(Ec,"DIV",{class:!0});var bf=s(Jt);g(tn.$$.fragment,bf),mv=l(bf),nd=n(bf,"P",{});var h4=s(nd);fv=i(h4,"Flax method for processing logits."),h4.forEach(r),bf.forEach(r),Ec.forEach(r),bm=l(e),qe=n(e,"DIV",{class:!0});var Pc=s(qe);g(rn.$$.fragment,Pc),gv=l(Pc),q=n(Pc,"P",{});var j=s(q);hv=i(j,"This class can be used to create a list of "),oi=n(j,"A",{href:!0});var u4=s(oi);uv=i(u4,"FlaxLogitsProcessor"),u4.forEach(r),_v=i(j," or "),ni=n(j,"A",{href:!0});var _4=s(ni);bv=i(_4,"FlaxLogitsWarper"),_4.forEach(r),vv=i(j,` to subsequently process
a `),sd=n(j,"CODE",{});var b4=s(sd);$v=i(b4,"scores"),b4.forEach(r),Tv=i(j," input tensor. This class inherits from list and adds a specific "),ad=n(j,"EM",{});var v4=s(ad);id=n(v4,"STRONG",{});var $4=s(id);yv=i($4,"call"),$4.forEach(r),v4.forEach(r),kv=i(j,` method to apply each
`),si=n(j,"A",{href:!0});var T4=s(si);xv=i(T4,"FlaxLogitsProcessor"),T4.forEach(r),wv=i(j," or "),ai=n(j,"A",{href:!0});var y4=s(ai);Lv=i(y4,"FlaxLogitsWarper"),y4.forEach(r),Ev=i(j," to the inputs."),j.forEach(r),Pv=l(Pc),ii=n(Pc,"DIV",{class:!0});var k4=s(ii);g(on.$$.fragment,k4),k4.forEach(r),Pc.forEach(r),vm=l(e),Ie=n(e,"DIV",{class:!0});var Fc=s(Ie);g(nn.$$.fragment,Fc),Fv=l(Fc),cd=n(Fc,"P",{});var x4=s(cd);Sv=i(x4,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),x4.forEach(r),Dv=l(Fc),Rt=n(Fc,"DIV",{class:!0});var vf=s(Rt);g(sn.$$.fragment,vf),zv=l(vf),ld=n(vf,"P",{});var w4=s(ld);qv=i(w4,"Flax method for warping logits."),w4.forEach(r),vf.forEach(r),Fc.forEach(r),$m=l(e),Oe=n(e,"DIV",{class:!0});var Sc=s(Oe);g(an.$$.fragment,Sc),Iv=l(Sc),ci=n(Sc,"P",{});var hy=s(ci);li=n(hy,"A",{href:!0});var L4=s(li);Ov=i(L4,"FlaxLogitsWarper"),L4.forEach(r),Bv=i(hy," for temperature (exponential scaling output probability distribution)."),hy.forEach(r),Mv=l(Sc),di=n(Sc,"DIV",{class:!0});var E4=s(di);g(cn.$$.fragment,E4),E4.forEach(r),Sc.forEach(r),Tm=l(e),Be=n(e,"DIV",{class:!0});var Dc=s(Be);g(ln.$$.fragment,Dc),Wv=l(Dc),pi=n(Dc,"P",{});var uy=s(pi);mi=n(uy,"A",{href:!0});var P4=s(mi);Vv=i(P4,"FlaxLogitsWarper"),P4.forEach(r),Cv=i(uy," that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),uy.forEach(r),Nv=l(Dc),fi=n(Dc,"DIV",{class:!0});var F4=s(fi);g(dn.$$.fragment,F4),F4.forEach(r),Dc.forEach(r),ym=l(e),Me=n(e,"DIV",{class:!0});var zc=s(Me);g(pn.$$.fragment,zc),Av=l(zc),gi=n(zc,"P",{});var _y=s(gi);hi=n(_y,"A",{href:!0});var S4=s(hi);jv=i(S4,"FlaxLogitsWarper"),S4.forEach(r),Uv=i(_y," that performs top-k, i.e. restricting to the k highest probability elements."),_y.forEach(r),Gv=l(zc),ui=n(zc,"DIV",{class:!0});var D4=s(ui);g(mn.$$.fragment,D4),D4.forEach(r),zc.forEach(r),km=l(e),We=n(e,"DIV",{class:!0});var qc=s(We);g(fn.$$.fragment,qc),Jv=l(qc),_i=n(qc,"P",{});var by=s(_i);bi=n(by,"A",{href:!0});var z4=s(bi);Rv=i(z4,"FlaxLogitsProcessor"),z4.forEach(r),Zv=i(by," that enforces the specified token as the first generated token."),by.forEach(r),Hv=l(qc),vi=n(qc,"DIV",{class:!0});var q4=s(vi);g(gn.$$.fragment,q4),q4.forEach(r),qc.forEach(r),xm=l(e),Ve=n(e,"DIV",{class:!0});var Ic=s(Ve);g(hn.$$.fragment,Ic),Xv=l(Ic),Zt=n(Ic,"P",{});var lp=s(Zt);$i=n(lp,"A",{href:!0});var I4=s($i);Qv=i(I4,"FlaxLogitsProcessor"),I4.forEach(r),Yv=i(lp," that enforces the specified token as the last generated token when "),dd=n(lp,"CODE",{});var O4=s(dd);Kv=i(O4,"max_length"),O4.forEach(r),e0=i(lp," is reached."),lp.forEach(r),t0=l(Ic),Ti=n(Ic,"DIV",{class:!0});var B4=s(Ti);g(un.$$.fragment,B4),B4.forEach(r),Ic.forEach(r),wm=l(e),Ce=n(e,"DIV",{class:!0});var Oc=s(Ce);g(_n.$$.fragment,Oc),r0=l(Oc),yi=n(Oc,"P",{});var vy=s(yi);ki=n(vy,"A",{href:!0});var M4=s(ki);o0=i(M4,"FlaxLogitsProcessor"),M4.forEach(r),n0=i(vy," enforcing a min-length by setting EOS probability to 0."),vy.forEach(r),s0=l(Oc),xi=n(Oc,"DIV",{class:!0});var W4=s(xi);g(bn.$$.fragment,W4),W4.forEach(r),Oc.forEach(r),Lm=l(e),ut=n(e,"H2",{class:!0});var $f=s(ut);Ht=n($f,"A",{id:!0,class:!0,href:!0});var V4=s(Ht);pd=n(V4,"SPAN",{});var C4=s(pd);g(vn.$$.fragment,C4),C4.forEach(r),V4.forEach(r),a0=l($f),md=n($f,"SPAN",{});var N4=s(md);i0=i(N4,"StoppingCriteria"),N4.forEach(r),$f.forEach(r),Em=l(e),Xt=n(e,"P",{});var Tf=s(Xt);c0=i(Tf,"A "),wi=n(Tf,"A",{href:!0});var A4=s(wi);l0=i(A4,"StoppingCriteria"),A4.forEach(r),d0=i(Tf," can be used to change when to stop generation (other than EOS token)."),Tf.forEach(r),Pm=l(e),Ne=n(e,"DIV",{class:!0});var Bc=s(Ne);g($n.$$.fragment,Bc),p0=l(Bc),fd=n(Bc,"P",{});var j4=s(fd);m0=i(j4,"Abstract base class for all stopping criteria that can be applied during generation."),j4.forEach(r),f0=l(Bc),Li=n(Bc,"DIV",{class:!0});var U4=s(Li);g(Tn.$$.fragment,U4),U4.forEach(r),Bc.forEach(r),Fm=l(e),_t=n(e,"DIV",{class:!0});var yf=s(_t);g(yn.$$.fragment,yf),g0=l(yf),Ei=n(yf,"DIV",{class:!0});var G4=s(Ei);g(kn.$$.fragment,G4),G4.forEach(r),yf.forEach(r),Sm=l(e),Ae=n(e,"DIV",{class:!0});var Mc=s(Ae);g(xn.$$.fragment,Mc),h0=l(Mc),wn=n(Mc,"P",{});var kf=s(wn);u0=i(kf,"This class can be used to stop generation whenever the full generated number of tokens exceeds "),gd=n(kf,"CODE",{});var J4=s(gd);_0=i(J4,"max_length"),J4.forEach(r),b0=i(kf,`. Keep
in mind for decoder-only type of transformers, this will include the initial prompted tokens.`),kf.forEach(r),v0=l(Mc),Pi=n(Mc,"DIV",{class:!0});var R4=s(Pi);g(Ln.$$.fragment,R4),R4.forEach(r),Mc.forEach(r),Dm=l(e),je=n(e,"DIV",{class:!0});var Wc=s(je);g(En.$$.fragment,Wc),$0=l(Wc),Pn=n(Wc,"P",{});var xf=s(Pn);T0=i(xf,`This class can be used to stop generation whenever the full generation exceeds some amount of time. By default, the
time will start being counted when you initialize this function. You can override this by passing an
`),hd=n(xf,"CODE",{});var Z4=s(hd);y0=i(Z4,"initial_time"),Z4.forEach(r),k0=i(xf,"."),xf.forEach(r),x0=l(Wc),Fi=n(Wc,"DIV",{class:!0});var H4=s(Fi);g(Fn.$$.fragment,H4),H4.forEach(r),Wc.forEach(r),zm=l(e),bt=n(e,"H2",{class:!0});var wf=s(bt);Qt=n(wf,"A",{id:!0,class:!0,href:!0});var X4=s(Qt);ud=n(X4,"SPAN",{});var Q4=s(ud);g(Sn.$$.fragment,Q4),Q4.forEach(r),X4.forEach(r),w0=l(wf),_d=n(wf,"SPAN",{});var Y4=s(_d);L0=i(Y4,"Constraints"),Y4.forEach(r),wf.forEach(r),qm=l(e),Yt=n(e,"P",{});var Lf=s(Yt);E0=i(Lf,"A "),Si=n(Lf,"A",{href:!0});var K4=s(Si);P0=i(K4,"Constraint"),K4.forEach(r),F0=i(Lf," can be used to force the generation to include specific tokens or sequences in the output."),Lf.forEach(r),Im=l(e),x=n(e,"DIV",{class:!0});var L=s(x);g(Dn.$$.fragment,L),S0=l(L),bd=n(L,"P",{});var ek=s(bd);D0=i(ek,`Abstract base class for all constraints that can be applied during generation.
It must define how the constraint can be satisfied.`),ek.forEach(r),z0=l(L),vd=n(L,"P",{});var tk=s(vd);q0=i(tk,"All classes that inherit Constraint must follow the requirement that"),tk.forEach(r),I0=l(L),g(Kt.$$.fragment,L),O0=l(L),$d=n(L,"P",{});var rk=s($d);B0=i(rk,"will always terminate (halt)."),rk.forEach(r),M0=l(L),er=n(L,"DIV",{class:!0});var Ef=s(er);g(zn.$$.fragment,Ef),W0=l(Ef),Td=n(Ef,"P",{});var ok=s(Td);V0=i(ok,"When called, returns the token that would take this constraint one step closer to being fulfilled."),ok.forEach(r),Ef.forEach(r),C0=l(L),tr=n(L,"DIV",{class:!0});var Pf=s(tr);g(qn.$$.fragment,Pf),N0=l(Pf),yd=n(Pf,"P",{});var nk=s(yd);A0=i(nk,"Creates a new instance of this constraint."),nk.forEach(r),Pf.forEach(r),j0=l(L),rr=n(L,"DIV",{class:!0});var Ff=s(rr);g(In.$$.fragment,Ff),U0=l(Ff),kd=n(Ff,"P",{});var sk=s(kd);G0=i(sk,"Reads in a token and returns whether it creates progress."),sk.forEach(r),Ff.forEach(r),J0=l(L),or=n(L,"DIV",{class:!0});var Sf=s(or);g(On.$$.fragment,Sf),R0=l(Sf),Bn=n(Sf,"P",{});var Df=s(Bn);Z0=i(Df,"Returns the number of remaining steps of "),xd=n(Df,"CODE",{});var ak=s(xd);H0=i(ak,"advance()"),ak.forEach(r),X0=i(Df," in order to complete this constraint."),Df.forEach(r),Sf.forEach(r),Q0=l(L),nr=n(L,"DIV",{class:!0});var zf=s(nr);g(Mn.$$.fragment,zf),Y0=l(zf),wd=n(zf,"P",{});var ik=s(wd);K0=i(ik,`Resets the state of this constraint to its initialization. We would call this in cases where the fulfillment of
a constraint is abrupted by an unwanted token.`),ik.forEach(r),zf.forEach(r),e$=l(L),sr=n(L,"DIV",{class:!0});var qf=s(sr);g(Wn.$$.fragment,qf),t$=l(qf),Ld=n(qf,"P",{});var ck=s(Ld);r$=i(ck,"Tests whether this constraint has been properly defined."),ck.forEach(r),qf.forEach(r),o$=l(L),Xe=n(L,"DIV",{class:!0});var Vc=s(Xe);g(Vn.$$.fragment,Vc),n$=l(Vc),Cn=n(Vc,"P",{});var If=s(Cn);s$=i(If,`Reads in a token and returns booleans that indicate the progress made by it. This function will update the
state of this object unlikes `),Ed=n(If,"CODE",{});var lk=s(Ed);a$=i(lk,"does_advance(self, token_id: int)"),lk.forEach(r),i$=i(If,"."),If.forEach(r),c$=l(Vc),Pd=n(Vc,"P",{});var dk=s(Pd);l$=i(dk,`This isn\u2019t to test whether a certain token will advance the progress; it\u2019s to update its state as if it has
been generated. This becomes important if token_id != desired token (refer to else statement in
PhrasalConstraint)`),dk.forEach(r),Vc.forEach(r),L.forEach(r),Om=l(e),vt=n(e,"DIV",{class:!0});var Of=s(vt);g(Nn.$$.fragment,Of),d$=l(Of),Di=n(Of,"P",{});var $y=s(Di);zi=n($y,"A",{href:!0});var pk=s(zi);p$=i(pk,"Constraint"),pk.forEach(r),m$=i($y," enforcing that an ordered sequence of tokens is included in the output."),$y.forEach(r),Of.forEach(r),Bm=l(e),$t=n(e,"DIV",{class:!0});var Bf=s($t);g(An.$$.fragment,Bf),f$=l(Bf),jn=n(Bf,"P",{});var Mf=s(jn);g$=i(Mf,"A special "),qi=n(Mf,"A",{href:!0});var mk=s(qi);h$=i(mk,"Constraint"),mk.forEach(r),u$=i(Mf," that is fulfilled by fulfilling just one of several constraints."),Mf.forEach(r),Bf.forEach(r),Mm=l(e),J=n(e,"DIV",{class:!0});var $r=s(J);g(Un.$$.fragment,$r),_$=l($r),Fd=n($r,"P",{});var fk=s(Fd);b$=i(fk,"A class for beam scorers to track its progress through a list of constraints."),fk.forEach(r),v$=l($r),O=n($r,"DIV",{class:!0});var Y=s(O);g(Gn.$$.fragment,Y),$$=l(Y),Sd=n(Y,"P",{});var gk=s(Sd);T$=i(gk,`The list of tokens to generate such that we can make progress.
By \u201Clist\u201D we don\u2019t mean the list of token that will fully fulfill a constraint.`),gk.forEach(r),y$=l(Y),Tt=n(Y,"P",{});var Cc=s(Tt);k$=i(Cc,"Given constraints "),Dd=n(Cc,"CODE",{});var hk=s(Dd);x$=i(hk,"c_i = {t_ij | j == # of tokens}"),hk.forEach(r),w$=i(Cc,`, If we\u2019re not in the middle of progressing through a
specific constraint `),zd=n(Cc,"CODE",{});var uk=s(zd);L$=i(uk,"c_i"),uk.forEach(r),E$=i(Cc,", we return:"),Cc.forEach(r),P$=l(Y),qd=n(Y,"P",{});var _k=s(qd);Id=n(_k,"CODE",{});var bk=s(Id);F$=i(bk,"[t_k1 for k in indices of unfulfilled constraints]"),bk.forEach(r),_k.forEach(r),S$=l(Y),Ue=n(Y,"P",{});var Tr=s(Ue);D$=i(Tr,`If we are in the middle of a constraint, then we return:
`),Od=n(Tr,"CODE",{});var vk=s(Od);z$=i(vk,"[t_ij]"),vk.forEach(r),q$=i(Tr,", where "),Bd=n(Tr,"CODE",{});var $k=s(Bd);I$=i($k,"i"),$k.forEach(r),O$=i(Tr," is the index of the inprogress constraint, "),Md=n(Tr,"CODE",{});var Tk=s(Md);B$=i(Tk,"j"),Tk.forEach(r),M$=i(Tr," is the next step for the constraint."),Tr.forEach(r),W$=l(Y),Wd=n(Y,"P",{});var yk=s(Wd);V$=i(yk,`Though we don\u2019t care which constraint is fulfilled first, if we are in the progress of fulfilling a constraint,
that\u2019s the only one we\u2019ll return.`),yk.forEach(r),Y.forEach(r),C$=l($r),ar=n($r,"DIV",{class:!0});var Wf=s(ar);g(Jn.$$.fragment,Wf),N$=l(Wf),Vd=n(Wf,"P",{});var kk=s(Vd);A$=i(kk,"token_ids: the tokens generated thus far to reset the state of the progress through constraints."),kk.forEach(r),Wf.forEach(r),$r.forEach(r),Wm=l(e),yt=n(e,"H2",{class:!0});var Vf=s(yt);ir=n(Vf,"A",{id:!0,class:!0,href:!0});var xk=s(ir);Cd=n(xk,"SPAN",{});var wk=s(Cd);g(Rn.$$.fragment,wk),wk.forEach(r),xk.forEach(r),j$=l(Vf),Nd=n(Vf,"SPAN",{});var Lk=s(Nd);U$=i(Lk,"BeamSearch"),Lk.forEach(r),Vf.forEach(r),Vm=l(e),R=n(e,"DIV",{class:!0});var yr=s(R);g(Zn.$$.fragment,yr),G$=l(yr),kt=n(yr,"P",{});var Nc=s(kt);J$=i(Nc,"Abstract base class for all beam scorers that are used for "),Ii=n(Nc,"A",{href:!0});var Ek=s(Ii);R$=i(Ek,"beam_search()"),Ek.forEach(r),Z$=i(Nc,` and
`),Oi=n(Nc,"A",{href:!0});var Pk=s(Oi);H$=i(Pk,"beam_sample()"),Pk.forEach(r),X$=i(Nc,"."),Nc.forEach(r),Q$=l(yr),Bi=n(yr,"DIV",{class:!0});var Fk=s(Bi);g(Hn.$$.fragment,Fk),Fk.forEach(r),Y$=l(yr),Mi=n(yr,"DIV",{class:!0});var Sk=s(Mi);g(Xn.$$.fragment,Sk),Sk.forEach(r),yr.forEach(r),Cm=l(e),I=n(e,"DIV",{class:!0});var K=s(I);g(Qn.$$.fragment,K),K$=l(K),Wi=n(K,"P",{});var Ty=s(Wi);Vi=n(Ty,"A",{href:!0});var Dk=s(Vi);eT=i(Dk,"BeamScorer"),Dk.forEach(r),tT=i(Ty," implementing standard beam search decoding."),Ty.forEach(r),rT=l(K),Yn=n(K,"P",{});var Cf=s(Yn);oT=i(Cf,"Adapted in part from "),Kn=n(Cf,"A",{href:!0,rel:!0});var zk=s(Kn);nT=i(zk,`Facebook\u2019s XLM beam search
code`),zk.forEach(r),sT=i(Cf,"."),Cf.forEach(r),aT=l(K),Ci=n(K,"P",{});var yy=s(Ci);iT=i(yy,"Reference for the diverse beam search algorithm and implementation "),es=n(yy,"A",{href:!0,rel:!0});var qk=s(es);cT=i(qk,`Ashwin Kalyan\u2019s DBS
implementation`),qk.forEach(r),yy.forEach(r),lT=l(K),Ni=n(K,"DIV",{class:!0});var Ik=s(Ni);g(ts.$$.fragment,Ik),Ik.forEach(r),dT=l(K),Ai=n(K,"DIV",{class:!0});var Ok=s(Ai);g(rs.$$.fragment,Ok),Ok.forEach(r),K.forEach(r),Nm=l(e),Z=n(e,"DIV",{class:!0});var kr=s(Z);g(os.$$.fragment,kr),pT=l(kr),ji=n(kr,"P",{});var ky=s(ji);Ui=n(ky,"A",{href:!0});var Bk=s(Ui);mT=i(Bk,"BeamScorer"),Bk.forEach(r),fT=i(ky," implementing constrained beam search decoding."),ky.forEach(r),gT=l(kr),Gi=n(kr,"DIV",{class:!0});var Mk=s(Gi);g(ns.$$.fragment,Mk),Mk.forEach(r),hT=l(kr),Ji=n(kr,"DIV",{class:!0});var Wk=s(Ji);g(ss.$$.fragment,Wk),Wk.forEach(r),kr.forEach(r),Am=l(e),xt=n(e,"H2",{class:!0});var Nf=s(xt);cr=n(Nf,"A",{id:!0,class:!0,href:!0});var Vk=s(cr);Ad=n(Vk,"SPAN",{});var Ck=s(Ad);g(as.$$.fragment,Ck),Ck.forEach(r),Vk.forEach(r),uT=l(Nf),jd=n(Nf,"SPAN",{});var Nk=s(jd);_T=i(Nk,"Utilities"),Nk.forEach(r),Nf.forEach(r),jm=l(e),Ge=n(e,"DIV",{class:!0});var Ac=s(Ge);g(is.$$.fragment,Ac),bT=l(Ac),Ud=n(Ac,"P",{});var Ak=s(Ud);vT=i(Ak,"Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),Ak.forEach(r),$T=l(Ac),Ri=n(Ac,"P",{});var xy=s(Ri);TT=i(xy,"From: "),cs=n(xy,"A",{href:!0,rel:!0});var jk=s(cs);yT=i(jk,"https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),jk.forEach(r),xy.forEach(r),Ac.forEach(r),Um=l(e),Je=n(e,"DIV",{class:!0});var jc=s(Je);g(ls.$$.fragment,jc),kT=l(jc),Gd=n(jc,"P",{});var Uk=s(Gd);xT=i(Uk,"Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),Uk.forEach(r),wT=l(jc),Zi=n(jc,"P",{});var wy=s(Zi);LT=i(wy,"From: "),ds=n(wy,"A",{href:!0,rel:!0});var Gk=s(ds);ET=i(Gk,"https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),Gk.forEach(r),wy.forEach(r),jc.forEach(r),Gm=l(e),wt=n(e,"H2",{class:!0});var Af=s(wt);lr=n(Af,"A",{id:!0,class:!0,href:!0});var Jk=s(lr);Jd=n(Jk,"SPAN",{});var Rk=s(Jd);g(ps.$$.fragment,Rk),Rk.forEach(r),Jk.forEach(r),PT=l(Af),Rd=n(Af,"SPAN",{});var Zk=s(Rd);FT=i(Zk,"Streamers"),Zk.forEach(r),Af.forEach(r),Jm=l(e),F=n(e,"DIV",{class:!0});var U=s(F);g(ms.$$.fragment,U),ST=l(U),Zd=n(U,"P",{});var Hk=s(Zd);DT=i(Hk,"Simple text streamer that prints the token(s) to stdout as soon as entire words are formed."),Hk.forEach(r),zT=l(U),g(dr.$$.fragment,U),qT=l(U),g(pr.$$.fragment,U),IT=l(U),mr=n(U,"DIV",{class:!0});var jf=s(mr);g(fs.$$.fragment,jf),OT=l(jf),Hd=n(jf,"P",{});var Xk=s(Hd);BT=i(Xk,"Flushes any remaining cache and prints a newline to stdout."),Xk.forEach(r),jf.forEach(r),MT=l(U),fr=n(U,"DIV",{class:!0});var Uf=s(fr);g(gs.$$.fragment,Uf),WT=l(Uf),Xd=n(Uf,"P",{});var Qk=s(Xd);VT=i(Qk,"Prints the new text to stdout. If the stream is ending, also prints a newline."),Qk.forEach(r),Uf.forEach(r),CT=l(U),gr=n(U,"DIV",{class:!0});var Gf=s(gr);g(hs.$$.fragment,Gf),NT=l(Gf),Qd=n(Gf,"P",{});var Yk=s(Qd);AT=i(Yk,"Recives tokens, decodes them, and prints them to stdout as soon as they form entire words."),Yk.forEach(r),Gf.forEach(r),U.forEach(r),Rm=l(e),M=n(e,"DIV",{class:!0});var tt=s(M);g(us.$$.fragment,tt),jT=l(tt),Yd=n(tt,"P",{});var Kk=s(Yd);UT=i(Kk,`Streamer that stores print-ready text in a queue, to be used by a downstream application as an iterator. This is
useful for applications that benefit from acessing the generated text in a non-blocking way (e.g. in an interactive
Gradio demo).`),Kk.forEach(r),GT=l(tt),g(hr.$$.fragment,tt),JT=l(tt),g(ur.$$.fragment,tt),RT=l(tt),_r=n(tt,"DIV",{class:!0});var Jf=s(_r);g(_s.$$.fragment,Jf),ZT=l(Jf),Kd=n(Jf,"P",{});var e3=s(Kd);HT=i(e3,"Put the new text in the queue. If the stream is ending, also put a stop signal in the queue."),e3.forEach(r),Jf.forEach(r),tt.forEach(r),this.h()},h(){d($,"name","hf:doc:metadata"),d($,"content",JSON.stringify(f3)),d(k,"id","utilities-for-generation"),d(k,"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(k,"href","#utilities-for-generation"),d(T,"class","relative group"),d(Ts,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),d(ys,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.greedy_search"),d(ks,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.contrastive_search"),d(xs,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.sample"),d(ws,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.beam_search"),d(Ls,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.beam_sample"),d(Es,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.group_beam_search"),d(Ps,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.constrained_beam_search"),d(Lt,"id","generate-outputs"),d(Lt,"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(Lt,"href","#generate-outputs"),d(rt,"class","relative group"),d(Ss,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),d(Ds,"href","/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput"),d(zs,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),d(Is,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.generation.GreedySearchDecoderOnlyOutput"),d(Pt,"id","transformers.generation.GreedySearchDecoderOnlyOutput"),d(Pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Pt,"href","#transformers.generation.GreedySearchDecoderOnlyOutput"),d(ot,"class","relative group"),d(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(St,"id","transformers.generation.SampleDecoderOnlyOutput"),d(St,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(St,"href","#transformers.generation.SampleDecoderOnlyOutput"),d(at,"class","relative group"),d(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(zt,"id","transformers.generation.BeamSearchDecoderOnlyOutput"),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","#transformers.generation.BeamSearchDecoderOnlyOutput"),d(lt,"class","relative group"),d(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(qt,"id","transformers.generation.BeamSampleDecoderOnlyOutput"),d(qt,"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(qt,"href","#transformers.generation.BeamSampleDecoderOnlyOutput"),d(mt,"class","relative group"),d(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(It,"id","transformers.LogitsProcessor"),d(It,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(It,"href","#transformers.LogitsProcessor"),d(ht,"class","relative group"),d(Cs,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ns,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(As,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(js,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(Us,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(Gs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Rs,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(Zs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xs,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(Qs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ks,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(ea,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ra,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(sa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(aa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ca,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(la,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(da,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsWarper"),d(lo,"href","https://arxiv.org/abs/2202.00666"),d(lo,"rel","nofollow"),d(pa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ma,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(fo,"href","https://github.com/pytorch/fairseq/blob/a07cb6f40480928c9e0548b737aadd36ee66ac76/fairseq/sequence_generator.py#L345"),d(fo,"rel","nofollow"),d(fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ha,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(ua,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_a,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(bo,"href","https://arxiv.org/abs/2010.00904"),d(bo,"rel","nofollow"),d(ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(va,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d($a,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.group_beam_search"),d(To,"href","https://arxiv.org/pdf/1610.02424.pdf"),d(To,"rel","nofollow"),d(Ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ka,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(xa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(La,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ea,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.LogitsProcessor"),d(Pa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Sa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Da,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(qa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsWarper"),d(Ia,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ba,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsWarper"),d(Ma,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Va,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsWarper"),d(Ca,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Aa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ga,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ra,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Jo,"href","https://github.com/pytorch/fairseq/blob/a07cb6f40480928c9e0548b737aadd36ee66ac76/fairseq/sequence_generator.py#L345"),d(Jo,"rel","nofollow"),d(Za,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xa,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Qa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ka,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(ei,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ti,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(ri,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(ni,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(si,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(ai,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(ii,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(li,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(di,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(mi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(fi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(hi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(ui,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(bi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(vi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($i,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(Ti,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ki,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(xi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ht,"id","transformers.StoppingCriteria"),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","#transformers.StoppingCriteria"),d(ut,"class","relative group"),d(wi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.StoppingCriteria"),d(Li,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ei,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Pi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qt,"id","transformers.Constraint"),d(Qt,"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(Qt,"href","#transformers.Constraint"),d(bt,"class","relative group"),d(Si,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.Constraint"),d(er,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(tr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(rr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(or,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(sr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(zi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.Constraint"),d(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(qi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.Constraint"),d($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ar,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ir,"id","transformers.BeamScorer"),d(ir,"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(ir,"href","#transformers.BeamScorer"),d(yt,"class","relative group"),d(Ii,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.beam_search"),d(Oi,"href","/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.beam_sample"),d(Bi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Mi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Vi,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.BeamScorer"),d(Kn,"href","https://github.com/facebookresearch/XLM/blob/9e6f6814d17be4fe5b15f2e6c43eb2b2d76daeb4/src/model/transformer.py#L529"),d(Kn,"rel","nofollow"),d(es,"href","https://github.com/ashwinkalyan/dbs/blob/master/dbs/beam_utils.lua"),d(es,"rel","nofollow"),d(Ni,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ai,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ui,"href","/docs/transformers/v4.30.0/en/internal/generation_utils#transformers.BeamScorer"),d(Gi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ji,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(cr,"id","transformers.top_k_top_p_filtering"),d(cr,"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(cr,"href","#transformers.top_k_top_p_filtering"),d(xt,"class","relative group"),d(cs,"href","https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),d(cs,"rel","nofollow"),d(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ds,"href","https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),d(ds,"rel","nofollow"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(lr,"id","transformers.TextStreamer"),d(lr,"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(lr,"href","#transformers.TextStreamer"),d(wt,"class","relative group"),d(mr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(gr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,p){t(document.head,$),m(e,w,p),m(e,T,p),t(T,k),t(k,B),h(y,B,null),t(T,D),t(T,Uc),t(Uc,Rf),m(e,pp,p),m(e,E,p),t(E,Zf),t(E,Ts),t(Ts,Hf),t(E,Xf),t(E,ys),t(ys,Qf),t(E,Yf),t(E,ks),t(ks,Kf),t(E,eg),t(E,xs),t(xs,tg),t(E,rg),t(E,ws),t(ws,og),t(E,ng),t(E,Ls),t(Ls,sg),t(E,ag),t(E,Es),t(Es,ig),t(E,cg),t(E,Ps),t(Ps,lg),t(E,dg),m(e,mp,p),m(e,Fs,p),t(Fs,pg),m(e,fp,p),m(e,rt,p),t(rt,Lt),t(Lt,Gc),h(xr,Gc,null),t(rt,mg),t(rt,Jc),t(Jc,fg),m(e,gp,p),m(e,X,p),t(X,gg),t(X,Ss),t(Ss,hg),t(X,ug),t(X,Ds),t(Ds,_g),t(X,bg),t(X,zs),t(zs,vg),t(X,$g),m(e,hp,p),m(e,qs,p),t(qs,Tg),m(e,up,p),h(wr,e,p),m(e,_p,p),m(e,Re,p),t(Re,yg),t(Re,Rc),t(Rc,kg),t(Re,xg),t(Re,Is),t(Is,wg),t(Re,Lg),m(e,bp,p),m(e,Q,p),t(Q,Os),t(Os,Zc),t(Zc,Eg),t(Os,Pg),t(Q,Fg),t(Q,Bs),t(Bs,Hc),t(Hc,Sg),t(Bs,Dg),t(Q,zg),t(Q,Ms),t(Ms,Xc),t(Xc,qg),t(Ms,Ig),t(Q,Og),t(Q,Ws),t(Ws,Qc),t(Qc,Bg),t(Ws,Mg),m(e,vp,p),m(e,S,p),t(S,Wg),t(S,Yc),t(Yc,Vg),t(S,Cg),t(S,Kc),t(Kc,Ng),t(S,Ag),t(S,el),t(el,jg),t(S,Ug),t(S,tl),t(tl,Gg),t(S,Jg),t(S,rl),t(rl,Rg),t(S,Zg),t(S,ol),t(ol,Hg),t(S,Xg),m(e,$p,p),m(e,W,p),t(W,Qg),t(W,nl),t(nl,Yg),t(W,Kg),t(W,sl),t(sl,eh),t(W,th),t(W,al),t(al,rh),t(W,oh),t(W,il),t(il,nh),t(W,sh),m(e,Tp,p),m(e,V,p),t(V,ah),t(V,cl),t(cl,ih),t(V,ch),t(V,ll),t(ll,lh),t(V,dh),t(V,dl),t(dl,ph),t(V,mh),t(V,pl),t(pl,fh),t(V,gh),m(e,yp,p),h(Lr,e,p),m(e,kp,p),m(e,Et,p),t(Et,hh),t(Et,ml),t(ml,uh),t(Et,_h),m(e,xp,p),m(e,C,p),t(C,bh),t(C,fl),t(fl,vh),t(C,$h),t(C,gl),t(gl,Th),t(C,yh),t(C,hl),t(hl,kh),t(C,xh),t(C,ul),t(ul,wh),t(C,Lh),m(e,wp,p),m(e,Vs,p),t(Vs,Eh),m(e,Lp,p),m(e,ot,p),t(ot,Pt),t(Pt,_l),h(Er,_l,null),t(ot,Ph),t(ot,bl),t(bl,Fh),m(e,Ep,p),m(e,nt,p),h(Pr,nt,null),t(nt,Sh),t(nt,vl),t(vl,Dh),m(e,Pp,p),m(e,st,p),h(Fr,st,null),t(st,zh),t(st,$l),t($l,qh),m(e,Fp,p),m(e,te,p),h(Sr,te,null),t(te,Ih),t(te,Tl),t(Tl,Oh),t(te,Bh),t(te,Ft),h(Dr,Ft,null),t(Ft,Mh),t(Ft,yl),t(yl,Wh),m(e,Sp,p),m(e,at,p),t(at,St),t(St,kl),h(zr,kl,null),t(at,Vh),t(at,xl),t(xl,Ch),m(e,Dp,p),m(e,it,p),h(qr,it,null),t(it,Nh),t(it,wl),t(wl,Ah),m(e,zp,p),m(e,ct,p),h(Ir,ct,null),t(ct,jh),t(ct,Ll),t(Ll,Uh),m(e,qp,p),m(e,re,p),h(Or,re,null),t(re,Gh),t(re,El),t(El,Jh),t(re,Rh),t(re,Dt),h(Br,Dt,null),t(Dt,Zh),t(Dt,Pl),t(Pl,Hh),m(e,Ip,p),m(e,lt,p),t(lt,zt),t(zt,Fl),h(Mr,Fl,null),t(lt,Xh),t(lt,Sl),t(Sl,Qh),m(e,Op,p),m(e,dt,p),h(Wr,dt,null),t(dt,Yh),t(dt,Dl),t(Dl,Kh),m(e,Bp,p),m(e,pt,p),h(Vr,pt,null),t(pt,eu),t(pt,zl),t(zl,tu),m(e,Mp,p),m(e,mt,p),t(mt,qt),t(qt,ql),h(Cr,ql,null),t(mt,ru),t(mt,Il),t(Il,ou),m(e,Wp,p),m(e,ft,p),h(Nr,ft,null),t(ft,nu),t(ft,Ol),t(Ol,su),m(e,Vp,p),m(e,gt,p),h(Ar,gt,null),t(gt,au),t(gt,Bl),t(Bl,iu),m(e,Cp,p),m(e,ht,p),t(ht,It),t(It,Ml),h(jr,Ml,null),t(ht,cu),t(ht,Wl),t(Wl,lu),m(e,Np,p),m(e,Ot,p),t(Ot,du),t(Ot,Cs),t(Cs,pu),t(Ot,mu),m(e,Ap,p),m(e,oe,p),h(Ur,oe,null),t(oe,fu),t(oe,Vl),t(Vl,gu),t(oe,hu),t(oe,Bt),h(Gr,Bt,null),t(Bt,uu),t(Bt,Cl),t(Cl,_u),m(e,jp,p),m(e,ne,p),h(Jr,ne,null),t(ne,bu),t(ne,z),t(z,vu),t(z,Ns),t(Ns,$u),t(z,Tu),t(z,As),t(As,yu),t(z,ku),t(z,Nl),t(Nl,xu),t(z,wu),t(z,Al),t(Al,jl),t(jl,Lu),t(z,Eu),t(z,js),t(js,Pu),t(z,Fu),t(z,Us),t(Us,Su),t(z,Du),t(ne,zu),t(ne,Gs),h(Rr,Gs,null),m(e,Up,p),m(e,se,p),h(Zr,se,null),t(se,qu),t(se,Ul),t(Ul,Iu),t(se,Ou),t(se,Mt),h(Hr,Mt,null),t(Mt,Bu),t(Mt,Gl),t(Gl,Mu),m(e,Gp,p),m(e,ae,p),h(Xr,ae,null),t(ae,Wu),t(ae,Js),t(Js,Rs),t(Rs,Vu),t(Js,Cu),t(ae,Nu),t(ae,Zs),h(Qr,Zs,null),m(e,Jp,p),m(e,ie,p),h(Yr,ie,null),t(ie,Au),t(ie,Hs),t(Hs,Xs),t(Xs,ju),t(Hs,Uu),t(ie,Gu),t(ie,Qs),h(Kr,Qs,null),m(e,Rp,p),m(e,ce,p),h(eo,ce,null),t(ce,Ju),t(ce,Ys),t(Ys,Ks),t(Ks,Ru),t(Ys,Zu),t(ce,Hu),t(ce,ea),h(to,ea,null),m(e,Zp,p),m(e,le,p),h(ro,le,null),t(le,Xu),t(le,ta),t(ta,ra),t(ra,Qu),t(ta,Yu),t(le,Ku),t(le,oa),h(oo,oa,null),m(e,Hp,p),m(e,de,p),h(no,de,null),t(de,e_),t(de,na),t(na,sa),t(sa,t_),t(na,r_),t(de,o_),t(de,aa),h(so,aa,null),m(e,Xp,p),m(e,pe,p),h(ao,pe,null),t(pe,n_),t(pe,ia),t(ia,ca),t(ca,s_),t(ia,a_),t(pe,i_),t(pe,la),h(io,la,null),m(e,Qp,p),m(e,me,p),h(co,me,null),t(me,c_),t(me,Wt),t(Wt,da),t(da,l_),t(Wt,d_),t(Wt,lo),t(lo,p_),t(Wt,m_),t(me,f_),t(me,pa),h(po,pa,null),m(e,Yp,p),m(e,fe,p),h(mo,fe,null),t(fe,g_),t(fe,Vt),t(Vt,ma),t(ma,h_),t(Vt,u_),t(Vt,fo),t(fo,__),t(Vt,b_),t(fe,v_),t(fe,fa),h(go,fa,null),m(e,Kp,p),m(e,ge,p),h(ho,ge,null),t(ge,$_),t(ge,ga),t(ga,ha),t(ha,T_),t(ga,y_),t(ge,k_),t(ge,ua),h(uo,ua,null),m(e,em,p),m(e,he,p),h(_o,he,null),t(he,x_),t(he,Ct),t(Ct,_a),t(_a,w_),t(Ct,L_),t(Ct,bo),t(bo,E_),t(Ct,P_),t(he,F_),t(he,ba),h(vo,ba,null),m(e,tm,p),m(e,ue,p),h($o,ue,null),t(ue,S_),t(ue,Ze),t(Ze,va),t(va,D_),t(Ze,z_),t(Ze,$a),t($a,q_),t(Ze,I_),t(Ze,To),t(To,O_),t(Ze,B_),t(ue,M_),t(ue,Ta),h(yo,Ta,null),m(e,rm,p),m(e,_e,p),h(ko,_e,null),t(_e,W_),t(_e,ya),t(ya,ka),t(ka,V_),t(ya,C_),t(_e,N_),t(_e,xa),h(xo,xa,null),m(e,om,p),m(e,be,p),h(wo,be,null),t(be,A_),t(be,Nt),t(Nt,wa),t(wa,j_),t(Nt,U_),t(Nt,Jl),t(Jl,G_),t(Nt,J_),t(be,R_),t(be,La),h(Lo,La,null),m(e,nm,p),m(e,ve,p),h(Eo,ve,null),t(ve,Z_),t(ve,He),t(He,Ea),t(Ea,H_),t(He,X_),t(He,Rl),t(Rl,Q_),t(He,Y_),t(He,Zl),t(Zl,K_),t(He,eb),t(ve,tb),t(ve,Pa),h(Po,Pa,null),m(e,sm,p),m(e,$e,p),h(Fo,$e,null),t($e,rb),t($e,Hl),t(Hl,ob),t($e,nb),t($e,At),h(So,At,null),t(At,sb),t(At,Xl),t(Xl,ab),m(e,am,p),m(e,Te,p),h(Do,Te,null),t(Te,ib),t(Te,G),t(G,cb),t(G,Fa),t(Fa,lb),t(G,db),t(G,Ql),t(Ql,pb),t(G,mb),t(G,Yl),t(Yl,Kl),t(Kl,fb),t(G,gb),t(G,Sa),t(Sa,hb),t(G,ub),t(Te,_b),t(Te,Da),h(zo,Da,null),m(e,im,p),m(e,ye,p),h(qo,ye,null),t(ye,bb),t(ye,ed),t(ed,vb),t(ye,$b),t(ye,jt),h(Io,jt,null),t(jt,Tb),t(jt,td),t(td,yb),m(e,cm,p),m(e,ke,p),h(Oo,ke,null),t(ke,kb),t(ke,za),t(za,qa),t(qa,xb),t(za,wb),t(ke,Lb),t(ke,Ia),h(Bo,Ia,null),m(e,lm,p),m(e,xe,p),h(Mo,xe,null),t(xe,Eb),t(xe,Oa),t(Oa,Ba),t(Ba,Pb),t(Oa,Fb),t(xe,Sb),t(xe,Ma),h(Wo,Ma,null),m(e,dm,p),m(e,we,p),h(Vo,we,null),t(we,Db),t(we,Wa),t(Wa,Va),t(Va,zb),t(Wa,qb),t(we,Ib),t(we,Ca),h(Co,Ca,null),m(e,pm,p),m(e,Le,p),h(No,Le,null),t(Le,Ob),t(Le,Na),t(Na,Aa),t(Aa,Bb),t(Na,Mb),t(Le,Wb),t(Le,ja),h(Ao,ja,null),m(e,mm,p),m(e,Ee,p),h(jo,Ee,null),t(Ee,Vb),t(Ee,Ua),t(Ua,Ga),t(Ga,Cb),t(Ua,Nb),t(Ee,Ab),t(Ee,Ja),h(Uo,Ja,null),m(e,fm,p),m(e,Pe,p),h(Go,Pe,null),t(Pe,jb),t(Pe,Ut),t(Ut,Ra),t(Ra,Ub),t(Ut,Gb),t(Ut,Jo),t(Jo,Jb),t(Ut,Rb),t(Pe,Zb),t(Pe,Za),h(Ro,Za,null),m(e,gm,p),m(e,Fe,p),h(Zo,Fe,null),t(Fe,Hb),t(Fe,Ha),t(Ha,Xa),t(Xa,Xb),t(Ha,Qb),t(Fe,Yb),t(Fe,Qa),h(Ho,Qa,null),m(e,hm,p),m(e,Se,p),h(Xo,Se,null),t(Se,Kb),t(Se,Ya),t(Ya,Ka),t(Ka,ev),t(Ya,tv),t(Se,rv),t(Se,ei),h(Qo,ei,null),m(e,um,p),m(e,De,p),h(Yo,De,null),t(De,ov),t(De,Gt),t(Gt,ti),t(ti,nv),t(Gt,sv),t(Gt,rd),t(rd,av),t(Gt,iv),t(De,cv),t(De,ri),h(Ko,ri,null),m(e,_m,p),m(e,ze,p),h(en,ze,null),t(ze,lv),t(ze,od),t(od,dv),t(ze,pv),t(ze,Jt),h(tn,Jt,null),t(Jt,mv),t(Jt,nd),t(nd,fv),m(e,bm,p),m(e,qe,p),h(rn,qe,null),t(qe,gv),t(qe,q),t(q,hv),t(q,oi),t(oi,uv),t(q,_v),t(q,ni),t(ni,bv),t(q,vv),t(q,sd),t(sd,$v),t(q,Tv),t(q,ad),t(ad,id),t(id,yv),t(q,kv),t(q,si),t(si,xv),t(q,wv),t(q,ai),t(ai,Lv),t(q,Ev),t(qe,Pv),t(qe,ii),h(on,ii,null),m(e,vm,p),m(e,Ie,p),h(nn,Ie,null),t(Ie,Fv),t(Ie,cd),t(cd,Sv),t(Ie,Dv),t(Ie,Rt),h(sn,Rt,null),t(Rt,zv),t(Rt,ld),t(ld,qv),m(e,$m,p),m(e,Oe,p),h(an,Oe,null),t(Oe,Iv),t(Oe,ci),t(ci,li),t(li,Ov),t(ci,Bv),t(Oe,Mv),t(Oe,di),h(cn,di,null),m(e,Tm,p),m(e,Be,p),h(ln,Be,null),t(Be,Wv),t(Be,pi),t(pi,mi),t(mi,Vv),t(pi,Cv),t(Be,Nv),t(Be,fi),h(dn,fi,null),m(e,ym,p),m(e,Me,p),h(pn,Me,null),t(Me,Av),t(Me,gi),t(gi,hi),t(hi,jv),t(gi,Uv),t(Me,Gv),t(Me,ui),h(mn,ui,null),m(e,km,p),m(e,We,p),h(fn,We,null),t(We,Jv),t(We,_i),t(_i,bi),t(bi,Rv),t(_i,Zv),t(We,Hv),t(We,vi),h(gn,vi,null),m(e,xm,p),m(e,Ve,p),h(hn,Ve,null),t(Ve,Xv),t(Ve,Zt),t(Zt,$i),t($i,Qv),t(Zt,Yv),t(Zt,dd),t(dd,Kv),t(Zt,e0),t(Ve,t0),t(Ve,Ti),h(un,Ti,null),m(e,wm,p),m(e,Ce,p),h(_n,Ce,null),t(Ce,r0),t(Ce,yi),t(yi,ki),t(ki,o0),t(yi,n0),t(Ce,s0),t(Ce,xi),h(bn,xi,null),m(e,Lm,p),m(e,ut,p),t(ut,Ht),t(Ht,pd),h(vn,pd,null),t(ut,a0),t(ut,md),t(md,i0),m(e,Em,p),m(e,Xt,p),t(Xt,c0),t(Xt,wi),t(wi,l0),t(Xt,d0),m(e,Pm,p),m(e,Ne,p),h($n,Ne,null),t(Ne,p0),t(Ne,fd),t(fd,m0),t(Ne,f0),t(Ne,Li),h(Tn,Li,null),m(e,Fm,p),m(e,_t,p),h(yn,_t,null),t(_t,g0),t(_t,Ei),h(kn,Ei,null),m(e,Sm,p),m(e,Ae,p),h(xn,Ae,null),t(Ae,h0),t(Ae,wn),t(wn,u0),t(wn,gd),t(gd,_0),t(wn,b0),t(Ae,v0),t(Ae,Pi),h(Ln,Pi,null),m(e,Dm,p),m(e,je,p),h(En,je,null),t(je,$0),t(je,Pn),t(Pn,T0),t(Pn,hd),t(hd,y0),t(Pn,k0),t(je,x0),t(je,Fi),h(Fn,Fi,null),m(e,zm,p),m(e,bt,p),t(bt,Qt),t(Qt,ud),h(Sn,ud,null),t(bt,w0),t(bt,_d),t(_d,L0),m(e,qm,p),m(e,Yt,p),t(Yt,E0),t(Yt,Si),t(Si,P0),t(Yt,F0),m(e,Im,p),m(e,x,p),h(Dn,x,null),t(x,S0),t(x,bd),t(bd,D0),t(x,z0),t(x,vd),t(vd,q0),t(x,I0),h(Kt,x,null),t(x,O0),t(x,$d),t($d,B0),t(x,M0),t(x,er),h(zn,er,null),t(er,W0),t(er,Td),t(Td,V0),t(x,C0),t(x,tr),h(qn,tr,null),t(tr,N0),t(tr,yd),t(yd,A0),t(x,j0),t(x,rr),h(In,rr,null),t(rr,U0),t(rr,kd),t(kd,G0),t(x,J0),t(x,or),h(On,or,null),t(or,R0),t(or,Bn),t(Bn,Z0),t(Bn,xd),t(xd,H0),t(Bn,X0),t(x,Q0),t(x,nr),h(Mn,nr,null),t(nr,Y0),t(nr,wd),t(wd,K0),t(x,e$),t(x,sr),h(Wn,sr,null),t(sr,t$),t(sr,Ld),t(Ld,r$),t(x,o$),t(x,Xe),h(Vn,Xe,null),t(Xe,n$),t(Xe,Cn),t(Cn,s$),t(Cn,Ed),t(Ed,a$),t(Cn,i$),t(Xe,c$),t(Xe,Pd),t(Pd,l$),m(e,Om,p),m(e,vt,p),h(Nn,vt,null),t(vt,d$),t(vt,Di),t(Di,zi),t(zi,p$),t(Di,m$),m(e,Bm,p),m(e,$t,p),h(An,$t,null),t($t,f$),t($t,jn),t(jn,g$),t(jn,qi),t(qi,h$),t(jn,u$),m(e,Mm,p),m(e,J,p),h(Un,J,null),t(J,_$),t(J,Fd),t(Fd,b$),t(J,v$),t(J,O),h(Gn,O,null),t(O,$$),t(O,Sd),t(Sd,T$),t(O,y$),t(O,Tt),t(Tt,k$),t(Tt,Dd),t(Dd,x$),t(Tt,w$),t(Tt,zd),t(zd,L$),t(Tt,E$),t(O,P$),t(O,qd),t(qd,Id),t(Id,F$),t(O,S$),t(O,Ue),t(Ue,D$),t(Ue,Od),t(Od,z$),t(Ue,q$),t(Ue,Bd),t(Bd,I$),t(Ue,O$),t(Ue,Md),t(Md,B$),t(Ue,M$),t(O,W$),t(O,Wd),t(Wd,V$),t(J,C$),t(J,ar),h(Jn,ar,null),t(ar,N$),t(ar,Vd),t(Vd,A$),m(e,Wm,p),m(e,yt,p),t(yt,ir),t(ir,Cd),h(Rn,Cd,null),t(yt,j$),t(yt,Nd),t(Nd,U$),m(e,Vm,p),m(e,R,p),h(Zn,R,null),t(R,G$),t(R,kt),t(kt,J$),t(kt,Ii),t(Ii,R$),t(kt,Z$),t(kt,Oi),t(Oi,H$),t(kt,X$),t(R,Q$),t(R,Bi),h(Hn,Bi,null),t(R,Y$),t(R,Mi),h(Xn,Mi,null),m(e,Cm,p),m(e,I,p),h(Qn,I,null),t(I,K$),t(I,Wi),t(Wi,Vi),t(Vi,eT),t(Wi,tT),t(I,rT),t(I,Yn),t(Yn,oT),t(Yn,Kn),t(Kn,nT),t(Yn,sT),t(I,aT),t(I,Ci),t(Ci,iT),t(Ci,es),t(es,cT),t(I,lT),t(I,Ni),h(ts,Ni,null),t(I,dT),t(I,Ai),h(rs,Ai,null),m(e,Nm,p),m(e,Z,p),h(os,Z,null),t(Z,pT),t(Z,ji),t(ji,Ui),t(Ui,mT),t(ji,fT),t(Z,gT),t(Z,Gi),h(ns,Gi,null),t(Z,hT),t(Z,Ji),h(ss,Ji,null),m(e,Am,p),m(e,xt,p),t(xt,cr),t(cr,Ad),h(as,Ad,null),t(xt,uT),t(xt,jd),t(jd,_T),m(e,jm,p),m(e,Ge,p),h(is,Ge,null),t(Ge,bT),t(Ge,Ud),t(Ud,vT),t(Ge,$T),t(Ge,Ri),t(Ri,TT),t(Ri,cs),t(cs,yT),m(e,Um,p),m(e,Je,p),h(ls,Je,null),t(Je,kT),t(Je,Gd),t(Gd,xT),t(Je,wT),t(Je,Zi),t(Zi,LT),t(Zi,ds),t(ds,ET),m(e,Gm,p),m(e,wt,p),t(wt,lr),t(lr,Jd),h(ps,Jd,null),t(wt,PT),t(wt,Rd),t(Rd,FT),m(e,Jm,p),m(e,F,p),h(ms,F,null),t(F,ST),t(F,Zd),t(Zd,DT),t(F,zT),h(dr,F,null),t(F,qT),h(pr,F,null),t(F,IT),t(F,mr),h(fs,mr,null),t(mr,OT),t(mr,Hd),t(Hd,BT),t(F,MT),t(F,fr),h(gs,fr,null),t(fr,WT),t(fr,Xd),t(Xd,VT),t(F,CT),t(F,gr),h(hs,gr,null),t(gr,NT),t(gr,Qd),t(Qd,AT),m(e,Rm,p),m(e,M,p),h(us,M,null),t(M,jT),t(M,Yd),t(Yd,UT),t(M,GT),h(hr,M,null),t(M,JT),h(ur,M,null),t(M,RT),t(M,_r),h(_s,_r,null),t(_r,ZT),t(_r,Kd),t(Kd,HT),Zm=!0},p(e,[p]){const bs={};p&2&&(bs.$$scope={dirty:p,ctx:e}),Kt.$set(bs);const ep={};p&2&&(ep.$$scope={dirty:p,ctx:e}),dr.$set(ep);const tp={};p&2&&(tp.$$scope={dirty:p,ctx:e}),pr.$set(tp);const rp={};p&2&&(rp.$$scope={dirty:p,ctx:e}),hr.$set(rp);const P={};p&2&&(P.$$scope={dirty:p,ctx:e}),ur.$set(P)},i(e){Zm||(u(y.$$.fragment,e),u(xr.$$.fragment,e),u(wr.$$.fragment,e),u(Lr.$$.fragment,e),u(Er.$$.fragment,e),u(Pr.$$.fragment,e),u(Fr.$$.fragment,e),u(Sr.$$.fragment,e),u(Dr.$$.fragment,e),u(zr.$$.fragment,e),u(qr.$$.fragment,e),u(Ir.$$.fragment,e),u(Or.$$.fragment,e),u(Br.$$.fragment,e),u(Mr.$$.fragment,e),u(Wr.$$.fragment,e),u(Vr.$$.fragment,e),u(Cr.$$.fragment,e),u(Nr.$$.fragment,e),u(Ar.$$.fragment,e),u(jr.$$.fragment,e),u(Ur.$$.fragment,e),u(Gr.$$.fragment,e),u(Jr.$$.fragment,e),u(Rr.$$.fragment,e),u(Zr.$$.fragment,e),u(Hr.$$.fragment,e),u(Xr.$$.fragment,e),u(Qr.$$.fragment,e),u(Yr.$$.fragment,e),u(Kr.$$.fragment,e),u(eo.$$.fragment,e),u(to.$$.fragment,e),u(ro.$$.fragment,e),u(oo.$$.fragment,e),u(no.$$.fragment,e),u(so.$$.fragment,e),u(ao.$$.fragment,e),u(io.$$.fragment,e),u(co.$$.fragment,e),u(po.$$.fragment,e),u(mo.$$.fragment,e),u(go.$$.fragment,e),u(ho.$$.fragment,e),u(uo.$$.fragment,e),u(_o.$$.fragment,e),u(vo.$$.fragment,e),u($o.$$.fragment,e),u(yo.$$.fragment,e),u(ko.$$.fragment,e),u(xo.$$.fragment,e),u(wo.$$.fragment,e),u(Lo.$$.fragment,e),u(Eo.$$.fragment,e),u(Po.$$.fragment,e),u(Fo.$$.fragment,e),u(So.$$.fragment,e),u(Do.$$.fragment,e),u(zo.$$.fragment,e),u(qo.$$.fragment,e),u(Io.$$.fragment,e),u(Oo.$$.fragment,e),u(Bo.$$.fragment,e),u(Mo.$$.fragment,e),u(Wo.$$.fragment,e),u(Vo.$$.fragment,e),u(Co.$$.fragment,e),u(No.$$.fragment,e),u(Ao.$$.fragment,e),u(jo.$$.fragment,e),u(Uo.$$.fragment,e),u(Go.$$.fragment,e),u(Ro.$$.fragment,e),u(Zo.$$.fragment,e),u(Ho.$$.fragment,e),u(Xo.$$.fragment,e),u(Qo.$$.fragment,e),u(Yo.$$.fragment,e),u(Ko.$$.fragment,e),u(en.$$.fragment,e),u(tn.$$.fragment,e),u(rn.$$.fragment,e),u(on.$$.fragment,e),u(nn.$$.fragment,e),u(sn.$$.fragment,e),u(an.$$.fragment,e),u(cn.$$.fragment,e),u(ln.$$.fragment,e),u(dn.$$.fragment,e),u(pn.$$.fragment,e),u(mn.$$.fragment,e),u(fn.$$.fragment,e),u(gn.$$.fragment,e),u(hn.$$.fragment,e),u(un.$$.fragment,e),u(_n.$$.fragment,e),u(bn.$$.fragment,e),u(vn.$$.fragment,e),u($n.$$.fragment,e),u(Tn.$$.fragment,e),u(yn.$$.fragment,e),u(kn.$$.fragment,e),u(xn.$$.fragment,e),u(Ln.$$.fragment,e),u(En.$$.fragment,e),u(Fn.$$.fragment,e),u(Sn.$$.fragment,e),u(Dn.$$.fragment,e),u(Kt.$$.fragment,e),u(zn.$$.fragment,e),u(qn.$$.fragment,e),u(In.$$.fragment,e),u(On.$$.fragment,e),u(Mn.$$.fragment,e),u(Wn.$$.fragment,e),u(Vn.$$.fragment,e),u(Nn.$$.fragment,e),u(An.$$.fragment,e),u(Un.$$.fragment,e),u(Gn.$$.fragment,e),u(Jn.$$.fragment,e),u(Rn.$$.fragment,e),u(Zn.$$.fragment,e),u(Hn.$$.fragment,e),u(Xn.$$.fragment,e),u(Qn.$$.fragment,e),u(ts.$$.fragment,e),u(rs.$$.fragment,e),u(os.$$.fragment,e),u(ns.$$.fragment,e),u(ss.$$.fragment,e),u(as.$$.fragment,e),u(is.$$.fragment,e),u(ls.$$.fragment,e),u(ps.$$.fragment,e),u(ms.$$.fragment,e),u(dr.$$.fragment,e),u(pr.$$.fragment,e),u(fs.$$.fragment,e),u(gs.$$.fragment,e),u(hs.$$.fragment,e),u(us.$$.fragment,e),u(hr.$$.fragment,e),u(ur.$$.fragment,e),u(_s.$$.fragment,e),Zm=!0)},o(e){_(y.$$.fragment,e),_(xr.$$.fragment,e),_(wr.$$.fragment,e),_(Lr.$$.fragment,e),_(Er.$$.fragment,e),_(Pr.$$.fragment,e),_(Fr.$$.fragment,e),_(Sr.$$.fragment,e),_(Dr.$$.fragment,e),_(zr.$$.fragment,e),_(qr.$$.fragment,e),_(Ir.$$.fragment,e),_(Or.$$.fragment,e),_(Br.$$.fragment,e),_(Mr.$$.fragment,e),_(Wr.$$.fragment,e),_(Vr.$$.fragment,e),_(Cr.$$.fragment,e),_(Nr.$$.fragment,e),_(Ar.$$.fragment,e),_(jr.$$.fragment,e),_(Ur.$$.fragment,e),_(Gr.$$.fragment,e),_(Jr.$$.fragment,e),_(Rr.$$.fragment,e),_(Zr.$$.fragment,e),_(Hr.$$.fragment,e),_(Xr.$$.fragment,e),_(Qr.$$.fragment,e),_(Yr.$$.fragment,e),_(Kr.$$.fragment,e),_(eo.$$.fragment,e),_(to.$$.fragment,e),_(ro.$$.fragment,e),_(oo.$$.fragment,e),_(no.$$.fragment,e),_(so.$$.fragment,e),_(ao.$$.fragment,e),_(io.$$.fragment,e),_(co.$$.fragment,e),_(po.$$.fragment,e),_(mo.$$.fragment,e),_(go.$$.fragment,e),_(ho.$$.fragment,e),_(uo.$$.fragment,e),_(_o.$$.fragment,e),_(vo.$$.fragment,e),_($o.$$.fragment,e),_(yo.$$.fragment,e),_(ko.$$.fragment,e),_(xo.$$.fragment,e),_(wo.$$.fragment,e),_(Lo.$$.fragment,e),_(Eo.$$.fragment,e),_(Po.$$.fragment,e),_(Fo.$$.fragment,e),_(So.$$.fragment,e),_(Do.$$.fragment,e),_(zo.$$.fragment,e),_(qo.$$.fragment,e),_(Io.$$.fragment,e),_(Oo.$$.fragment,e),_(Bo.$$.fragment,e),_(Mo.$$.fragment,e),_(Wo.$$.fragment,e),_(Vo.$$.fragment,e),_(Co.$$.fragment,e),_(No.$$.fragment,e),_(Ao.$$.fragment,e),_(jo.$$.fragment,e),_(Uo.$$.fragment,e),_(Go.$$.fragment,e),_(Ro.$$.fragment,e),_(Zo.$$.fragment,e),_(Ho.$$.fragment,e),_(Xo.$$.fragment,e),_(Qo.$$.fragment,e),_(Yo.$$.fragment,e),_(Ko.$$.fragment,e),_(en.$$.fragment,e),_(tn.$$.fragment,e),_(rn.$$.fragment,e),_(on.$$.fragment,e),_(nn.$$.fragment,e),_(sn.$$.fragment,e),_(an.$$.fragment,e),_(cn.$$.fragment,e),_(ln.$$.fragment,e),_(dn.$$.fragment,e),_(pn.$$.fragment,e),_(mn.$$.fragment,e),_(fn.$$.fragment,e),_(gn.$$.fragment,e),_(hn.$$.fragment,e),_(un.$$.fragment,e),_(_n.$$.fragment,e),_(bn.$$.fragment,e),_(vn.$$.fragment,e),_($n.$$.fragment,e),_(Tn.$$.fragment,e),_(yn.$$.fragment,e),_(kn.$$.fragment,e),_(xn.$$.fragment,e),_(Ln.$$.fragment,e),_(En.$$.fragment,e),_(Fn.$$.fragment,e),_(Sn.$$.fragment,e),_(Dn.$$.fragment,e),_(Kt.$$.fragment,e),_(zn.$$.fragment,e),_(qn.$$.fragment,e),_(In.$$.fragment,e),_(On.$$.fragment,e),_(Mn.$$.fragment,e),_(Wn.$$.fragment,e),_(Vn.$$.fragment,e),_(Nn.$$.fragment,e),_(An.$$.fragment,e),_(Un.$$.fragment,e),_(Gn.$$.fragment,e),_(Jn.$$.fragment,e),_(Rn.$$.fragment,e),_(Zn.$$.fragment,e),_(Hn.$$.fragment,e),_(Xn.$$.fragment,e),_(Qn.$$.fragment,e),_(ts.$$.fragment,e),_(rs.$$.fragment,e),_(os.$$.fragment,e),_(ns.$$.fragment,e),_(ss.$$.fragment,e),_(as.$$.fragment,e),_(is.$$.fragment,e),_(ls.$$.fragment,e),_(ps.$$.fragment,e),_(ms.$$.fragment,e),_(dr.$$.fragment,e),_(pr.$$.fragment,e),_(fs.$$.fragment,e),_(gs.$$.fragment,e),_(hs.$$.fragment,e),_(us.$$.fragment,e),_(hr.$$.fragment,e),_(ur.$$.fragment,e),_(_s.$$.fragment,e),Zm=!1},d(e){r($),e&&r(w),e&&r(T),b(y),e&&r(pp),e&&r(E),e&&r(mp),e&&r(Fs),e&&r(fp),e&&r(rt),b(xr),e&&r(gp),e&&r(X),e&&r(hp),e&&r(qs),e&&r(up),b(wr,e),e&&r(_p),e&&r(Re),e&&r(bp),e&&r(Q),e&&r(vp),e&&r(S),e&&r($p),e&&r(W),e&&r(Tp),e&&r(V),e&&r(yp),b(Lr,e),e&&r(kp),e&&r(Et),e&&r(xp),e&&r(C),e&&r(wp),e&&r(Vs),e&&r(Lp),e&&r(ot),b(Er),e&&r(Ep),e&&r(nt),b(Pr),e&&r(Pp),e&&r(st),b(Fr),e&&r(Fp),e&&r(te),b(Sr),b(Dr),e&&r(Sp),e&&r(at),b(zr),e&&r(Dp),e&&r(it),b(qr),e&&r(zp),e&&r(ct),b(Ir),e&&r(qp),e&&r(re),b(Or),b(Br),e&&r(Ip),e&&r(lt),b(Mr),e&&r(Op),e&&r(dt),b(Wr),e&&r(Bp),e&&r(pt),b(Vr),e&&r(Mp),e&&r(mt),b(Cr),e&&r(Wp),e&&r(ft),b(Nr),e&&r(Vp),e&&r(gt),b(Ar),e&&r(Cp),e&&r(ht),b(jr),e&&r(Np),e&&r(Ot),e&&r(Ap),e&&r(oe),b(Ur),b(Gr),e&&r(jp),e&&r(ne),b(Jr),b(Rr),e&&r(Up),e&&r(se),b(Zr),b(Hr),e&&r(Gp),e&&r(ae),b(Xr),b(Qr),e&&r(Jp),e&&r(ie),b(Yr),b(Kr),e&&r(Rp),e&&r(ce),b(eo),b(to),e&&r(Zp),e&&r(le),b(ro),b(oo),e&&r(Hp),e&&r(de),b(no),b(so),e&&r(Xp),e&&r(pe),b(ao),b(io),e&&r(Qp),e&&r(me),b(co),b(po),e&&r(Yp),e&&r(fe),b(mo),b(go),e&&r(Kp),e&&r(ge),b(ho),b(uo),e&&r(em),e&&r(he),b(_o),b(vo),e&&r(tm),e&&r(ue),b($o),b(yo),e&&r(rm),e&&r(_e),b(ko),b(xo),e&&r(om),e&&r(be),b(wo),b(Lo),e&&r(nm),e&&r(ve),b(Eo),b(Po),e&&r(sm),e&&r($e),b(Fo),b(So),e&&r(am),e&&r(Te),b(Do),b(zo),e&&r(im),e&&r(ye),b(qo),b(Io),e&&r(cm),e&&r(ke),b(Oo),b(Bo),e&&r(lm),e&&r(xe),b(Mo),b(Wo),e&&r(dm),e&&r(we),b(Vo),b(Co),e&&r(pm),e&&r(Le),b(No),b(Ao),e&&r(mm),e&&r(Ee),b(jo),b(Uo),e&&r(fm),e&&r(Pe),b(Go),b(Ro),e&&r(gm),e&&r(Fe),b(Zo),b(Ho),e&&r(hm),e&&r(Se),b(Xo),b(Qo),e&&r(um),e&&r(De),b(Yo),b(Ko),e&&r(_m),e&&r(ze),b(en),b(tn),e&&r(bm),e&&r(qe),b(rn),b(on),e&&r(vm),e&&r(Ie),b(nn),b(sn),e&&r($m),e&&r(Oe),b(an),b(cn),e&&r(Tm),e&&r(Be),b(ln),b(dn),e&&r(ym),e&&r(Me),b(pn),b(mn),e&&r(km),e&&r(We),b(fn),b(gn),e&&r(xm),e&&r(Ve),b(hn),b(un),e&&r(wm),e&&r(Ce),b(_n),b(bn),e&&r(Lm),e&&r(ut),b(vn),e&&r(Em),e&&r(Xt),e&&r(Pm),e&&r(Ne),b($n),b(Tn),e&&r(Fm),e&&r(_t),b(yn),b(kn),e&&r(Sm),e&&r(Ae),b(xn),b(Ln),e&&r(Dm),e&&r(je),b(En),b(Fn),e&&r(zm),e&&r(bt),b(Sn),e&&r(qm),e&&r(Yt),e&&r(Im),e&&r(x),b(Dn),b(Kt),b(zn),b(qn),b(In),b(On),b(Mn),b(Wn),b(Vn),e&&r(Om),e&&r(vt),b(Nn),e&&r(Bm),e&&r($t),b(An),e&&r(Mm),e&&r(J),b(Un),b(Gn),b(Jn),e&&r(Wm),e&&r(yt),b(Rn),e&&r(Vm),e&&r(R),b(Zn),b(Hn),b(Xn),e&&r(Cm),e&&r(I),b(Qn),b(ts),b(rs),e&&r(Nm),e&&r(Z),b(os),b(ns),b(ss),e&&r(Am),e&&r(xt),b(as),e&&r(jm),e&&r(Ge),b(is),e&&r(Um),e&&r(Je),b(ls),e&&r(Gm),e&&r(wt),b(ps),e&&r(Jm),e&&r(F),b(ms),b(dr),b(pr),b(fs),b(gs),b(hs),e&&r(Rm),e&&r(M),b(us),b(hr),b(ur),b(_s)}}}const f3={local:"utilities-for-generation",sections:[{local:"generate-outputs",sections:[{local:"transformers.generation.GreedySearchDecoderOnlyOutput",title:"GreedySearchOutput"},{local:"transformers.generation.SampleDecoderOnlyOutput",title:"SampleOutput"},{local:"transformers.generation.BeamSearchDecoderOnlyOutput",title:"BeamSearchOutput"},{local:"transformers.generation.BeamSampleDecoderOnlyOutput",title:"BeamSampleOutput"}],title:"Generate Outputs"},{local:"transformers.LogitsProcessor",title:"LogitsProcessor"},{local:"transformers.StoppingCriteria",title:"StoppingCriteria"},{local:"transformers.Constraint",title:"Constraints"},{local:"transformers.BeamScorer",title:"BeamSearch"},{local:"transformers.top_k_top_p_filtering",title:"Utilities"},{local:"transformers.TextStreamer",title:"Streamers"}],title:"Utilities for Generation"};function g3(H){return a3(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class T3 extends r3{constructor($){super();o3(this,$,g3,m3,n3,{})}}export{T3 as default,f3 as metadata};
