import{S as rx,i as ox,s as nx,e as o,k as c,w as f,t as a,M as sx,c as n,d as r,m as l,a as s,x as g,h as i,b as d,G as t,g as m,y as h,q as u,o as _,B as b,v as ax,L as E1}from"../../chunks/vendor-hf-doc-builder.js";import{T as tx}from"../../chunks/Tip-hf-doc-builder.js";import{D as v}from"../../chunks/Docstring-hf-doc-builder.js";import{C as dp}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as L1}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ix(Y){let $,w;return $=new dp({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($.$$.fragment)},l(T){g($.$$.fragment,T)},m(T,k){h($,T,k),w=!0},p:E1,i(T){w||(u($.$$.fragment,T),w=!0)},o(T){_($.$$.fragment,T),w=!1},d(T){b($,T)}}}function cx(Y){let $,w;return{c(){$=o("p"),w=a("The API for the streamer classes is still under development and may change in the future.")},l(T){$=n(T,"P",{});var k=s($);w=i(k,"The API for the streamer classes is still under development and may change in the future."),k.forEach(r)},m(T,k){m(T,$,k),t($,w)},d(T){T&&r($)}}}function lx(Y){let $,w,T,k,A;return k=new dp({props:{code:`from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer

tok = AutoTokenizer.from_pretrained("gpt2")
model = AutoModelForCausalLM.from_pretrained("gpt2")
inputs = tok(["An increasing sequence: one,"], return_tensors="pt")
streamer = TextStreamer(tok)

# Despite returning the usual output, the streamer will also print the generated text to stdout.
_ = model.generate(**inputs, streamer=streamer, max_new_tokens=20)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, TextStreamer

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

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

tok = AutoTokenizer.from_pretrained("gpt2")
model = AutoModelForCausalLM.from_pretrained("gpt2")
inputs = tok(["An increasing sequence: one,"], return_tensors="pt")
streamer = TextIteratorStreamer(tok)

# Run the generation in a separate thread, so that we can fetch the generated text in a non-blocking way.
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=20)
thread = Thread(target=model.generate, kwargs=generation_kwargs)
thread.start()
generated_text = ""
for new_text in streamer:
    generated_text += new_text
generated_text`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> threading <span class="hljs-keyword">import</span> Thread

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

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