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