import{S as Pk,i as Fk,s as Dk,e as o,k as c,w as f,t as a,M as Sk,c as n,d as t,m as l,a as s,x as g,h as i,b as d,G as r,g as m,y as h,q as u,o as _,B as b,v as zk,L as Ok}from"../../chunks/vendor-hf-doc-builder.js";import{D as v}from"../../chunks/Docstring-hf-doc-builder.js";import{C as iT}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ae}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as qk}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bk(xd){let L,Re;return L=new iT({props:{code:`completed = False
while not completed:
    _, completed = constraint.update(constraint.advance())`,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(L.$$.fragment)},l(k){g(L.$$.fragment,k)},m(k,Ce){h(L,k,Ce),Re=!0},p:Ok,i(k){Re||(u(L.$$.fragment,k),Re=!0)},o(k){_(L.$$.fragment,k),Re=!1},d(k){b(L,k)}}}function Ik(xd){let L,Re,k,Ce,fc,at,Jm,gc,Qm,wd,y,Zm,Un,ef,rf,Yn,tf,of,Xn,nf,sf,Jn,af,cf,Qn,lf,df,Zn,pf,mf,es,ff,gf,rs,hf,uf,Ld,ts,_f,Ed,Ke,_r,hc,it,bf,uc,vf,Pd,V,$f,os,Tf,yf,ns,kf,xf,ss,wf,Lf,Fd,as,Ef,Dd,ct,Sd,We,Pf,_c,Ff,Df,is,Sf,zf,zd,M,cs,bc,Of,qf,Bf,ls,vc,If,Af,Cf,ds,$c,Wf,Nf,Vf,ps,Tc,Mf,Gf,Od,x,jf,yc,Hf,Rf,kc,Kf,Uf,xc,Yf,Xf,wc,Jf,Qf,Lc,Zf,eg,Ec,rg,tg,qd,S,og,Pc,ng,sg,Fc,ag,ig,Dc,cg,lg,Sc,dg,pg,Bd,z,mg,zc,fg,gg,Oc,hg,ug,qc,_g,bg,Bc,vg,$g,Id,lt,Ad,br,Tg,Ic,yg,kg,Cd,O,xg,Ac,wg,Lg,Cc,Eg,Pg,Wc,Fg,Dg,Nc,Sg,zg,Wd,ms,Og,Nd,Ue,vr,Vc,dt,qg,Mc,Bg,Vd,Ye,pt,Ig,Gc,Ag,Md,Xe,mt,Cg,jc,Wg,Gd,R,ft,Ng,Hc,Vg,Mg,$r,gt,Gg,Rc,jg,jd,Je,Tr,Kc,ht,Hg,Uc,Rg,Hd,Qe,ut,Kg,Yc,Ug,Rd,Ze,_t,Yg,Xc,Xg,Kd,K,bt,Jg,Jc,Qg,Zg,yr,vt,eh,Qc,rh,Ud,er,kr,Zc,$t,th,el,oh,Yd,rr,Tt,nh,rl,sh,Xd,tr,yt,ah,tl,ih,Jd,or,xr,ol,kt,ch,nl,lh,Qd,nr,xt,dh,sl,ph,Zd,sr,wt,mh,al,fh,ep,ar,wr,il,Lt,gh,cl,hh,rp,Lr,uh,fs,_h,bh,tp,U,Et,vh,ll,$h,Th,Er,Pt,yh,dl,kh,op,Y,Ft,xh,E,wh,gs,Lh,Eh,hs,Ph,Fh,pl,Dh,Sh,ml,fl,zh,Oh,us,qh,Bh,_s,Ih,Ah,Ch,bs,Dt,np,X,St,Wh,gl,Nh,Vh,Pr,zt,Mh,hl,Gh,sp,J,Ot,jh,vs,$s,Hh,Rh,Kh,Ts,qt,ap,Q,Bt,Uh,ys,ks,Yh,Xh,Jh,xs,It,ip,Z,At,Qh,ws,Ls,Zh,eu,ru,Es,Ct,cp,ee,Wt,tu,Ps,Fs,ou,nu,su,Ds,Nt,lp,re,Vt,au,Ss,zs,iu,cu,lu,Os,Mt,dp,te,Gt,du,Fr,qs,pu,mu,jt,fu,gu,hu,Bs,Ht,pp,oe,Rt,uu,Dr,Is,_u,bu,Kt,vu,$u,Tu,As,Ut,mp,ne,Yt,yu,Cs,Ws,ku,xu,wu,Ns,Xt,fp,se,Jt,Lu,Sr,Vs,Eu,Pu,Qt,Fu,Du,Su,Ms,Zt,gp,ae,eo,zu,Ne,Gs,Ou,qu,js,Bu,Iu,ro,Au,Cu,Wu,Hs,to,hp,ie,oo,Nu,Rs,Ks,Vu,Mu,Gu,Us,no,up,ce,so,ju,zr,Ys,Hu,Ru,ul,Ku,Uu,Yu,Xs,ao,_p,le,io,Xu,G,Js,Ju,Qu,_l,Zu,e_,bl,r_,t_,vl,o_,n_,s_,Qs,co,bp,de,lo,a_,$l,i_,c_,Or,po,l_,Tl,d_,vp,pe,mo,p_,A,m_,Zs,f_,g_,yl,h_,u_,kl,xl,__,b_,ea,v_,$_,T_,ra,fo,$p,me,go,y_,wl,k_,x_,qr,ho,w_,Ll,L_,Tp,fe,uo,E_,ta,oa,P_,F_,D_,na,_o,yp,ge,bo,S_,sa,aa,z_,O_,q_,ia,vo,kp,he,$o,B_,ca,la,I_,A_,C_,da,To,xp,ue,yo,W_,pa,ma,N_,V_,M_,fa,ko,wp,_e,xo,G_,ga,ha,j_,H_,R_,ua,wo,Lp,be,Lo,K_,Br,_a,U_,Y_,Eo,X_,J_,Q_,ba,Po,Ep,ve,Fo,Z_,va,$a,eb,rb,tb,Ta,Do,Pp,$e,So,ob,ya,ka,nb,sb,ab,xa,zo,Fp,Te,Oo,ib,Ir,wa,cb,lb,El,db,pb,mb,La,qo,Dp,ye,Bo,fb,Pl,gb,hb,Ar,Io,ub,Fl,_b,Sp,ke,Ao,bb,P,vb,Ea,$b,Tb,Pa,yb,kb,Dl,xb,wb,Sl,zl,Lb,Eb,Fa,Pb,Fb,Da,Db,Sb,zb,Sa,Co,zp,xe,Wo,Ob,Ol,qb,Bb,Cr,No,Ib,ql,Ab,Op,we,Vo,Cb,za,Oa,Wb,Nb,Vb,qa,Mo,qp,Le,Go,Mb,Ba,Ia,Gb,jb,Hb,Aa,jo,Bp,Ee,Ho,Rb,Ca,Wa,Kb,Ub,Yb,Na,Ro,Ip,Pe,Ko,Xb,Va,Ma,Jb,Qb,Zb,Ga,Uo,Ap,Fe,Yo,ev,Wr,ja,rv,tv,Bl,ov,nv,sv,Ha,Xo,Cp,De,Jo,av,Ra,Ka,iv,cv,lv,Ua,Qo,Wp,ir,Nr,Il,Zo,dv,Al,pv,Np,Vr,mv,Ya,fv,gv,Vp,Se,en,hv,Cl,uv,_v,Xa,rn,Mp,cr,tn,bv,Ja,on,Gp,ze,nn,vv,sn,$v,Wl,Tv,yv,kv,Qa,an,jp,Oe,cn,xv,ln,wv,Nl,Lv,Ev,Pv,Za,dn,Hp,lr,Mr,Vl,pn,Fv,Ml,Dv,Rp,Gr,Sv,ei,zv,Ov,Kp,$,mn,qv,Gl,Bv,Iv,jl,Av,Cv,jr,Wv,Hl,Nv,Vv,Hr,fn,Mv,Rl,Gv,jv,Rr,gn,Hv,Kl,Rv,Kv,Kr,hn,Uv,Ul,Yv,Xv,Ur,un,Jv,_n,Qv,Yl,Zv,e1,r1,Yr,bn,t1,Xl,o1,n1,Xr,vn,s1,Jl,a1,i1,Ve,$n,c1,Tn,l1,Ql,d1,p1,m1,Zl,f1,Up,dr,yn,g1,ri,ti,h1,u1,Yp,pr,kn,_1,xn,b1,oi,v1,$1,Xp,C,wn,T1,ed,y1,k1,D,Ln,x1,rd,w1,L1,mr,E1,td,P1,F1,od,D1,S1,z1,nd,sd,O1,q1,qe,B1,ad,I1,A1,id,C1,W1,cd,N1,V1,M1,ld,G1,j1,Jr,En,H1,dd,R1,Jp,fr,Qr,pd,Pn,K1,md,U1,Qp,W,Fn,Y1,gr,X1,ni,J1,Q1,si,Z1,e$,r$,ai,Dn,t$,ii,Sn,Zp,F,zn,o$,ci,li,n$,s$,a$,On,i$,qn,c$,l$,d$,di,p$,Bn,m$,f$,pi,In,g$,mi,An,em,N,Cn,h$,fi,gi,u$,_$,b$,hi,Wn,v$,ui,Nn,rm,hr,Zr,fd,Vn,$$,gd,T$,tm,Be,Mn,y$,hd,k$,x$,_i,w$,Gn,L$,om,Ie,jn,E$,ud,P$,F$,bi,D$,Hn,S$,nm;return at=new Ae({}),it=new Ae({}),ct=new iT({props:{code:`from transformers import GPT2Tokenizer, GPT2LMHeadModel

tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
model = GPT2LMHeadModel.from_pretrained("gpt2")

inputs = tokenizer("Hello, my dog is cute and ", return_tensors="pt")
generation_output = model.generate(**inputs, return_dict_in_generate=True, output_scores=True)`,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>)`}}),lt=new iT({props:{code:"generation_output[:2]",highlighted:'generation_output[:<span class="hljs-number">2</span>]'}}),dt=new Ae({}),pt=new v({props:{name:"class transformers.generation_utils.GreedySearchDecoderOnlyOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L73"}}),mt=new v({props:{name:"class transformers.generation_utils.GreedySearchEncoderDecoderOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L149"}}),ft=new v({props:{name:"class transformers.generation_flax_utils.FlaxGreedySearchOutput",anchor:"transformers.generation_flax_utils.FlaxGreedySearchOutput",parameters:[{name:"sequences",val:": ndarray = None"}],parametersDescription:[{anchor:"transformers.generation_flax_utils.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/vr_19816/src/transformers/generation_flax_utils.py#L51"}}),gt=new v({props:{name:"replace",anchor:"transformers.generation_flax_utils.FlaxGreedySearchOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/flax/struct.py#L108"}}),ht=new Ae({}),ut=new v({props:{name:"class transformers.generation_utils.SampleDecoderOnlyOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L191"}}),_t=new v({props:{name:"class transformers.generation_utils.SampleEncoderDecoderOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L220"}}),bt=new v({props:{name:"class transformers.generation_flax_utils.FlaxSampleOutput",anchor:"transformers.generation_flax_utils.FlaxSampleOutput",parameters:[{name:"sequences",val:": ndarray = None"}],parametersDescription:[{anchor:"transformers.generation_flax_utils.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/vr_19816/src/transformers/generation_flax_utils.py#L65"}}),vt=new v({props:{name:"replace",anchor:"transformers.generation_flax_utils.FlaxSampleOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/flax/struct.py#L108"}}),$t=new Ae({}),Tt=new v({props:{name:"class transformers.generation_utils.BeamSearchDecoderOnlyOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.BeamSearchDecoderOnlyOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>tuple(tuple(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, input_ids.shape[-1])</code>.`,name:"beam_indices"},{anchor:"transformers.generation_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L263"}}),yt=new v({props:{name:"class transformers.generation_utils.BeamSearchEncoderDecoderOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.BeamSearchEncoderDecoderOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>tuple(tuple(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, max_length-1)</code>.`,name:"beam_indices"},{anchor:"transformers.generation_utils.BeamSearchEncoderDecoderOutput.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;",name:"attentions"},{anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L298"}}),kt=new Ae({}),xt=new v({props:{name:"class transformers.generation_utils.BeamSampleDecoderOnlyOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.BeamSampleDecoderOnlyOutput.beam_indices",description:`<strong>beam_indices</strong> (<code>tuple(tuple(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, input_ids.shape[-1])</code>.`,name:"beam_indices"},{anchor:"transformers.generation_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L349"}}),wt=new v({props:{name:"class transformers.generation_utils.BeamSampleEncoderDecoderOutput",anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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, max_length-1)</code>.`,name:"beam_indices"},{anchor:"transformers.generation_utils.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_utils.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_utils.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_utils.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_utils.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/vr_19816/src/transformers/generation_utils.py#L384"}}),Lt=new Ae({}),Et=new v({props:{name:"class transformers.LogitsProcessor",anchor:"transformers.LogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L51"}}),Pt=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),Ft=new v({props:{name:"class transformers.LogitsProcessorList",anchor:"transformers.LogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L73"}}),Dt=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),St=new v({props:{name:"class transformers.LogitsWarper",anchor:"transformers.LogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L62"}}),zt=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),Ot=new v({props:{name:"class transformers.MinLengthLogitsProcessor",anchor:"transformers.MinLengthLogitsProcessor",parameters:[{name:"min_length",val:": int"},{name:"eos_token_id",val:": 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>int</code>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L96"}}),qt=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/vr_19816/src/transformers/generation_logits_process.py#L117"}}),Bt=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/vr_19816/src/transformers/generation_logits_process.py#L124"}}),It=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/vr_19816/src/transformers/generation_logits_process.py#L139"}}),At=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/vr_19816/src/transformers/generation_logits_process.py#L144"}}),Ct=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/vr_19816/src/transformers/generation_logits_process.py#L160"}}),Wt=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/vr_19816/src/transformers/generation_logits_process.py#L170"}}),Nt=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/vr_19816/src/transformers/generation_logits_process.py#L193"}}),Vt=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/vr_19816/src/transformers/generation_logits_process.py#L209"}}),Mt=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/vr_19816/src/transformers/generation_logits_process.py#L230"}}),Gt=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/vr_19816/src/transformers/generation_logits_process.py#L238"}}),Ht=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/vr_19816/src/transformers/generation_logits_process.py#L261"}}),Rt=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/vr_19816/src/transformers/generation_logits_process.py#L322"}}),Ut=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/vr_19816/src/transformers/generation_logits_process.py#L337"}}),Yt=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:": 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>int</code>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L389"}}),Xt=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/vr_19816/src/transformers/generation_logits_process.py#L431"}}),Jt=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"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L517"}}),Zt=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/vr_19816/src/transformers/generation_logits_process.py#L534"}}),eo=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/vr_19816/src/transformers/generation_logits_process.py#L543"}}),to=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/vr_19816/src/transformers/generation_logits_process.py#L574"}}),oo=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/vr_19816/src/transformers/generation_logits_process.py#L603"}}),no=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/vr_19816/src/transformers/generation_logits_process.py#L615"}}),so=new v({props:{name:"class transformers.ForcedEOSTokenLogitsProcessor",anchor:"transformers.ForcedEOSTokenLogitsProcessor",parameters:[{name:"max_length",val:": int"},{name:"eos_token_id",val:": 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>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/vr_19816/src/transformers/generation_logits_process.py#L624"}}),ao=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/vr_19816/src/transformers/generation_logits_process.py#L639"}}),io=new v({props:{name:"class transformers.InfNanRemoveLogitsProcessor",anchor:"transformers.InfNanRemoveLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_logits_process.py#L648"}}),co=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/vr_19816/src/transformers/generation_logits_process.py#L655"}}),lo=new v({props:{name:"class transformers.TFLogitsProcessor",anchor:"transformers.TFLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_tf_logits_process.py#L53"}}),po=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),mo=new v({props:{name:"class transformers.TFLogitsProcessorList",anchor:"transformers.TFLogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_tf_logits_process.py#L75"}}),fo=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),go=new v({props:{name:"class transformers.TFLogitsWarper",anchor:"transformers.TFLogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_tf_logits_process.py#L64"}}),ho=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),uo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L98"}}),_o=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/vr_19816/src/transformers/generation_tf_logits_process.py#L113"}}),bo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L147"}}),vo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L169"}}),$o=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/vr_19816/src/transformers/generation_tf_logits_process.py#L118"}}),To=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/vr_19816/src/transformers/generation_tf_logits_process.py#L139"}}),yo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L201"}}),ko=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/vr_19816/src/transformers/generation_tf_logits_process.py#L227"}}),xo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L287"}}),wo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L364"}}),Lo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L385"}}),Po=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/vr_19816/src/transformers/generation_tf_logits_process.py#L424"}}),Fo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L237"}}),Do=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/vr_19816/src/transformers/generation_tf_logits_process.py#L279"}}),So=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/vr_19816/src/transformers/generation_tf_logits_process.py#L446"}}),zo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L460"}}),Oo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L476"}}),qo=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/vr_19816/src/transformers/generation_tf_logits_process.py#L493"}}),Bo=new v({props:{name:"class transformers.FlaxLogitsProcessor",anchor:"transformers.FlaxLogitsProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_flax_logits_process.py#L50"}}),Io=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),Ao=new v({props:{name:"class transformers.FlaxLogitsProcessorList",anchor:"transformers.FlaxLogitsProcessorList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_flax_logits_process.py#L72"}}),Co=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),Wo=new v({props:{name:"class transformers.FlaxLogitsWarper",anchor:"transformers.FlaxLogitsWarper",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_flax_logits_process.py#L61"}}),No=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),Vo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L95"}}),Mo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L110"}}),Go=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/vr_19816/src/transformers/generation_flax_logits_process.py#L115"}}),jo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L137"}}),Ho=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/vr_19816/src/transformers/generation_flax_logits_process.py#L157"}}),Ro=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/vr_19816/src/transformers/generation_flax_logits_process.py#L178"}}),Ko=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/vr_19816/src/transformers/generation_flax_logits_process.py#L193"}}),Uo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L205"}}),Yo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L215"}}),Xo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L230"}}),Jo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L240"}}),Qo=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/vr_19816/src/transformers/generation_flax_logits_process.py#L261"}}),Zo=new Ae({}),en=new v({props:{name:"class transformers.StoppingCriteria",anchor:"transformers.StoppingCriteria",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_stopping_criteria.py#L33"}}),rn=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),tn=new v({props:{name:"class transformers.StoppingCriteriaList",anchor:"transformers.StoppingCriteriaList",parameters:[{name:"iterable",val:" = ()"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_stopping_criteria.py#L110"}}),on=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),nn=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/vr_19816/src/transformers/generation_stopping_criteria.py#L41"}}),an=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),cn=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/vr_19816/src/transformers/generation_stopping_criteria.py#L88"}}),dn=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/pr_19816/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/vr_19816/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>
`}}),pn=new Ae({}),mn=new v({props:{name:"class transformers.Constraint",anchor:"transformers.Constraint",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L5"}}),jr=new qk({props:{anchor:"transformers.Constraint.example",$$slots:{default:[Bk]},$$scope:{ctx:xd}}}),fn=new v({props:{name:"advance",anchor:"transformers.Constraint.advance",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/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>
`}}),gn=new v({props:{name:"copy",anchor:"transformers.Constraint.copy",parameters:[{name:"stateful",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/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>
`}}),hn=new v({props:{name:"does_advance",anchor:"transformers.Constraint.does_advance",parameters:[{name:"token_id",val:": int"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L60"}}),un=new v({props:{name:"remaining",anchor:"transformers.Constraint.remaining",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L104"}}),bn=new v({props:{name:"reset",anchor:"transformers.Constraint.reset",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L94"}}),vn=new v({props:{name:"test",anchor:"transformers.Constraint.test",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L24"}}),$n=new v({props:{name:"update",anchor:"transformers.Constraint.update",parameters:[{name:"token_id",val:": int"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/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>
`}}),yn=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/vr_19816/src/transformers/generation_beam_constraints.py#L129"}}),kn=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/vr_19816/src/transformers/generation_beam_constraints.py#L261"}}),wn=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/pr_19816/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/vr_19816/src/transformers/generation_beam_constraints.py#L350"}}),Ln=new v({props:{name:"advance",anchor:"transformers.ConstraintListState.advance",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_constraints.py#L382"}}),En=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/vr_19816/src/transformers/generation_beam_constraints.py#L417"}}),Pn=new Ae({}),Fn=new v({props:{name:"class transformers.BeamScorer",anchor:"transformers.BeamScorer",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L88"}}),Dn=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>int</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L94",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>
`}}),Sn=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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>int</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L106",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>
`}}),zn=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.Optional[bool] = False"},{name:"num_beam_hyps_to_keep",val:": typing.Optional[int] = 1"},{name:"num_beam_groups",val:": typing.Optional[int] = 1"},{name:"**kwargs",val:""}],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.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.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>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to stop the beam search when at least <code>num_beams</code> sentences are finished per batch or not.`,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"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L120"}}),In=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.Optional[int] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L208"}}),An=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.Optional[int] = None"},{name:"beam_indices",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L302"}}),Cn=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.Optional[bool] = False"},{name:"num_beam_hyps_to_keep",val:": typing.Optional[int] = 1"},{name:"num_beam_groups",val:": typing.Optional[int] = 1"},{name:"**kwargs",val:""}],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.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.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/pr_19816/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>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to stop the beam search when at least <code>num_beams</code> sentences are finished per batch or not.`,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"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L390"}}),Wn=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.Optional[int] = 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/pr_19816/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. See
<a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_19816/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>int</code>, <em>optional</em>) &#x2014;
The id of the <em>end-of-sequence</em> token.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L486",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>
`}}),Nn=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.Optional[int] = None"}],source:"https://github.com/huggingface/transformers/blob/vr_19816/src/transformers/generation_beam_search.py#L768"}}),Vn=new Ae({}),Mn=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/vr_19816/src/transformers/generation_utils.py#L3848"}}),jn=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/vr_19816/src/transformers/generation_tf_utils.py#L3269"}}),{c(){L=o("meta"),Re=c(),k=o("h1"),Ce=o("a"),fc=o("span"),f(at.$$.fragment),Jm=c(),gc=o("span"),Qm=a("Utilities for Generation"),wd=c(),y=o("p"),Zm=a("This page lists all the utility functions used by "),Un=o("a"),ef=a("generate()"),rf=a(`,
`),Yn=o("a"),tf=a("greedy_search()"),of=a(`,
`),Xn=o("a"),nf=a("contrastive_search()"),sf=a(`,
`),Jn=o("a"),af=a("sample()"),cf=a(`,
`),Qn=o("a"),lf=a("beam_search()"),df=a(`,
`),Zn=o("a"),pf=a("beam_sample()"),mf=a(`,
`),es=o("a"),ff=a("group_beam_search()"),gf=a(`, and
`),rs=o("a"),hf=a("constrained_beam_search()"),uf=a("."),Ld=c(),ts=o("p"),_f=a("Most of those are only useful if you are studying the code of the generate methods in the library."),Ed=c(),Ke=o("h2"),_r=o("a"),hc=o("span"),f(it.$$.fragment),bf=c(),uc=o("span"),vf=a("Generate Outputs"),Pd=c(),V=o("p"),$f=a("The output of "),os=o("a"),Tf=a("generate()"),yf=a(` is an instance of a subclass of
`),ns=o("a"),kf=a("ModelOutput"),xf=a(`. This output is a data structure containing all the information returned
by `),ss=o("a"),wf=a("generate()"),Lf=a(", but that can also be used as tuple or dictionary."),Fd=c(),as=o("p"),Ef=a("Here\u2019s an example:"),Dd=c(),f(ct.$$.fragment),Sd=c(),We=o("p"),Pf=a("The "),_c=o("code"),Ff=a("generation_output"),Df=a(" object is a "),is=o("a"),Sf=a("GreedySearchDecoderOnlyOutput"),zf=a(`, as we can
see in the documentation of that class below, it means it has the following attributes:`),zd=c(),M=o("ul"),cs=o("li"),bc=o("code"),Of=a("sequences"),qf=a(": the generated sequences of tokens"),Bf=c(),ls=o("li"),vc=o("code"),If=a("scores"),Af=a(" (optional): the prediction scores of the language modelling head, for each generation step"),Cf=c(),ds=o("li"),$c=o("code"),Wf=a("hidden_states"),Nf=a(" (optional): the hidden states of the model, for each generation step"),Vf=c(),ps=o("li"),Tc=o("code"),Mf=a("attentions"),Gf=a(" (optional): the attention weights of the model, for each generation step"),Od=c(),x=o("p"),jf=a("Here we have the "),yc=o("code"),Hf=a("scores"),Rf=a(" since we passed along "),kc=o("code"),Kf=a("output_scores=True"),Uf=a(", but we don\u2019t have "),xc=o("code"),Yf=a("hidden_states"),Xf=a(` and
`),wc=o("code"),Jf=a("attentions"),Qf=a(" because we didn\u2019t pass "),Lc=o("code"),Zf=a("output_hidden_states=True"),eg=a(" or "),Ec=o("code"),rg=a("output_attentions=True"),tg=a("."),qd=c(),S=o("p"),og=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 `),Pc=o("code"),ng=a("None"),sg=a(". Here for instance "),Fc=o("code"),ag=a("generation_output.scores"),ig=a(` are all the generated prediction scores of the
language modeling head, and `),Dc=o("code"),cg=a("generation_output.attentions"),lg=a(" is "),Sc=o("code"),dg=a("None"),pg=a("."),Bd=c(),z=o("p"),mg=a("When using our "),zc=o("code"),fg=a("generation_output"),gg=a(" object as a tuple, it only keeps the attributes that don\u2019t have "),Oc=o("code"),hg=a("None"),ug=a(` values.
Here, for instance, it has two elements, `),qc=o("code"),_g=a("loss"),bg=a(" then "),Bc=o("code"),vg=a("logits"),$g=a(", so"),Id=c(),f(lt.$$.fragment),Ad=c(),br=o("p"),Tg=a("will return the tuple "),Ic=o("code"),yg=a("(generation_output.sequences, generation_output.scores)"),kg=a(" for instance."),Cd=c(),O=o("p"),xg=a("When using our "),Ac=o("code"),wg=a("generation_output"),Lg=a(" object as a dictionary, it only keeps the attributes that don\u2019t have "),Cc=o("code"),Eg=a("None"),Pg=a(`
values. Here, for instance, it has two keys that are `),Wc=o("code"),Fg=a("sequences"),Dg=a(" and "),Nc=o("code"),Sg=a("scores"),zg=a("."),Wd=c(),ms=o("p"),Og=a("We document here all output types."),Nd=c(),Ue=o("h3"),vr=o("a"),Vc=o("span"),f(dt.$$.fragment),qg=c(),Mc=o("span"),Bg=a("GreedySearchOutput"),Vd=c(),Ye=o("div"),f(pt.$$.fragment),Ig=c(),Gc=o("p"),Ag=a("Base class for outputs of decoder-only generation models using greedy search."),Md=c(),Xe=o("div"),f(mt.$$.fragment),Cg=c(),jc=o("p"),Wg=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)`),Gd=c(),R=o("div"),f(ft.$$.fragment),Ng=c(),Hc=o("p"),Vg=a("Flax Base class for outputs of decoder-only generation models using greedy search."),Mg=c(),$r=o("div"),f(gt.$$.fragment),Gg=c(),Rc=o("p"),jg=a("\u201CReturns a new object replacing the specified fields with new values."),jd=c(),Je=o("h3"),Tr=o("a"),Kc=o("span"),f(ht.$$.fragment),Hg=c(),Uc=o("span"),Rg=a("SampleOutput"),Hd=c(),Qe=o("div"),f(ut.$$.fragment),Kg=c(),Yc=o("p"),Ug=a("Base class for outputs of decoder-only generation models using sampling."),Rd=c(),Ze=o("div"),f(_t.$$.fragment),Yg=c(),Xc=o("p"),Xg=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)`),Kd=c(),K=o("div"),f(bt.$$.fragment),Jg=c(),Jc=o("p"),Qg=a("Flax Base class for outputs of decoder-only generation models using sampling."),Zg=c(),yr=o("div"),f(vt.$$.fragment),eh=c(),Qc=o("p"),rh=a("\u201CReturns a new object replacing the specified fields with new values."),Ud=c(),er=o("h3"),kr=o("a"),Zc=o("span"),f($t.$$.fragment),th=c(),el=o("span"),oh=a("BeamSearchOutput"),Yd=c(),rr=o("div"),f(Tt.$$.fragment),nh=c(),rl=o("p"),sh=a("Base class for outputs of decoder-only generation models using beam search."),Xd=c(),tr=o("div"),f(yt.$$.fragment),ah=c(),tl=o("p"),ih=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)`),Jd=c(),or=o("h3"),xr=o("a"),ol=o("span"),f(kt.$$.fragment),ch=c(),nl=o("span"),lh=a("BeamSampleOutput"),Qd=c(),nr=o("div"),f(xt.$$.fragment),dh=c(),sl=o("p"),ph=a("Base class for outputs of decoder-only generation models using beam sample."),Zd=c(),sr=o("div"),f(wt.$$.fragment),mh=c(),al=o("p"),fh=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)`),ep=c(),ar=o("h2"),wr=o("a"),il=o("span"),f(Lt.$$.fragment),gh=c(),cl=o("span"),hh=a("LogitsProcessor"),rp=c(),Lr=o("p"),uh=a("A "),fs=o("a"),_h=a("LogitsProcessor"),bh=a(` can be used to modify the prediction scores of a language model head for
generation.`),tp=c(),U=o("div"),f(Et.$$.fragment),vh=c(),ll=o("p"),$h=a("Abstract base class for all logit processors that can be applied during generation."),Th=c(),Er=o("div"),f(Pt.$$.fragment),yh=c(),dl=o("p"),kh=a("Torch method for processing logits."),op=c(),Y=o("div"),f(Ft.$$.fragment),xh=c(),E=o("p"),wh=a("This class can be used to create a list of "),gs=o("a"),Lh=a("LogitsProcessor"),Eh=a(" or "),hs=o("a"),Ph=a("LogitsWarper"),Fh=a(` to subsequently process a
`),pl=o("code"),Dh=a("scores"),Sh=a(" input tensor. This class inherits from list and adds a specific "),ml=o("em"),fl=o("strong"),zh=a("call"),Oh=a(` method to apply each
`),us=o("a"),qh=a("LogitsProcessor"),Bh=a(" or "),_s=o("a"),Ih=a("LogitsWarper"),Ah=a(" to the inputs."),Ch=c(),bs=o("div"),f(Dt.$$.fragment),np=c(),X=o("div"),f(St.$$.fragment),Wh=c(),gl=o("p"),Nh=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),Vh=c(),Pr=o("div"),f(zt.$$.fragment),Mh=c(),hl=o("p"),Gh=a("Torch method for warping logits."),sp=c(),J=o("div"),f(Ot.$$.fragment),jh=c(),vs=o("p"),$s=o("a"),Hh=a("LogitsProcessor"),Rh=a(" enforcing a min-length by setting EOS probability to 0."),Kh=c(),Ts=o("div"),f(qt.$$.fragment),ap=c(),Q=o("div"),f(Bt.$$.fragment),Uh=c(),ys=o("p"),ks=o("a"),Yh=a("LogitsWarper"),Xh=a(" for temperature (exponential scaling output probability distribution)."),Jh=c(),xs=o("div"),f(It.$$.fragment),ip=c(),Z=o("div"),f(At.$$.fragment),Qh=c(),ws=o("p"),Ls=o("a"),Zh=a("LogitsProcessor"),eu=a(" enforcing an exponential penalty on repeated sequences."),ru=c(),Es=o("div"),f(Ct.$$.fragment),cp=c(),ee=o("div"),f(Wt.$$.fragment),tu=c(),Ps=o("p"),Fs=o("a"),ou=a("LogitsWarper"),nu=a(" that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),su=c(),Ds=o("div"),f(Nt.$$.fragment),lp=c(),re=o("div"),f(Vt.$$.fragment),au=c(),Ss=o("p"),zs=o("a"),iu=a("LogitsWarper"),cu=a(" that performs top-k, i.e. restricting to the k highest probability elements."),lu=c(),Os=o("div"),f(Mt.$$.fragment),dp=c(),te=o("div"),f(Gt.$$.fragment),du=c(),Fr=o("p"),qs=o("a"),pu=a("LogitsWarper"),mu=a(" that performs typical decoding. See "),jt=o("a"),fu=a(`Typical Decoding for Natural Language
Generation`),gu=a(" for more information."),hu=c(),Bs=o("div"),f(Ht.$$.fragment),pp=c(),oe=o("div"),f(Rt.$$.fragment),uu=c(),Dr=o("p"),Is=o("a"),_u=a("LogitsProcessor"),bu=a(` that enforces no repetition of n-grams. See
`),Kt=o("a"),vu=a("Fairseq"),$u=a("."),Tu=c(),As=o("div"),f(Ut.$$.fragment),mp=c(),ne=o("div"),f(Yt.$$.fragment),yu=c(),Cs=o("p"),Ws=o("a"),ku=a("LogitsProcessor"),xu=a(" that enforces that specified sequences will never be sampled."),wu=c(),Ns=o("div"),f(Xt.$$.fragment),fp=c(),se=o("div"),f(Jt.$$.fragment),Lu=c(),Sr=o("p"),Vs=o("a"),Eu=a("LogitsProcessor"),Pu=a(` that enforces constrained generation and is useful for prefix-conditioned constrained
generation. See `),Qt=o("a"),Fu=a("Autoregressive Entity Retrieval"),Du=a(" for more information."),Su=c(),Ms=o("div"),f(Zt.$$.fragment),gp=c(),ae=o("div"),f(eo.$$.fragment),zu=c(),Ne=o("p"),Gs=o("a"),Ou=a("LogitsProcessor"),qu=a(` that enforces diverse beam search. Note that this logits processor is only effective for
`),js=o("a"),Bu=a("PreTrainedModel.group_beam_search()"),Iu=a(". See "),ro=o("a"),Au=a(`Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence
Models`),Cu=a(" for more details."),Wu=c(),Hs=o("div"),f(to.$$.fragment),hp=c(),ie=o("div"),f(oo.$$.fragment),Nu=c(),Rs=o("p"),Ks=o("a"),Vu=a("LogitsProcessor"),Mu=a(" that enforces the specified token as the first generated token."),Gu=c(),Us=o("div"),f(no.$$.fragment),up=c(),ce=o("div"),f(so.$$.fragment),ju=c(),zr=o("p"),Ys=o("a"),Hu=a("LogitsProcessor"),Ru=a(" that enforces the specified token as the last generated token when "),ul=o("code"),Ku=a("max_length"),Uu=a(" is reached."),Yu=c(),Xs=o("div"),f(ao.$$.fragment),_p=c(),le=o("div"),f(io.$$.fragment),Xu=c(),G=o("p"),Js=o("a"),Ju=a("LogitsProcessor"),Qu=a(" that removes all "),_l=o("code"),Zu=a("nan"),e_=a(" and "),bl=o("code"),r_=a("inf"),t_=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. `),vl=o("code"),o_=a("max_length"),n_=a(` is
reached.`),s_=c(),Qs=o("div"),f(co.$$.fragment),bp=c(),de=o("div"),f(lo.$$.fragment),a_=c(),$l=o("p"),i_=a("Abstract base class for all logit processors that can be applied during generation."),c_=c(),Or=o("div"),f(po.$$.fragment),l_=c(),Tl=o("p"),d_=a("TF method for processing logits."),vp=c(),pe=o("div"),f(mo.$$.fragment),p_=c(),A=o("p"),m_=a("This class can be used to create a list of "),Zs=o("a"),f_=a("TFLogitsProcessor"),g_=a(" to subsequently process a "),yl=o("code"),h_=a("scores"),u_=a(` input tensor.
This class inherits from list and adds a specific `),kl=o("em"),xl=o("strong"),__=a("call"),b_=a(" method to apply each "),ea=o("a"),v_=a("TFLogitsProcessor"),$_=a(` to the
inputs.`),T_=c(),ra=o("div"),f(fo.$$.fragment),$p=c(),me=o("div"),f(go.$$.fragment),y_=c(),wl=o("p"),k_=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),x_=c(),qr=o("div"),f(ho.$$.fragment),w_=c(),Ll=o("p"),L_=a("TF method for warping logits."),Tp=c(),fe=o("div"),f(uo.$$.fragment),E_=c(),ta=o("p"),oa=o("a"),P_=a("TFLogitsWarper"),F_=a(" for temperature (exponential scaling output probability distribution)."),D_=c(),na=o("div"),f(_o.$$.fragment),yp=c(),ge=o("div"),f(bo.$$.fragment),S_=c(),sa=o("p"),aa=o("a"),z_=a("TFLogitsWarper"),O_=a(" that performs top-p, i.e. restricting to top tokens summing to <= prob_cut_off."),q_=c(),ia=o("div"),f(vo.$$.fragment),kp=c(),he=o("div"),f($o.$$.fragment),B_=c(),ca=o("p"),la=o("a"),I_=a("TFLogitsWarper"),A_=a(" that performs top-k, i.e. restricting to the k highest probability elements."),C_=c(),da=o("div"),f(To.$$.fragment),xp=c(),ue=o("div"),f(yo.$$.fragment),W_=c(),pa=o("p"),ma=o("a"),N_=a("TFLogitsProcessor"),V_=a(" enforcing a min-length by setting EOS probability to 0."),M_=c(),fa=o("div"),f(ko.$$.fragment),wp=c(),_e=o("div"),f(xo.$$.fragment),G_=c(),ga=o("p"),ha=o("a"),j_=a("TFLogitsProcessor"),H_=a(" that enforces that specified sequences will never be sampled."),R_=c(),ua=o("div"),f(wo.$$.fragment),Lp=c(),be=o("div"),f(Lo.$$.fragment),K_=c(),Br=o("p"),_a=o("a"),U_=a("TFLogitsProcessor"),Y_=a(` that enforces no repetition of n-grams. See
`),Eo=o("a"),X_=a("Fairseq"),J_=a("."),Q_=c(),ba=o("div"),f(Po.$$.fragment),Ep=c(),ve=o("div"),f(Fo.$$.fragment),Z_=c(),va=o("p"),$a=o("a"),eb=a("TFLogitsProcessor"),rb=a(" enforcing an exponential penalty on repeated sequences."),tb=c(),Ta=o("div"),f(Do.$$.fragment),Pp=c(),$e=o("div"),f(So.$$.fragment),ob=c(),ya=o("p"),ka=o("a"),nb=a("TFLogitsProcessor"),sb=a(" that enforces the specified token as the first generated token."),ab=c(),xa=o("div"),f(zo.$$.fragment),Fp=c(),Te=o("div"),f(Oo.$$.fragment),ib=c(),Ir=o("p"),wa=o("a"),cb=a("TFLogitsProcessor"),lb=a(" that enforces the specified token as the last generated token when "),El=o("code"),db=a("max_length"),pb=a(" is reached."),mb=c(),La=o("div"),f(qo.$$.fragment),Dp=c(),ye=o("div"),f(Bo.$$.fragment),fb=c(),Pl=o("p"),gb=a("Abstract base class for all logit processors that can be applied during generation."),hb=c(),Ar=o("div"),f(Io.$$.fragment),ub=c(),Fl=o("p"),_b=a("Flax method for processing logits."),Sp=c(),ke=o("div"),f(Ao.$$.fragment),bb=c(),P=o("p"),vb=a("This class can be used to create a list of "),Ea=o("a"),$b=a("FlaxLogitsProcessor"),Tb=a(" or "),Pa=o("a"),yb=a("FlaxLogitsWarper"),kb=a(` to subsequently process
a `),Dl=o("code"),xb=a("scores"),wb=a(" input tensor. This class inherits from list and adds a specific "),Sl=o("em"),zl=o("strong"),Lb=a("call"),Eb=a(` method to apply each
`),Fa=o("a"),Pb=a("FlaxLogitsProcessor"),Fb=a(" or "),Da=o("a"),Db=a("FlaxLogitsWarper"),Sb=a(" to the inputs."),zb=c(),Sa=o("div"),f(Co.$$.fragment),zp=c(),xe=o("div"),f(Wo.$$.fragment),Ob=c(),Ol=o("p"),qb=a("Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),Bb=c(),Cr=o("div"),f(No.$$.fragment),Ib=c(),ql=o("p"),Ab=a("Flax method for warping logits."),Op=c(),we=o("div"),f(Vo.$$.fragment),Cb=c(),za=o("p"),Oa=o("a"),Wb=a("FlaxLogitsWarper"),Nb=a(" for temperature (exponential scaling output probability distribution)."),Vb=c(),qa=o("div"),f(Mo.$$.fragment),qp=c(),Le=o("div"),f(Go.$$.fragment),Mb=c(),Ba=o("p"),Ia=o("a"),Gb=a("FlaxLogitsWarper"),jb=a(" that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),Hb=c(),Aa=o("div"),f(jo.$$.fragment),Bp=c(),Ee=o("div"),f(Ho.$$.fragment),Rb=c(),Ca=o("p"),Wa=o("a"),Kb=a("FlaxLogitsWarper"),Ub=a(" that performs top-k, i.e. restricting to the k highest probability elements."),Yb=c(),Na=o("div"),f(Ro.$$.fragment),Ip=c(),Pe=o("div"),f(Ko.$$.fragment),Xb=c(),Va=o("p"),Ma=o("a"),Jb=a("FlaxLogitsProcessor"),Qb=a(" that enforces the specified token as the first generated token."),Zb=c(),Ga=o("div"),f(Uo.$$.fragment),Ap=c(),Fe=o("div"),f(Yo.$$.fragment),ev=c(),Wr=o("p"),ja=o("a"),rv=a("FlaxLogitsProcessor"),tv=a(" that enforces the specified token as the last generated token when "),Bl=o("code"),ov=a("max_length"),nv=a(" is reached."),sv=c(),Ha=o("div"),f(Xo.$$.fragment),Cp=c(),De=o("div"),f(Jo.$$.fragment),av=c(),Ra=o("p"),Ka=o("a"),iv=a("FlaxLogitsProcessor"),cv=a(" enforcing a min-length by setting EOS probability to 0."),lv=c(),Ua=o("div"),f(Qo.$$.fragment),Wp=c(),ir=o("h2"),Nr=o("a"),Il=o("span"),f(Zo.$$.fragment),dv=c(),Al=o("span"),pv=a("StoppingCriteria"),Np=c(),Vr=o("p"),mv=a("A "),Ya=o("a"),fv=a("StoppingCriteria"),gv=a(" can be used to change when to stop generation (other than EOS token)."),Vp=c(),Se=o("div"),f(en.$$.fragment),hv=c(),Cl=o("p"),uv=a("Abstract base class for all stopping criteria that can be applied during generation."),_v=c(),Xa=o("div"),f(rn.$$.fragment),Mp=c(),cr=o("div"),f(tn.$$.fragment),bv=c(),Ja=o("div"),f(on.$$.fragment),Gp=c(),ze=o("div"),f(nn.$$.fragment),vv=c(),sn=o("p"),$v=a("This class can be used to stop generation whenever the full generated number of tokens exceeds "),Wl=o("code"),Tv=a("max_length"),yv=a(`. Keep
in mind for decoder-only type of transformers, this will include the initial prompted tokens.`),kv=c(),Qa=o("div"),f(an.$$.fragment),jp=c(),Oe=o("div"),f(cn.$$.fragment),xv=c(),ln=o("p"),wv=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
`),Nl=o("code"),Lv=a("initial_time"),Ev=a("."),Pv=c(),Za=o("div"),f(dn.$$.fragment),Hp=c(),lr=o("h2"),Mr=o("a"),Vl=o("span"),f(pn.$$.fragment),Fv=c(),Ml=o("span"),Dv=a("Constraints"),Rp=c(),Gr=o("p"),Sv=a("A "),ei=o("a"),zv=a("Constraint"),Ov=a(" can be used to force the generation to include specific tokens or sequences in the output."),Kp=c(),$=o("div"),f(mn.$$.fragment),qv=c(),Gl=o("p"),Bv=a(`Abstract base class for all constraints that can be applied during generation.
It must define how the constraint can be satisfied.`),Iv=c(),jl=o("p"),Av=a("All classes that inherit Constraint must follow the requirement that"),Cv=c(),f(jr.$$.fragment),Wv=c(),Hl=o("p"),Nv=a("will always terminate (halt)."),Vv=c(),Hr=o("div"),f(fn.$$.fragment),Mv=c(),Rl=o("p"),Gv=a("When called, returns the token that would take this constraint one step closer to being fulfilled."),jv=c(),Rr=o("div"),f(gn.$$.fragment),Hv=c(),Kl=o("p"),Rv=a("Creates a new instance of this constraint."),Kv=c(),Kr=o("div"),f(hn.$$.fragment),Uv=c(),Ul=o("p"),Yv=a("Reads in a token and returns whether it creates progress."),Xv=c(),Ur=o("div"),f(un.$$.fragment),Jv=c(),_n=o("p"),Qv=a("Returns the number of remaining steps of "),Yl=o("code"),Zv=a("advance()"),e1=a(" in order to complete this constraint."),r1=c(),Yr=o("div"),f(bn.$$.fragment),t1=c(),Xl=o("p"),o1=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.`),n1=c(),Xr=o("div"),f(vn.$$.fragment),s1=c(),Jl=o("p"),a1=a("Tests whether this constraint has been properly defined."),i1=c(),Ve=o("div"),f($n.$$.fragment),c1=c(),Tn=o("p"),l1=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 `),Ql=o("code"),d1=a("does_advance(self, token_id: int)"),p1=a("."),m1=c(),Zl=o("p"),f1=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)`),Up=c(),dr=o("div"),f(yn.$$.fragment),g1=c(),ri=o("p"),ti=o("a"),h1=a("Constraint"),u1=a(" enforcing that an ordered sequence of tokens is included in the output."),Yp=c(),pr=o("div"),f(kn.$$.fragment),_1=c(),xn=o("p"),b1=a("A special "),oi=o("a"),v1=a("Constraint"),$1=a(" that is fulfilled by fulfilling just one of several constraints."),Xp=c(),C=o("div"),f(wn.$$.fragment),T1=c(),ed=o("p"),y1=a("A class for beam scorers to track its progress through a list of constraints."),k1=c(),D=o("div"),f(Ln.$$.fragment),x1=c(),rd=o("p"),w1=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.`),L1=c(),mr=o("p"),E1=a("Given constraints "),td=o("code"),P1=a("c_i = {t_ij | j == # of tokens}"),F1=a(`, If we\u2019re not in the middle of progressing through a
specific constraint `),od=o("code"),D1=a("c_i"),S1=a(", we return:"),z1=c(),nd=o("p"),sd=o("code"),O1=a("[t_k1 for k in indices of unfulfilled constraints]"),q1=c(),qe=o("p"),B1=a(`If we are in the middle of a constraint, then we return:
`),ad=o("code"),I1=a("[t_ij]"),A1=a(", where "),id=o("code"),C1=a("i"),W1=a(" is the index of the inprogress constraint, "),cd=o("code"),N1=a("j"),V1=a(" is the next step for the constraint."),M1=c(),ld=o("p"),G1=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.`),j1=c(),Jr=o("div"),f(En.$$.fragment),H1=c(),dd=o("p"),R1=a("token_ids: the tokens generated thus far to reset the state of the progress through constraints."),Jp=c(),fr=o("h2"),Qr=o("a"),pd=o("span"),f(Pn.$$.fragment),K1=c(),md=o("span"),U1=a("BeamSearch"),Qp=c(),W=o("div"),f(Fn.$$.fragment),Y1=c(),gr=o("p"),X1=a("Abstract base class for all beam scorers that are used for "),ni=o("a"),J1=a("beam_search()"),Q1=a(` and
`),si=o("a"),Z1=a("beam_sample()"),e$=a("."),r$=c(),ai=o("div"),f(Dn.$$.fragment),t$=c(),ii=o("div"),f(Sn.$$.fragment),Zp=c(),F=o("div"),f(zn.$$.fragment),o$=c(),ci=o("p"),li=o("a"),n$=a("BeamScorer"),s$=a(" implementing standard beam search decoding."),a$=c(),On=o("p"),i$=a("Adapted in part from "),qn=o("a"),c$=a(`Facebook\u2019s XLM beam search
code`),l$=a("."),d$=c(),di=o("p"),p$=a("Reference for the diverse beam search algorithm and implementation "),Bn=o("a"),m$=a(`Ashwin Kalyan\u2019s DBS
implementation`),f$=c(),pi=o("div"),f(In.$$.fragment),g$=c(),mi=o("div"),f(An.$$.fragment),em=c(),N=o("div"),f(Cn.$$.fragment),h$=c(),fi=o("p"),gi=o("a"),u$=a("BeamScorer"),_$=a(" implementing constrained beam search decoding."),b$=c(),hi=o("div"),f(Wn.$$.fragment),v$=c(),ui=o("div"),f(Nn.$$.fragment),rm=c(),hr=o("h2"),Zr=o("a"),fd=o("span"),f(Vn.$$.fragment),$$=c(),gd=o("span"),T$=a("Utilities"),tm=c(),Be=o("div"),f(Mn.$$.fragment),y$=c(),hd=o("p"),k$=a("Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),x$=c(),_i=o("p"),w$=a("From: "),Gn=o("a"),L$=a("https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),om=c(),Ie=o("div"),f(jn.$$.fragment),E$=c(),ud=o("p"),P$=a("Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),F$=c(),bi=o("p"),D$=a("From: "),Hn=o("a"),S$=a("https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),this.h()},l(e){const p=Sk('[data-svelte="svelte-1phssyn"]',document.head);L=n(p,"META",{name:!0,content:!0}),p.forEach(t),Re=l(e),k=n(e,"H1",{class:!0});var Rn=s(k);Ce=n(Rn,"A",{id:!0,class:!0,href:!0});var cT=s(Ce);fc=n(cT,"SPAN",{});var lT=s(fc);g(at.$$.fragment,lT),lT.forEach(t),cT.forEach(t),Jm=l(Rn),gc=n(Rn,"SPAN",{});var dT=s(gc);Qm=i(dT,"Utilities for Generation"),dT.forEach(t),Rn.forEach(t),wd=l(e),y=n(e,"P",{});var w=s(y);Zm=i(w,"This page lists all the utility functions used by "),Un=n(w,"A",{href:!0});var pT=s(Un);ef=i(pT,"generate()"),pT.forEach(t),rf=i(w,`,
`),Yn=n(w,"A",{href:!0});var mT=s(Yn);tf=i(mT,"greedy_search()"),mT.forEach(t),of=i(w,`,
`),Xn=n(w,"A",{href:!0});var fT=s(Xn);nf=i(fT,"contrastive_search()"),fT.forEach(t),sf=i(w,`,
`),Jn=n(w,"A",{href:!0});var gT=s(Jn);af=i(gT,"sample()"),gT.forEach(t),cf=i(w,`,
`),Qn=n(w,"A",{href:!0});var hT=s(Qn);lf=i(hT,"beam_search()"),hT.forEach(t),df=i(w,`,
`),Zn=n(w,"A",{href:!0});var uT=s(Zn);pf=i(uT,"beam_sample()"),uT.forEach(t),mf=i(w,`,
`),es=n(w,"A",{href:!0});var _T=s(es);ff=i(_T,"group_beam_search()"),_T.forEach(t),gf=i(w,`, and
`),rs=n(w,"A",{href:!0});var bT=s(rs);hf=i(bT,"constrained_beam_search()"),bT.forEach(t),uf=i(w,"."),w.forEach(t),Ld=l(e),ts=n(e,"P",{});var vT=s(ts);_f=i(vT,"Most of those are only useful if you are studying the code of the generate methods in the library."),vT.forEach(t),Ed=l(e),Ke=n(e,"H2",{class:!0});var sm=s(Ke);_r=n(sm,"A",{id:!0,class:!0,href:!0});var $T=s(_r);hc=n($T,"SPAN",{});var TT=s(hc);g(it.$$.fragment,TT),TT.forEach(t),$T.forEach(t),bf=l(sm),uc=n(sm,"SPAN",{});var yT=s(uc);vf=i(yT,"Generate Outputs"),yT.forEach(t),sm.forEach(t),Pd=l(e),V=n(e,"P",{});var et=s(V);$f=i(et,"The output of "),os=n(et,"A",{href:!0});var kT=s(os);Tf=i(kT,"generate()"),kT.forEach(t),yf=i(et,` is an instance of a subclass of
`),ns=n(et,"A",{href:!0});var xT=s(ns);kf=i(xT,"ModelOutput"),xT.forEach(t),xf=i(et,`. This output is a data structure containing all the information returned
by `),ss=n(et,"A",{href:!0});var wT=s(ss);wf=i(wT,"generate()"),wT.forEach(t),Lf=i(et,", but that can also be used as tuple or dictionary."),et.forEach(t),Fd=l(e),as=n(e,"P",{});var LT=s(as);Ef=i(LT,"Here\u2019s an example:"),LT.forEach(t),Dd=l(e),g(ct.$$.fragment,e),Sd=l(e),We=n(e,"P",{});var vi=s(We);Pf=i(vi,"The "),_c=n(vi,"CODE",{});var ET=s(_c);Ff=i(ET,"generation_output"),ET.forEach(t),Df=i(vi," object is a "),is=n(vi,"A",{href:!0});var PT=s(is);Sf=i(PT,"GreedySearchDecoderOnlyOutput"),PT.forEach(t),zf=i(vi,`, as we can
see in the documentation of that class below, it means it has the following attributes:`),vi.forEach(t),zd=l(e),M=n(e,"UL",{});var rt=s(M);cs=n(rt,"LI",{});var z$=s(cs);bc=n(z$,"CODE",{});var FT=s(bc);Of=i(FT,"sequences"),FT.forEach(t),qf=i(z$,": the generated sequences of tokens"),z$.forEach(t),Bf=l(rt),ls=n(rt,"LI",{});var O$=s(ls);vc=n(O$,"CODE",{});var DT=s(vc);If=i(DT,"scores"),DT.forEach(t),Af=i(O$," (optional): the prediction scores of the language modelling head, for each generation step"),O$.forEach(t),Cf=l(rt),ds=n(rt,"LI",{});var q$=s(ds);$c=n(q$,"CODE",{});var ST=s($c);Wf=i(ST,"hidden_states"),ST.forEach(t),Nf=i(q$," (optional): the hidden states of the model, for each generation step"),q$.forEach(t),Vf=l(rt),ps=n(rt,"LI",{});var B$=s(ps);Tc=n(B$,"CODE",{});var zT=s(Tc);Mf=i(zT,"attentions"),zT.forEach(t),Gf=i(B$," (optional): the attention weights of the model, for each generation step"),B$.forEach(t),rt.forEach(t),Od=l(e),x=n(e,"P",{});var q=s(x);jf=i(q,"Here we have the "),yc=n(q,"CODE",{});var OT=s(yc);Hf=i(OT,"scores"),OT.forEach(t),Rf=i(q," since we passed along "),kc=n(q,"CODE",{});var qT=s(kc);Kf=i(qT,"output_scores=True"),qT.forEach(t),Uf=i(q,", but we don\u2019t have "),xc=n(q,"CODE",{});var BT=s(xc);Yf=i(BT,"hidden_states"),BT.forEach(t),Xf=i(q,` and
`),wc=n(q,"CODE",{});var IT=s(wc);Jf=i(IT,"attentions"),IT.forEach(t),Qf=i(q," because we didn\u2019t pass "),Lc=n(q,"CODE",{});var AT=s(Lc);Zf=i(AT,"output_hidden_states=True"),AT.forEach(t),eg=i(q," or "),Ec=n(q,"CODE",{});var CT=s(Ec);rg=i(CT,"output_attentions=True"),CT.forEach(t),tg=i(q,"."),q.forEach(t),qd=l(e),S=n(e,"P",{});var Me=s(S);og=i(Me,`You can access each attribute as you would usually do, and if that attribute has not been returned by the model, you
will get `),Pc=n(Me,"CODE",{});var WT=s(Pc);ng=i(WT,"None"),WT.forEach(t),sg=i(Me,". Here for instance "),Fc=n(Me,"CODE",{});var NT=s(Fc);ag=i(NT,"generation_output.scores"),NT.forEach(t),ig=i(Me,` are all the generated prediction scores of the
language modeling head, and `),Dc=n(Me,"CODE",{});var VT=s(Dc);cg=i(VT,"generation_output.attentions"),VT.forEach(t),lg=i(Me," is "),Sc=n(Me,"CODE",{});var MT=s(Sc);dg=i(MT,"None"),MT.forEach(t),pg=i(Me,"."),Me.forEach(t),Bd=l(e),z=n(e,"P",{});var Ge=s(z);mg=i(Ge,"When using our "),zc=n(Ge,"CODE",{});var GT=s(zc);fg=i(GT,"generation_output"),GT.forEach(t),gg=i(Ge," object as a tuple, it only keeps the attributes that don\u2019t have "),Oc=n(Ge,"CODE",{});var jT=s(Oc);hg=i(jT,"None"),jT.forEach(t),ug=i(Ge,` values.
Here, for instance, it has two elements, `),qc=n(Ge,"CODE",{});var HT=s(qc);_g=i(HT,"loss"),HT.forEach(t),bg=i(Ge," then "),Bc=n(Ge,"CODE",{});var RT=s(Bc);vg=i(RT,"logits"),RT.forEach(t),$g=i(Ge,", so"),Ge.forEach(t),Id=l(e),g(lt.$$.fragment,e),Ad=l(e),br=n(e,"P",{});var am=s(br);Tg=i(am,"will return the tuple "),Ic=n(am,"CODE",{});var KT=s(Ic);yg=i(KT,"(generation_output.sequences, generation_output.scores)"),KT.forEach(t),kg=i(am," for instance."),am.forEach(t),Cd=l(e),O=n(e,"P",{});var je=s(O);xg=i(je,"When using our "),Ac=n(je,"CODE",{});var UT=s(Ac);wg=i(UT,"generation_output"),UT.forEach(t),Lg=i(je," object as a dictionary, it only keeps the attributes that don\u2019t have "),Cc=n(je,"CODE",{});var YT=s(Cc);Eg=i(YT,"None"),YT.forEach(t),Pg=i(je,`
values. Here, for instance, it has two keys that are `),Wc=n(je,"CODE",{});var XT=s(Wc);Fg=i(XT,"sequences"),XT.forEach(t),Dg=i(je," and "),Nc=n(je,"CODE",{});var JT=s(Nc);Sg=i(JT,"scores"),JT.forEach(t),zg=i(je,"."),je.forEach(t),Wd=l(e),ms=n(e,"P",{});var QT=s(ms);Og=i(QT,"We document here all output types."),QT.forEach(t),Nd=l(e),Ue=n(e,"H3",{class:!0});var im=s(Ue);vr=n(im,"A",{id:!0,class:!0,href:!0});var ZT=s(vr);Vc=n(ZT,"SPAN",{});var e2=s(Vc);g(dt.$$.fragment,e2),e2.forEach(t),ZT.forEach(t),qg=l(im),Mc=n(im,"SPAN",{});var r2=s(Mc);Bg=i(r2,"GreedySearchOutput"),r2.forEach(t),im.forEach(t),Vd=l(e),Ye=n(e,"DIV",{class:!0});var cm=s(Ye);g(pt.$$.fragment,cm),Ig=l(cm),Gc=n(cm,"P",{});var t2=s(Gc);Ag=i(t2,"Base class for outputs of decoder-only generation models using greedy search."),t2.forEach(t),cm.forEach(t),Md=l(e),Xe=n(e,"DIV",{class:!0});var lm=s(Xe);g(mt.$$.fragment,lm),Cg=l(lm),jc=n(lm,"P",{});var o2=s(jc);Wg=i(o2,`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)`),o2.forEach(t),lm.forEach(t),Gd=l(e),R=n(e,"DIV",{class:!0});var $i=s(R);g(ft.$$.fragment,$i),Ng=l($i),Hc=n($i,"P",{});var n2=s(Hc);Vg=i(n2,"Flax Base class for outputs of decoder-only generation models using greedy search."),n2.forEach(t),Mg=l($i),$r=n($i,"DIV",{class:!0});var dm=s($r);g(gt.$$.fragment,dm),Gg=l(dm),Rc=n(dm,"P",{});var s2=s(Rc);jg=i(s2,"\u201CReturns a new object replacing the specified fields with new values."),s2.forEach(t),dm.forEach(t),$i.forEach(t),jd=l(e),Je=n(e,"H3",{class:!0});var pm=s(Je);Tr=n(pm,"A",{id:!0,class:!0,href:!0});var a2=s(Tr);Kc=n(a2,"SPAN",{});var i2=s(Kc);g(ht.$$.fragment,i2),i2.forEach(t),a2.forEach(t),Hg=l(pm),Uc=n(pm,"SPAN",{});var c2=s(Uc);Rg=i(c2,"SampleOutput"),c2.forEach(t),pm.forEach(t),Hd=l(e),Qe=n(e,"DIV",{class:!0});var mm=s(Qe);g(ut.$$.fragment,mm),Kg=l(mm),Yc=n(mm,"P",{});var l2=s(Yc);Ug=i(l2,"Base class for outputs of decoder-only generation models using sampling."),l2.forEach(t),mm.forEach(t),Rd=l(e),Ze=n(e,"DIV",{class:!0});var fm=s(Ze);g(_t.$$.fragment,fm),Yg=l(fm),Xc=n(fm,"P",{});var d2=s(Xc);Xg=i(d2,`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)`),d2.forEach(t),fm.forEach(t),Kd=l(e),K=n(e,"DIV",{class:!0});var Ti=s(K);g(bt.$$.fragment,Ti),Jg=l(Ti),Jc=n(Ti,"P",{});var p2=s(Jc);Qg=i(p2,"Flax Base class for outputs of decoder-only generation models using sampling."),p2.forEach(t),Zg=l(Ti),yr=n(Ti,"DIV",{class:!0});var gm=s(yr);g(vt.$$.fragment,gm),eh=l(gm),Qc=n(gm,"P",{});var m2=s(Qc);rh=i(m2,"\u201CReturns a new object replacing the specified fields with new values."),m2.forEach(t),gm.forEach(t),Ti.forEach(t),Ud=l(e),er=n(e,"H3",{class:!0});var hm=s(er);kr=n(hm,"A",{id:!0,class:!0,href:!0});var f2=s(kr);Zc=n(f2,"SPAN",{});var g2=s(Zc);g($t.$$.fragment,g2),g2.forEach(t),f2.forEach(t),th=l(hm),el=n(hm,"SPAN",{});var h2=s(el);oh=i(h2,"BeamSearchOutput"),h2.forEach(t),hm.forEach(t),Yd=l(e),rr=n(e,"DIV",{class:!0});var um=s(rr);g(Tt.$$.fragment,um),nh=l(um),rl=n(um,"P",{});var u2=s(rl);sh=i(u2,"Base class for outputs of decoder-only generation models using beam search."),u2.forEach(t),um.forEach(t),Xd=l(e),tr=n(e,"DIV",{class:!0});var _m=s(tr);g(yt.$$.fragment,_m),ah=l(_m),tl=n(_m,"P",{});var _2=s(tl);ih=i(_2,`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)`),_2.forEach(t),_m.forEach(t),Jd=l(e),or=n(e,"H3",{class:!0});var bm=s(or);xr=n(bm,"A",{id:!0,class:!0,href:!0});var b2=s(xr);ol=n(b2,"SPAN",{});var v2=s(ol);g(kt.$$.fragment,v2),v2.forEach(t),b2.forEach(t),ch=l(bm),nl=n(bm,"SPAN",{});var $2=s(nl);lh=i($2,"BeamSampleOutput"),$2.forEach(t),bm.forEach(t),Qd=l(e),nr=n(e,"DIV",{class:!0});var vm=s(nr);g(xt.$$.fragment,vm),dh=l(vm),sl=n(vm,"P",{});var T2=s(sl);ph=i(T2,"Base class for outputs of decoder-only generation models using beam sample."),T2.forEach(t),vm.forEach(t),Zd=l(e),sr=n(e,"DIV",{class:!0});var $m=s(sr);g(wt.$$.fragment,$m),mh=l($m),al=n($m,"P",{});var y2=s(al);fh=i(y2,`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)`),y2.forEach(t),$m.forEach(t),ep=l(e),ar=n(e,"H2",{class:!0});var Tm=s(ar);wr=n(Tm,"A",{id:!0,class:!0,href:!0});var k2=s(wr);il=n(k2,"SPAN",{});var x2=s(il);g(Lt.$$.fragment,x2),x2.forEach(t),k2.forEach(t),gh=l(Tm),cl=n(Tm,"SPAN",{});var w2=s(cl);hh=i(w2,"LogitsProcessor"),w2.forEach(t),Tm.forEach(t),rp=l(e),Lr=n(e,"P",{});var ym=s(Lr);uh=i(ym,"A "),fs=n(ym,"A",{href:!0});var L2=s(fs);_h=i(L2,"LogitsProcessor"),L2.forEach(t),bh=i(ym,` can be used to modify the prediction scores of a language model head for
generation.`),ym.forEach(t),tp=l(e),U=n(e,"DIV",{class:!0});var yi=s(U);g(Et.$$.fragment,yi),vh=l(yi),ll=n(yi,"P",{});var E2=s(ll);$h=i(E2,"Abstract base class for all logit processors that can be applied during generation."),E2.forEach(t),Th=l(yi),Er=n(yi,"DIV",{class:!0});var km=s(Er);g(Pt.$$.fragment,km),yh=l(km),dl=n(km,"P",{});var P2=s(dl);kh=i(P2,"Torch method for processing logits."),P2.forEach(t),km.forEach(t),yi.forEach(t),op=l(e),Y=n(e,"DIV",{class:!0});var ki=s(Y);g(Ft.$$.fragment,ki),xh=l(ki),E=n(ki,"P",{});var B=s(E);wh=i(B,"This class can be used to create a list of "),gs=n(B,"A",{href:!0});var F2=s(gs);Lh=i(F2,"LogitsProcessor"),F2.forEach(t),Eh=i(B," or "),hs=n(B,"A",{href:!0});var D2=s(hs);Ph=i(D2,"LogitsWarper"),D2.forEach(t),Fh=i(B,` to subsequently process a
`),pl=n(B,"CODE",{});var S2=s(pl);Dh=i(S2,"scores"),S2.forEach(t),Sh=i(B," input tensor. This class inherits from list and adds a specific "),ml=n(B,"EM",{});var z2=s(ml);fl=n(z2,"STRONG",{});var O2=s(fl);zh=i(O2,"call"),O2.forEach(t),z2.forEach(t),Oh=i(B,` method to apply each
`),us=n(B,"A",{href:!0});var q2=s(us);qh=i(q2,"LogitsProcessor"),q2.forEach(t),Bh=i(B," or "),_s=n(B,"A",{href:!0});var B2=s(_s);Ih=i(B2,"LogitsWarper"),B2.forEach(t),Ah=i(B," to the inputs."),B.forEach(t),Ch=l(ki),bs=n(ki,"DIV",{class:!0});var I2=s(bs);g(Dt.$$.fragment,I2),I2.forEach(t),ki.forEach(t),np=l(e),X=n(e,"DIV",{class:!0});var xi=s(X);g(St.$$.fragment,xi),Wh=l(xi),gl=n(xi,"P",{});var A2=s(gl);Nh=i(A2,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),A2.forEach(t),Vh=l(xi),Pr=n(xi,"DIV",{class:!0});var xm=s(Pr);g(zt.$$.fragment,xm),Mh=l(xm),hl=n(xm,"P",{});var C2=s(hl);Gh=i(C2,"Torch method for warping logits."),C2.forEach(t),xm.forEach(t),xi.forEach(t),sp=l(e),J=n(e,"DIV",{class:!0});var wi=s(J);g(Ot.$$.fragment,wi),jh=l(wi),vs=n(wi,"P",{});var I$=s(vs);$s=n(I$,"A",{href:!0});var W2=s($s);Hh=i(W2,"LogitsProcessor"),W2.forEach(t),Rh=i(I$," enforcing a min-length by setting EOS probability to 0."),I$.forEach(t),Kh=l(wi),Ts=n(wi,"DIV",{class:!0});var N2=s(Ts);g(qt.$$.fragment,N2),N2.forEach(t),wi.forEach(t),ap=l(e),Q=n(e,"DIV",{class:!0});var Li=s(Q);g(Bt.$$.fragment,Li),Uh=l(Li),ys=n(Li,"P",{});var A$=s(ys);ks=n(A$,"A",{href:!0});var V2=s(ks);Yh=i(V2,"LogitsWarper"),V2.forEach(t),Xh=i(A$," for temperature (exponential scaling output probability distribution)."),A$.forEach(t),Jh=l(Li),xs=n(Li,"DIV",{class:!0});var M2=s(xs);g(It.$$.fragment,M2),M2.forEach(t),Li.forEach(t),ip=l(e),Z=n(e,"DIV",{class:!0});var Ei=s(Z);g(At.$$.fragment,Ei),Qh=l(Ei),ws=n(Ei,"P",{});var C$=s(ws);Ls=n(C$,"A",{href:!0});var G2=s(Ls);Zh=i(G2,"LogitsProcessor"),G2.forEach(t),eu=i(C$," enforcing an exponential penalty on repeated sequences."),C$.forEach(t),ru=l(Ei),Es=n(Ei,"DIV",{class:!0});var j2=s(Es);g(Ct.$$.fragment,j2),j2.forEach(t),Ei.forEach(t),cp=l(e),ee=n(e,"DIV",{class:!0});var Pi=s(ee);g(Wt.$$.fragment,Pi),tu=l(Pi),Ps=n(Pi,"P",{});var W$=s(Ps);Fs=n(W$,"A",{href:!0});var H2=s(Fs);ou=i(H2,"LogitsWarper"),H2.forEach(t),nu=i(W$," that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),W$.forEach(t),su=l(Pi),Ds=n(Pi,"DIV",{class:!0});var R2=s(Ds);g(Nt.$$.fragment,R2),R2.forEach(t),Pi.forEach(t),lp=l(e),re=n(e,"DIV",{class:!0});var Fi=s(re);g(Vt.$$.fragment,Fi),au=l(Fi),Ss=n(Fi,"P",{});var N$=s(Ss);zs=n(N$,"A",{href:!0});var K2=s(zs);iu=i(K2,"LogitsWarper"),K2.forEach(t),cu=i(N$," that performs top-k, i.e. restricting to the k highest probability elements."),N$.forEach(t),lu=l(Fi),Os=n(Fi,"DIV",{class:!0});var U2=s(Os);g(Mt.$$.fragment,U2),U2.forEach(t),Fi.forEach(t),dp=l(e),te=n(e,"DIV",{class:!0});var Di=s(te);g(Gt.$$.fragment,Di),du=l(Di),Fr=n(Di,"P",{});var _d=s(Fr);qs=n(_d,"A",{href:!0});var Y2=s(qs);pu=i(Y2,"LogitsWarper"),Y2.forEach(t),mu=i(_d," that performs typical decoding. See "),jt=n(_d,"A",{href:!0,rel:!0});var X2=s(jt);fu=i(X2,`Typical Decoding for Natural Language
Generation`),X2.forEach(t),gu=i(_d," for more information."),_d.forEach(t),hu=l(Di),Bs=n(Di,"DIV",{class:!0});var J2=s(Bs);g(Ht.$$.fragment,J2),J2.forEach(t),Di.forEach(t),pp=l(e),oe=n(e,"DIV",{class:!0});var Si=s(oe);g(Rt.$$.fragment,Si),uu=l(Si),Dr=n(Si,"P",{});var bd=s(Dr);Is=n(bd,"A",{href:!0});var Q2=s(Is);_u=i(Q2,"LogitsProcessor"),Q2.forEach(t),bu=i(bd,` that enforces no repetition of n-grams. See
`),Kt=n(bd,"A",{href:!0,rel:!0});var Z2=s(Kt);vu=i(Z2,"Fairseq"),Z2.forEach(t),$u=i(bd,"."),bd.forEach(t),Tu=l(Si),As=n(Si,"DIV",{class:!0});var ey=s(As);g(Ut.$$.fragment,ey),ey.forEach(t),Si.forEach(t),mp=l(e),ne=n(e,"DIV",{class:!0});var zi=s(ne);g(Yt.$$.fragment,zi),yu=l(zi),Cs=n(zi,"P",{});var V$=s(Cs);Ws=n(V$,"A",{href:!0});var ry=s(Ws);ku=i(ry,"LogitsProcessor"),ry.forEach(t),xu=i(V$," that enforces that specified sequences will never be sampled."),V$.forEach(t),wu=l(zi),Ns=n(zi,"DIV",{class:!0});var ty=s(Ns);g(Xt.$$.fragment,ty),ty.forEach(t),zi.forEach(t),fp=l(e),se=n(e,"DIV",{class:!0});var Oi=s(se);g(Jt.$$.fragment,Oi),Lu=l(Oi),Sr=n(Oi,"P",{});var vd=s(Sr);Vs=n(vd,"A",{href:!0});var oy=s(Vs);Eu=i(oy,"LogitsProcessor"),oy.forEach(t),Pu=i(vd,` that enforces constrained generation and is useful for prefix-conditioned constrained
generation. See `),Qt=n(vd,"A",{href:!0,rel:!0});var ny=s(Qt);Fu=i(ny,"Autoregressive Entity Retrieval"),ny.forEach(t),Du=i(vd," for more information."),vd.forEach(t),Su=l(Oi),Ms=n(Oi,"DIV",{class:!0});var sy=s(Ms);g(Zt.$$.fragment,sy),sy.forEach(t),Oi.forEach(t),gp=l(e),ae=n(e,"DIV",{class:!0});var qi=s(ae);g(eo.$$.fragment,qi),zu=l(qi),Ne=n(qi,"P",{});var Kn=s(Ne);Gs=n(Kn,"A",{href:!0});var ay=s(Gs);Ou=i(ay,"LogitsProcessor"),ay.forEach(t),qu=i(Kn,` that enforces diverse beam search. Note that this logits processor is only effective for
`),js=n(Kn,"A",{href:!0});var iy=s(js);Bu=i(iy,"PreTrainedModel.group_beam_search()"),iy.forEach(t),Iu=i(Kn,". See "),ro=n(Kn,"A",{href:!0,rel:!0});var cy=s(ro);Au=i(cy,`Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence
Models`),cy.forEach(t),Cu=i(Kn," for more details."),Kn.forEach(t),Wu=l(qi),Hs=n(qi,"DIV",{class:!0});var ly=s(Hs);g(to.$$.fragment,ly),ly.forEach(t),qi.forEach(t),hp=l(e),ie=n(e,"DIV",{class:!0});var Bi=s(ie);g(oo.$$.fragment,Bi),Nu=l(Bi),Rs=n(Bi,"P",{});var M$=s(Rs);Ks=n(M$,"A",{href:!0});var dy=s(Ks);Vu=i(dy,"LogitsProcessor"),dy.forEach(t),Mu=i(M$," that enforces the specified token as the first generated token."),M$.forEach(t),Gu=l(Bi),Us=n(Bi,"DIV",{class:!0});var py=s(Us);g(no.$$.fragment,py),py.forEach(t),Bi.forEach(t),up=l(e),ce=n(e,"DIV",{class:!0});var Ii=s(ce);g(so.$$.fragment,Ii),ju=l(Ii),zr=n(Ii,"P",{});var $d=s(zr);Ys=n($d,"A",{href:!0});var my=s(Ys);Hu=i(my,"LogitsProcessor"),my.forEach(t),Ru=i($d," that enforces the specified token as the last generated token when "),ul=n($d,"CODE",{});var fy=s(ul);Ku=i(fy,"max_length"),fy.forEach(t),Uu=i($d," is reached."),$d.forEach(t),Yu=l(Ii),Xs=n(Ii,"DIV",{class:!0});var gy=s(Xs);g(ao.$$.fragment,gy),gy.forEach(t),Ii.forEach(t),_p=l(e),le=n(e,"DIV",{class:!0});var Ai=s(le);g(io.$$.fragment,Ai),Xu=l(Ai),G=n(Ai,"P",{});var ur=s(G);Js=n(ur,"A",{href:!0});var hy=s(Js);Ju=i(hy,"LogitsProcessor"),hy.forEach(t),Qu=i(ur," that removes all "),_l=n(ur,"CODE",{});var uy=s(_l);Zu=i(uy,"nan"),uy.forEach(t),e_=i(ur," and "),bl=n(ur,"CODE",{});var _y=s(bl);r_=i(_y,"inf"),_y.forEach(t),t_=i(ur,` 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. `),vl=n(ur,"CODE",{});var by=s(vl);o_=i(by,"max_length"),by.forEach(t),n_=i(ur,` is
reached.`),ur.forEach(t),s_=l(Ai),Qs=n(Ai,"DIV",{class:!0});var vy=s(Qs);g(co.$$.fragment,vy),vy.forEach(t),Ai.forEach(t),bp=l(e),de=n(e,"DIV",{class:!0});var Ci=s(de);g(lo.$$.fragment,Ci),a_=l(Ci),$l=n(Ci,"P",{});var $y=s($l);i_=i($y,"Abstract base class for all logit processors that can be applied during generation."),$y.forEach(t),c_=l(Ci),Or=n(Ci,"DIV",{class:!0});var wm=s(Or);g(po.$$.fragment,wm),l_=l(wm),Tl=n(wm,"P",{});var Ty=s(Tl);d_=i(Ty,"TF method for processing logits."),Ty.forEach(t),wm.forEach(t),Ci.forEach(t),vp=l(e),pe=n(e,"DIV",{class:!0});var Wi=s(pe);g(mo.$$.fragment,Wi),p_=l(Wi),A=n(Wi,"P",{});var He=s(A);m_=i(He,"This class can be used to create a list of "),Zs=n(He,"A",{href:!0});var yy=s(Zs);f_=i(yy,"TFLogitsProcessor"),yy.forEach(t),g_=i(He," to subsequently process a "),yl=n(He,"CODE",{});var ky=s(yl);h_=i(ky,"scores"),ky.forEach(t),u_=i(He,` input tensor.
This class inherits from list and adds a specific `),kl=n(He,"EM",{});var xy=s(kl);xl=n(xy,"STRONG",{});var wy=s(xl);__=i(wy,"call"),wy.forEach(t),xy.forEach(t),b_=i(He," method to apply each "),ea=n(He,"A",{href:!0});var Ly=s(ea);v_=i(Ly,"TFLogitsProcessor"),Ly.forEach(t),$_=i(He,` to the
inputs.`),He.forEach(t),T_=l(Wi),ra=n(Wi,"DIV",{class:!0});var Ey=s(ra);g(fo.$$.fragment,Ey),Ey.forEach(t),Wi.forEach(t),$p=l(e),me=n(e,"DIV",{class:!0});var Ni=s(me);g(go.$$.fragment,Ni),y_=l(Ni),wl=n(Ni,"P",{});var Py=s(wl);k_=i(Py,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),Py.forEach(t),x_=l(Ni),qr=n(Ni,"DIV",{class:!0});var Lm=s(qr);g(ho.$$.fragment,Lm),w_=l(Lm),Ll=n(Lm,"P",{});var Fy=s(Ll);L_=i(Fy,"TF method for warping logits."),Fy.forEach(t),Lm.forEach(t),Ni.forEach(t),Tp=l(e),fe=n(e,"DIV",{class:!0});var Vi=s(fe);g(uo.$$.fragment,Vi),E_=l(Vi),ta=n(Vi,"P",{});var G$=s(ta);oa=n(G$,"A",{href:!0});var Dy=s(oa);P_=i(Dy,"TFLogitsWarper"),Dy.forEach(t),F_=i(G$," for temperature (exponential scaling output probability distribution)."),G$.forEach(t),D_=l(Vi),na=n(Vi,"DIV",{class:!0});var Sy=s(na);g(_o.$$.fragment,Sy),Sy.forEach(t),Vi.forEach(t),yp=l(e),ge=n(e,"DIV",{class:!0});var Mi=s(ge);g(bo.$$.fragment,Mi),S_=l(Mi),sa=n(Mi,"P",{});var j$=s(sa);aa=n(j$,"A",{href:!0});var zy=s(aa);z_=i(zy,"TFLogitsWarper"),zy.forEach(t),O_=i(j$," that performs top-p, i.e. restricting to top tokens summing to <= prob_cut_off."),j$.forEach(t),q_=l(Mi),ia=n(Mi,"DIV",{class:!0});var Oy=s(ia);g(vo.$$.fragment,Oy),Oy.forEach(t),Mi.forEach(t),kp=l(e),he=n(e,"DIV",{class:!0});var Gi=s(he);g($o.$$.fragment,Gi),B_=l(Gi),ca=n(Gi,"P",{});var H$=s(ca);la=n(H$,"A",{href:!0});var qy=s(la);I_=i(qy,"TFLogitsWarper"),qy.forEach(t),A_=i(H$," that performs top-k, i.e. restricting to the k highest probability elements."),H$.forEach(t),C_=l(Gi),da=n(Gi,"DIV",{class:!0});var By=s(da);g(To.$$.fragment,By),By.forEach(t),Gi.forEach(t),xp=l(e),ue=n(e,"DIV",{class:!0});var ji=s(ue);g(yo.$$.fragment,ji),W_=l(ji),pa=n(ji,"P",{});var R$=s(pa);ma=n(R$,"A",{href:!0});var Iy=s(ma);N_=i(Iy,"TFLogitsProcessor"),Iy.forEach(t),V_=i(R$," enforcing a min-length by setting EOS probability to 0."),R$.forEach(t),M_=l(ji),fa=n(ji,"DIV",{class:!0});var Ay=s(fa);g(ko.$$.fragment,Ay),Ay.forEach(t),ji.forEach(t),wp=l(e),_e=n(e,"DIV",{class:!0});var Hi=s(_e);g(xo.$$.fragment,Hi),G_=l(Hi),ga=n(Hi,"P",{});var K$=s(ga);ha=n(K$,"A",{href:!0});var Cy=s(ha);j_=i(Cy,"TFLogitsProcessor"),Cy.forEach(t),H_=i(K$," that enforces that specified sequences will never be sampled."),K$.forEach(t),R_=l(Hi),ua=n(Hi,"DIV",{class:!0});var Wy=s(ua);g(wo.$$.fragment,Wy),Wy.forEach(t),Hi.forEach(t),Lp=l(e),be=n(e,"DIV",{class:!0});var Ri=s(be);g(Lo.$$.fragment,Ri),K_=l(Ri),Br=n(Ri,"P",{});var Td=s(Br);_a=n(Td,"A",{href:!0});var Ny=s(_a);U_=i(Ny,"TFLogitsProcessor"),Ny.forEach(t),Y_=i(Td,` that enforces no repetition of n-grams. See
`),Eo=n(Td,"A",{href:!0,rel:!0});var Vy=s(Eo);X_=i(Vy,"Fairseq"),Vy.forEach(t),J_=i(Td,"."),Td.forEach(t),Q_=l(Ri),ba=n(Ri,"DIV",{class:!0});var My=s(ba);g(Po.$$.fragment,My),My.forEach(t),Ri.forEach(t),Ep=l(e),ve=n(e,"DIV",{class:!0});var Ki=s(ve);g(Fo.$$.fragment,Ki),Z_=l(Ki),va=n(Ki,"P",{});var U$=s(va);$a=n(U$,"A",{href:!0});var Gy=s($a);eb=i(Gy,"TFLogitsProcessor"),Gy.forEach(t),rb=i(U$," enforcing an exponential penalty on repeated sequences."),U$.forEach(t),tb=l(Ki),Ta=n(Ki,"DIV",{class:!0});var jy=s(Ta);g(Do.$$.fragment,jy),jy.forEach(t),Ki.forEach(t),Pp=l(e),$e=n(e,"DIV",{class:!0});var Ui=s($e);g(So.$$.fragment,Ui),ob=l(Ui),ya=n(Ui,"P",{});var Y$=s(ya);ka=n(Y$,"A",{href:!0});var Hy=s(ka);nb=i(Hy,"TFLogitsProcessor"),Hy.forEach(t),sb=i(Y$," that enforces the specified token as the first generated token."),Y$.forEach(t),ab=l(Ui),xa=n(Ui,"DIV",{class:!0});var Ry=s(xa);g(zo.$$.fragment,Ry),Ry.forEach(t),Ui.forEach(t),Fp=l(e),Te=n(e,"DIV",{class:!0});var Yi=s(Te);g(Oo.$$.fragment,Yi),ib=l(Yi),Ir=n(Yi,"P",{});var yd=s(Ir);wa=n(yd,"A",{href:!0});var Ky=s(wa);cb=i(Ky,"TFLogitsProcessor"),Ky.forEach(t),lb=i(yd," that enforces the specified token as the last generated token when "),El=n(yd,"CODE",{});var Uy=s(El);db=i(Uy,"max_length"),Uy.forEach(t),pb=i(yd," is reached."),yd.forEach(t),mb=l(Yi),La=n(Yi,"DIV",{class:!0});var Yy=s(La);g(qo.$$.fragment,Yy),Yy.forEach(t),Yi.forEach(t),Dp=l(e),ye=n(e,"DIV",{class:!0});var Xi=s(ye);g(Bo.$$.fragment,Xi),fb=l(Xi),Pl=n(Xi,"P",{});var Xy=s(Pl);gb=i(Xy,"Abstract base class for all logit processors that can be applied during generation."),Xy.forEach(t),hb=l(Xi),Ar=n(Xi,"DIV",{class:!0});var Em=s(Ar);g(Io.$$.fragment,Em),ub=l(Em),Fl=n(Em,"P",{});var Jy=s(Fl);_b=i(Jy,"Flax method for processing logits."),Jy.forEach(t),Em.forEach(t),Xi.forEach(t),Sp=l(e),ke=n(e,"DIV",{class:!0});var Ji=s(ke);g(Ao.$$.fragment,Ji),bb=l(Ji),P=n(Ji,"P",{});var I=s(P);vb=i(I,"This class can be used to create a list of "),Ea=n(I,"A",{href:!0});var Qy=s(Ea);$b=i(Qy,"FlaxLogitsProcessor"),Qy.forEach(t),Tb=i(I," or "),Pa=n(I,"A",{href:!0});var Zy=s(Pa);yb=i(Zy,"FlaxLogitsWarper"),Zy.forEach(t),kb=i(I,` to subsequently process
a `),Dl=n(I,"CODE",{});var e0=s(Dl);xb=i(e0,"scores"),e0.forEach(t),wb=i(I," input tensor. This class inherits from list and adds a specific "),Sl=n(I,"EM",{});var r0=s(Sl);zl=n(r0,"STRONG",{});var t0=s(zl);Lb=i(t0,"call"),t0.forEach(t),r0.forEach(t),Eb=i(I,` method to apply each
`),Fa=n(I,"A",{href:!0});var o0=s(Fa);Pb=i(o0,"FlaxLogitsProcessor"),o0.forEach(t),Fb=i(I," or "),Da=n(I,"A",{href:!0});var n0=s(Da);Db=i(n0,"FlaxLogitsWarper"),n0.forEach(t),Sb=i(I," to the inputs."),I.forEach(t),zb=l(Ji),Sa=n(Ji,"DIV",{class:!0});var s0=s(Sa);g(Co.$$.fragment,s0),s0.forEach(t),Ji.forEach(t),zp=l(e),xe=n(e,"DIV",{class:!0});var Qi=s(xe);g(Wo.$$.fragment,Qi),Ob=l(Qi),Ol=n(Qi,"P",{});var a0=s(Ol);qb=i(a0,"Abstract base class for all logit warpers that can be applied during generation with multinomial sampling."),a0.forEach(t),Bb=l(Qi),Cr=n(Qi,"DIV",{class:!0});var Pm=s(Cr);g(No.$$.fragment,Pm),Ib=l(Pm),ql=n(Pm,"P",{});var i0=s(ql);Ab=i(i0,"Flax method for warping logits."),i0.forEach(t),Pm.forEach(t),Qi.forEach(t),Op=l(e),we=n(e,"DIV",{class:!0});var Zi=s(we);g(Vo.$$.fragment,Zi),Cb=l(Zi),za=n(Zi,"P",{});var X$=s(za);Oa=n(X$,"A",{href:!0});var c0=s(Oa);Wb=i(c0,"FlaxLogitsWarper"),c0.forEach(t),Nb=i(X$," for temperature (exponential scaling output probability distribution)."),X$.forEach(t),Vb=l(Zi),qa=n(Zi,"DIV",{class:!0});var l0=s(qa);g(Mo.$$.fragment,l0),l0.forEach(t),Zi.forEach(t),qp=l(e),Le=n(e,"DIV",{class:!0});var ec=s(Le);g(Go.$$.fragment,ec),Mb=l(ec),Ba=n(ec,"P",{});var J$=s(Ba);Ia=n(J$,"A",{href:!0});var d0=s(Ia);Gb=i(d0,"FlaxLogitsWarper"),d0.forEach(t),jb=i(J$," that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off."),J$.forEach(t),Hb=l(ec),Aa=n(ec,"DIV",{class:!0});var p0=s(Aa);g(jo.$$.fragment,p0),p0.forEach(t),ec.forEach(t),Bp=l(e),Ee=n(e,"DIV",{class:!0});var rc=s(Ee);g(Ho.$$.fragment,rc),Rb=l(rc),Ca=n(rc,"P",{});var Q$=s(Ca);Wa=n(Q$,"A",{href:!0});var m0=s(Wa);Kb=i(m0,"FlaxLogitsWarper"),m0.forEach(t),Ub=i(Q$," that performs top-k, i.e. restricting to the k highest probability elements."),Q$.forEach(t),Yb=l(rc),Na=n(rc,"DIV",{class:!0});var f0=s(Na);g(Ro.$$.fragment,f0),f0.forEach(t),rc.forEach(t),Ip=l(e),Pe=n(e,"DIV",{class:!0});var tc=s(Pe);g(Ko.$$.fragment,tc),Xb=l(tc),Va=n(tc,"P",{});var Z$=s(Va);Ma=n(Z$,"A",{href:!0});var g0=s(Ma);Jb=i(g0,"FlaxLogitsProcessor"),g0.forEach(t),Qb=i(Z$," that enforces the specified token as the first generated token."),Z$.forEach(t),Zb=l(tc),Ga=n(tc,"DIV",{class:!0});var h0=s(Ga);g(Uo.$$.fragment,h0),h0.forEach(t),tc.forEach(t),Ap=l(e),Fe=n(e,"DIV",{class:!0});var oc=s(Fe);g(Yo.$$.fragment,oc),ev=l(oc),Wr=n(oc,"P",{});var kd=s(Wr);ja=n(kd,"A",{href:!0});var u0=s(ja);rv=i(u0,"FlaxLogitsProcessor"),u0.forEach(t),tv=i(kd," that enforces the specified token as the last generated token when "),Bl=n(kd,"CODE",{});var _0=s(Bl);ov=i(_0,"max_length"),_0.forEach(t),nv=i(kd," is reached."),kd.forEach(t),sv=l(oc),Ha=n(oc,"DIV",{class:!0});var b0=s(Ha);g(Xo.$$.fragment,b0),b0.forEach(t),oc.forEach(t),Cp=l(e),De=n(e,"DIV",{class:!0});var nc=s(De);g(Jo.$$.fragment,nc),av=l(nc),Ra=n(nc,"P",{});var eT=s(Ra);Ka=n(eT,"A",{href:!0});var v0=s(Ka);iv=i(v0,"FlaxLogitsProcessor"),v0.forEach(t),cv=i(eT," enforcing a min-length by setting EOS probability to 0."),eT.forEach(t),lv=l(nc),Ua=n(nc,"DIV",{class:!0});var $0=s(Ua);g(Qo.$$.fragment,$0),$0.forEach(t),nc.forEach(t),Wp=l(e),ir=n(e,"H2",{class:!0});var Fm=s(ir);Nr=n(Fm,"A",{id:!0,class:!0,href:!0});var T0=s(Nr);Il=n(T0,"SPAN",{});var y0=s(Il);g(Zo.$$.fragment,y0),y0.forEach(t),T0.forEach(t),dv=l(Fm),Al=n(Fm,"SPAN",{});var k0=s(Al);pv=i(k0,"StoppingCriteria"),k0.forEach(t),Fm.forEach(t),Np=l(e),Vr=n(e,"P",{});var Dm=s(Vr);mv=i(Dm,"A "),Ya=n(Dm,"A",{href:!0});var x0=s(Ya);fv=i(x0,"StoppingCriteria"),x0.forEach(t),gv=i(Dm," can be used to change when to stop generation (other than EOS token)."),Dm.forEach(t),Vp=l(e),Se=n(e,"DIV",{class:!0});var sc=s(Se);g(en.$$.fragment,sc),hv=l(sc),Cl=n(sc,"P",{});var w0=s(Cl);uv=i(w0,"Abstract base class for all stopping criteria that can be applied during generation."),w0.forEach(t),_v=l(sc),Xa=n(sc,"DIV",{class:!0});var L0=s(Xa);g(rn.$$.fragment,L0),L0.forEach(t),sc.forEach(t),Mp=l(e),cr=n(e,"DIV",{class:!0});var Sm=s(cr);g(tn.$$.fragment,Sm),bv=l(Sm),Ja=n(Sm,"DIV",{class:!0});var E0=s(Ja);g(on.$$.fragment,E0),E0.forEach(t),Sm.forEach(t),Gp=l(e),ze=n(e,"DIV",{class:!0});var ac=s(ze);g(nn.$$.fragment,ac),vv=l(ac),sn=n(ac,"P",{});var zm=s(sn);$v=i(zm,"This class can be used to stop generation whenever the full generated number of tokens exceeds "),Wl=n(zm,"CODE",{});var P0=s(Wl);Tv=i(P0,"max_length"),P0.forEach(t),yv=i(zm,`. Keep
in mind for decoder-only type of transformers, this will include the initial prompted tokens.`),zm.forEach(t),kv=l(ac),Qa=n(ac,"DIV",{class:!0});var F0=s(Qa);g(an.$$.fragment,F0),F0.forEach(t),ac.forEach(t),jp=l(e),Oe=n(e,"DIV",{class:!0});var ic=s(Oe);g(cn.$$.fragment,ic),xv=l(ic),ln=n(ic,"P",{});var Om=s(ln);wv=i(Om,`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
`),Nl=n(Om,"CODE",{});var D0=s(Nl);Lv=i(D0,"initial_time"),D0.forEach(t),Ev=i(Om,"."),Om.forEach(t),Pv=l(ic),Za=n(ic,"DIV",{class:!0});var S0=s(Za);g(dn.$$.fragment,S0),S0.forEach(t),ic.forEach(t),Hp=l(e),lr=n(e,"H2",{class:!0});var qm=s(lr);Mr=n(qm,"A",{id:!0,class:!0,href:!0});var z0=s(Mr);Vl=n(z0,"SPAN",{});var O0=s(Vl);g(pn.$$.fragment,O0),O0.forEach(t),z0.forEach(t),Fv=l(qm),Ml=n(qm,"SPAN",{});var q0=s(Ml);Dv=i(q0,"Constraints"),q0.forEach(t),qm.forEach(t),Rp=l(e),Gr=n(e,"P",{});var Bm=s(Gr);Sv=i(Bm,"A "),ei=n(Bm,"A",{href:!0});var B0=s(ei);zv=i(B0,"Constraint"),B0.forEach(t),Ov=i(Bm," can be used to force the generation to include specific tokens or sequences in the output."),Bm.forEach(t),Kp=l(e),$=n(e,"DIV",{class:!0});var T=s($);g(mn.$$.fragment,T),qv=l(T),Gl=n(T,"P",{});var I0=s(Gl);Bv=i(I0,`Abstract base class for all constraints that can be applied during generation.
It must define how the constraint can be satisfied.`),I0.forEach(t),Iv=l(T),jl=n(T,"P",{});var A0=s(jl);Av=i(A0,"All classes that inherit Constraint must follow the requirement that"),A0.forEach(t),Cv=l(T),g(jr.$$.fragment,T),Wv=l(T),Hl=n(T,"P",{});var C0=s(Hl);Nv=i(C0,"will always terminate (halt)."),C0.forEach(t),Vv=l(T),Hr=n(T,"DIV",{class:!0});var Im=s(Hr);g(fn.$$.fragment,Im),Mv=l(Im),Rl=n(Im,"P",{});var W0=s(Rl);Gv=i(W0,"When called, returns the token that would take this constraint one step closer to being fulfilled."),W0.forEach(t),Im.forEach(t),jv=l(T),Rr=n(T,"DIV",{class:!0});var Am=s(Rr);g(gn.$$.fragment,Am),Hv=l(Am),Kl=n(Am,"P",{});var N0=s(Kl);Rv=i(N0,"Creates a new instance of this constraint."),N0.forEach(t),Am.forEach(t),Kv=l(T),Kr=n(T,"DIV",{class:!0});var Cm=s(Kr);g(hn.$$.fragment,Cm),Uv=l(Cm),Ul=n(Cm,"P",{});var V0=s(Ul);Yv=i(V0,"Reads in a token and returns whether it creates progress."),V0.forEach(t),Cm.forEach(t),Xv=l(T),Ur=n(T,"DIV",{class:!0});var Wm=s(Ur);g(un.$$.fragment,Wm),Jv=l(Wm),_n=n(Wm,"P",{});var Nm=s(_n);Qv=i(Nm,"Returns the number of remaining steps of "),Yl=n(Nm,"CODE",{});var M0=s(Yl);Zv=i(M0,"advance()"),M0.forEach(t),e1=i(Nm," in order to complete this constraint."),Nm.forEach(t),Wm.forEach(t),r1=l(T),Yr=n(T,"DIV",{class:!0});var Vm=s(Yr);g(bn.$$.fragment,Vm),t1=l(Vm),Xl=n(Vm,"P",{});var G0=s(Xl);o1=i(G0,`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.`),G0.forEach(t),Vm.forEach(t),n1=l(T),Xr=n(T,"DIV",{class:!0});var Mm=s(Xr);g(vn.$$.fragment,Mm),s1=l(Mm),Jl=n(Mm,"P",{});var j0=s(Jl);a1=i(j0,"Tests whether this constraint has been properly defined."),j0.forEach(t),Mm.forEach(t),i1=l(T),Ve=n(T,"DIV",{class:!0});var cc=s(Ve);g($n.$$.fragment,cc),c1=l(cc),Tn=n(cc,"P",{});var Gm=s(Tn);l1=i(Gm,`Reads in a token and returns booleans that indicate the progress made by it. This function will update the
state of this object unlikes `),Ql=n(Gm,"CODE",{});var H0=s(Ql);d1=i(H0,"does_advance(self, token_id: int)"),H0.forEach(t),p1=i(Gm,"."),Gm.forEach(t),m1=l(cc),Zl=n(cc,"P",{});var R0=s(Zl);f1=i(R0,`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)`),R0.forEach(t),cc.forEach(t),T.forEach(t),Up=l(e),dr=n(e,"DIV",{class:!0});var jm=s(dr);g(yn.$$.fragment,jm),g1=l(jm),ri=n(jm,"P",{});var rT=s(ri);ti=n(rT,"A",{href:!0});var K0=s(ti);h1=i(K0,"Constraint"),K0.forEach(t),u1=i(rT," enforcing that an ordered sequence of tokens is included in the output."),rT.forEach(t),jm.forEach(t),Yp=l(e),pr=n(e,"DIV",{class:!0});var Hm=s(pr);g(kn.$$.fragment,Hm),_1=l(Hm),xn=n(Hm,"P",{});var Rm=s(xn);b1=i(Rm,"A special "),oi=n(Rm,"A",{href:!0});var U0=s(oi);v1=i(U0,"Constraint"),U0.forEach(t),$1=i(Rm," that is fulfilled by fulfilling just one of several constraints."),Rm.forEach(t),Hm.forEach(t),Xp=l(e),C=n(e,"DIV",{class:!0});var tt=s(C);g(wn.$$.fragment,tt),T1=l(tt),ed=n(tt,"P",{});var Y0=s(ed);y1=i(Y0,"A class for beam scorers to track its progress through a list of constraints."),Y0.forEach(t),k1=l(tt),D=n(tt,"DIV",{class:!0});var j=s(D);g(Ln.$$.fragment,j),x1=l(j),rd=n(j,"P",{});var X0=s(rd);w1=i(X0,`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.`),X0.forEach(t),L1=l(j),mr=n(j,"P",{});var lc=s(mr);E1=i(lc,"Given constraints "),td=n(lc,"CODE",{});var J0=s(td);P1=i(J0,"c_i = {t_ij | j == # of tokens}"),J0.forEach(t),F1=i(lc,`, If we\u2019re not in the middle of progressing through a
specific constraint `),od=n(lc,"CODE",{});var Q0=s(od);D1=i(Q0,"c_i"),Q0.forEach(t),S1=i(lc,", we return:"),lc.forEach(t),z1=l(j),nd=n(j,"P",{});var Z0=s(nd);sd=n(Z0,"CODE",{});var ek=s(sd);O1=i(ek,"[t_k1 for k in indices of unfulfilled constraints]"),ek.forEach(t),Z0.forEach(t),q1=l(j),qe=n(j,"P",{});var ot=s(qe);B1=i(ot,`If we are in the middle of a constraint, then we return:
`),ad=n(ot,"CODE",{});var rk=s(ad);I1=i(rk,"[t_ij]"),rk.forEach(t),A1=i(ot,", where "),id=n(ot,"CODE",{});var tk=s(id);C1=i(tk,"i"),tk.forEach(t),W1=i(ot," is the index of the inprogress constraint, "),cd=n(ot,"CODE",{});var ok=s(cd);N1=i(ok,"j"),ok.forEach(t),V1=i(ot," is the next step for the constraint."),ot.forEach(t),M1=l(j),ld=n(j,"P",{});var nk=s(ld);G1=i(nk,`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.`),nk.forEach(t),j.forEach(t),j1=l(tt),Jr=n(tt,"DIV",{class:!0});var Km=s(Jr);g(En.$$.fragment,Km),H1=l(Km),dd=n(Km,"P",{});var sk=s(dd);R1=i(sk,"token_ids: the tokens generated thus far to reset the state of the progress through constraints."),sk.forEach(t),Km.forEach(t),tt.forEach(t),Jp=l(e),fr=n(e,"H2",{class:!0});var Um=s(fr);Qr=n(Um,"A",{id:!0,class:!0,href:!0});var ak=s(Qr);pd=n(ak,"SPAN",{});var ik=s(pd);g(Pn.$$.fragment,ik),ik.forEach(t),ak.forEach(t),K1=l(Um),md=n(Um,"SPAN",{});var ck=s(md);U1=i(ck,"BeamSearch"),ck.forEach(t),Um.forEach(t),Qp=l(e),W=n(e,"DIV",{class:!0});var nt=s(W);g(Fn.$$.fragment,nt),Y1=l(nt),gr=n(nt,"P",{});var dc=s(gr);X1=i(dc,"Abstract base class for all beam scorers that are used for "),ni=n(dc,"A",{href:!0});var lk=s(ni);J1=i(lk,"beam_search()"),lk.forEach(t),Q1=i(dc,` and
`),si=n(dc,"A",{href:!0});var dk=s(si);Z1=i(dk,"beam_sample()"),dk.forEach(t),e$=i(dc,"."),dc.forEach(t),r$=l(nt),ai=n(nt,"DIV",{class:!0});var pk=s(ai);g(Dn.$$.fragment,pk),pk.forEach(t),t$=l(nt),ii=n(nt,"DIV",{class:!0});var mk=s(ii);g(Sn.$$.fragment,mk),mk.forEach(t),nt.forEach(t),Zp=l(e),F=n(e,"DIV",{class:!0});var H=s(F);g(zn.$$.fragment,H),o$=l(H),ci=n(H,"P",{});var tT=s(ci);li=n(tT,"A",{href:!0});var fk=s(li);n$=i(fk,"BeamScorer"),fk.forEach(t),s$=i(tT," implementing standard beam search decoding."),tT.forEach(t),a$=l(H),On=n(H,"P",{});var Ym=s(On);i$=i(Ym,"Adapted in part from "),qn=n(Ym,"A",{href:!0,rel:!0});var gk=s(qn);c$=i(gk,`Facebook\u2019s XLM beam search
code`),gk.forEach(t),l$=i(Ym,"."),Ym.forEach(t),d$=l(H),di=n(H,"P",{});var oT=s(di);p$=i(oT,"Reference for the diverse beam search algorithm and implementation "),Bn=n(oT,"A",{href:!0,rel:!0});var hk=s(Bn);m$=i(hk,`Ashwin Kalyan\u2019s DBS
implementation`),hk.forEach(t),oT.forEach(t),f$=l(H),pi=n(H,"DIV",{class:!0});var uk=s(pi);g(In.$$.fragment,uk),uk.forEach(t),g$=l(H),mi=n(H,"DIV",{class:!0});var _k=s(mi);g(An.$$.fragment,_k),_k.forEach(t),H.forEach(t),em=l(e),N=n(e,"DIV",{class:!0});var st=s(N);g(Cn.$$.fragment,st),h$=l(st),fi=n(st,"P",{});var nT=s(fi);gi=n(nT,"A",{href:!0});var bk=s(gi);u$=i(bk,"BeamScorer"),bk.forEach(t),_$=i(nT," implementing constrained beam search decoding."),nT.forEach(t),b$=l(st),hi=n(st,"DIV",{class:!0});var vk=s(hi);g(Wn.$$.fragment,vk),vk.forEach(t),v$=l(st),ui=n(st,"DIV",{class:!0});var $k=s(ui);g(Nn.$$.fragment,$k),$k.forEach(t),st.forEach(t),rm=l(e),hr=n(e,"H2",{class:!0});var Xm=s(hr);Zr=n(Xm,"A",{id:!0,class:!0,href:!0});var Tk=s(Zr);fd=n(Tk,"SPAN",{});var yk=s(fd);g(Vn.$$.fragment,yk),yk.forEach(t),Tk.forEach(t),$$=l(Xm),gd=n(Xm,"SPAN",{});var kk=s(gd);T$=i(kk,"Utilities"),kk.forEach(t),Xm.forEach(t),tm=l(e),Be=n(e,"DIV",{class:!0});var pc=s(Be);g(Mn.$$.fragment,pc),y$=l(pc),hd=n(pc,"P",{});var xk=s(hd);k$=i(xk,"Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),xk.forEach(t),x$=l(pc),_i=n(pc,"P",{});var sT=s(_i);w$=i(sT,"From: "),Gn=n(sT,"A",{href:!0,rel:!0});var wk=s(Gn);L$=i(wk,"https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),wk.forEach(t),sT.forEach(t),pc.forEach(t),om=l(e),Ie=n(e,"DIV",{class:!0});var mc=s(Ie);g(jn.$$.fragment,mc),E$=l(mc),ud=n(mc,"P",{});var Lk=s(ud);P$=i(Lk,"Filter a distribution of logits using top-k and/or nucleus (top-p) filtering"),Lk.forEach(t),F$=l(mc),bi=n(mc,"P",{});var aT=s(bi);D$=i(aT,"From: "),Hn=n(aT,"A",{href:!0,rel:!0});var Ek=s(Hn);S$=i(Ek,"https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),Ek.forEach(t),aT.forEach(t),mc.forEach(t),this.h()},h(){d(L,"name","hf:doc:metadata"),d(L,"content",JSON.stringify(Ak)),d(Ce,"id","utilities-for-generation"),d(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ce,"href","#utilities-for-generation"),d(k,"class","relative group"),d(Un,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),d(Yn,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.greedy_search"),d(Xn,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.contrastive_search"),d(Jn,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.sample"),d(Qn,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.beam_search"),d(Zn,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.beam_sample"),d(es,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.group_beam_search"),d(rs,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.constrained_beam_search"),d(_r,"id","generate-outputs"),d(_r,"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(_r,"href","#generate-outputs"),d(Ke,"class","relative group"),d(os,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),d(ns,"href","/docs/transformers/pr_19816/en/main_classes/output#transformers.utils.ModelOutput"),d(ss,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),d(is,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.generation_utils.GreedySearchDecoderOnlyOutput"),d(vr,"id","transformers.generation_utils.GreedySearchDecoderOnlyOutput"),d(vr,"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(vr,"href","#transformers.generation_utils.GreedySearchDecoderOnlyOutput"),d(Ue,"class","relative group"),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(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($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(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(Tr,"id","transformers.generation_utils.SampleDecoderOnlyOutput"),d(Tr,"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(Tr,"href","#transformers.generation_utils.SampleDecoderOnlyOutput"),d(Je,"class","relative group"),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(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(yr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(kr,"id","transformers.generation_utils.BeamSearchDecoderOnlyOutput"),d(kr,"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(kr,"href","#transformers.generation_utils.BeamSearchDecoderOnlyOutput"),d(er,"class","relative group"),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(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(xr,"id","transformers.generation_utils.BeamSampleDecoderOnlyOutput"),d(xr,"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(xr,"href","#transformers.generation_utils.BeamSampleDecoderOnlyOutput"),d(or,"class","relative group"),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(wr,"id","transformers.LogitsProcessor"),d(wr,"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(wr,"href","#transformers.LogitsProcessor"),d(ar,"class","relative group"),d(fs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),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(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(gs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(hs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(us,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(_s,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(bs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Pr,"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($s,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Ts,"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(ks,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(xs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ls,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Es,"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(Fs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(Ds,"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(zs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(Os,"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(qs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsWarper"),d(jt,"href","https://arxiv.org/abs/2202.00666"),d(jt,"rel","nofollow"),d(Bs,"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(Is,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Kt,"href","https://github.com/pytorch/fairseq/blob/a07cb6f40480928c9e0548b737aadd36ee66ac76/fairseq/sequence_generator.py#L345"),d(Kt,"rel","nofollow"),d(As,"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(Ws,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Ns,"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(Vs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Qt,"href","https://arxiv.org/abs/2010.00904"),d(Qt,"rel","nofollow"),d(Ms,"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(Gs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(js,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.group_beam_search"),d(ro,"href","https://arxiv.org/pdf/1610.02424.pdf"),d(ro,"rel","nofollow"),d(Hs,"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(Ks,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Us,"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(Ys,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.LogitsProcessor"),d(Xs,"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(Js,"href","/docs/transformers/pr_19816/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(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(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(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(Zs,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(ea,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(ra,"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(qr,"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(oa,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsWarper"),d(na,"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(aa,"href","/docs/transformers/pr_19816/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(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(la,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsWarper"),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(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(ma,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),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(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(ha,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),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(_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(_a,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),d(Eo,"href","https://github.com/pytorch/fairseq/blob/a07cb6f40480928c9e0548b737aadd36ee66ac76/fairseq/sequence_generator.py#L345"),d(Eo,"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(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($a,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),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(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(ka,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),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/pr_19816/en/internal/generation_utils#transformers.TFLogitsProcessor"),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(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(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(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(Ea,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(Pa,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(Fa,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(Da,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(Sa,"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(Cr,"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(Oa,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsWarper"),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(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(Ia,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsWarper"),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(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(Wa,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsWarper"),d(Na,"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(Ma,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(Ga,"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(ja,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),d(Ha,"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/pr_19816/en/internal/generation_utils#transformers.FlaxLogitsProcessor"),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(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(Nr,"id","transformers.StoppingCriteria"),d(Nr,"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(Nr,"href","#transformers.StoppingCriteria"),d(ir,"class","relative group"),d(Ya,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.StoppingCriteria"),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(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(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(cr,"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,"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(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(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(Mr,"id","transformers.Constraint"),d(Mr,"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(Mr,"href","#transformers.Constraint"),d(lr,"class","relative group"),d(ei,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.Constraint"),d(Hr,"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(Kr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ur,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Yr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Xr,"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($,"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/pr_19816/en/internal/generation_utils#transformers.Constraint"),d(dr,"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/pr_19816/en/internal/generation_utils#transformers.Constraint"),d(pr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qr,"id","transformers.BeamScorer"),d(Qr,"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(Qr,"href","#transformers.BeamScorer"),d(fr,"class","relative group"),d(ni,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.beam_search"),d(si,"href","/docs/transformers/pr_19816/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.beam_sample"),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(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(W,"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/pr_19816/en/internal/generation_utils#transformers.BeamScorer"),d(qn,"href","https://github.com/facebookresearch/XLM/blob/9e6f6814d17be4fe5b15f2e6c43eb2b2d76daeb4/src/model/transformer.py#L529"),d(qn,"rel","nofollow"),d(Bn,"href","https://github.com/ashwinkalyan/dbs/blob/master/dbs/beam_utils.lua"),d(Bn,"rel","nofollow"),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(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(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(gi,"href","/docs/transformers/pr_19816/en/internal/generation_utils#transformers.BeamScorer"),d(hi,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Zr,"id","transformers.top_k_top_p_filtering"),d(Zr,"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(Zr,"href","#transformers.top_k_top_p_filtering"),d(hr,"class","relative group"),d(Gn,"href","https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),d(Gn,"rel","nofollow"),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(Hn,"href","https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317"),d(Hn,"rel","nofollow"),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")},m(e,p){r(document.head,L),m(e,Re,p),m(e,k,p),r(k,Ce),r(Ce,fc),h(at,fc,null),r(k,Jm),r(k,gc),r(gc,Qm),m(e,wd,p),m(e,y,p),r(y,Zm),r(y,Un),r(Un,ef),r(y,rf),r(y,Yn),r(Yn,tf),r(y,of),r(y,Xn),r(Xn,nf),r(y,sf),r(y,Jn),r(Jn,af),r(y,cf),r(y,Qn),r(Qn,lf),r(y,df),r(y,Zn),r(Zn,pf),r(y,mf),r(y,es),r(es,ff),r(y,gf),r(y,rs),r(rs,hf),r(y,uf),m(e,Ld,p),m(e,ts,p),r(ts,_f),m(e,Ed,p),m(e,Ke,p),r(Ke,_r),r(_r,hc),h(it,hc,null),r(Ke,bf),r(Ke,uc),r(uc,vf),m(e,Pd,p),m(e,V,p),r(V,$f),r(V,os),r(os,Tf),r(V,yf),r(V,ns),r(ns,kf),r(V,xf),r(V,ss),r(ss,wf),r(V,Lf),m(e,Fd,p),m(e,as,p),r(as,Ef),m(e,Dd,p),h(ct,e,p),m(e,Sd,p),m(e,We,p),r(We,Pf),r(We,_c),r(_c,Ff),r(We,Df),r(We,is),r(is,Sf),r(We,zf),m(e,zd,p),m(e,M,p),r(M,cs),r(cs,bc),r(bc,Of),r(cs,qf),r(M,Bf),r(M,ls),r(ls,vc),r(vc,If),r(ls,Af),r(M,Cf),r(M,ds),r(ds,$c),r($c,Wf),r(ds,Nf),r(M,Vf),r(M,ps),r(ps,Tc),r(Tc,Mf),r(ps,Gf),m(e,Od,p),m(e,x,p),r(x,jf),r(x,yc),r(yc,Hf),r(x,Rf),r(x,kc),r(kc,Kf),r(x,Uf),r(x,xc),r(xc,Yf),r(x,Xf),r(x,wc),r(wc,Jf),r(x,Qf),r(x,Lc),r(Lc,Zf),r(x,eg),r(x,Ec),r(Ec,rg),r(x,tg),m(e,qd,p),m(e,S,p),r(S,og),r(S,Pc),r(Pc,ng),r(S,sg),r(S,Fc),r(Fc,ag),r(S,ig),r(S,Dc),r(Dc,cg),r(S,lg),r(S,Sc),r(Sc,dg),r(S,pg),m(e,Bd,p),m(e,z,p),r(z,mg),r(z,zc),r(zc,fg),r(z,gg),r(z,Oc),r(Oc,hg),r(z,ug),r(z,qc),r(qc,_g),r(z,bg),r(z,Bc),r(Bc,vg),r(z,$g),m(e,Id,p),h(lt,e,p),m(e,Ad,p),m(e,br,p),r(br,Tg),r(br,Ic),r(Ic,yg),r(br,kg),m(e,Cd,p),m(e,O,p),r(O,xg),r(O,Ac),r(Ac,wg),r(O,Lg),r(O,Cc),r(Cc,Eg),r(O,Pg),r(O,Wc),r(Wc,Fg),r(O,Dg),r(O,Nc),r(Nc,Sg),r(O,zg),m(e,Wd,p),m(e,ms,p),r(ms,Og),m(e,Nd,p),m(e,Ue,p),r(Ue,vr),r(vr,Vc),h(dt,Vc,null),r(Ue,qg),r(Ue,Mc),r(Mc,Bg),m(e,Vd,p),m(e,Ye,p),h(pt,Ye,null),r(Ye,Ig),r(Ye,Gc),r(Gc,Ag),m(e,Md,p),m(e,Xe,p),h(mt,Xe,null),r(Xe,Cg),r(Xe,jc),r(jc,Wg),m(e,Gd,p),m(e,R,p),h(ft,R,null),r(R,Ng),r(R,Hc),r(Hc,Vg),r(R,Mg),r(R,$r),h(gt,$r,null),r($r,Gg),r($r,Rc),r(Rc,jg),m(e,jd,p),m(e,Je,p),r(Je,Tr),r(Tr,Kc),h(ht,Kc,null),r(Je,Hg),r(Je,Uc),r(Uc,Rg),m(e,Hd,p),m(e,Qe,p),h(ut,Qe,null),r(Qe,Kg),r(Qe,Yc),r(Yc,Ug),m(e,Rd,p),m(e,Ze,p),h(_t,Ze,null),r(Ze,Yg),r(Ze,Xc),r(Xc,Xg),m(e,Kd,p),m(e,K,p),h(bt,K,null),r(K,Jg),r(K,Jc),r(Jc,Qg),r(K,Zg),r(K,yr),h(vt,yr,null),r(yr,eh),r(yr,Qc),r(Qc,rh),m(e,Ud,p),m(e,er,p),r(er,kr),r(kr,Zc),h($t,Zc,null),r(er,th),r(er,el),r(el,oh),m(e,Yd,p),m(e,rr,p),h(Tt,rr,null),r(rr,nh),r(rr,rl),r(rl,sh),m(e,Xd,p),m(e,tr,p),h(yt,tr,null),r(tr,ah),r(tr,tl),r(tl,ih),m(e,Jd,p),m(e,or,p),r(or,xr),r(xr,ol),h(kt,ol,null),r(or,ch),r(or,nl),r(nl,lh),m(e,Qd,p),m(e,nr,p),h(xt,nr,null),r(nr,dh),r(nr,sl),r(sl,ph),m(e,Zd,p),m(e,sr,p),h(wt,sr,null),r(sr,mh),r(sr,al),r(al,fh),m(e,ep,p),m(e,ar,p),r(ar,wr),r(wr,il),h(Lt,il,null),r(ar,gh),r(ar,cl),r(cl,hh),m(e,rp,p),m(e,Lr,p),r(Lr,uh),r(Lr,fs),r(fs,_h),r(Lr,bh),m(e,tp,p),m(e,U,p),h(Et,U,null),r(U,vh),r(U,ll),r(ll,$h),r(U,Th),r(U,Er),h(Pt,Er,null),r(Er,yh),r(Er,dl),r(dl,kh),m(e,op,p),m(e,Y,p),h(Ft,Y,null),r(Y,xh),r(Y,E),r(E,wh),r(E,gs),r(gs,Lh),r(E,Eh),r(E,hs),r(hs,Ph),r(E,Fh),r(E,pl),r(pl,Dh),r(E,Sh),r(E,ml),r(ml,fl),r(fl,zh),r(E,Oh),r(E,us),r(us,qh),r(E,Bh),r(E,_s),r(_s,Ih),r(E,Ah),r(Y,Ch),r(Y,bs),h(Dt,bs,null),m(e,np,p),m(e,X,p),h(St,X,null),r(X,Wh),r(X,gl),r(gl,Nh),r(X,Vh),r(X,Pr),h(zt,Pr,null),r(Pr,Mh),r(Pr,hl),r(hl,Gh),m(e,sp,p),m(e,J,p),h(Ot,J,null),r(J,jh),r(J,vs),r(vs,$s),r($s,Hh),r(vs,Rh),r(J,Kh),r(J,Ts),h(qt,Ts,null),m(e,ap,p),m(e,Q,p),h(Bt,Q,null),r(Q,Uh),r(Q,ys),r(ys,ks),r(ks,Yh),r(ys,Xh),r(Q,Jh),r(Q,xs),h(It,xs,null),m(e,ip,p),m(e,Z,p),h(At,Z,null),r(Z,Qh),r(Z,ws),r(ws,Ls),r(Ls,Zh),r(ws,eu),r(Z,ru),r(Z,Es),h(Ct,Es,null),m(e,cp,p),m(e,ee,p),h(Wt,ee,null),r(ee,tu),r(ee,Ps),r(Ps,Fs),r(Fs,ou),r(Ps,nu),r(ee,su),r(ee,Ds),h(Nt,Ds,null),m(e,lp,p),m(e,re,p),h(Vt,re,null),r(re,au),r(re,Ss),r(Ss,zs),r(zs,iu),r(Ss,cu),r(re,lu),r(re,Os),h(Mt,Os,null),m(e,dp,p),m(e,te,p),h(Gt,te,null),r(te,du),r(te,Fr),r(Fr,qs),r(qs,pu),r(Fr,mu),r(Fr,jt),r(jt,fu),r(Fr,gu),r(te,hu),r(te,Bs),h(Ht,Bs,null),m(e,pp,p),m(e,oe,p),h(Rt,oe,null),r(oe,uu),r(oe,Dr),r(Dr,Is),r(Is,_u),r(Dr,bu),r(Dr,Kt),r(Kt,vu),r(Dr,$u),r(oe,Tu),r(oe,As),h(Ut,As,null),m(e,mp,p),m(e,ne,p),h(Yt,ne,null),r(ne,yu),r(ne,Cs),r(Cs,Ws),r(Ws,ku),r(Cs,xu),r(ne,wu),r(ne,Ns),h(Xt,Ns,null),m(e,fp,p),m(e,se,p),h(Jt,se,null),r(se,Lu),r(se,Sr),r(Sr,Vs),r(Vs,Eu),r(Sr,Pu),r(Sr,Qt),r(Qt,Fu),r(Sr,Du),r(se,Su),r(se,Ms),h(Zt,Ms,null),m(e,gp,p),m(e,ae,p),h(eo,ae,null),r(ae,zu),r(ae,Ne),r(Ne,Gs),r(Gs,Ou),r(Ne,qu),r(Ne,js),r(js,Bu),r(Ne,Iu),r(Ne,ro),r(ro,Au),r(Ne,Cu),r(ae,Wu),r(ae,Hs),h(to,Hs,null),m(e,hp,p),m(e,ie,p),h(oo,ie,null),r(ie,Nu),r(ie,Rs),r(Rs,Ks),r(Ks,Vu),r(Rs,Mu),r(ie,Gu),r(ie,Us),h(no,Us,null),m(e,up,p),m(e,ce,p),h(so,ce,null),r(ce,ju),r(ce,zr),r(zr,Ys),r(Ys,Hu),r(zr,Ru),r(zr,ul),r(ul,Ku),r(zr,Uu),r(ce,Yu),r(ce,Xs),h(ao,Xs,null),m(e,_p,p),m(e,le,p),h(io,le,null),r(le,Xu),r(le,G),r(G,Js),r(Js,Ju),r(G,Qu),r(G,_l),r(_l,Zu),r(G,e_),r(G,bl),r(bl,r_),r(G,t_),r(G,vl),r(vl,o_),r(G,n_),r(le,s_),r(le,Qs),h(co,Qs,null),m(e,bp,p),m(e,de,p),h(lo,de,null),r(de,a_),r(de,$l),r($l,i_),r(de,c_),r(de,Or),h(po,Or,null),r(Or,l_),r(Or,Tl),r(Tl,d_),m(e,vp,p),m(e,pe,p),h(mo,pe,null),r(pe,p_),r(pe,A),r(A,m_),r(A,Zs),r(Zs,f_),r(A,g_),r(A,yl),r(yl,h_),r(A,u_),r(A,kl),r(kl,xl),r(xl,__),r(A,b_),r(A,ea),r(ea,v_),r(A,$_),r(pe,T_),r(pe,ra),h(fo,ra,null),m(e,$p,p),m(e,me,p),h(go,me,null),r(me,y_),r(me,wl),r(wl,k_),r(me,x_),r(me,qr),h(ho,qr,null),r(qr,w_),r(qr,Ll),r(Ll,L_),m(e,Tp,p),m(e,fe,p),h(uo,fe,null),r(fe,E_),r(fe,ta),r(ta,oa),r(oa,P_),r(ta,F_),r(fe,D_),r(fe,na),h(_o,na,null),m(e,yp,p),m(e,ge,p),h(bo,ge,null),r(ge,S_),r(ge,sa),r(sa,aa),r(aa,z_),r(sa,O_),r(ge,q_),r(ge,ia),h(vo,ia,null),m(e,kp,p),m(e,he,p),h($o,he,null),r(he,B_),r(he,ca),r(ca,la),r(la,I_),r(ca,A_),r(he,C_),r(he,da),h(To,da,null),m(e,xp,p),m(e,ue,p),h(yo,ue,null),r(ue,W_),r(ue,pa),r(pa,ma),r(ma,N_),r(pa,V_),r(ue,M_),r(ue,fa),h(ko,fa,null),m(e,wp,p),m(e,_e,p),h(xo,_e,null),r(_e,G_),r(_e,ga),r(ga,ha),r(ha,j_),r(ga,H_),r(_e,R_),r(_e,ua),h(wo,ua,null),m(e,Lp,p),m(e,be,p),h(Lo,be,null),r(be,K_),r(be,Br),r(Br,_a),r(_a,U_),r(Br,Y_),r(Br,Eo),r(Eo,X_),r(Br,J_),r(be,Q_),r(be,ba),h(Po,ba,null),m(e,Ep,p),m(e,ve,p),h(Fo,ve,null),r(ve,Z_),r(ve,va),r(va,$a),r($a,eb),r(va,rb),r(ve,tb),r(ve,Ta),h(Do,Ta,null),m(e,Pp,p),m(e,$e,p),h(So,$e,null),r($e,ob),r($e,ya),r(ya,ka),r(ka,nb),r(ya,sb),r($e,ab),r($e,xa),h(zo,xa,null),m(e,Fp,p),m(e,Te,p),h(Oo,Te,null),r(Te,ib),r(Te,Ir),r(Ir,wa),r(wa,cb),r(Ir,lb),r(Ir,El),r(El,db),r(Ir,pb),r(Te,mb),r(Te,La),h(qo,La,null),m(e,Dp,p),m(e,ye,p),h(Bo,ye,null),r(ye,fb),r(ye,Pl),r(Pl,gb),r(ye,hb),r(ye,Ar),h(Io,Ar,null),r(Ar,ub),r(Ar,Fl),r(Fl,_b),m(e,Sp,p),m(e,ke,p),h(Ao,ke,null),r(ke,bb),r(ke,P),r(P,vb),r(P,Ea),r(Ea,$b),r(P,Tb),r(P,Pa),r(Pa,yb),r(P,kb),r(P,Dl),r(Dl,xb),r(P,wb),r(P,Sl),r(Sl,zl),r(zl,Lb),r(P,Eb),r(P,Fa),r(Fa,Pb),r(P,Fb),r(P,Da),r(Da,Db),r(P,Sb),r(ke,zb),r(ke,Sa),h(Co,Sa,null),m(e,zp,p),m(e,xe,p),h(Wo,xe,null),r(xe,Ob),r(xe,Ol),r(Ol,qb),r(xe,Bb),r(xe,Cr),h(No,Cr,null),r(Cr,Ib),r(Cr,ql),r(ql,Ab),m(e,Op,p),m(e,we,p),h(Vo,we,null),r(we,Cb),r(we,za),r(za,Oa),r(Oa,Wb),r(za,Nb),r(we,Vb),r(we,qa),h(Mo,qa,null),m(e,qp,p),m(e,Le,p),h(Go,Le,null),r(Le,Mb),r(Le,Ba),r(Ba,Ia),r(Ia,Gb),r(Ba,jb),r(Le,Hb),r(Le,Aa),h(jo,Aa,null),m(e,Bp,p),m(e,Ee,p),h(Ho,Ee,null),r(Ee,Rb),r(Ee,Ca),r(Ca,Wa),r(Wa,Kb),r(Ca,Ub),r(Ee,Yb),r(Ee,Na),h(Ro,Na,null),m(e,Ip,p),m(e,Pe,p),h(Ko,Pe,null),r(Pe,Xb),r(Pe,Va),r(Va,Ma),r(Ma,Jb),r(Va,Qb),r(Pe,Zb),r(Pe,Ga),h(Uo,Ga,null),m(e,Ap,p),m(e,Fe,p),h(Yo,Fe,null),r(Fe,ev),r(Fe,Wr),r(Wr,ja),r(ja,rv),r(Wr,tv),r(Wr,Bl),r(Bl,ov),r(Wr,nv),r(Fe,sv),r(Fe,Ha),h(Xo,Ha,null),m(e,Cp,p),m(e,De,p),h(Jo,De,null),r(De,av),r(De,Ra),r(Ra,Ka),r(Ka,iv),r(Ra,cv),r(De,lv),r(De,Ua),h(Qo,Ua,null),m(e,Wp,p),m(e,ir,p),r(ir,Nr),r(Nr,Il),h(Zo,Il,null),r(ir,dv),r(ir,Al),r(Al,pv),m(e,Np,p),m(e,Vr,p),r(Vr,mv),r(Vr,Ya),r(Ya,fv),r(Vr,gv),m(e,Vp,p),m(e,Se,p),h(en,Se,null),r(Se,hv),r(Se,Cl),r(Cl,uv),r(Se,_v),r(Se,Xa),h(rn,Xa,null),m(e,Mp,p),m(e,cr,p),h(tn,cr,null),r(cr,bv),r(cr,Ja),h(on,Ja,null),m(e,Gp,p),m(e,ze,p),h(nn,ze,null),r(ze,vv),r(ze,sn),r(sn,$v),r(sn,Wl),r(Wl,Tv),r(sn,yv),r(ze,kv),r(ze,Qa),h(an,Qa,null),m(e,jp,p),m(e,Oe,p),h(cn,Oe,null),r(Oe,xv),r(Oe,ln),r(ln,wv),r(ln,Nl),r(Nl,Lv),r(ln,Ev),r(Oe,Pv),r(Oe,Za),h(dn,Za,null),m(e,Hp,p),m(e,lr,p),r(lr,Mr),r(Mr,Vl),h(pn,Vl,null),r(lr,Fv),r(lr,Ml),r(Ml,Dv),m(e,Rp,p),m(e,Gr,p),r(Gr,Sv),r(Gr,ei),r(ei,zv),r(Gr,Ov),m(e,Kp,p),m(e,$,p),h(mn,$,null),r($,qv),r($,Gl),r(Gl,Bv),r($,Iv),r($,jl),r(jl,Av),r($,Cv),h(jr,$,null),r($,Wv),r($,Hl),r(Hl,Nv),r($,Vv),r($,Hr),h(fn,Hr,null),r(Hr,Mv),r(Hr,Rl),r(Rl,Gv),r($,jv),r($,Rr),h(gn,Rr,null),r(Rr,Hv),r(Rr,Kl),r(Kl,Rv),r($,Kv),r($,Kr),h(hn,Kr,null),r(Kr,Uv),r(Kr,Ul),r(Ul,Yv),r($,Xv),r($,Ur),h(un,Ur,null),r(Ur,Jv),r(Ur,_n),r(_n,Qv),r(_n,Yl),r(Yl,Zv),r(_n,e1),r($,r1),r($,Yr),h(bn,Yr,null),r(Yr,t1),r(Yr,Xl),r(Xl,o1),r($,n1),r($,Xr),h(vn,Xr,null),r(Xr,s1),r(Xr,Jl),r(Jl,a1),r($,i1),r($,Ve),h($n,Ve,null),r(Ve,c1),r(Ve,Tn),r(Tn,l1),r(Tn,Ql),r(Ql,d1),r(Tn,p1),r(Ve,m1),r(Ve,Zl),r(Zl,f1),m(e,Up,p),m(e,dr,p),h(yn,dr,null),r(dr,g1),r(dr,ri),r(ri,ti),r(ti,h1),r(ri,u1),m(e,Yp,p),m(e,pr,p),h(kn,pr,null),r(pr,_1),r(pr,xn),r(xn,b1),r(xn,oi),r(oi,v1),r(xn,$1),m(e,Xp,p),m(e,C,p),h(wn,C,null),r(C,T1),r(C,ed),r(ed,y1),r(C,k1),r(C,D),h(Ln,D,null),r(D,x1),r(D,rd),r(rd,w1),r(D,L1),r(D,mr),r(mr,E1),r(mr,td),r(td,P1),r(mr,F1),r(mr,od),r(od,D1),r(mr,S1),r(D,z1),r(D,nd),r(nd,sd),r(sd,O1),r(D,q1),r(D,qe),r(qe,B1),r(qe,ad),r(ad,I1),r(qe,A1),r(qe,id),r(id,C1),r(qe,W1),r(qe,cd),r(cd,N1),r(qe,V1),r(D,M1),r(D,ld),r(ld,G1),r(C,j1),r(C,Jr),h(En,Jr,null),r(Jr,H1),r(Jr,dd),r(dd,R1),m(e,Jp,p),m(e,fr,p),r(fr,Qr),r(Qr,pd),h(Pn,pd,null),r(fr,K1),r(fr,md),r(md,U1),m(e,Qp,p),m(e,W,p),h(Fn,W,null),r(W,Y1),r(W,gr),r(gr,X1),r(gr,ni),r(ni,J1),r(gr,Q1),r(gr,si),r(si,Z1),r(gr,e$),r(W,r$),r(W,ai),h(Dn,ai,null),r(W,t$),r(W,ii),h(Sn,ii,null),m(e,Zp,p),m(e,F,p),h(zn,F,null),r(F,o$),r(F,ci),r(ci,li),r(li,n$),r(ci,s$),r(F,a$),r(F,On),r(On,i$),r(On,qn),r(qn,c$),r(On,l$),r(F,d$),r(F,di),r(di,p$),r(di,Bn),r(Bn,m$),r(F,f$),r(F,pi),h(In,pi,null),r(F,g$),r(F,mi),h(An,mi,null),m(e,em,p),m(e,N,p),h(Cn,N,null),r(N,h$),r(N,fi),r(fi,gi),r(gi,u$),r(fi,_$),r(N,b$),r(N,hi),h(Wn,hi,null),r(N,v$),r(N,ui),h(Nn,ui,null),m(e,rm,p),m(e,hr,p),r(hr,Zr),r(Zr,fd),h(Vn,fd,null),r(hr,$$),r(hr,gd),r(gd,T$),m(e,tm,p),m(e,Be,p),h(Mn,Be,null),r(Be,y$),r(Be,hd),r(hd,k$),r(Be,x$),r(Be,_i),r(_i,w$),r(_i,Gn),r(Gn,L$),m(e,om,p),m(e,Ie,p),h(jn,Ie,null),r(Ie,E$),r(Ie,ud),r(ud,P$),r(Ie,F$),r(Ie,bi),r(bi,D$),r(bi,Hn),r(Hn,S$),nm=!0},p(e,[p]){const Rn={};p&2&&(Rn.$$scope={dirty:p,ctx:e}),jr.$set(Rn)},i(e){nm||(u(at.$$.fragment,e),u(it.$$.fragment,e),u(ct.$$.fragment,e),u(lt.$$.fragment,e),u(dt.$$.fragment,e),u(pt.$$.fragment,e),u(mt.$$.fragment,e),u(ft.$$.fragment,e),u(gt.$$.fragment,e),u(ht.$$.fragment,e),u(ut.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(vt.$$.fragment,e),u($t.$$.fragment,e),u(Tt.$$.fragment,e),u(yt.$$.fragment,e),u(kt.$$.fragment,e),u(xt.$$.fragment,e),u(wt.$$.fragment,e),u(Lt.$$.fragment,e),u(Et.$$.fragment,e),u(Pt.$$.fragment,e),u(Ft.$$.fragment,e),u(Dt.$$.fragment,e),u(St.$$.fragment,e),u(zt.$$.fragment,e),u(Ot.$$.fragment,e),u(qt.$$.fragment,e),u(Bt.$$.fragment,e),u(It.$$.fragment,e),u(At.$$.fragment,e),u(Ct.$$.fragment,e),u(Wt.$$.fragment,e),u(Nt.$$.fragment,e),u(Vt.$$.fragment,e),u(Mt.$$.fragment,e),u(Gt.$$.fragment,e),u(Ht.$$.fragment,e),u(Rt.$$.fragment,e),u(Ut.$$.fragment,e),u(Yt.$$.fragment,e),u(Xt.$$.fragment,e),u(Jt.$$.fragment,e),u(Zt.$$.fragment,e),u(eo.$$.fragment,e),u(to.$$.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(lo.$$.fragment,e),u(po.$$.fragment,e),u(mo.$$.fragment,e),u(fo.$$.fragment,e),u(go.$$.fragment,e),u(ho.$$.fragment,e),u(uo.$$.fragment,e),u(_o.$$.fragment,e),u(bo.$$.fragment,e),u(vo.$$.fragment,e),u($o.$$.fragment,e),u(To.$$.fragment,e),u(yo.$$.fragment,e),u(ko.$$.fragment,e),u(xo.$$.fragment,e),u(wo.$$.fragment,e),u(Lo.$$.fragment,e),u(Po.$$.fragment,e),u(Fo.$$.fragment,e),u(Do.$$.fragment,e),u(So.$$.fragment,e),u(zo.$$.fragment,e),u(Oo.$$.fragment,e),u(qo.$$.fragment,e),u(Bo.$$.fragment,e),u(Io.$$.fragment,e),u(Ao.$$.fragment,e),u(Co.$$.fragment,e),u(Wo.$$.fragment,e),u(No.$$.fragment,e),u(Vo.$$.fragment,e),u(Mo.$$.fragment,e),u(Go.$$.fragment,e),u(jo.$$.fragment,e),u(Ho.$$.fragment,e),u(Ro.$$.fragment,e),u(Ko.$$.fragment,e),u(Uo.$$.fragment,e),u(Yo.$$.fragment,e),u(Xo.$$.fragment,e),u(Jo.$$.fragment,e),u(Qo.$$.fragment,e),u(Zo.$$.fragment,e),u(en.$$.fragment,e),u(rn.$$.fragment,e),u(tn.$$.fragment,e),u(on.$$.fragment,e),u(nn.$$.fragment,e),u(an.$$.fragment,e),u(cn.$$.fragment,e),u(dn.$$.fragment,e),u(pn.$$.fragment,e),u(mn.$$.fragment,e),u(jr.$$.fragment,e),u(fn.$$.fragment,e),u(gn.$$.fragment,e),u(hn.$$.fragment,e),u(un.$$.fragment,e),u(bn.$$.fragment,e),u(vn.$$.fragment,e),u($n.$$.fragment,e),u(yn.$$.fragment,e),u(kn.$$.fragment,e),u(wn.$$.fragment,e),u(Ln.$$.fragment,e),u(En.$$.fragment,e),u(Pn.$$.fragment,e),u(Fn.$$.fragment,e),u(Dn.$$.fragment,e),u(Sn.$$.fragment,e),u(zn.$$.fragment,e),u(In.$$.fragment,e),u(An.$$.fragment,e),u(Cn.$$.fragment,e),u(Wn.$$.fragment,e),u(Nn.$$.fragment,e),u(Vn.$$.fragment,e),u(Mn.$$.fragment,e),u(jn.$$.fragment,e),nm=!0)},o(e){_(at.$$.fragment,e),_(it.$$.fragment,e),_(ct.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),_(pt.$$.fragment,e),_(mt.$$.fragment,e),_(ft.$$.fragment,e),_(gt.$$.fragment,e),_(ht.$$.fragment,e),_(ut.$$.fragment,e),_(_t.$$.fragment,e),_(bt.$$.fragment,e),_(vt.$$.fragment,e),_($t.$$.fragment,e),_(Tt.$$.fragment,e),_(yt.$$.fragment,e),_(kt.$$.fragment,e),_(xt.$$.fragment,e),_(wt.$$.fragment,e),_(Lt.$$.fragment,e),_(Et.$$.fragment,e),_(Pt.$$.fragment,e),_(Ft.$$.fragment,e),_(Dt.$$.fragment,e),_(St.$$.fragment,e),_(zt.$$.fragment,e),_(Ot.$$.fragment,e),_(qt.$$.fragment,e),_(Bt.$$.fragment,e),_(It.$$.fragment,e),_(At.$$.fragment,e),_(Ct.$$.fragment,e),_(Wt.$$.fragment,e),_(Nt.$$.fragment,e),_(Vt.$$.fragment,e),_(Mt.$$.fragment,e),_(Gt.$$.fragment,e),_(Ht.$$.fragment,e),_(Rt.$$.fragment,e),_(Ut.$$.fragment,e),_(Yt.$$.fragment,e),_(Xt.$$.fragment,e),_(Jt.$$.fragment,e),_(Zt.$$.fragment,e),_(eo.$$.fragment,e),_(to.$$.fragment,e),_(oo.$$.fragment,e),_(no.$$.fragment,e),_(so.$$.fragment,e),_(ao.$$.fragment,e),_(io.$$.fragment,e),_(co.$$.fragment,e),_(lo.$$.fragment,e),_(po.$$.fragment,e),_(mo.$$.fragment,e),_(fo.$$.fragment,e),_(go.$$.fragment,e),_(ho.$$.fragment,e),_(uo.$$.fragment,e),_(_o.$$.fragment,e),_(bo.$$.fragment,e),_(vo.$$.fragment,e),_($o.$$.fragment,e),_(To.$$.fragment,e),_(yo.$$.fragment,e),_(ko.$$.fragment,e),_(xo.$$.fragment,e),_(wo.$$.fragment,e),_(Lo.$$.fragment,e),_(Po.$$.fragment,e),_(Fo.$$.fragment,e),_(Do.$$.fragment,e),_(So.$$.fragment,e),_(zo.$$.fragment,e),_(Oo.$$.fragment,e),_(qo.$$.fragment,e),_(Bo.$$.fragment,e),_(Io.$$.fragment,e),_(Ao.$$.fragment,e),_(Co.$$.fragment,e),_(Wo.$$.fragment,e),_(No.$$.fragment,e),_(Vo.$$.fragment,e),_(Mo.$$.fragment,e),_(Go.$$.fragment,e),_(jo.$$.fragment,e),_(Ho.$$.fragment,e),_(Ro.$$.fragment,e),_(Ko.$$.fragment,e),_(Uo.$$.fragment,e),_(Yo.$$.fragment,e),_(Xo.$$.fragment,e),_(Jo.$$.fragment,e),_(Qo.$$.fragment,e),_(Zo.$$.fragment,e),_(en.$$.fragment,e),_(rn.$$.fragment,e),_(tn.$$.fragment,e),_(on.$$.fragment,e),_(nn.$$.fragment,e),_(an.$$.fragment,e),_(cn.$$.fragment,e),_(dn.$$.fragment,e),_(pn.$$.fragment,e),_(mn.$$.fragment,e),_(jr.$$.fragment,e),_(fn.$$.fragment,e),_(gn.$$.fragment,e),_(hn.$$.fragment,e),_(un.$$.fragment,e),_(bn.$$.fragment,e),_(vn.$$.fragment,e),_($n.$$.fragment,e),_(yn.$$.fragment,e),_(kn.$$.fragment,e),_(wn.$$.fragment,e),_(Ln.$$.fragment,e),_(En.$$.fragment,e),_(Pn.$$.fragment,e),_(Fn.$$.fragment,e),_(Dn.$$.fragment,e),_(Sn.$$.fragment,e),_(zn.$$.fragment,e),_(In.$$.fragment,e),_(An.$$.fragment,e),_(Cn.$$.fragment,e),_(Wn.$$.fragment,e),_(Nn.$$.fragment,e),_(Vn.$$.fragment,e),_(Mn.$$.fragment,e),_(jn.$$.fragment,e),nm=!1},d(e){t(L),e&&t(Re),e&&t(k),b(at),e&&t(wd),e&&t(y),e&&t(Ld),e&&t(ts),e&&t(Ed),e&&t(Ke),b(it),e&&t(Pd),e&&t(V),e&&t(Fd),e&&t(as),e&&t(Dd),b(ct,e),e&&t(Sd),e&&t(We),e&&t(zd),e&&t(M),e&&t(Od),e&&t(x),e&&t(qd),e&&t(S),e&&t(Bd),e&&t(z),e&&t(Id),b(lt,e),e&&t(Ad),e&&t(br),e&&t(Cd),e&&t(O),e&&t(Wd),e&&t(ms),e&&t(Nd),e&&t(Ue),b(dt),e&&t(Vd),e&&t(Ye),b(pt),e&&t(Md),e&&t(Xe),b(mt),e&&t(Gd),e&&t(R),b(ft),b(gt),e&&t(jd),e&&t(Je),b(ht),e&&t(Hd),e&&t(Qe),b(ut),e&&t(Rd),e&&t(Ze),b(_t),e&&t(Kd),e&&t(K),b(bt),b(vt),e&&t(Ud),e&&t(er),b($t),e&&t(Yd),e&&t(rr),b(Tt),e&&t(Xd),e&&t(tr),b(yt),e&&t(Jd),e&&t(or),b(kt),e&&t(Qd),e&&t(nr),b(xt),e&&t(Zd),e&&t(sr),b(wt),e&&t(ep),e&&t(ar),b(Lt),e&&t(rp),e&&t(Lr),e&&t(tp),e&&t(U),b(Et),b(Pt),e&&t(op),e&&t(Y),b(Ft),b(Dt),e&&t(np),e&&t(X),b(St),b(zt),e&&t(sp),e&&t(J),b(Ot),b(qt),e&&t(ap),e&&t(Q),b(Bt),b(It),e&&t(ip),e&&t(Z),b(At),b(Ct),e&&t(cp),e&&t(ee),b(Wt),b(Nt),e&&t(lp),e&&t(re),b(Vt),b(Mt),e&&t(dp),e&&t(te),b(Gt),b(Ht),e&&t(pp),e&&t(oe),b(Rt),b(Ut),e&&t(mp),e&&t(ne),b(Yt),b(Xt),e&&t(fp),e&&t(se),b(Jt),b(Zt),e&&t(gp),e&&t(ae),b(eo),b(to),e&&t(hp),e&&t(ie),b(oo),b(no),e&&t(up),e&&t(ce),b(so),b(ao),e&&t(_p),e&&t(le),b(io),b(co),e&&t(bp),e&&t(de),b(lo),b(po),e&&t(vp),e&&t(pe),b(mo),b(fo),e&&t($p),e&&t(me),b(go),b(ho),e&&t(Tp),e&&t(fe),b(uo),b(_o),e&&t(yp),e&&t(ge),b(bo),b(vo),e&&t(kp),e&&t(he),b($o),b(To),e&&t(xp),e&&t(ue),b(yo),b(ko),e&&t(wp),e&&t(_e),b(xo),b(wo),e&&t(Lp),e&&t(be),b(Lo),b(Po),e&&t(Ep),e&&t(ve),b(Fo),b(Do),e&&t(Pp),e&&t($e),b(So),b(zo),e&&t(Fp),e&&t(Te),b(Oo),b(qo),e&&t(Dp),e&&t(ye),b(Bo),b(Io),e&&t(Sp),e&&t(ke),b(Ao),b(Co),e&&t(zp),e&&t(xe),b(Wo),b(No),e&&t(Op),e&&t(we),b(Vo),b(Mo),e&&t(qp),e&&t(Le),b(Go),b(jo),e&&t(Bp),e&&t(Ee),b(Ho),b(Ro),e&&t(Ip),e&&t(Pe),b(Ko),b(Uo),e&&t(Ap),e&&t(Fe),b(Yo),b(Xo),e&&t(Cp),e&&t(De),b(Jo),b(Qo),e&&t(Wp),e&&t(ir),b(Zo),e&&t(Np),e&&t(Vr),e&&t(Vp),e&&t(Se),b(en),b(rn),e&&t(Mp),e&&t(cr),b(tn),b(on),e&&t(Gp),e&&t(ze),b(nn),b(an),e&&t(jp),e&&t(Oe),b(cn),b(dn),e&&t(Hp),e&&t(lr),b(pn),e&&t(Rp),e&&t(Gr),e&&t(Kp),e&&t($),b(mn),b(jr),b(fn),b(gn),b(hn),b(un),b(bn),b(vn),b($n),e&&t(Up),e&&t(dr),b(yn),e&&t(Yp),e&&t(pr),b(kn),e&&t(Xp),e&&t(C),b(wn),b(Ln),b(En),e&&t(Jp),e&&t(fr),b(Pn),e&&t(Qp),e&&t(W),b(Fn),b(Dn),b(Sn),e&&t(Zp),e&&t(F),b(zn),b(In),b(An),e&&t(em),e&&t(N),b(Cn),b(Wn),b(Nn),e&&t(rm),e&&t(hr),b(Vn),e&&t(tm),e&&t(Be),b(Mn),e&&t(om),e&&t(Ie),b(jn)}}}const Ak={local:"utilities-for-generation",sections:[{local:"generate-outputs",sections:[{local:"transformers.generation_utils.GreedySearchDecoderOnlyOutput",title:"GreedySearchOutput"},{local:"transformers.generation_utils.SampleDecoderOnlyOutput",title:"SampleOutput"},{local:"transformers.generation_utils.BeamSearchDecoderOnlyOutput",title:"BeamSearchOutput"},{local:"transformers.generation_utils.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"}],title:"Utilities for Generation"};function Ck(xd){return zk(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jk extends Pk{constructor(L){super();Fk(this,L,Ck,Ik,Dk,{})}}export{jk as default,Ak as metadata};
