import{S as tv,i as ov,s as nv,e as r,k as d,w as h,t as o,M as rv,c as a,d as t,m as c,a as s,x as p,h as n,b as l,G as e,g as $,y as m,q as f,o as u,B as _,v as av,L as Kb}from"../../chunks/vendor-hf-doc-builder.js";import{T as Yb}from"../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ev}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oi}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qb}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function sv(pe){let y,F,q,E,S;return E=new ev({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMHRva2VuaXplciUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBdG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjB0b2tlbml6ZXIlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEF0b2tlbml6ZXIucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the tokenizer to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the tokenizer to an organization with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){y=r("p"),F=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=a(v,"P",{});var D=s(y);F=n(D,"Examples:"),D.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,D){$(v,y,D),e(y,F),$(v,q,D),m(E,v,D),S=!0},p:Kb,i(v){S||(f(E.$$.fragment,v),S=!0)},o(v){u(E.$$.fragment,v),S=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function iv(pe){let y,F;return{c(){y=r("p"),F=o(`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`)},l(q){y=a(q,"P",{});var E=s(y);F=n(E,`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`),E.forEach(t)},m(q,E){$(q,y,E),e(y,F)},d(q){q&&t(y)}}}function dv(pe){let y,F,q,E,S;return E=new ev({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMHRva2VuaXplciUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBdG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjB0b2tlbml6ZXIlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEF0b2tlbml6ZXIucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the tokenizer to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the tokenizer to an organization with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){y=r("p"),F=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=a(v,"P",{});var D=s(y);F=n(D,"Examples:"),D.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,D){$(v,y,D),e(y,F),$(v,q,D),m(E,v,D),S=!0},p:Kb,i(v){S||(f(E.$$.fragment,v),S=!0)},o(v){u(E.$$.fragment,v),S=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function cv(pe){let y,F;return{c(){y=r("p"),F=o(`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`)},l(q){y=a(q,"P",{});var E=s(y);F=n(E,`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`),E.forEach(t)},m(q,E){$(q,y,E),e(y,F)},d(q){q&&t(y)}}}function lv(pe){let y,F,q,E,S,v,D,Wn,Ui,Os,je,Ri,Tt,Mi,Vi,Us,He,Bn,Gi,ji,Sn,Hi,Rs,O,Zi,Co,Ji,Xi,Ao,Yi,Qi,Wo,Ki,ed,Bo,td,od,Ms,De,So,nd,rd,Oo,ad,sd,Vs,me,On,id,dd,Un,cd,ld,Rn,hd,Gs,I,Uo,pd,md,Ro,fd,ud,Mn,_d,gd,Vn,kd,bd,Gn,vd,Td,jn,yd,wd,Hn,zd,xd,yt,Ed,$d,js,Ne,Ze,Zn,wt,Pd,Jn,qd,Hs,g,zt,Id,Xn,Fd,Ld,xt,Dd,Mo,Nd,Cd,Ad,Yn,Wd,Bd,Qn,Sd,Od,Kn,Ud,Rd,N,fe,er,Md,Vd,tr,Gd,jd,or,Hd,Zd,Jd,U,nr,Xd,Yd,rr,Qd,Kd,ar,ec,tc,sr,oc,nc,ir,rc,ac,sc,Q,dr,ic,dc,cr,cc,lc,lr,hc,pc,hr,mc,fc,uc,R,pr,_c,gc,mr,kc,bc,fr,vc,Tc,ur,yc,wc,Vo,zc,xc,Ec,Je,_r,$c,Pc,gr,qc,Ic,Fc,K,kr,Lc,Dc,br,Nc,Cc,vr,Ac,Wc,Tr,Bc,Sc,Oc,ee,yr,Uc,Rc,wr,Mc,Vc,zr,Gc,jc,xr,Hc,Zc,Jc,Xe,Et,Xc,Er,Yc,Qc,Ye,$t,Kc,$r,el,tl,ue,Pt,ol,Pr,nl,rl,qt,al,qr,sl,il,dl,_e,It,cl,Ir,ll,hl,Ft,pl,Fr,ml,fl,ul,ge,Lt,_l,Lr,gl,kl,Qe,bl,Ke,Dt,vl,Dr,Tl,yl,et,Nt,wl,Nr,zl,xl,tt,Ct,El,Cr,$l,Pl,ke,At,ql,Ar,Il,Fl,ot,Ll,be,Wt,Dl,Wr,Nl,Cl,Ce,Al,Br,Wl,Bl,Sr,Sl,Ol,Ul,ve,Bt,Rl,Or,Ml,Vl,Ur,Gl,Zs,Ae,nt,Rr,St,jl,Mr,Hl,Js,te,Zl,Go,Jl,Xl,Ot,Yl,Ql,jo,Kl,eh,Xs,k,Ut,th,Vr,oh,nh,Rt,rh,Ho,ah,sh,ih,Gr,dh,ch,jr,lh,hh,Hr,ph,mh,C,Te,Zr,fh,uh,Jr,_h,gh,Xr,kh,bh,vh,M,Yr,Th,yh,Qr,wh,zh,Kr,xh,Eh,ea,$h,Ph,ta,qh,Ih,Fh,oe,oa,Lh,Dh,na,Nh,Ch,ra,Ah,Wh,aa,Bh,Sh,Oh,V,sa,Uh,Rh,ia,Mh,Vh,da,Gh,jh,ca,Hh,Zh,Zo,Jh,Xh,Yh,rt,la,Qh,Kh,ha,ep,tp,op,ne,pa,np,rp,ma,ap,sp,fa,ip,dp,ua,cp,lp,hp,re,_a,pp,mp,ga,fp,up,ka,_p,gp,ba,kp,bp,vp,at,Mt,Tp,va,yp,wp,st,Vt,zp,Ta,xp,Ep,ye,Gt,$p,ya,Pp,qp,jt,Ip,wa,Fp,Lp,Dp,we,Ht,Np,za,Cp,Ap,Zt,Wp,xa,Bp,Sp,Op,ze,Jt,Up,Ea,Rp,Mp,it,Vp,dt,Xt,Gp,$a,jp,Hp,ct,Yt,Zp,Pa,Jp,Xp,lt,Qt,Yp,qa,Qp,Kp,xe,Kt,em,Ia,tm,om,ht,nm,Ee,eo,rm,Fa,am,sm,La,im,dm,pt,to,cm,Da,lm,Ys,We,mt,Na,oo,hm,Ca,pm,Qs,w,no,mm,ie,fm,ro,Aa,um,_m,gm,Jo,km,bm,Xo,vm,Tm,ym,Wa,wm,zm,G,ao,xm,Ba,Em,$m,Sa,Pm,qm,so,Yo,Oa,Im,Fm,Lm,Qo,Ua,Dm,Nm,Cm,Ra,Am,Wm,j,io,Bm,Ma,Sm,Om,Va,Um,Rm,co,Ko,Ga,Mm,Vm,Gm,en,ja,jm,Hm,Zm,Ha,Jm,Xm,ft,lo,Ym,Za,Qm,Km,$e,ho,ef,Ja,tf,of,Be,tn,Xa,nf,rf,af,on,Ya,sf,df,cf,nn,Qa,lf,hf,pf,ut,po,mf,mo,ff,Ka,uf,_f,gf,W,fo,kf,es,bf,vf,uo,Tf,rn,yf,wf,zf,_o,an,ts,xf,Ef,$f,sn,os,Pf,qf,If,ns,Ff,Lf,go,dn,rs,Df,Nf,Cf,cn,as,Af,Wf,Bf,H,ko,Sf,Se,Of,ss,Uf,Rf,is,Mf,Vf,Gf,ds,jf,Hf,bo,ln,cs,Zf,Jf,Xf,hn,ls,Yf,Qf,Kf,hs,eu,tu,Z,vo,ou,ps,nu,ru,ms,au,su,To,pn,fs,iu,du,cu,mn,us,lu,hu,pu,_s,mu,fu,_t,yo,uu,gs,_u,gu,gt,wo,ku,ks,bu,vu,B,zo,Tu,bs,yu,wu,vs,zu,xu,xo,Ts,Eu,$u,ys,Pu,qu,ws,Iu,Fu,Eo,fn,zs,Lu,Du,Nu,un,xs,Cu,Au,Wu,L,$o,Bu,Es,Su,Ou,Po,Uu,_n,Ru,Mu,Vu,qo,gn,$s,Gu,ju,Hu,kn,Ps,Zu,Ju,Xu,qs,Yu,Qu,Io,bn,Is,Ku,e_,t_,vn,Fs,o_,n_,r_,Ls,a_,s_,kt,Fo,i_,Ds,d_,Ks;return v=new Oi({}),wt=new Oi({}),zt=new T({props:{name:"class transformers.PreTrainedTokenizer",anchor:"transformers.PreTrainedTokenizer",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length (in number of tokens) for the inputs to the transformer model. When the tokenizer is
loaded with <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a>, this will be set to the
value stored for the associated model in <code>max_model_input_sizes</code> (see above). If no value is provided, will
default to VERY_LARGE_INTEGER (<code>int(1e30)</code>).`,name:"model_max_length"},{anchor:"transformers.PreTrainedTokenizer.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.PreTrainedTokenizer.truncation_side",description:`<strong>truncation_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have truncation applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"truncation_side"},{anchor:"transformers.PreTrainedTokenizer.model_input_names",description:`<strong>model_input_names</strong> (<code>List[string]</code>, <em>optional</em>) &#x2014;
The list of inputs accepted by the forward pass of the model (like <code>&quot;token_type_ids&quot;</code> or
<code>&quot;attention_mask&quot;</code>). Default value is picked from the class attribute of the same name.`,name:"model_input_names"},{anchor:"transformers.PreTrainedTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the beginning of a sentence. Will be associated to <code>self.bos_token</code> and
<code>self.bos_token_id</code>.`,name:"bos_token"},{anchor:"transformers.PreTrainedTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the end of a sentence. Will be associated to <code>self.eos_token</code> and
<code>self.eos_token_id</code>.`,name:"eos_token"},{anchor:"transformers.PreTrainedTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing an out-of-vocabulary token. Will be associated to <code>self.unk_token</code> and
<code>self.unk_token_id</code>.`,name:"unk_token"},{anchor:"transformers.PreTrainedTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token separating two different sentences in the same input (used by BERT for instance). Will be
associated to <code>self.sep_token</code> and <code>self.sep_token_id</code>.`,name:"sep_token"},{anchor:"transformers.PreTrainedTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation. Will be associated to <code>self.pad_token</code> and <code>self.pad_token_id</code>.`,name:"pad_token"},{anchor:"transformers.PreTrainedTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the class of the input (used by BERT for instance). Will be associated to
<code>self.cls_token</code> and <code>self.cls_token_id</code>.`,name:"cls_token"},{anchor:"transformers.PreTrainedTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing a masked token (used by masked-language modeling pretraining objectives, like
BERT). Will be associated to <code>self.mask_token</code> and <code>self.mask_token_id</code>.`,name:"mask_token"},{anchor:"transformers.PreTrainedTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Add them here to ensure they won&#x2019;t be split by the
tokenization process. Will be associated to <code>self.additional_special_tokens</code> and
<code>self.additional_special_tokens_ids</code>.`,name:"additional_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should cleanup the spaces that were added when splitting the input text during the
tokenization process.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizer.split_special_tokens",description:`<strong>split_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the special tokens should be split during the tokenization process. The default behavior is
to not split special tokens. This means that if <code>&lt;s&gt;</code> is the <code>bos_token</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;) = [&apos;&lt;s&gt;</code>]. Otherwise, if <code>split_special_tokens=True</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;)</code> will be give <code>[&apos;&lt;&apos;, &apos;s&apos;, &apos;&gt;&apos;]</code>. This argument is only supported for <code>slow</code> tokenizers for the moment.`,name:"split_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L333"}}),Et=new T({props:{name:"__call__",anchor:"transformers.PreTrainedTokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.PreTrainedTokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizer.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.PreTrainedTokenizer.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2528",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> \u2014 List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> \u2014 List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>\u201Ctoken_type_ids\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> \u2014 List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>\u201Cattention_mask\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> \u2014 List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> \u2014 Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> \u2014 List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> \u2014 The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),$t=new T({props:{name:"batch_decode",anchor:"transformers.PreTrainedTokenizer.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.batch_decode.sequences",description:`<strong>sequences</strong> (<code>Union[List[int], List[List[int]], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"sequences"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3486",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Pt=new T({props:{name:"decode",anchor:"transformers.PreTrainedTokenizer.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.PreTrainedTokenizer.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizer.decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3520",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),It=new T({props:{name:"encode",anchor:"transformers.PreTrainedTokenizer.encode",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[int]]"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[int], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.encode.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.encode.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizer.encode.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.encode.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizer.encode.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizer.encode.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizer.encode.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizer.encode.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.encode.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizer.encode.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>
<p>**kwargs &#x2014; Passed along to the <code>.tokenize()</code> method.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2336",returnDescription:`
<p>The tokenized ids of the text.</p>
`,returnType:`
<p><code>List[int]</code>, <code>torch.Tensor</code>, <code>tf.Tensor</code> or <code>np.ndarray</code></p>
`}}),Lt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedTokenizer.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tokenizer to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload tokenizer&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L776"}}),Qe=new Qb({props:{anchor:"transformers.PreTrainedTokenizer.push_to_hub.example",$$slots:{default:[sv]},$$scope:{ctx:pe}}}),Dt=new T({props:{name:"convert_ids_to_tokens",anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens",parameters:[{name:"ids",val:": typing.Union[int, typing.List[int]]"},{name:"skip_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens.ids",description:`<strong>ids</strong> (<code>int</code> or <code>List[int]</code>) &#x2014;
The token id (or token ids) to convert to tokens.`,name:"ids"},{anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L890",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Nt=new T({props:{name:"convert_tokens_to_ids",anchor:"transformers.PreTrainedTokenizer.convert_tokens_to_ids",parameters:[{name:"tokens",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.convert_tokens_to_ids.tokens",description:"<strong>tokens</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several token(s) to convert to token id(s).",name:"tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L567",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),Ct=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizer.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L369",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),At=new T({props:{name:"num_special_tokens_to_add",anchor:"transformers.PreTrainedTokenizer.num_special_tokens_to_add",parameters:[{name:"pair",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.num_special_tokens_to_add.pair",description:`<strong>pair</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the number of added tokens should be computed in the case of a sequence pair or a single
sequence.`,name:"pair"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L458",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ot=new Yb({props:{$$slots:{default:[iv]},$$scope:{ctx:pe}}}),Wt=new T({props:{name:"prepare_for_tokenization",anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization",parameters:[{name:"text",val:": str"},{name:"is_split_into_words",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.text",description:`<strong>text</strong> (<code>str</code>) &#x2014;
The text to prepare.`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Keyword arguments to use for the tokenization.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L828",returnDescription:`
<p>The prepared text and the unused kwargs.</p>
`,returnType:`
<p><code>Tuple[str, Dict[str, Any]]</code></p>
`}}),Bt=new T({props:{name:"tokenize",anchor:"transformers.PreTrainedTokenizer.tokenize",parameters:[{name:"text",val:": str"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.tokenize.text",description:`<strong>text</strong> (<code>str</code>) &#x2014;
The sequence to be encoded.`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.tokenize.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Passed along to the model-specific <code>prepare_for_tokenization</code> preprocessing method.`,name:"*kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L481",returnDescription:`
<p>The list of tokens.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),St=new Oi({}),Ut=new T({props:{name:"class transformers.PreTrainedTokenizerFast",anchor:"transformers.PreTrainedTokenizerFast",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length (in number of tokens) for the inputs to the transformer model. When the tokenizer is
loaded with <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a>, this will be set to the
value stored for the associated model in <code>max_model_input_sizes</code> (see above). If no value is provided, will
default to VERY_LARGE_INTEGER (<code>int(1e30)</code>).`,name:"model_max_length"},{anchor:"transformers.PreTrainedTokenizerFast.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.PreTrainedTokenizerFast.truncation_side",description:`<strong>truncation_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have truncation applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"truncation_side"},{anchor:"transformers.PreTrainedTokenizerFast.model_input_names",description:`<strong>model_input_names</strong> (<code>List[string]</code>, <em>optional</em>) &#x2014;
The list of inputs accepted by the forward pass of the model (like <code>&quot;token_type_ids&quot;</code> or
<code>&quot;attention_mask&quot;</code>). Default value is picked from the class attribute of the same name.`,name:"model_input_names"},{anchor:"transformers.PreTrainedTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the beginning of a sentence. Will be associated to <code>self.bos_token</code> and
<code>self.bos_token_id</code>.`,name:"bos_token"},{anchor:"transformers.PreTrainedTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the end of a sentence. Will be associated to <code>self.eos_token</code> and
<code>self.eos_token_id</code>.`,name:"eos_token"},{anchor:"transformers.PreTrainedTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing an out-of-vocabulary token. Will be associated to <code>self.unk_token</code> and
<code>self.unk_token_id</code>.`,name:"unk_token"},{anchor:"transformers.PreTrainedTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token separating two different sentences in the same input (used by BERT for instance). Will be
associated to <code>self.sep_token</code> and <code>self.sep_token_id</code>.`,name:"sep_token"},{anchor:"transformers.PreTrainedTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation. Will be associated to <code>self.pad_token</code> and <code>self.pad_token_id</code>.`,name:"pad_token"},{anchor:"transformers.PreTrainedTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the class of the input (used by BERT for instance). Will be associated to
<code>self.cls_token</code> and <code>self.cls_token_id</code>.`,name:"cls_token"},{anchor:"transformers.PreTrainedTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing a masked token (used by masked-language modeling pretraining objectives, like
BERT). Will be associated to <code>self.mask_token</code> and <code>self.mask_token_id</code>.`,name:"mask_token"},{anchor:"transformers.PreTrainedTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Add them here to ensure they won&#x2019;t be split by the
tokenization process. Will be associated to <code>self.additional_special_tokens</code> and
<code>self.additional_special_tokens_ids</code>.`,name:"additional_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should cleanup the spaces that were added when splitting the input text during the
tokenization process.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.split_special_tokens",description:`<strong>split_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the special tokens should be split during the tokenization process. The default behavior is
to not split special tokens. This means that if <code>&lt;s&gt;</code> is the <code>bos_token</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;) = [&apos;&lt;s&gt;</code>]. Otherwise, if <code>split_special_tokens=True</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;)</code> will be give <code>[&apos;&lt;&apos;, &apos;s&apos;, &apos;&gt;&apos;]</code>. This argument is only supported for <code>slow</code> tokenizers for the moment.`,name:"split_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.tokenizer_object",description:`<strong>tokenizer_object</strong> (<a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a>) &#x2014;
A <a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a> object from &#x1F917; tokenizers to instantiate from. See <a href="../fast_tokenizers">Using tokenizers from &#x1F917;
tokenizers</a> for more information.`,name:"tokenizer_object"},{anchor:"transformers.PreTrainedTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>) &#x2014;
A path to a local JSON file representing a previously serialized <a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a> object from &#x1F917;
tokenizers.`,name:"tokenizer_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L78"}}),Mt=new T({props:{name:"__call__",anchor:"transformers.PreTrainedTokenizerFast.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2528",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> \u2014 List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> \u2014 List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>\u201Ctoken_type_ids\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> \u2014 List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>\u201Cattention_mask\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> \u2014 List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> \u2014 Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> \u2014 List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> \u2014 The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Vt=new T({props:{name:"batch_decode",anchor:"transformers.PreTrainedTokenizerFast.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.sequences",description:`<strong>sequences</strong> (<code>Union[List[int], List[List[int]], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"sequences"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3486",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Gt=new T({props:{name:"decode",anchor:"transformers.PreTrainedTokenizerFast.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.PreTrainedTokenizerFast.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3520",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Ht=new T({props:{name:"encode",anchor:"transformers.PreTrainedTokenizerFast.encode",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[int]]"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[int], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.encode.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text"},{anchor:"transformers.PreTrainedTokenizerFast.encode.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizerFast.encode.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.encode.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizerFast.encode.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizerFast.encode.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.encode.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.encode.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizerFast.encode.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizerFast.encode.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>
<p>**kwargs &#x2014; Passed along to the <code>.tokenize()</code> method.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2336",returnDescription:`
<p>The tokenized ids of the text.</p>
`,returnType:`
<p><code>List[int]</code>, <code>torch.Tensor</code>, <code>tf.Tensor</code> or <code>np.ndarray</code></p>
`}}),Jt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedTokenizerFast.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tokenizer to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload tokenizer&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L776"}}),it=new Qb({props:{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.example",$$slots:{default:[dv]},$$scope:{ctx:pe}}}),Xt=new T({props:{name:"convert_ids_to_tokens",anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens",parameters:[{name:"ids",val:": typing.Union[int, typing.List[int]]"},{name:"skip_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens.ids",description:`<strong>ids</strong> (<code>int</code> or <code>List[int]</code>) &#x2014;
The token id (or token ids) to convert to tokens.`,name:"ids"},{anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L310",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Yt=new T({props:{name:"convert_tokens_to_ids",anchor:"transformers.PreTrainedTokenizerFast.convert_tokens_to_ids",parameters:[{name:"tokens",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.convert_tokens_to_ids.tokens",description:"<strong>tokens</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several token(s) to convert to token id(s).",name:"tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L255",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),Qt=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizerFast.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L176",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),Kt=new T({props:{name:"num_special_tokens_to_add",anchor:"transformers.PreTrainedTokenizerFast.num_special_tokens_to_add",parameters:[{name:"pair",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.num_special_tokens_to_add.pair",description:`<strong>pair</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the number of added tokens should be computed in the case of a sequence pair or a single
sequence.`,name:"pair"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L289",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ht=new Yb({props:{$$slots:{default:[cv]},$$scope:{ctx:pe}}}),eo=new T({props:{name:"set_truncation_and_padding",anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding",parameters:[{name:"padding_strategy",val:": PaddingStrategy"},{name:"truncation_strategy",val:": TruncationStrategy"},{name:"max_length",val:": int"},{name:"stride",val:": int"},{name:"pad_to_multiple_of",val:": typing.Optional[int]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.padding_strategy",description:`<strong>padding_strategy</strong> (<a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>) &#x2014;
The kind of padding that will be applied to the input`,name:"padding_strategy"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.truncation_strategy",description:`<strong>truncation_strategy</strong> (<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>) &#x2014;
The kind of truncation that will be applied to the input`,name:"truncation_strategy"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum size of a sequence.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.stride",description:`<strong>stride</strong> (<code>int</code>) &#x2014;
The stride to use when handling overflow.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability <code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L339"}}),to=new T({props:{name:"train_new_from_iterator",anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator",parameters:[{name:"text_iterator",val:""},{name:"vocab_size",val:""},{name:"length",val:" = None"},{name:"new_special_tokens",val:" = None"},{name:"special_tokens_map",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.text_iterator",description:`<strong>text_iterator</strong> (generator of <code>List[str]</code>) &#x2014;
The training corpus. Should be a generator of batches of texts, for instance a list of lists of texts
if you have everything in memory.`,name:"text_iterator"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>) &#x2014;
The size of the vocabulary you want for your tokenizer.`,name:"vocab_size"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.length",description:`<strong>length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The total number of sequences in the iterator. This is used to provide meaningful progress tracking`,name:"length"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.new_special_tokens",description:`<strong>new_special_tokens</strong> (list of <code>str</code> or <code>AddedToken</code>, <em>optional</em>) &#x2014;
A list of new special tokens to add to the tokenizer you are training.`,name:"new_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.special_tokens_map",description:`<strong>special_tokens_map</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
If you want to rename some of the special tokens this tokenizer uses, pass along a mapping old special
token name to new special token name in this argument.`,name:"special_tokens_map"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the trainer from the &#x1F917; Tokenizers library.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_fast.py#L627",returnDescription:`
<p>A new tokenizer of the same type as the original one, trained on
<code>text_iterator</code>.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"
>PreTrainedTokenizerFast</a></p>
`}}),oo=new Oi({}),no=new T({props:{name:"class transformers.BatchEncoding",anchor:"transformers.BatchEncoding",parameters:[{name:"data",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"encoding",val:": typing.Union[tokenizers.Encoding, typing.Sequence[tokenizers.Encoding], NoneType] = None"},{name:"tensor_type",val:": typing.Union[NoneType, str, transformers.utils.generic.TensorType] = None"},{name:"prepend_batch_axis",val:": bool = False"},{name:"n_sequences",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.data",description:`<strong>data</strong> (<code>dict</code>) &#x2014;
Dictionary of lists/arrays/tensors returned by the <code>__call__</code>/<code>encode_plus</code>/<code>batch_encode_plus</code> methods
(&#x2018;input_ids&#x2019;, &#x2018;attention_mask&#x2019;, etc.).`,name:"data"},{anchor:"transformers.BatchEncoding.encoding",description:`<strong>encoding</strong> (<code>tokenizers.Encoding</code> or <code>Sequence[tokenizers.Encoding]</code>, <em>optional</em>) &#x2014;
If the tokenizer is a fast tokenizer which outputs additional information like mapping from word/character
space to token space the <code>tokenizers.Encoding</code> instance or list of instance (for batches) hold this
information.`,name:"encoding"},{anchor:"transformers.BatchEncoding.tensor_type",description:`<strong>tensor_type</strong> (<code>Union[None, str, TensorType]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"tensor_type"},{anchor:"transformers.BatchEncoding.prepend_batch_axis",description:`<strong>prepend_batch_axis</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add a batch axis when converting to tensors (see <code>tensor_type</code> above).`,name:"prepend_batch_axis"},{anchor:"transformers.BatchEncoding.n_sequences",description:`<strong>n_sequences</strong> (<code>Optional[int]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"n_sequences"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L164"}}),ao=new T({props:{name:"char_to_token",anchor:"transformers.BatchEncoding.char_to_token",parameters:[{name:"batch_or_char_index",val:": int"},{name:"char_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.char_to_token.batch_or_char_index",description:`<strong>batch_or_char_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the word in the sequence`,name:"batch_or_char_index"},{anchor:"transformers.BatchEncoding.char_to_token.char_index",description:`<strong>char_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"char_index"},{anchor:"transformers.BatchEncoding.char_to_token.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided character index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L543",returnDescription:`
<p>Index of the token.</p>
`,returnType:`
<p><code>int</code></p>
`}}),io=new T({props:{name:"char_to_word",anchor:"transformers.BatchEncoding.char_to_word",parameters:[{name:"batch_or_char_index",val:": int"},{name:"char_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.char_to_word.batch_or_char_index",description:`<strong>batch_or_char_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the character in the original string.`,name:"batch_or_char_index"},{anchor:"transformers.BatchEncoding.char_to_word.char_index",description:`<strong>char_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the character in the
original string.`,name:"char_index"},{anchor:"transformers.BatchEncoding.char_to_word.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided character index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L629",returnDescription:`
<p>Index or indices of the associated encoded token(s).</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),lo=new T({props:{name:"convert_to_tensors",anchor:"transformers.BatchEncoding.convert_to_tensors",parameters:[{name:"tensor_type",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"prepend_batch_axis",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BatchEncoding.convert_to_tensors.tensor_type",description:`<strong>tensor_type</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
The type of tensors to use. If <code>str</code>, should be one of the values of the enum <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>. If
<code>None</code>, no modification is done.`,name:"tensor_type"},{anchor:"transformers.BatchEncoding.convert_to_tensors.prepend_batch_axis",description:`<strong>prepend_batch_axis</strong> (<code>int</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add the batch dimension during the conversion.`,name:"prepend_batch_axis"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L668"}}),ho=new T({props:{name:"sequence_ids",anchor:"transformers.BatchEncoding.sequence_ids",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.sequence_ids.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L307",returnDescription:`
<p>A list indicating the sequence id corresponding to each token. Special tokens added
by the tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding
sequence.</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),po=new T({props:{name:"to",anchor:"transformers.BatchEncoding.to",parameters:[{name:"device",val:": typing.Union[str, ForwardRef('torch.device')]"}],parametersDescription:[{anchor:"transformers.BatchEncoding.to.device",description:"<strong>device</strong> (<code>str</code> or <code>torch.device</code>) &#x2014; The device to put the tensors on.",name:"device"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L761",returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),fo=new T({props:{name:"token_to_chars",anchor:"transformers.BatchEncoding.token_to_chars",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_chars.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_chars.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token or tokens in
the sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L504",returnDescription:`
<p>Span of characters in the original string, or None, if the token
(e.g. <s>, </s>) doesn\u2019t correspond to any chars in the origin string.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/internal/tokenization_utils#transformers.CharSpan"
>CharSpan</a></p>
`}}),ko=new T({props:{name:"token_to_sequence",anchor:"transformers.BatchEncoding.token_to_sequence",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_sequence.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprises one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_sequence.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token in the
sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L374",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),vo=new T({props:{name:"token_to_word",anchor:"transformers.BatchEncoding.token_to_word",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_word.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_word.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token in the
sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L413",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),yo=new T({props:{name:"tokens",anchor:"transformers.BatchEncoding.tokens",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.tokens.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L289",returnDescription:`
<p>The list of tokens at that index.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),wo=new T({props:{name:"word_ids",anchor:"transformers.BatchEncoding.word_ids",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_ids.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L355",returnDescription:`
<p>A list indicating the word corresponding to each token. Special tokens added by the
tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding word
(several tokens will be mapped to the same word index if they are parts of that word).</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),zo=new T({props:{name:"word_to_chars",anchor:"transformers.BatchEncoding.word_to_chars",parameters:[{name:"batch_or_word_index",val:": int"},{name:"word_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_to_chars.batch_or_word_index",description:`<strong>batch_or_word_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the word in the sequence`,name:"batch_or_word_index"},{anchor:"transformers.BatchEncoding.word_to_chars.word_index",description:`<strong>word_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"word_index"},{anchor:"transformers.BatchEncoding.word_to_chars.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided word index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L584",returnDescription:`
<p>Span(s) of the associated character or characters in the string. CharSpan
are NamedTuple with:</p>
<ul>
<li>start: index of the first character associated to the token in the original string</li>
<li>end: index of the character following the last character associated to the token in the original
string</li>
</ul>
`,returnType:`
<p><code>CharSpan</code> or <code>List[CharSpan]</code></p>
`}}),$o=new T({props:{name:"word_to_tokens",anchor:"transformers.BatchEncoding.word_to_tokens",parameters:[{name:"batch_or_word_index",val:": int"},{name:"word_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_to_tokens.batch_or_word_index",description:`<strong>batch_or_word_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprises one sequence, this can be the index of
the word in the sequence.`,name:"batch_or_word_index"},{anchor:"transformers.BatchEncoding.word_to_tokens.word_index",description:`<strong>word_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"word_index"},{anchor:"transformers.BatchEncoding.word_to_tokens.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided word index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L451",returnDescription:`
<p>Span of tokens in the encoded sequence. Returns
<code>None</code> if no tokens correspond to the word. This can happen especially when the token is a special token
that has been used to format the tokenization. For example when we add a class token at the very beginning
of the tokenization.</p>
`,returnType:`
<p>(<a
  href="/docs/transformers/main/en/internal/tokenization_utils#transformers.TokenSpan"
>TokenSpan</a>, <em>optional</em>)</p>
`}}),Fo=new T({props:{name:"words",anchor:"transformers.BatchEncoding.words",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.words.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L331",returnDescription:`
<p>A list indicating the word corresponding to each token. Special tokens added by the
tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding word
(several tokens will be mapped to the same word index if they are parts of that word).</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),{c(){y=r("meta"),F=d(),q=r("h1"),E=r("a"),S=r("span"),h(v.$$.fragment),D=d(),Wn=r("span"),Ui=o("Tokenizer"),Os=d(),je=r("p"),Ri=o(`A tokenizer is in charge of preparing the inputs for a model. The library contains tokenizers for all the models. Most
of the tokenizers are available in two flavors: a full python implementation and a \u201CFast\u201D implementation based on the
Rust library `),Tt=r("a"),Mi=o("\u{1F917} Tokenizers"),Vi=o(". The \u201CFast\u201D implementations allows:"),Us=d(),He=r("ol"),Bn=r("li"),Gi=o("a significant speed-up in particular when doing batched tokenization and"),ji=d(),Sn=r("li"),Hi=o(`additional methods to map between the original string (character and words) and the token space (e.g. getting the
index of the token comprising a given character or the span of characters corresponding to a given token).`),Rs=d(),O=r("p"),Zi=o("The base classes "),Co=r("a"),Ji=o("PreTrainedTokenizer"),Xi=o(" and "),Ao=r("a"),Yi=o("PreTrainedTokenizerFast"),Qi=o(`
implement the common methods for encoding string inputs in model inputs (see below) and instantiating/saving python and
\u201CFast\u201D tokenizers either from a local file or directory or from a pretrained tokenizer provided by the library
(downloaded from HuggingFace\u2019s AWS S3 repository). They both rely on
`),Wo=r("a"),Ki=o("PreTrainedTokenizerBase"),ed=o(` that contains the common methods, and
`),Bo=r("a"),td=o("SpecialTokensMixin"),od=o("."),Ms=d(),De=r("p"),So=r("a"),nd=o("PreTrainedTokenizer"),rd=o(" and "),Oo=r("a"),ad=o("PreTrainedTokenizerFast"),sd=o(` thus implement the main
methods for using all the tokenizers:`),Vs=d(),me=r("ul"),On=r("li"),id=o(`Tokenizing (splitting strings in sub-word token strings), converting tokens strings to ids and back, and
encoding/decoding (i.e., tokenizing and converting to integers).`),dd=d(),Un=r("li"),cd=o("Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),ld=d(),Rn=r("li"),hd=o(`Managing special tokens (like mask, beginning-of-sentence, etc.): adding them, assigning them to attributes in the
tokenizer for easy access and making sure they are not split during tokenization.`),Gs=d(),I=r("p"),Uo=r("a"),pd=o("BatchEncoding"),md=o(` holds the output of the
`),Ro=r("a"),fd=o("PreTrainedTokenizerBase"),ud=o("\u2019s encoding methods ("),Mn=r("code"),_d=o("__call__"),gd=o(`,
`),Vn=r("code"),kd=o("encode_plus"),bd=o(" and "),Gn=r("code"),vd=o("batch_encode_plus"),Td=o(`) and is derived from a Python dictionary. When the tokenizer is a pure python
tokenizer, this class behaves just like a standard python dictionary and holds the various model inputs computed by
these methods (`),jn=r("code"),yd=o("input_ids"),wd=o(", "),Hn=r("code"),zd=o("attention_mask"),xd=o(`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=r("a"),Ed=o("tokenizers library"),$d=o(`), this class provides in addition
several advanced alignment methods which can be used to map between the original string (character and words) and the
token space (e.g., getting the index of the token comprising a given character or the span of characters corresponding
to a given token).`),js=d(),Ne=r("h2"),Ze=r("a"),Zn=r("span"),h(wt.$$.fragment),Pd=d(),Jn=r("span"),qd=o("PreTrainedTokenizer"),Hs=d(),g=r("div"),h(zt.$$.fragment),Id=d(),Xn=r("p"),Fd=o("Base class for all slow tokenizers."),Ld=d(),xt=r("p"),Dd=o("Inherits from "),Mo=r("a"),Nd=o("PreTrainedTokenizerBase"),Cd=o("."),Ad=d(),Yn=r("p"),Wd=o(`Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
pretrained tokenizers as well as adding tokens to the vocabulary.`),Bd=d(),Qn=r("p"),Sd=o(`This class also contain the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),Od=d(),Kn=r("p"),Ud=o("Class attributes (overridden by derived classes)"),Rd=d(),N=r("ul"),fe=r("li"),er=r("strong"),Md=o("vocab_files_names"),Vd=o(" ("),tr=r("code"),Gd=o("Dict[str, str]"),jd=o(") \u2014 A dictionary with, as keys, the "),or=r("code"),Hd=o("__init__"),Zd=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Jd=d(),U=r("li"),nr=r("strong"),Xd=o("pretrained_vocab_files_map"),Yd=o(" ("),rr=r("code"),Qd=o("Dict[str, Dict[str, str]]"),Kd=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ar=r("code"),ec=o("__init__"),tc=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),sr=r("code"),oc=o("short-cut-names"),nc=o(" of the pretrained models with, as associated values, the "),ir=r("code"),rc=o("url"),ac=o(` to the
associated pretrained vocabulary file.`),sc=d(),Q=r("li"),dr=r("strong"),ic=o("max_model_input_sizes"),dc=o(" ("),cr=r("code"),cc=o("Dict[str, Optional[int]]"),lc=o(") \u2014 A dictionary with, as keys, the "),lr=r("code"),hc=o("short-cut-names"),pc=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),hr=r("code"),mc=o("None"),fc=o(" if the model has no maximum input size."),uc=d(),R=r("li"),pr=r("strong"),_c=o("pretrained_init_configuration"),gc=o(" ("),mr=r("code"),kc=o("Dict[str, Dict[str, Any]]"),bc=o(`) \u2014 A dictionary with, as keys, the
`),fr=r("code"),vc=o("short-cut-names"),Tc=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ur=r("code"),yc=o("__init__"),wc=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Vo=r("a"),zc=o("from_pretrained()"),xc=o(" method."),Ec=d(),Je=r("li"),_r=r("strong"),$c=o("model_input_names"),Pc=o(" ("),gr=r("code"),qc=o("List[str]"),Ic=o(") \u2014 A list of inputs expected in the forward pass of the model."),Fc=d(),K=r("li"),kr=r("strong"),Lc=o("padding_side"),Dc=o(" ("),br=r("code"),Nc=o("str"),Cc=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),vr=r("code"),Ac=o("'right'"),Wc=o(" or "),Tr=r("code"),Bc=o("'left'"),Sc=o("."),Oc=d(),ee=r("li"),yr=r("strong"),Uc=o("truncation_side"),Rc=o(" ("),wr=r("code"),Mc=o("str"),Vc=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),zr=r("code"),Gc=o("'right'"),jc=o(" or "),xr=r("code"),Hc=o("'left'"),Zc=o("."),Jc=d(),Xe=r("div"),h(Et.$$.fragment),Xc=d(),Er=r("p"),Yc=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Qc=d(),Ye=r("div"),h($t.$$.fragment),Kc=d(),$r=r("p"),el=o("Convert a list of lists of token ids into a list of strings by calling decode."),tl=d(),ue=r("div"),h(Pt.$$.fragment),ol=d(),Pr=r("p"),nl=o(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),rl=d(),qt=r("p"),al=o("Similar to doing "),qr=r("code"),sl=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),il=o("."),dl=d(),_e=r("div"),h(It.$$.fragment),cl=d(),Ir=r("p"),ll=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),hl=d(),Ft=r("p"),pl=o("Same as doing "),Fr=r("code"),ml=o("self.convert_tokens_to_ids(self.tokenize(text))"),fl=o("."),ul=d(),ge=r("div"),h(Lt.$$.fragment),_l=d(),Lr=r("p"),gl=o("Upload the tokenizer files to the \u{1F917} Model Hub."),kl=d(),h(Qe.$$.fragment),bl=d(),Ke=r("div"),h(Dt.$$.fragment),vl=d(),Dr=r("p"),Tl=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),yl=d(),et=r("div"),h(Nt.$$.fragment),wl=d(),Nr=r("p"),zl=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),xl=d(),tt=r("div"),h(Ct.$$.fragment),El=d(),Cr=r("p"),$l=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Pl=d(),ke=r("div"),h(At.$$.fragment),ql=d(),Ar=r("p"),Il=o("Returns the number of added tokens when encoding a sequence with special tokens."),Fl=d(),h(ot.$$.fragment),Ll=d(),be=r("div"),h(Wt.$$.fragment),Dl=d(),Wr=r("p"),Nl=o("Performs any necessary transformations before tokenization."),Cl=d(),Ce=r("p"),Al=o("This method should pop the arguments from kwargs and return the remaining "),Br=r("code"),Wl=o("kwargs"),Bl=o(` as well. We test the
`),Sr=r("code"),Sl=o("kwargs"),Ol=o(" at the end of the encoding process to be sure all the arguments have been used."),Ul=d(),ve=r("div"),h(Bt.$$.fragment),Rl=d(),Or=r("p"),Ml=o("Converts a string in a sequence of tokens, using the tokenizer."),Vl=d(),Ur=r("p"),Gl=o(`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Zs=d(),Ae=r("h2"),nt=r("a"),Rr=r("span"),h(St.$$.fragment),jl=d(),Mr=r("span"),Hl=o("PreTrainedTokenizerFast"),Js=d(),te=r("p"),Zl=o("The "),Go=r("a"),Jl=o("PreTrainedTokenizerFast"),Xl=o(" depend on the "),Ot=r("a"),Yl=o("tokenizers"),Ql=o(` library. The tokenizers obtained from the \u{1F917} tokenizers library can be
loaded very simply into \u{1F917} transformers. Take a look at the `),jo=r("a"),Kl=o("Using tokenizers from \u{1F917} tokenizers"),eh=o(" page to understand how this is done."),Xs=d(),k=r("div"),h(Ut.$$.fragment),th=d(),Vr=r("p"),oh=o("Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),nh=d(),Rt=r("p"),rh=o("Inherits from "),Ho=r("a"),ah=o("PreTrainedTokenizerBase"),sh=o("."),ih=d(),Gr=r("p"),dh=o(`Handles all the shared methods for tokenization and special tokens, as well as methods for
downloading/caching/loading pretrained tokenizers, as well as adding tokens to the vocabulary.`),ch=d(),jr=r("p"),lh=o(`This class also contains the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),hh=d(),Hr=r("p"),ph=o("Class attributes (overridden by derived classes)"),mh=d(),C=r("ul"),Te=r("li"),Zr=r("strong"),fh=o("vocab_files_names"),uh=o(" ("),Jr=r("code"),_h=o("Dict[str, str]"),gh=o(") \u2014 A dictionary with, as keys, the "),Xr=r("code"),kh=o("__init__"),bh=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),vh=d(),M=r("li"),Yr=r("strong"),Th=o("pretrained_vocab_files_map"),yh=o(" ("),Qr=r("code"),wh=o("Dict[str, Dict[str, str]]"),zh=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),Kr=r("code"),xh=o("__init__"),Eh=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),ea=r("code"),$h=o("short-cut-names"),Ph=o(" of the pretrained models with, as associated values, the "),ta=r("code"),qh=o("url"),Ih=o(` to the
associated pretrained vocabulary file.`),Fh=d(),oe=r("li"),oa=r("strong"),Lh=o("max_model_input_sizes"),Dh=o(" ("),na=r("code"),Nh=o("Dict[str, Optional[int]]"),Ch=o(") \u2014 A dictionary with, as keys, the "),ra=r("code"),Ah=o("short-cut-names"),Wh=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),aa=r("code"),Bh=o("None"),Sh=o(" if the model has no maximum input size."),Oh=d(),V=r("li"),sa=r("strong"),Uh=o("pretrained_init_configuration"),Rh=o(" ("),ia=r("code"),Mh=o("Dict[str, Dict[str, Any]]"),Vh=o(`) \u2014 A dictionary with, as keys, the
`),da=r("code"),Gh=o("short-cut-names"),jh=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ca=r("code"),Hh=o("__init__"),Zh=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Zo=r("a"),Jh=o("from_pretrained()"),Xh=o(" method."),Yh=d(),rt=r("li"),la=r("strong"),Qh=o("model_input_names"),Kh=o(" ("),ha=r("code"),ep=o("List[str]"),tp=o(") \u2014 A list of inputs expected in the forward pass of the model."),op=d(),ne=r("li"),pa=r("strong"),np=o("padding_side"),rp=o(" ("),ma=r("code"),ap=o("str"),sp=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),fa=r("code"),ip=o("'right'"),dp=o(" or "),ua=r("code"),cp=o("'left'"),lp=o("."),hp=d(),re=r("li"),_a=r("strong"),pp=o("truncation_side"),mp=o(" ("),ga=r("code"),fp=o("str"),up=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),ka=r("code"),_p=o("'right'"),gp=o(" or "),ba=r("code"),kp=o("'left'"),bp=o("."),vp=d(),at=r("div"),h(Mt.$$.fragment),Tp=d(),va=r("p"),yp=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),wp=d(),st=r("div"),h(Vt.$$.fragment),zp=d(),Ta=r("p"),xp=o("Convert a list of lists of token ids into a list of strings by calling decode."),Ep=d(),ye=r("div"),h(Gt.$$.fragment),$p=d(),ya=r("p"),Pp=o(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),qp=d(),jt=r("p"),Ip=o("Similar to doing "),wa=r("code"),Fp=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Lp=o("."),Dp=d(),we=r("div"),h(Ht.$$.fragment),Np=d(),za=r("p"),Cp=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ap=d(),Zt=r("p"),Wp=o("Same as doing "),xa=r("code"),Bp=o("self.convert_tokens_to_ids(self.tokenize(text))"),Sp=o("."),Op=d(),ze=r("div"),h(Jt.$$.fragment),Up=d(),Ea=r("p"),Rp=o("Upload the tokenizer files to the \u{1F917} Model Hub."),Mp=d(),h(it.$$.fragment),Vp=d(),dt=r("div"),h(Xt.$$.fragment),Gp=d(),$a=r("p"),jp=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Hp=d(),ct=r("div"),h(Yt.$$.fragment),Zp=d(),Pa=r("p"),Jp=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Xp=d(),lt=r("div"),h(Qt.$$.fragment),Yp=d(),qa=r("p"),Qp=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Kp=d(),xe=r("div"),h(Kt.$$.fragment),em=d(),Ia=r("p"),tm=o("Returns the number of added tokens when encoding a sequence with special tokens."),om=d(),h(ht.$$.fragment),nm=d(),Ee=r("div"),h(eo.$$.fragment),rm=d(),Fa=r("p"),am=o(`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),sm=d(),La=r("p"),im=o(`The provided tokenizer has no padding / truncation strategy before the managed section. If your tokenizer set a
padding / truncation strategy before, then it will be reset to no padding / truncation when exiting the managed
section.`),dm=d(),pt=r("div"),h(to.$$.fragment),cm=d(),Da=r("p"),lm=o(`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Ys=d(),We=r("h2"),mt=r("a"),Na=r("span"),h(oo.$$.fragment),hm=d(),Ca=r("span"),pm=o("BatchEncoding"),Qs=d(),w=r("div"),h(no.$$.fragment),mm=d(),ie=r("p"),fm=o("Holds the output of the "),ro=r("a"),Aa=r("strong"),um=o("call"),_m=o("()"),gm=o(`,
`),Jo=r("a"),km=o("encode_plus()"),bm=o(` and
`),Xo=r("a"),vm=o("batch_encode_plus()"),Tm=o(" methods (tokens, attention_masks, etc)."),ym=d(),Wa=r("p"),wm=o(`This class is derived from a python dictionary and can be used as a dictionary. In addition, this class exposes
utility methods to map from word/character space to token space.`),zm=d(),G=r("div"),h(ao.$$.fragment),xm=d(),Ba=r("p"),Em=o(`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),$m=d(),Sa=r("p"),Pm=o("Can be called as:"),qm=d(),so=r("ul"),Yo=r("li"),Oa=r("code"),Im=o("self.char_to_token(char_index)"),Fm=o(" if batch size is 1"),Lm=d(),Qo=r("li"),Ua=r("code"),Dm=o("self.char_to_token(batch_index, char_index)"),Nm=o(" if batch size is greater or equal to 1"),Cm=d(),Ra=r("p"),Am=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),Wm=d(),j=r("div"),h(io.$$.fragment),Bm=d(),Ma=r("p"),Sm=o(`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),Om=d(),Va=r("p"),Um=o("Can be called as:"),Rm=d(),co=r("ul"),Ko=r("li"),Ga=r("code"),Mm=o("self.char_to_word(char_index)"),Vm=o(" if batch size is 1"),Gm=d(),en=r("li"),ja=r("code"),jm=o("self.char_to_word(batch_index, char_index)"),Hm=o(" if batch size is greater than 1"),Zm=d(),Ha=r("p"),Jm=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),Xm=d(),ft=r("div"),h(lo.$$.fragment),Ym=d(),Za=r("p"),Qm=o("Convert the inner content to tensors."),Km=d(),$e=r("div"),h(ho.$$.fragment),ef=d(),Ja=r("p"),tf=o("Return a list mapping the tokens to the id of their original sentences:"),of=d(),Be=r("ul"),tn=r("li"),Xa=r("code"),nf=o("None"),rf=o(" for special tokens added around or between sequences,"),af=d(),on=r("li"),Ya=r("code"),sf=o("0"),df=o(" for tokens corresponding to words in the first sequence,"),cf=d(),nn=r("li"),Qa=r("code"),lf=o("1"),hf=o(` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),pf=d(),ut=r("div"),h(po.$$.fragment),mf=d(),mo=r("p"),ff=o("Send all values to device by calling "),Ka=r("code"),uf=o("v.to(device)"),_f=o(" (PyTorch only)."),gf=d(),W=r("div"),h(fo.$$.fragment),kf=d(),es=r("p"),bf=o("Get the character span corresponding to an encoded token in a sequence of the batch."),vf=d(),uo=r("p"),Tf=o("Character spans are returned as a "),rn=r("a"),yf=o("CharSpan"),wf=o(" with:"),zf=d(),_o=r("ul"),an=r("li"),ts=r("strong"),xf=o("start"),Ef=o(" \u2014 Index of the first character in the original string associated to the token."),$f=d(),sn=r("li"),os=r("strong"),Pf=o("end"),qf=o(` \u2014 Index of the character following the last character in the original string associated to the
token.`),If=d(),ns=r("p"),Ff=o("Can be called as:"),Lf=d(),go=r("ul"),dn=r("li"),rs=r("code"),Df=o("self.token_to_chars(token_index)"),Nf=o(" if batch size is 1"),Cf=d(),cn=r("li"),as=r("code"),Af=o("self.token_to_chars(batch_index, token_index)"),Wf=o(" if batch size is greater or equal to 1"),Bf=d(),H=r("div"),h(ko.$$.fragment),Sf=d(),Se=r("p"),Of=o("Get the index of the sequence represented by the given token. In the general use case, this method returns "),ss=r("code"),Uf=o("0"),Rf=o(`
for a single sequence or the first sequence of a pair, and `),is=r("code"),Mf=o("1"),Vf=o(" for the second sequence of a pair"),Gf=d(),ds=r("p"),jf=o("Can be called as:"),Hf=d(),bo=r("ul"),ln=r("li"),cs=r("code"),Zf=o("self.token_to_sequence(token_index)"),Jf=o(" if batch size is 1"),Xf=d(),hn=r("li"),ls=r("code"),Yf=o("self.token_to_sequence(batch_index, token_index)"),Qf=o(" if batch size is greater than 1"),Kf=d(),hs=r("p"),eu=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),tu=d(),Z=r("div"),h(vo.$$.fragment),ou=d(),ps=r("p"),nu=o("Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),ru=d(),ms=r("p"),au=o("Can be called as:"),su=d(),To=r("ul"),pn=r("li"),fs=r("code"),iu=o("self.token_to_word(token_index)"),du=o(" if batch size is 1"),cu=d(),mn=r("li"),us=r("code"),lu=o("self.token_to_word(batch_index, token_index)"),hu=o(" if batch size is greater than 1"),pu=d(),_s=r("p"),mu=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),fu=d(),_t=r("div"),h(yo.$$.fragment),uu=d(),gs=r("p"),_u=o(`Return the list of tokens (sub-parts of the input strings after word/subword splitting and before conversion to
integer indices) at a given batch index (only works for the output of a fast tokenizer).`),gu=d(),gt=r("div"),h(wo.$$.fragment),ku=d(),ks=r("p"),bu=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),vu=d(),B=r("div"),h(zo.$$.fragment),Tu=d(),bs=r("p"),yu=o("Get the character span in the original string corresponding to given word in a sequence of the batch."),wu=d(),vs=r("p"),zu=o("Character spans are returned as a CharSpan NamedTuple with:"),xu=d(),xo=r("ul"),Ts=r("li"),Eu=o("start: index of the first character in the original string"),$u=d(),ys=r("li"),Pu=o("end: index of the character following the last character in the original string"),qu=d(),ws=r("p"),Iu=o("Can be called as:"),Fu=d(),Eo=r("ul"),fn=r("li"),zs=r("code"),Lu=o("self.word_to_chars(word_index)"),Du=o(" if batch size is 1"),Nu=d(),un=r("li"),xs=r("code"),Cu=o("self.word_to_chars(batch_index, word_index)"),Au=o(" if batch size is greater or equal to 1"),Wu=d(),L=r("div"),h($o.$$.fragment),Bu=d(),Es=r("p"),Su=o("Get the encoded token span corresponding to a word in a sequence of the batch."),Ou=d(),Po=r("p"),Uu=o("Token spans are returned as a "),_n=r("a"),Ru=o("TokenSpan"),Mu=o(" with:"),Vu=d(),qo=r("ul"),gn=r("li"),$s=r("strong"),Gu=o("start"),ju=o(" \u2014 Index of the first token."),Hu=d(),kn=r("li"),Ps=r("strong"),Zu=o("end"),Ju=o(" \u2014 Index of the token following the last token."),Xu=d(),qs=r("p"),Yu=o("Can be called as:"),Qu=d(),Io=r("ul"),bn=r("li"),Is=r("code"),Ku=o("self.word_to_tokens(word_index, sequence_index: int = 0)"),e_=o(" if batch size is 1"),t_=d(),vn=r("li"),Fs=r("code"),o_=o("self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),n_=o(` if batch size is greater or equal to
1`),r_=d(),Ls=r("p"),a_=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),s_=d(),kt=r("div"),h(Fo.$$.fragment),i_=d(),Ds=r("p"),d_=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),this.h()},l(i){const b=rv('[data-svelte="svelte-1phssyn"]',document.head);y=a(b,"META",{name:!0,content:!0}),b.forEach(t),F=c(i),q=a(i,"H1",{class:!0});var Lo=s(q);E=a(Lo,"A",{id:!0,class:!0,href:!0});var Ns=s(E);S=a(Ns,"SPAN",{});var Cs=s(S);p(v.$$.fragment,Cs),Cs.forEach(t),Ns.forEach(t),D=c(Lo),Wn=a(Lo,"SPAN",{});var As=s(Wn);Ui=n(As,"Tokenizer"),As.forEach(t),Lo.forEach(t),Os=c(i),je=a(i,"P",{});var ei=s(je);Ri=n(ei,`A tokenizer is in charge of preparing the inputs for a model. The library contains tokenizers for all the models. Most
of the tokenizers are available in two flavors: a full python implementation and a \u201CFast\u201D implementation based on the
Rust library `),Tt=a(ei,"A",{href:!0,rel:!0});var F_=s(Tt);Mi=n(F_,"\u{1F917} Tokenizers"),F_.forEach(t),Vi=n(ei,". The \u201CFast\u201D implementations allows:"),ei.forEach(t),Us=c(i),He=a(i,"OL",{});var ti=s(He);Bn=a(ti,"LI",{});var L_=s(Bn);Gi=n(L_,"a significant speed-up in particular when doing batched tokenization and"),L_.forEach(t),ji=c(ti),Sn=a(ti,"LI",{});var D_=s(Sn);Hi=n(D_,`additional methods to map between the original string (character and words) and the token space (e.g. getting the
index of the token comprising a given character or the span of characters corresponding to a given token).`),D_.forEach(t),ti.forEach(t),Rs=c(i),O=a(i,"P",{});var Pe=s(O);Zi=n(Pe,"The base classes "),Co=a(Pe,"A",{href:!0});var N_=s(Co);Ji=n(N_,"PreTrainedTokenizer"),N_.forEach(t),Xi=n(Pe," and "),Ao=a(Pe,"A",{href:!0});var C_=s(Ao);Yi=n(C_,"PreTrainedTokenizerFast"),C_.forEach(t),Qi=n(Pe,`
implement the common methods for encoding string inputs in model inputs (see below) and instantiating/saving python and
\u201CFast\u201D tokenizers either from a local file or directory or from a pretrained tokenizer provided by the library
(downloaded from HuggingFace\u2019s AWS S3 repository). They both rely on
`),Wo=a(Pe,"A",{href:!0});var A_=s(Wo);Ki=n(A_,"PreTrainedTokenizerBase"),A_.forEach(t),ed=n(Pe,` that contains the common methods, and
`),Bo=a(Pe,"A",{href:!0});var W_=s(Bo);td=n(W_,"SpecialTokensMixin"),W_.forEach(t),od=n(Pe,"."),Pe.forEach(t),Ms=c(i),De=a(i,"P",{});var Ws=s(De);So=a(Ws,"A",{href:!0});var B_=s(So);nd=n(B_,"PreTrainedTokenizer"),B_.forEach(t),rd=n(Ws," and "),Oo=a(Ws,"A",{href:!0});var S_=s(Oo);ad=n(S_,"PreTrainedTokenizerFast"),S_.forEach(t),sd=n(Ws,` thus implement the main
methods for using all the tokenizers:`),Ws.forEach(t),Vs=c(i),me=a(i,"UL",{});var Tn=s(me);On=a(Tn,"LI",{});var O_=s(On);id=n(O_,`Tokenizing (splitting strings in sub-word token strings), converting tokens strings to ids and back, and
encoding/decoding (i.e., tokenizing and converting to integers).`),O_.forEach(t),dd=c(Tn),Un=a(Tn,"LI",{});var U_=s(Un);cd=n(U_,"Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),U_.forEach(t),ld=c(Tn),Rn=a(Tn,"LI",{});var R_=s(Rn);hd=n(R_,`Managing special tokens (like mask, beginning-of-sentence, etc.): adding them, assigning them to attributes in the
tokenizer for easy access and making sure they are not split during tokenization.`),R_.forEach(t),Tn.forEach(t),Gs=c(i),I=a(i,"P",{});var A=s(I);Uo=a(A,"A",{href:!0});var M_=s(Uo);pd=n(M_,"BatchEncoding"),M_.forEach(t),md=n(A,` holds the output of the
`),Ro=a(A,"A",{href:!0});var V_=s(Ro);fd=n(V_,"PreTrainedTokenizerBase"),V_.forEach(t),ud=n(A,"\u2019s encoding methods ("),Mn=a(A,"CODE",{});var G_=s(Mn);_d=n(G_,"__call__"),G_.forEach(t),gd=n(A,`,
`),Vn=a(A,"CODE",{});var j_=s(Vn);kd=n(j_,"encode_plus"),j_.forEach(t),bd=n(A," and "),Gn=a(A,"CODE",{});var H_=s(Gn);vd=n(H_,"batch_encode_plus"),H_.forEach(t),Td=n(A,`) and is derived from a Python dictionary. When the tokenizer is a pure python
tokenizer, this class behaves just like a standard python dictionary and holds the various model inputs computed by
these methods (`),jn=a(A,"CODE",{});var Z_=s(jn);yd=n(Z_,"input_ids"),Z_.forEach(t),wd=n(A,", "),Hn=a(A,"CODE",{});var J_=s(Hn);zd=n(J_,"attention_mask"),J_.forEach(t),xd=n(A,`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=a(A,"A",{href:!0,rel:!0});var X_=s(yt);Ed=n(X_,"tokenizers library"),X_.forEach(t),$d=n(A,`), this class provides in addition
several advanced alignment methods which can be used to map between the original string (character and words) and the
token space (e.g., getting the index of the token comprising a given character or the span of characters corresponding
to a given token).`),A.forEach(t),js=c(i),Ne=a(i,"H2",{class:!0});var oi=s(Ne);Ze=a(oi,"A",{id:!0,class:!0,href:!0});var Y_=s(Ze);Zn=a(Y_,"SPAN",{});var Q_=s(Zn);p(wt.$$.fragment,Q_),Q_.forEach(t),Y_.forEach(t),Pd=c(oi),Jn=a(oi,"SPAN",{});var K_=s(Jn);qd=n(K_,"PreTrainedTokenizer"),K_.forEach(t),oi.forEach(t),Hs=c(i),g=a(i,"DIV",{class:!0});var z=s(g);p(zt.$$.fragment,z),Id=c(z),Xn=a(z,"P",{});var eg=s(Xn);Fd=n(eg,"Base class for all slow tokenizers."),eg.forEach(t),Ld=c(z),xt=a(z,"P",{});var ni=s(xt);Dd=n(ni,"Inherits from "),Mo=a(ni,"A",{href:!0});var tg=s(Mo);Nd=n(tg,"PreTrainedTokenizerBase"),tg.forEach(t),Cd=n(ni,"."),ni.forEach(t),Ad=c(z),Yn=a(z,"P",{});var og=s(Yn);Wd=n(og,`Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
pretrained tokenizers as well as adding tokens to the vocabulary.`),og.forEach(t),Bd=c(z),Qn=a(z,"P",{});var ng=s(Qn);Sd=n(ng,`This class also contain the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),ng.forEach(t),Od=c(z),Kn=a(z,"P",{});var rg=s(Kn);Ud=n(rg,"Class attributes (overridden by derived classes)"),rg.forEach(t),Rd=c(z),N=a(z,"UL",{});var J=s(N);fe=a(J,"LI",{});var Do=s(fe);er=a(Do,"STRONG",{});var ag=s(er);Md=n(ag,"vocab_files_names"),ag.forEach(t),Vd=n(Do," ("),tr=a(Do,"CODE",{});var sg=s(tr);Gd=n(sg,"Dict[str, str]"),sg.forEach(t),jd=n(Do,") \u2014 A dictionary with, as keys, the "),or=a(Do,"CODE",{});var ig=s(or);Hd=n(ig,"__init__"),ig.forEach(t),Zd=n(Do,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Do.forEach(t),Jd=c(J),U=a(J,"LI",{});var de=s(U);nr=a(de,"STRONG",{});var dg=s(nr);Xd=n(dg,"pretrained_vocab_files_map"),dg.forEach(t),Yd=n(de," ("),rr=a(de,"CODE",{});var cg=s(rr);Qd=n(cg,"Dict[str, Dict[str, str]]"),cg.forEach(t),Kd=n(de,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ar=a(de,"CODE",{});var lg=s(ar);ec=n(lg,"__init__"),lg.forEach(t),tc=n(de,` keyword name of each vocabulary file required by the model, the
low-level being the `),sr=a(de,"CODE",{});var hg=s(sr);oc=n(hg,"short-cut-names"),hg.forEach(t),nc=n(de," of the pretrained models with, as associated values, the "),ir=a(de,"CODE",{});var pg=s(ir);rc=n(pg,"url"),pg.forEach(t),ac=n(de,` to the
associated pretrained vocabulary file.`),de.forEach(t),sc=c(J),Q=a(J,"LI",{});var Oe=s(Q);dr=a(Oe,"STRONG",{});var mg=s(dr);ic=n(mg,"max_model_input_sizes"),mg.forEach(t),dc=n(Oe," ("),cr=a(Oe,"CODE",{});var fg=s(cr);cc=n(fg,"Dict[str, Optional[int]]"),fg.forEach(t),lc=n(Oe,") \u2014 A dictionary with, as keys, the "),lr=a(Oe,"CODE",{});var ug=s(lr);hc=n(ug,"short-cut-names"),ug.forEach(t),pc=n(Oe,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),hr=a(Oe,"CODE",{});var _g=s(hr);mc=n(_g,"None"),_g.forEach(t),fc=n(Oe," if the model has no maximum input size."),Oe.forEach(t),uc=c(J),R=a(J,"LI",{});var ce=s(R);pr=a(ce,"STRONG",{});var gg=s(pr);_c=n(gg,"pretrained_init_configuration"),gg.forEach(t),gc=n(ce," ("),mr=a(ce,"CODE",{});var kg=s(mr);kc=n(kg,"Dict[str, Dict[str, Any]]"),kg.forEach(t),bc=n(ce,`) \u2014 A dictionary with, as keys, the
`),fr=a(ce,"CODE",{});var bg=s(fr);vc=n(bg,"short-cut-names"),bg.forEach(t),Tc=n(ce,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ur=a(ce,"CODE",{});var vg=s(ur);yc=n(vg,"__init__"),vg.forEach(t),wc=n(ce,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Vo=a(ce,"A",{href:!0});var Tg=s(Vo);zc=n(Tg,"from_pretrained()"),Tg.forEach(t),xc=n(ce," method."),ce.forEach(t),Ec=c(J),Je=a(J,"LI",{});var Bs=s(Je);_r=a(Bs,"STRONG",{});var yg=s(_r);$c=n(yg,"model_input_names"),yg.forEach(t),Pc=n(Bs," ("),gr=a(Bs,"CODE",{});var wg=s(gr);qc=n(wg,"List[str]"),wg.forEach(t),Ic=n(Bs,") \u2014 A list of inputs expected in the forward pass of the model."),Bs.forEach(t),Fc=c(J),K=a(J,"LI",{});var Ue=s(K);kr=a(Ue,"STRONG",{});var zg=s(kr);Lc=n(zg,"padding_side"),zg.forEach(t),Dc=n(Ue," ("),br=a(Ue,"CODE",{});var xg=s(br);Nc=n(xg,"str"),xg.forEach(t),Cc=n(Ue,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),vr=a(Ue,"CODE",{});var Eg=s(vr);Ac=n(Eg,"'right'"),Eg.forEach(t),Wc=n(Ue," or "),Tr=a(Ue,"CODE",{});var $g=s(Tr);Bc=n($g,"'left'"),$g.forEach(t),Sc=n(Ue,"."),Ue.forEach(t),Oc=c(J),ee=a(J,"LI",{});var Re=s(ee);yr=a(Re,"STRONG",{});var Pg=s(yr);Uc=n(Pg,"truncation_side"),Pg.forEach(t),Rc=n(Re," ("),wr=a(Re,"CODE",{});var qg=s(wr);Mc=n(qg,"str"),qg.forEach(t),Vc=n(Re,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),zr=a(Re,"CODE",{});var Ig=s(zr);Gc=n(Ig,"'right'"),Ig.forEach(t),jc=n(Re," or "),xr=a(Re,"CODE",{});var Fg=s(xr);Hc=n(Fg,"'left'"),Fg.forEach(t),Zc=n(Re,"."),Re.forEach(t),J.forEach(t),Jc=c(z),Xe=a(z,"DIV",{class:!0});var ri=s(Xe);p(Et.$$.fragment,ri),Xc=c(ri),Er=a(ri,"P",{});var Lg=s(Er);Yc=n(Lg,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Lg.forEach(t),ri.forEach(t),Qc=c(z),Ye=a(z,"DIV",{class:!0});var ai=s(Ye);p($t.$$.fragment,ai),Kc=c(ai),$r=a(ai,"P",{});var Dg=s($r);el=n(Dg,"Convert a list of lists of token ids into a list of strings by calling decode."),Dg.forEach(t),ai.forEach(t),tl=c(z),ue=a(z,"DIV",{class:!0});var yn=s(ue);p(Pt.$$.fragment,yn),ol=c(yn),Pr=a(yn,"P",{});var Ng=s(Pr);nl=n(Ng,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Ng.forEach(t),rl=c(yn),qt=a(yn,"P",{});var si=s(qt);al=n(si,"Similar to doing "),qr=a(si,"CODE",{});var Cg=s(qr);sl=n(Cg,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Cg.forEach(t),il=n(si,"."),si.forEach(t),yn.forEach(t),dl=c(z),_e=a(z,"DIV",{class:!0});var wn=s(_e);p(It.$$.fragment,wn),cl=c(wn),Ir=a(wn,"P",{});var Ag=s(Ir);ll=n(Ag,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ag.forEach(t),hl=c(wn),Ft=a(wn,"P",{});var ii=s(Ft);pl=n(ii,"Same as doing "),Fr=a(ii,"CODE",{});var Wg=s(Fr);ml=n(Wg,"self.convert_tokens_to_ids(self.tokenize(text))"),Wg.forEach(t),fl=n(ii,"."),ii.forEach(t),wn.forEach(t),ul=c(z),ge=a(z,"DIV",{class:!0});var zn=s(ge);p(Lt.$$.fragment,zn),_l=c(zn),Lr=a(zn,"P",{});var Bg=s(Lr);gl=n(Bg,"Upload the tokenizer files to the \u{1F917} Model Hub."),Bg.forEach(t),kl=c(zn),p(Qe.$$.fragment,zn),zn.forEach(t),bl=c(z),Ke=a(z,"DIV",{class:!0});var di=s(Ke);p(Dt.$$.fragment,di),vl=c(di),Dr=a(di,"P",{});var Sg=s(Dr);Tl=n(Sg,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Sg.forEach(t),di.forEach(t),yl=c(z),et=a(z,"DIV",{class:!0});var ci=s(et);p(Nt.$$.fragment,ci),wl=c(ci),Nr=a(ci,"P",{});var Og=s(Nr);zl=n(Og,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Og.forEach(t),ci.forEach(t),xl=c(z),tt=a(z,"DIV",{class:!0});var li=s(tt);p(Ct.$$.fragment,li),El=c(li),Cr=a(li,"P",{});var Ug=s(Cr);$l=n(Ug,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Ug.forEach(t),li.forEach(t),Pl=c(z),ke=a(z,"DIV",{class:!0});var xn=s(ke);p(At.$$.fragment,xn),ql=c(xn),Ar=a(xn,"P",{});var Rg=s(Ar);Il=n(Rg,"Returns the number of added tokens when encoding a sequence with special tokens."),Rg.forEach(t),Fl=c(xn),p(ot.$$.fragment,xn),xn.forEach(t),Ll=c(z),be=a(z,"DIV",{class:!0});var En=s(be);p(Wt.$$.fragment,En),Dl=c(En),Wr=a(En,"P",{});var Mg=s(Wr);Nl=n(Mg,"Performs any necessary transformations before tokenization."),Mg.forEach(t),Cl=c(En),Ce=a(En,"P",{});var $n=s(Ce);Al=n($n,"This method should pop the arguments from kwargs and return the remaining "),Br=a($n,"CODE",{});var Vg=s(Br);Wl=n(Vg,"kwargs"),Vg.forEach(t),Bl=n($n,` as well. We test the
`),Sr=a($n,"CODE",{});var Gg=s(Sr);Sl=n(Gg,"kwargs"),Gg.forEach(t),Ol=n($n," at the end of the encoding process to be sure all the arguments have been used."),$n.forEach(t),En.forEach(t),Ul=c(z),ve=a(z,"DIV",{class:!0});var Pn=s(ve);p(Bt.$$.fragment,Pn),Rl=c(Pn),Or=a(Pn,"P",{});var jg=s(Or);Ml=n(jg,"Converts a string in a sequence of tokens, using the tokenizer."),jg.forEach(t),Vl=c(Pn),Ur=a(Pn,"P",{});var Hg=s(Ur);Gl=n(Hg,`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Hg.forEach(t),Pn.forEach(t),z.forEach(t),Zs=c(i),Ae=a(i,"H2",{class:!0});var hi=s(Ae);nt=a(hi,"A",{id:!0,class:!0,href:!0});var Zg=s(nt);Rr=a(Zg,"SPAN",{});var Jg=s(Rr);p(St.$$.fragment,Jg),Jg.forEach(t),Zg.forEach(t),jl=c(hi),Mr=a(hi,"SPAN",{});var Xg=s(Mr);Hl=n(Xg,"PreTrainedTokenizerFast"),Xg.forEach(t),hi.forEach(t),Js=c(i),te=a(i,"P",{});var bt=s(te);Zl=n(bt,"The "),Go=a(bt,"A",{href:!0});var Yg=s(Go);Jl=n(Yg,"PreTrainedTokenizerFast"),Yg.forEach(t),Xl=n(bt," depend on the "),Ot=a(bt,"A",{href:!0,rel:!0});var Qg=s(Ot);Yl=n(Qg,"tokenizers"),Qg.forEach(t),Ql=n(bt,` library. The tokenizers obtained from the \u{1F917} tokenizers library can be
loaded very simply into \u{1F917} transformers. Take a look at the `),jo=a(bt,"A",{href:!0});var Kg=s(jo);Kl=n(Kg,"Using tokenizers from \u{1F917} tokenizers"),Kg.forEach(t),eh=n(bt," page to understand how this is done."),bt.forEach(t),Xs=c(i),k=a(i,"DIV",{class:!0});var x=s(k);p(Ut.$$.fragment,x),th=c(x),Vr=a(x,"P",{});var ek=s(Vr);oh=n(ek,"Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),ek.forEach(t),nh=c(x),Rt=a(x,"P",{});var pi=s(Rt);rh=n(pi,"Inherits from "),Ho=a(pi,"A",{href:!0});var tk=s(Ho);ah=n(tk,"PreTrainedTokenizerBase"),tk.forEach(t),sh=n(pi,"."),pi.forEach(t),ih=c(x),Gr=a(x,"P",{});var ok=s(Gr);dh=n(ok,`Handles all the shared methods for tokenization and special tokens, as well as methods for
downloading/caching/loading pretrained tokenizers, as well as adding tokens to the vocabulary.`),ok.forEach(t),ch=c(x),jr=a(x,"P",{});var nk=s(jr);lh=n(nk,`This class also contains the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),nk.forEach(t),hh=c(x),Hr=a(x,"P",{});var rk=s(Hr);ph=n(rk,"Class attributes (overridden by derived classes)"),rk.forEach(t),mh=c(x),C=a(x,"UL",{});var X=s(C);Te=a(X,"LI",{});var No=s(Te);Zr=a(No,"STRONG",{});var ak=s(Zr);fh=n(ak,"vocab_files_names"),ak.forEach(t),uh=n(No," ("),Jr=a(No,"CODE",{});var sk=s(Jr);_h=n(sk,"Dict[str, str]"),sk.forEach(t),gh=n(No,") \u2014 A dictionary with, as keys, the "),Xr=a(No,"CODE",{});var ik=s(Xr);kh=n(ik,"__init__"),ik.forEach(t),bh=n(No,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),No.forEach(t),vh=c(X),M=a(X,"LI",{});var le=s(M);Yr=a(le,"STRONG",{});var dk=s(Yr);Th=n(dk,"pretrained_vocab_files_map"),dk.forEach(t),yh=n(le," ("),Qr=a(le,"CODE",{});var ck=s(Qr);wh=n(ck,"Dict[str, Dict[str, str]]"),ck.forEach(t),zh=n(le,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),Kr=a(le,"CODE",{});var lk=s(Kr);xh=n(lk,"__init__"),lk.forEach(t),Eh=n(le,` keyword name of each vocabulary file required by the model, the
low-level being the `),ea=a(le,"CODE",{});var hk=s(ea);$h=n(hk,"short-cut-names"),hk.forEach(t),Ph=n(le," of the pretrained models with, as associated values, the "),ta=a(le,"CODE",{});var pk=s(ta);qh=n(pk,"url"),pk.forEach(t),Ih=n(le,` to the
associated pretrained vocabulary file.`),le.forEach(t),Fh=c(X),oe=a(X,"LI",{});var Me=s(oe);oa=a(Me,"STRONG",{});var mk=s(oa);Lh=n(mk,"max_model_input_sizes"),mk.forEach(t),Dh=n(Me," ("),na=a(Me,"CODE",{});var fk=s(na);Nh=n(fk,"Dict[str, Optional[int]]"),fk.forEach(t),Ch=n(Me,") \u2014 A dictionary with, as keys, the "),ra=a(Me,"CODE",{});var uk=s(ra);Ah=n(uk,"short-cut-names"),uk.forEach(t),Wh=n(Me,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),aa=a(Me,"CODE",{});var _k=s(aa);Bh=n(_k,"None"),_k.forEach(t),Sh=n(Me," if the model has no maximum input size."),Me.forEach(t),Oh=c(X),V=a(X,"LI",{});var he=s(V);sa=a(he,"STRONG",{});var gk=s(sa);Uh=n(gk,"pretrained_init_configuration"),gk.forEach(t),Rh=n(he," ("),ia=a(he,"CODE",{});var kk=s(ia);Mh=n(kk,"Dict[str, Dict[str, Any]]"),kk.forEach(t),Vh=n(he,`) \u2014 A dictionary with, as keys, the
`),da=a(he,"CODE",{});var bk=s(da);Gh=n(bk,"short-cut-names"),bk.forEach(t),jh=n(he,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ca=a(he,"CODE",{});var vk=s(ca);Hh=n(vk,"__init__"),vk.forEach(t),Zh=n(he,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Zo=a(he,"A",{href:!0});var Tk=s(Zo);Jh=n(Tk,"from_pretrained()"),Tk.forEach(t),Xh=n(he," method."),he.forEach(t),Yh=c(X),rt=a(X,"LI",{});var Ss=s(rt);la=a(Ss,"STRONG",{});var yk=s(la);Qh=n(yk,"model_input_names"),yk.forEach(t),Kh=n(Ss," ("),ha=a(Ss,"CODE",{});var wk=s(ha);ep=n(wk,"List[str]"),wk.forEach(t),tp=n(Ss,") \u2014 A list of inputs expected in the forward pass of the model."),Ss.forEach(t),op=c(X),ne=a(X,"LI",{});var Ve=s(ne);pa=a(Ve,"STRONG",{});var zk=s(pa);np=n(zk,"padding_side"),zk.forEach(t),rp=n(Ve," ("),ma=a(Ve,"CODE",{});var xk=s(ma);ap=n(xk,"str"),xk.forEach(t),sp=n(Ve,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),fa=a(Ve,"CODE",{});var Ek=s(fa);ip=n(Ek,"'right'"),Ek.forEach(t),dp=n(Ve," or "),ua=a(Ve,"CODE",{});var $k=s(ua);cp=n($k,"'left'"),$k.forEach(t),lp=n(Ve,"."),Ve.forEach(t),hp=c(X),re=a(X,"LI",{});var Ge=s(re);_a=a(Ge,"STRONG",{});var Pk=s(_a);pp=n(Pk,"truncation_side"),Pk.forEach(t),mp=n(Ge," ("),ga=a(Ge,"CODE",{});var qk=s(ga);fp=n(qk,"str"),qk.forEach(t),up=n(Ge,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),ka=a(Ge,"CODE",{});var Ik=s(ka);_p=n(Ik,"'right'"),Ik.forEach(t),gp=n(Ge," or "),ba=a(Ge,"CODE",{});var Fk=s(ba);kp=n(Fk,"'left'"),Fk.forEach(t),bp=n(Ge,"."),Ge.forEach(t),X.forEach(t),vp=c(x),at=a(x,"DIV",{class:!0});var mi=s(at);p(Mt.$$.fragment,mi),Tp=c(mi),va=a(mi,"P",{});var Lk=s(va);yp=n(Lk,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Lk.forEach(t),mi.forEach(t),wp=c(x),st=a(x,"DIV",{class:!0});var fi=s(st);p(Vt.$$.fragment,fi),zp=c(fi),Ta=a(fi,"P",{});var Dk=s(Ta);xp=n(Dk,"Convert a list of lists of token ids into a list of strings by calling decode."),Dk.forEach(t),fi.forEach(t),Ep=c(x),ye=a(x,"DIV",{class:!0});var qn=s(ye);p(Gt.$$.fragment,qn),$p=c(qn),ya=a(qn,"P",{});var Nk=s(ya);Pp=n(Nk,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Nk.forEach(t),qp=c(qn),jt=a(qn,"P",{});var ui=s(jt);Ip=n(ui,"Similar to doing "),wa=a(ui,"CODE",{});var Ck=s(wa);Fp=n(Ck,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ck.forEach(t),Lp=n(ui,"."),ui.forEach(t),qn.forEach(t),Dp=c(x),we=a(x,"DIV",{class:!0});var In=s(we);p(Ht.$$.fragment,In),Np=c(In),za=a(In,"P",{});var Ak=s(za);Cp=n(Ak,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ak.forEach(t),Ap=c(In),Zt=a(In,"P",{});var _i=s(Zt);Wp=n(_i,"Same as doing "),xa=a(_i,"CODE",{});var Wk=s(xa);Bp=n(Wk,"self.convert_tokens_to_ids(self.tokenize(text))"),Wk.forEach(t),Sp=n(_i,"."),_i.forEach(t),In.forEach(t),Op=c(x),ze=a(x,"DIV",{class:!0});var Fn=s(ze);p(Jt.$$.fragment,Fn),Up=c(Fn),Ea=a(Fn,"P",{});var Bk=s(Ea);Rp=n(Bk,"Upload the tokenizer files to the \u{1F917} Model Hub."),Bk.forEach(t),Mp=c(Fn),p(it.$$.fragment,Fn),Fn.forEach(t),Vp=c(x),dt=a(x,"DIV",{class:!0});var gi=s(dt);p(Xt.$$.fragment,gi),Gp=c(gi),$a=a(gi,"P",{});var Sk=s($a);jp=n(Sk,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Sk.forEach(t),gi.forEach(t),Hp=c(x),ct=a(x,"DIV",{class:!0});var ki=s(ct);p(Yt.$$.fragment,ki),Zp=c(ki),Pa=a(ki,"P",{});var Ok=s(Pa);Jp=n(Ok,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Ok.forEach(t),ki.forEach(t),Xp=c(x),lt=a(x,"DIV",{class:!0});var bi=s(lt);p(Qt.$$.fragment,bi),Yp=c(bi),qa=a(bi,"P",{});var Uk=s(qa);Qp=n(Uk,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Uk.forEach(t),bi.forEach(t),Kp=c(x),xe=a(x,"DIV",{class:!0});var Ln=s(xe);p(Kt.$$.fragment,Ln),em=c(Ln),Ia=a(Ln,"P",{});var Rk=s(Ia);tm=n(Rk,"Returns the number of added tokens when encoding a sequence with special tokens."),Rk.forEach(t),om=c(Ln),p(ht.$$.fragment,Ln),Ln.forEach(t),nm=c(x),Ee=a(x,"DIV",{class:!0});var Dn=s(Ee);p(eo.$$.fragment,Dn),rm=c(Dn),Fa=a(Dn,"P",{});var Mk=s(Fa);am=n(Mk,`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),Mk.forEach(t),sm=c(Dn),La=a(Dn,"P",{});var Vk=s(La);im=n(Vk,`The provided tokenizer has no padding / truncation strategy before the managed section. If your tokenizer set a
padding / truncation strategy before, then it will be reset to no padding / truncation when exiting the managed
section.`),Vk.forEach(t),Dn.forEach(t),dm=c(x),pt=a(x,"DIV",{class:!0});var vi=s(pt);p(to.$$.fragment,vi),cm=c(vi),Da=a(vi,"P",{});var Gk=s(Da);lm=n(Gk,`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Gk.forEach(t),vi.forEach(t),x.forEach(t),Ys=c(i),We=a(i,"H2",{class:!0});var Ti=s(We);mt=a(Ti,"A",{id:!0,class:!0,href:!0});var jk=s(mt);Na=a(jk,"SPAN",{});var Hk=s(Na);p(oo.$$.fragment,Hk),Hk.forEach(t),jk.forEach(t),hm=c(Ti),Ca=a(Ti,"SPAN",{});var Zk=s(Ca);pm=n(Zk,"BatchEncoding"),Zk.forEach(t),Ti.forEach(t),Qs=c(i),w=a(i,"DIV",{class:!0});var P=s(w);p(no.$$.fragment,P),mm=c(P),ie=a(P,"P",{});var vt=s(ie);fm=n(vt,"Holds the output of the "),ro=a(vt,"A",{href:!0});var c_=s(ro);Aa=a(c_,"STRONG",{});var Jk=s(Aa);um=n(Jk,"call"),Jk.forEach(t),_m=n(c_,"()"),c_.forEach(t),gm=n(vt,`,
`),Jo=a(vt,"A",{href:!0});var Xk=s(Jo);km=n(Xk,"encode_plus()"),Xk.forEach(t),bm=n(vt,` and
`),Xo=a(vt,"A",{href:!0});var Yk=s(Xo);vm=n(Yk,"batch_encode_plus()"),Yk.forEach(t),Tm=n(vt," methods (tokens, attention_masks, etc)."),vt.forEach(t),ym=c(P),Wa=a(P,"P",{});var Qk=s(Wa);wm=n(Qk,`This class is derived from a python dictionary and can be used as a dictionary. In addition, this class exposes
utility methods to map from word/character space to token space.`),Qk.forEach(t),zm=c(P),G=a(P,"DIV",{class:!0});var qe=s(G);p(ao.$$.fragment,qe),xm=c(qe),Ba=a(qe,"P",{});var Kk=s(Ba);Em=n(Kk,`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),Kk.forEach(t),$m=c(qe),Sa=a(qe,"P",{});var eb=s(Sa);Pm=n(eb,"Can be called as:"),eb.forEach(t),qm=c(qe),so=a(qe,"UL",{});var yi=s(so);Yo=a(yi,"LI",{});var l_=s(Yo);Oa=a(l_,"CODE",{});var tb=s(Oa);Im=n(tb,"self.char_to_token(char_index)"),tb.forEach(t),Fm=n(l_," if batch size is 1"),l_.forEach(t),Lm=c(yi),Qo=a(yi,"LI",{});var h_=s(Qo);Ua=a(h_,"CODE",{});var ob=s(Ua);Dm=n(ob,"self.char_to_token(batch_index, char_index)"),ob.forEach(t),Nm=n(h_," if batch size is greater or equal to 1"),h_.forEach(t),yi.forEach(t),Cm=c(qe),Ra=a(qe,"P",{});var nb=s(Ra);Am=n(nb,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),nb.forEach(t),qe.forEach(t),Wm=c(P),j=a(P,"DIV",{class:!0});var Ie=s(j);p(io.$$.fragment,Ie),Bm=c(Ie),Ma=a(Ie,"P",{});var rb=s(Ma);Sm=n(rb,`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),rb.forEach(t),Om=c(Ie),Va=a(Ie,"P",{});var ab=s(Va);Um=n(ab,"Can be called as:"),ab.forEach(t),Rm=c(Ie),co=a(Ie,"UL",{});var wi=s(co);Ko=a(wi,"LI",{});var p_=s(Ko);Ga=a(p_,"CODE",{});var sb=s(Ga);Mm=n(sb,"self.char_to_word(char_index)"),sb.forEach(t),Vm=n(p_," if batch size is 1"),p_.forEach(t),Gm=c(wi),en=a(wi,"LI",{});var m_=s(en);ja=a(m_,"CODE",{});var ib=s(ja);jm=n(ib,"self.char_to_word(batch_index, char_index)"),ib.forEach(t),Hm=n(m_," if batch size is greater than 1"),m_.forEach(t),wi.forEach(t),Zm=c(Ie),Ha=a(Ie,"P",{});var db=s(Ha);Jm=n(db,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),db.forEach(t),Ie.forEach(t),Xm=c(P),ft=a(P,"DIV",{class:!0});var zi=s(ft);p(lo.$$.fragment,zi),Ym=c(zi),Za=a(zi,"P",{});var cb=s(Za);Qm=n(cb,"Convert the inner content to tensors."),cb.forEach(t),zi.forEach(t),Km=c(P),$e=a(P,"DIV",{class:!0});var Nn=s($e);p(ho.$$.fragment,Nn),ef=c(Nn),Ja=a(Nn,"P",{});var lb=s(Ja);tf=n(lb,"Return a list mapping the tokens to the id of their original sentences:"),lb.forEach(t),of=c(Nn),Be=a(Nn,"UL",{});var Cn=s(Be);tn=a(Cn,"LI",{});var f_=s(tn);Xa=a(f_,"CODE",{});var hb=s(Xa);nf=n(hb,"None"),hb.forEach(t),rf=n(f_," for special tokens added around or between sequences,"),f_.forEach(t),af=c(Cn),on=a(Cn,"LI",{});var u_=s(on);Ya=a(u_,"CODE",{});var pb=s(Ya);sf=n(pb,"0"),pb.forEach(t),df=n(u_," for tokens corresponding to words in the first sequence,"),u_.forEach(t),cf=c(Cn),nn=a(Cn,"LI",{});var __=s(nn);Qa=a(__,"CODE",{});var mb=s(Qa);lf=n(mb,"1"),mb.forEach(t),hf=n(__,` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),__.forEach(t),Cn.forEach(t),Nn.forEach(t),pf=c(P),ut=a(P,"DIV",{class:!0});var xi=s(ut);p(po.$$.fragment,xi),mf=c(xi),mo=a(xi,"P",{});var Ei=s(mo);ff=n(Ei,"Send all values to device by calling "),Ka=a(Ei,"CODE",{});var fb=s(Ka);uf=n(fb,"v.to(device)"),fb.forEach(t),_f=n(Ei," (PyTorch only)."),Ei.forEach(t),xi.forEach(t),gf=c(P),W=a(P,"DIV",{class:!0});var ae=s(W);p(fo.$$.fragment,ae),kf=c(ae),es=a(ae,"P",{});var ub=s(es);bf=n(ub,"Get the character span corresponding to an encoded token in a sequence of the batch."),ub.forEach(t),vf=c(ae),uo=a(ae,"P",{});var $i=s(uo);Tf=n($i,"Character spans are returned as a "),rn=a($i,"A",{href:!0});var _b=s(rn);yf=n(_b,"CharSpan"),_b.forEach(t),wf=n($i," with:"),$i.forEach(t),zf=c(ae),_o=a(ae,"UL",{});var Pi=s(_o);an=a(Pi,"LI",{});var g_=s(an);ts=a(g_,"STRONG",{});var gb=s(ts);xf=n(gb,"start"),gb.forEach(t),Ef=n(g_," \u2014 Index of the first character in the original string associated to the token."),g_.forEach(t),$f=c(Pi),sn=a(Pi,"LI",{});var k_=s(sn);os=a(k_,"STRONG",{});var kb=s(os);Pf=n(kb,"end"),kb.forEach(t),qf=n(k_,` \u2014 Index of the character following the last character in the original string associated to the
token.`),k_.forEach(t),Pi.forEach(t),If=c(ae),ns=a(ae,"P",{});var bb=s(ns);Ff=n(bb,"Can be called as:"),bb.forEach(t),Lf=c(ae),go=a(ae,"UL",{});var qi=s(go);dn=a(qi,"LI",{});var b_=s(dn);rs=a(b_,"CODE",{});var vb=s(rs);Df=n(vb,"self.token_to_chars(token_index)"),vb.forEach(t),Nf=n(b_," if batch size is 1"),b_.forEach(t),Cf=c(qi),cn=a(qi,"LI",{});var v_=s(cn);as=a(v_,"CODE",{});var Tb=s(as);Af=n(Tb,"self.token_to_chars(batch_index, token_index)"),Tb.forEach(t),Wf=n(v_," if batch size is greater or equal to 1"),v_.forEach(t),qi.forEach(t),ae.forEach(t),Bf=c(P),H=a(P,"DIV",{class:!0});var Fe=s(H);p(ko.$$.fragment,Fe),Sf=c(Fe),Se=a(Fe,"P",{});var An=s(Se);Of=n(An,"Get the index of the sequence represented by the given token. In the general use case, this method returns "),ss=a(An,"CODE",{});var yb=s(ss);Uf=n(yb,"0"),yb.forEach(t),Rf=n(An,`
for a single sequence or the first sequence of a pair, and `),is=a(An,"CODE",{});var wb=s(is);Mf=n(wb,"1"),wb.forEach(t),Vf=n(An," for the second sequence of a pair"),An.forEach(t),Gf=c(Fe),ds=a(Fe,"P",{});var zb=s(ds);jf=n(zb,"Can be called as:"),zb.forEach(t),Hf=c(Fe),bo=a(Fe,"UL",{});var Ii=s(bo);ln=a(Ii,"LI",{});var T_=s(ln);cs=a(T_,"CODE",{});var xb=s(cs);Zf=n(xb,"self.token_to_sequence(token_index)"),xb.forEach(t),Jf=n(T_," if batch size is 1"),T_.forEach(t),Xf=c(Ii),hn=a(Ii,"LI",{});var y_=s(hn);ls=a(y_,"CODE",{});var Eb=s(ls);Yf=n(Eb,"self.token_to_sequence(batch_index, token_index)"),Eb.forEach(t),Qf=n(y_," if batch size is greater than 1"),y_.forEach(t),Ii.forEach(t),Kf=c(Fe),hs=a(Fe,"P",{});var $b=s(hs);eu=n($b,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),$b.forEach(t),Fe.forEach(t),tu=c(P),Z=a(P,"DIV",{class:!0});var Le=s(Z);p(vo.$$.fragment,Le),ou=c(Le),ps=a(Le,"P",{});var Pb=s(ps);nu=n(Pb,"Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),Pb.forEach(t),ru=c(Le),ms=a(Le,"P",{});var qb=s(ms);au=n(qb,"Can be called as:"),qb.forEach(t),su=c(Le),To=a(Le,"UL",{});var Fi=s(To);pn=a(Fi,"LI",{});var w_=s(pn);fs=a(w_,"CODE",{});var Ib=s(fs);iu=n(Ib,"self.token_to_word(token_index)"),Ib.forEach(t),du=n(w_," if batch size is 1"),w_.forEach(t),cu=c(Fi),mn=a(Fi,"LI",{});var z_=s(mn);us=a(z_,"CODE",{});var Fb=s(us);lu=n(Fb,"self.token_to_word(batch_index, token_index)"),Fb.forEach(t),hu=n(z_," if batch size is greater than 1"),z_.forEach(t),Fi.forEach(t),pu=c(Le),_s=a(Le,"P",{});var Lb=s(_s);mu=n(Lb,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),Lb.forEach(t),Le.forEach(t),fu=c(P),_t=a(P,"DIV",{class:!0});var Li=s(_t);p(yo.$$.fragment,Li),uu=c(Li),gs=a(Li,"P",{});var Db=s(gs);_u=n(Db,`Return the list of tokens (sub-parts of the input strings after word/subword splitting and before conversion to
integer indices) at a given batch index (only works for the output of a fast tokenizer).`),Db.forEach(t),Li.forEach(t),gu=c(P),gt=a(P,"DIV",{class:!0});var Di=s(gt);p(wo.$$.fragment,Di),ku=c(Di),ks=a(Di,"P",{});var Nb=s(ks);bu=n(Nb,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Nb.forEach(t),Di.forEach(t),vu=c(P),B=a(P,"DIV",{class:!0});var se=s(B);p(zo.$$.fragment,se),Tu=c(se),bs=a(se,"P",{});var Cb=s(bs);yu=n(Cb,"Get the character span in the original string corresponding to given word in a sequence of the batch."),Cb.forEach(t),wu=c(se),vs=a(se,"P",{});var Ab=s(vs);zu=n(Ab,"Character spans are returned as a CharSpan NamedTuple with:"),Ab.forEach(t),xu=c(se),xo=a(se,"UL",{});var Ni=s(xo);Ts=a(Ni,"LI",{});var Wb=s(Ts);Eu=n(Wb,"start: index of the first character in the original string"),Wb.forEach(t),$u=c(Ni),ys=a(Ni,"LI",{});var Bb=s(ys);Pu=n(Bb,"end: index of the character following the last character in the original string"),Bb.forEach(t),Ni.forEach(t),qu=c(se),ws=a(se,"P",{});var Sb=s(ws);Iu=n(Sb,"Can be called as:"),Sb.forEach(t),Fu=c(se),Eo=a(se,"UL",{});var Ci=s(Eo);fn=a(Ci,"LI",{});var x_=s(fn);zs=a(x_,"CODE",{});var Ob=s(zs);Lu=n(Ob,"self.word_to_chars(word_index)"),Ob.forEach(t),Du=n(x_," if batch size is 1"),x_.forEach(t),Nu=c(Ci),un=a(Ci,"LI",{});var E_=s(un);xs=a(E_,"CODE",{});var Ub=s(xs);Cu=n(Ub,"self.word_to_chars(batch_index, word_index)"),Ub.forEach(t),Au=n(E_," if batch size is greater or equal to 1"),E_.forEach(t),Ci.forEach(t),se.forEach(t),Wu=c(P),L=a(P,"DIV",{class:!0});var Y=s(L);p($o.$$.fragment,Y),Bu=c(Y),Es=a(Y,"P",{});var Rb=s(Es);Su=n(Rb,"Get the encoded token span corresponding to a word in a sequence of the batch."),Rb.forEach(t),Ou=c(Y),Po=a(Y,"P",{});var Ai=s(Po);Uu=n(Ai,"Token spans are returned as a "),_n=a(Ai,"A",{href:!0});var Mb=s(_n);Ru=n(Mb,"TokenSpan"),Mb.forEach(t),Mu=n(Ai," with:"),Ai.forEach(t),Vu=c(Y),qo=a(Y,"UL",{});var Wi=s(qo);gn=a(Wi,"LI",{});var $_=s(gn);$s=a($_,"STRONG",{});var Vb=s($s);Gu=n(Vb,"start"),Vb.forEach(t),ju=n($_," \u2014 Index of the first token."),$_.forEach(t),Hu=c(Wi),kn=a(Wi,"LI",{});var P_=s(kn);Ps=a(P_,"STRONG",{});var Gb=s(Ps);Zu=n(Gb,"end"),Gb.forEach(t),Ju=n(P_," \u2014 Index of the token following the last token."),P_.forEach(t),Wi.forEach(t),Xu=c(Y),qs=a(Y,"P",{});var jb=s(qs);Yu=n(jb,"Can be called as:"),jb.forEach(t),Qu=c(Y),Io=a(Y,"UL",{});var Bi=s(Io);bn=a(Bi,"LI",{});var q_=s(bn);Is=a(q_,"CODE",{});var Hb=s(Is);Ku=n(Hb,"self.word_to_tokens(word_index, sequence_index: int = 0)"),Hb.forEach(t),e_=n(q_," if batch size is 1"),q_.forEach(t),t_=c(Bi),vn=a(Bi,"LI",{});var I_=s(vn);Fs=a(I_,"CODE",{});var Zb=s(Fs);o_=n(Zb,"self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),Zb.forEach(t),n_=n(I_,` if batch size is greater or equal to
1`),I_.forEach(t),Bi.forEach(t),r_=c(Y),Ls=a(Y,"P",{});var Jb=s(Ls);a_=n(Jb,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),Jb.forEach(t),Y.forEach(t),s_=c(P),kt=a(P,"DIV",{class:!0});var Si=s(kt);p(Fo.$$.fragment,Si),i_=c(Si),Ds=a(Si,"P",{});var Xb=s(Ds);d_=n(Xb,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Xb.forEach(t),Si.forEach(t),P.forEach(t),this.h()},h(){l(y,"name","hf:doc:metadata"),l(y,"content",JSON.stringify(hv)),l(E,"id","tokenizer"),l(E,"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"),l(E,"href","#tokenizer"),l(q,"class","relative group"),l(Tt,"href","https://github.com/huggingface/tokenizers"),l(Tt,"rel","nofollow"),l(Co,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Ao,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Wo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Bo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.SpecialTokensMixin"),l(So,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Oo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Uo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"),l(Ro,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(yt,"href","https://github.com/huggingface/tokenizers"),l(yt,"rel","nofollow"),l(Ze,"id","transformers.PreTrainedTokenizer"),l(Ze,"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"),l(Ze,"href","#transformers.PreTrainedTokenizer"),l(Ne,"class","relative group"),l(Mo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Vo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),l(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(nt,"id","transformers.PreTrainedTokenizerFast"),l(nt,"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"),l(nt,"href","#transformers.PreTrainedTokenizerFast"),l(Ae,"class","relative group"),l(Go,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Ot,"href","https://huggingface.co/docs/tokenizers"),l(Ot,"rel","nofollow"),l(jo,"href","../fast_tokenizers"),l(Ho,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Zo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),l(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(mt,"id","transformers.BatchEncoding"),l(mt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(mt,"href","#transformers.BatchEncoding"),l(We,"class","relative group"),l(ro,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Jo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode_plus"),l(Xo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_encode_plus"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(rn,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.CharSpan"),l(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_n,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.TokenSpan"),l(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,b){e(document.head,y),$(i,F,b),$(i,q,b),e(q,E),e(E,S),m(v,S,null),e(q,D),e(q,Wn),e(Wn,Ui),$(i,Os,b),$(i,je,b),e(je,Ri),e(je,Tt),e(Tt,Mi),e(je,Vi),$(i,Us,b),$(i,He,b),e(He,Bn),e(Bn,Gi),e(He,ji),e(He,Sn),e(Sn,Hi),$(i,Rs,b),$(i,O,b),e(O,Zi),e(O,Co),e(Co,Ji),e(O,Xi),e(O,Ao),e(Ao,Yi),e(O,Qi),e(O,Wo),e(Wo,Ki),e(O,ed),e(O,Bo),e(Bo,td),e(O,od),$(i,Ms,b),$(i,De,b),e(De,So),e(So,nd),e(De,rd),e(De,Oo),e(Oo,ad),e(De,sd),$(i,Vs,b),$(i,me,b),e(me,On),e(On,id),e(me,dd),e(me,Un),e(Un,cd),e(me,ld),e(me,Rn),e(Rn,hd),$(i,Gs,b),$(i,I,b),e(I,Uo),e(Uo,pd),e(I,md),e(I,Ro),e(Ro,fd),e(I,ud),e(I,Mn),e(Mn,_d),e(I,gd),e(I,Vn),e(Vn,kd),e(I,bd),e(I,Gn),e(Gn,vd),e(I,Td),e(I,jn),e(jn,yd),e(I,wd),e(I,Hn),e(Hn,zd),e(I,xd),e(I,yt),e(yt,Ed),e(I,$d),$(i,js,b),$(i,Ne,b),e(Ne,Ze),e(Ze,Zn),m(wt,Zn,null),e(Ne,Pd),e(Ne,Jn),e(Jn,qd),$(i,Hs,b),$(i,g,b),m(zt,g,null),e(g,Id),e(g,Xn),e(Xn,Fd),e(g,Ld),e(g,xt),e(xt,Dd),e(xt,Mo),e(Mo,Nd),e(xt,Cd),e(g,Ad),e(g,Yn),e(Yn,Wd),e(g,Bd),e(g,Qn),e(Qn,Sd),e(g,Od),e(g,Kn),e(Kn,Ud),e(g,Rd),e(g,N),e(N,fe),e(fe,er),e(er,Md),e(fe,Vd),e(fe,tr),e(tr,Gd),e(fe,jd),e(fe,or),e(or,Hd),e(fe,Zd),e(N,Jd),e(N,U),e(U,nr),e(nr,Xd),e(U,Yd),e(U,rr),e(rr,Qd),e(U,Kd),e(U,ar),e(ar,ec),e(U,tc),e(U,sr),e(sr,oc),e(U,nc),e(U,ir),e(ir,rc),e(U,ac),e(N,sc),e(N,Q),e(Q,dr),e(dr,ic),e(Q,dc),e(Q,cr),e(cr,cc),e(Q,lc),e(Q,lr),e(lr,hc),e(Q,pc),e(Q,hr),e(hr,mc),e(Q,fc),e(N,uc),e(N,R),e(R,pr),e(pr,_c),e(R,gc),e(R,mr),e(mr,kc),e(R,bc),e(R,fr),e(fr,vc),e(R,Tc),e(R,ur),e(ur,yc),e(R,wc),e(R,Vo),e(Vo,zc),e(R,xc),e(N,Ec),e(N,Je),e(Je,_r),e(_r,$c),e(Je,Pc),e(Je,gr),e(gr,qc),e(Je,Ic),e(N,Fc),e(N,K),e(K,kr),e(kr,Lc),e(K,Dc),e(K,br),e(br,Nc),e(K,Cc),e(K,vr),e(vr,Ac),e(K,Wc),e(K,Tr),e(Tr,Bc),e(K,Sc),e(N,Oc),e(N,ee),e(ee,yr),e(yr,Uc),e(ee,Rc),e(ee,wr),e(wr,Mc),e(ee,Vc),e(ee,zr),e(zr,Gc),e(ee,jc),e(ee,xr),e(xr,Hc),e(ee,Zc),e(g,Jc),e(g,Xe),m(Et,Xe,null),e(Xe,Xc),e(Xe,Er),e(Er,Yc),e(g,Qc),e(g,Ye),m($t,Ye,null),e(Ye,Kc),e(Ye,$r),e($r,el),e(g,tl),e(g,ue),m(Pt,ue,null),e(ue,ol),e(ue,Pr),e(Pr,nl),e(ue,rl),e(ue,qt),e(qt,al),e(qt,qr),e(qr,sl),e(qt,il),e(g,dl),e(g,_e),m(It,_e,null),e(_e,cl),e(_e,Ir),e(Ir,ll),e(_e,hl),e(_e,Ft),e(Ft,pl),e(Ft,Fr),e(Fr,ml),e(Ft,fl),e(g,ul),e(g,ge),m(Lt,ge,null),e(ge,_l),e(ge,Lr),e(Lr,gl),e(ge,kl),m(Qe,ge,null),e(g,bl),e(g,Ke),m(Dt,Ke,null),e(Ke,vl),e(Ke,Dr),e(Dr,Tl),e(g,yl),e(g,et),m(Nt,et,null),e(et,wl),e(et,Nr),e(Nr,zl),e(g,xl),e(g,tt),m(Ct,tt,null),e(tt,El),e(tt,Cr),e(Cr,$l),e(g,Pl),e(g,ke),m(At,ke,null),e(ke,ql),e(ke,Ar),e(Ar,Il),e(ke,Fl),m(ot,ke,null),e(g,Ll),e(g,be),m(Wt,be,null),e(be,Dl),e(be,Wr),e(Wr,Nl),e(be,Cl),e(be,Ce),e(Ce,Al),e(Ce,Br),e(Br,Wl),e(Ce,Bl),e(Ce,Sr),e(Sr,Sl),e(Ce,Ol),e(g,Ul),e(g,ve),m(Bt,ve,null),e(ve,Rl),e(ve,Or),e(Or,Ml),e(ve,Vl),e(ve,Ur),e(Ur,Gl),$(i,Zs,b),$(i,Ae,b),e(Ae,nt),e(nt,Rr),m(St,Rr,null),e(Ae,jl),e(Ae,Mr),e(Mr,Hl),$(i,Js,b),$(i,te,b),e(te,Zl),e(te,Go),e(Go,Jl),e(te,Xl),e(te,Ot),e(Ot,Yl),e(te,Ql),e(te,jo),e(jo,Kl),e(te,eh),$(i,Xs,b),$(i,k,b),m(Ut,k,null),e(k,th),e(k,Vr),e(Vr,oh),e(k,nh),e(k,Rt),e(Rt,rh),e(Rt,Ho),e(Ho,ah),e(Rt,sh),e(k,ih),e(k,Gr),e(Gr,dh),e(k,ch),e(k,jr),e(jr,lh),e(k,hh),e(k,Hr),e(Hr,ph),e(k,mh),e(k,C),e(C,Te),e(Te,Zr),e(Zr,fh),e(Te,uh),e(Te,Jr),e(Jr,_h),e(Te,gh),e(Te,Xr),e(Xr,kh),e(Te,bh),e(C,vh),e(C,M),e(M,Yr),e(Yr,Th),e(M,yh),e(M,Qr),e(Qr,wh),e(M,zh),e(M,Kr),e(Kr,xh),e(M,Eh),e(M,ea),e(ea,$h),e(M,Ph),e(M,ta),e(ta,qh),e(M,Ih),e(C,Fh),e(C,oe),e(oe,oa),e(oa,Lh),e(oe,Dh),e(oe,na),e(na,Nh),e(oe,Ch),e(oe,ra),e(ra,Ah),e(oe,Wh),e(oe,aa),e(aa,Bh),e(oe,Sh),e(C,Oh),e(C,V),e(V,sa),e(sa,Uh),e(V,Rh),e(V,ia),e(ia,Mh),e(V,Vh),e(V,da),e(da,Gh),e(V,jh),e(V,ca),e(ca,Hh),e(V,Zh),e(V,Zo),e(Zo,Jh),e(V,Xh),e(C,Yh),e(C,rt),e(rt,la),e(la,Qh),e(rt,Kh),e(rt,ha),e(ha,ep),e(rt,tp),e(C,op),e(C,ne),e(ne,pa),e(pa,np),e(ne,rp),e(ne,ma),e(ma,ap),e(ne,sp),e(ne,fa),e(fa,ip),e(ne,dp),e(ne,ua),e(ua,cp),e(ne,lp),e(C,hp),e(C,re),e(re,_a),e(_a,pp),e(re,mp),e(re,ga),e(ga,fp),e(re,up),e(re,ka),e(ka,_p),e(re,gp),e(re,ba),e(ba,kp),e(re,bp),e(k,vp),e(k,at),m(Mt,at,null),e(at,Tp),e(at,va),e(va,yp),e(k,wp),e(k,st),m(Vt,st,null),e(st,zp),e(st,Ta),e(Ta,xp),e(k,Ep),e(k,ye),m(Gt,ye,null),e(ye,$p),e(ye,ya),e(ya,Pp),e(ye,qp),e(ye,jt),e(jt,Ip),e(jt,wa),e(wa,Fp),e(jt,Lp),e(k,Dp),e(k,we),m(Ht,we,null),e(we,Np),e(we,za),e(za,Cp),e(we,Ap),e(we,Zt),e(Zt,Wp),e(Zt,xa),e(xa,Bp),e(Zt,Sp),e(k,Op),e(k,ze),m(Jt,ze,null),e(ze,Up),e(ze,Ea),e(Ea,Rp),e(ze,Mp),m(it,ze,null),e(k,Vp),e(k,dt),m(Xt,dt,null),e(dt,Gp),e(dt,$a),e($a,jp),e(k,Hp),e(k,ct),m(Yt,ct,null),e(ct,Zp),e(ct,Pa),e(Pa,Jp),e(k,Xp),e(k,lt),m(Qt,lt,null),e(lt,Yp),e(lt,qa),e(qa,Qp),e(k,Kp),e(k,xe),m(Kt,xe,null),e(xe,em),e(xe,Ia),e(Ia,tm),e(xe,om),m(ht,xe,null),e(k,nm),e(k,Ee),m(eo,Ee,null),e(Ee,rm),e(Ee,Fa),e(Fa,am),e(Ee,sm),e(Ee,La),e(La,im),e(k,dm),e(k,pt),m(to,pt,null),e(pt,cm),e(pt,Da),e(Da,lm),$(i,Ys,b),$(i,We,b),e(We,mt),e(mt,Na),m(oo,Na,null),e(We,hm),e(We,Ca),e(Ca,pm),$(i,Qs,b),$(i,w,b),m(no,w,null),e(w,mm),e(w,ie),e(ie,fm),e(ie,ro),e(ro,Aa),e(Aa,um),e(ro,_m),e(ie,gm),e(ie,Jo),e(Jo,km),e(ie,bm),e(ie,Xo),e(Xo,vm),e(ie,Tm),e(w,ym),e(w,Wa),e(Wa,wm),e(w,zm),e(w,G),m(ao,G,null),e(G,xm),e(G,Ba),e(Ba,Em),e(G,$m),e(G,Sa),e(Sa,Pm),e(G,qm),e(G,so),e(so,Yo),e(Yo,Oa),e(Oa,Im),e(Yo,Fm),e(so,Lm),e(so,Qo),e(Qo,Ua),e(Ua,Dm),e(Qo,Nm),e(G,Cm),e(G,Ra),e(Ra,Am),e(w,Wm),e(w,j),m(io,j,null),e(j,Bm),e(j,Ma),e(Ma,Sm),e(j,Om),e(j,Va),e(Va,Um),e(j,Rm),e(j,co),e(co,Ko),e(Ko,Ga),e(Ga,Mm),e(Ko,Vm),e(co,Gm),e(co,en),e(en,ja),e(ja,jm),e(en,Hm),e(j,Zm),e(j,Ha),e(Ha,Jm),e(w,Xm),e(w,ft),m(lo,ft,null),e(ft,Ym),e(ft,Za),e(Za,Qm),e(w,Km),e(w,$e),m(ho,$e,null),e($e,ef),e($e,Ja),e(Ja,tf),e($e,of),e($e,Be),e(Be,tn),e(tn,Xa),e(Xa,nf),e(tn,rf),e(Be,af),e(Be,on),e(on,Ya),e(Ya,sf),e(on,df),e(Be,cf),e(Be,nn),e(nn,Qa),e(Qa,lf),e(nn,hf),e(w,pf),e(w,ut),m(po,ut,null),e(ut,mf),e(ut,mo),e(mo,ff),e(mo,Ka),e(Ka,uf),e(mo,_f),e(w,gf),e(w,W),m(fo,W,null),e(W,kf),e(W,es),e(es,bf),e(W,vf),e(W,uo),e(uo,Tf),e(uo,rn),e(rn,yf),e(uo,wf),e(W,zf),e(W,_o),e(_o,an),e(an,ts),e(ts,xf),e(an,Ef),e(_o,$f),e(_o,sn),e(sn,os),e(os,Pf),e(sn,qf),e(W,If),e(W,ns),e(ns,Ff),e(W,Lf),e(W,go),e(go,dn),e(dn,rs),e(rs,Df),e(dn,Nf),e(go,Cf),e(go,cn),e(cn,as),e(as,Af),e(cn,Wf),e(w,Bf),e(w,H),m(ko,H,null),e(H,Sf),e(H,Se),e(Se,Of),e(Se,ss),e(ss,Uf),e(Se,Rf),e(Se,is),e(is,Mf),e(Se,Vf),e(H,Gf),e(H,ds),e(ds,jf),e(H,Hf),e(H,bo),e(bo,ln),e(ln,cs),e(cs,Zf),e(ln,Jf),e(bo,Xf),e(bo,hn),e(hn,ls),e(ls,Yf),e(hn,Qf),e(H,Kf),e(H,hs),e(hs,eu),e(w,tu),e(w,Z),m(vo,Z,null),e(Z,ou),e(Z,ps),e(ps,nu),e(Z,ru),e(Z,ms),e(ms,au),e(Z,su),e(Z,To),e(To,pn),e(pn,fs),e(fs,iu),e(pn,du),e(To,cu),e(To,mn),e(mn,us),e(us,lu),e(mn,hu),e(Z,pu),e(Z,_s),e(_s,mu),e(w,fu),e(w,_t),m(yo,_t,null),e(_t,uu),e(_t,gs),e(gs,_u),e(w,gu),e(w,gt),m(wo,gt,null),e(gt,ku),e(gt,ks),e(ks,bu),e(w,vu),e(w,B),m(zo,B,null),e(B,Tu),e(B,bs),e(bs,yu),e(B,wu),e(B,vs),e(vs,zu),e(B,xu),e(B,xo),e(xo,Ts),e(Ts,Eu),e(xo,$u),e(xo,ys),e(ys,Pu),e(B,qu),e(B,ws),e(ws,Iu),e(B,Fu),e(B,Eo),e(Eo,fn),e(fn,zs),e(zs,Lu),e(fn,Du),e(Eo,Nu),e(Eo,un),e(un,xs),e(xs,Cu),e(un,Au),e(w,Wu),e(w,L),m($o,L,null),e(L,Bu),e(L,Es),e(Es,Su),e(L,Ou),e(L,Po),e(Po,Uu),e(Po,_n),e(_n,Ru),e(Po,Mu),e(L,Vu),e(L,qo),e(qo,gn),e(gn,$s),e($s,Gu),e(gn,ju),e(qo,Hu),e(qo,kn),e(kn,Ps),e(Ps,Zu),e(kn,Ju),e(L,Xu),e(L,qs),e(qs,Yu),e(L,Qu),e(L,Io),e(Io,bn),e(bn,Is),e(Is,Ku),e(bn,e_),e(Io,t_),e(Io,vn),e(vn,Fs),e(Fs,o_),e(vn,n_),e(L,r_),e(L,Ls),e(Ls,a_),e(w,s_),e(w,kt),m(Fo,kt,null),e(kt,i_),e(kt,Ds),e(Ds,d_),Ks=!0},p(i,[b]){const Lo={};b&2&&(Lo.$$scope={dirty:b,ctx:i}),Qe.$set(Lo);const Ns={};b&2&&(Ns.$$scope={dirty:b,ctx:i}),ot.$set(Ns);const Cs={};b&2&&(Cs.$$scope={dirty:b,ctx:i}),it.$set(Cs);const As={};b&2&&(As.$$scope={dirty:b,ctx:i}),ht.$set(As)},i(i){Ks||(f(v.$$.fragment,i),f(wt.$$.fragment,i),f(zt.$$.fragment,i),f(Et.$$.fragment,i),f($t.$$.fragment,i),f(Pt.$$.fragment,i),f(It.$$.fragment,i),f(Lt.$$.fragment,i),f(Qe.$$.fragment,i),f(Dt.$$.fragment,i),f(Nt.$$.fragment,i),f(Ct.$$.fragment,i),f(At.$$.fragment,i),f(ot.$$.fragment,i),f(Wt.$$.fragment,i),f(Bt.$$.fragment,i),f(St.$$.fragment,i),f(Ut.$$.fragment,i),f(Mt.$$.fragment,i),f(Vt.$$.fragment,i),f(Gt.$$.fragment,i),f(Ht.$$.fragment,i),f(Jt.$$.fragment,i),f(it.$$.fragment,i),f(Xt.$$.fragment,i),f(Yt.$$.fragment,i),f(Qt.$$.fragment,i),f(Kt.$$.fragment,i),f(ht.$$.fragment,i),f(eo.$$.fragment,i),f(to.$$.fragment,i),f(oo.$$.fragment,i),f(no.$$.fragment,i),f(ao.$$.fragment,i),f(io.$$.fragment,i),f(lo.$$.fragment,i),f(ho.$$.fragment,i),f(po.$$.fragment,i),f(fo.$$.fragment,i),f(ko.$$.fragment,i),f(vo.$$.fragment,i),f(yo.$$.fragment,i),f(wo.$$.fragment,i),f(zo.$$.fragment,i),f($o.$$.fragment,i),f(Fo.$$.fragment,i),Ks=!0)},o(i){u(v.$$.fragment,i),u(wt.$$.fragment,i),u(zt.$$.fragment,i),u(Et.$$.fragment,i),u($t.$$.fragment,i),u(Pt.$$.fragment,i),u(It.$$.fragment,i),u(Lt.$$.fragment,i),u(Qe.$$.fragment,i),u(Dt.$$.fragment,i),u(Nt.$$.fragment,i),u(Ct.$$.fragment,i),u(At.$$.fragment,i),u(ot.$$.fragment,i),u(Wt.$$.fragment,i),u(Bt.$$.fragment,i),u(St.$$.fragment,i),u(Ut.$$.fragment,i),u(Mt.$$.fragment,i),u(Vt.$$.fragment,i),u(Gt.$$.fragment,i),u(Ht.$$.fragment,i),u(Jt.$$.fragment,i),u(it.$$.fragment,i),u(Xt.$$.fragment,i),u(Yt.$$.fragment,i),u(Qt.$$.fragment,i),u(Kt.$$.fragment,i),u(ht.$$.fragment,i),u(eo.$$.fragment,i),u(to.$$.fragment,i),u(oo.$$.fragment,i),u(no.$$.fragment,i),u(ao.$$.fragment,i),u(io.$$.fragment,i),u(lo.$$.fragment,i),u(ho.$$.fragment,i),u(po.$$.fragment,i),u(fo.$$.fragment,i),u(ko.$$.fragment,i),u(vo.$$.fragment,i),u(yo.$$.fragment,i),u(wo.$$.fragment,i),u(zo.$$.fragment,i),u($o.$$.fragment,i),u(Fo.$$.fragment,i),Ks=!1},d(i){t(y),i&&t(F),i&&t(q),_(v),i&&t(Os),i&&t(je),i&&t(Us),i&&t(He),i&&t(Rs),i&&t(O),i&&t(Ms),i&&t(De),i&&t(Vs),i&&t(me),i&&t(Gs),i&&t(I),i&&t(js),i&&t(Ne),_(wt),i&&t(Hs),i&&t(g),_(zt),_(Et),_($t),_(Pt),_(It),_(Lt),_(Qe),_(Dt),_(Nt),_(Ct),_(At),_(ot),_(Wt),_(Bt),i&&t(Zs),i&&t(Ae),_(St),i&&t(Js),i&&t(te),i&&t(Xs),i&&t(k),_(Ut),_(Mt),_(Vt),_(Gt),_(Ht),_(Jt),_(it),_(Xt),_(Yt),_(Qt),_(Kt),_(ht),_(eo),_(to),i&&t(Ys),i&&t(We),_(oo),i&&t(Qs),i&&t(w),_(no),_(ao),_(io),_(lo),_(ho),_(po),_(fo),_(ko),_(vo),_(yo),_(wo),_(zo),_($o),_(Fo)}}}const hv={local:"tokenizer",sections:[{local:"transformers.PreTrainedTokenizer",title:"PreTrainedTokenizer"},{local:"transformers.PreTrainedTokenizerFast",title:"PreTrainedTokenizerFast"},{local:"transformers.BatchEncoding",title:"BatchEncoding"}],title:"Tokenizer"};function pv(pe){return av(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bv extends tv{constructor(y){super();ov(this,y,pv,lv,nv,{})}}export{bv as default,hv as metadata};
