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

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

inputs = tokenizer("Hello, my dog is cute and ", return_tensors="pt")
generation_output = model.generate(**inputs, return_dict_in_generate=True, output_scores=True)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPT2Tokenizer, GPT2LMHeadModel

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

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