import{S as cv,i as lv,s as hv,e as r,k as d,w as h,t as o,M as pv,c as s,d as t,m as c,a,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 mv,L as iv}from"../../chunks/vendor-hf-doc-builder.js";import{T as sv}from"../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../chunks/Docstring-hf-doc-builder.js";import{C as dv}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Gi}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as av}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function fv(pe){let y,L,q,E,B;return E=new dv({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")

# Push the tokenizer to your namespace with the name "my-finetuned-bert".
tokenizer.push_to_hub("my-finetuned-bert")

# Push the tokenizer to an organization with the name "my-finetuned-bert".
tokenizer.push_to_hub("huggingface/my-finetuned-bert")`,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"),L=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=s(v,"P",{});var I=a(y);L=n(I,"Examples:"),I.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,I){$(v,y,I),e(y,L),$(v,q,I),m(E,v,I),B=!0},p:iv,i(v){B||(f(E.$$.fragment,v),B=!0)},o(v){u(E.$$.fragment,v),B=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function uv(pe){let y,L;return{c(){y=r("p"),L=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=s(q,"P",{});var E=a(y);L=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,L)},d(q){q&&t(y)}}}function _v(pe){let y,L,q,E,B;return E=new dv({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")

# Push the tokenizer to your namespace with the name "my-finetuned-bert".
tokenizer.push_to_hub("my-finetuned-bert")

# Push the tokenizer to an organization with the name "my-finetuned-bert".
tokenizer.push_to_hub("huggingface/my-finetuned-bert")`,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"),L=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=s(v,"P",{});var I=a(y);L=n(I,"Examples:"),I.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,I){$(v,y,I),e(y,L),$(v,q,I),m(E,v,I),B=!0},p:iv,i(v){B||(f(E.$$.fragment,v),B=!0)},o(v){u(E.$$.fragment,v),B=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function gv(pe){let y,L;return{c(){y=r("p"),L=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=s(q,"P",{});var E=a(y);L=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,L)},d(q){q&&t(y)}}}function kv(pe){let y,L,q,E,B,v,I,Bn,ji,Ua,He,Hi,Tt,Mi,Xi,Va,Me,Wn,Yi,Ji,Rn,Ki,Ga,W,Qi,Oo,Zi,ed,So,td,od,Bo,nd,rd,Wo,sd,ad,ja,Ie,Ro,id,dd,Uo,cd,ld,Ha,me,Un,hd,pd,Vn,md,fd,Gn,ud,Ma,D,Vo,_d,gd,Go,kd,bd,jn,vd,Td,Hn,yd,wd,Mn,xd,zd,Xn,Ed,$d,Yn,Pd,qd,yt,Dd,Ld,Xa,Ne,Xe,Jn,wt,Fd,Kn,Id,Ya,g,xt,Nd,Qn,Ad,Cd,zt,Od,jo,Sd,Bd,Wd,Zn,Rd,Ud,er,Vd,Gd,tr,jd,Hd,N,fe,or,Md,Xd,nr,Yd,Jd,rr,Kd,Qd,Zd,R,sr,ec,tc,ar,oc,nc,ir,rc,sc,dr,ac,ic,cr,dc,cc,lc,Q,lr,hc,pc,hr,mc,fc,pr,uc,_c,mr,gc,kc,bc,U,fr,vc,Tc,ur,yc,wc,_r,xc,zc,gr,Ec,$c,Ho,Pc,qc,Dc,Ye,kr,Lc,Fc,br,Ic,Nc,Ac,Z,vr,Cc,Oc,Tr,Sc,Bc,yr,Wc,Rc,wr,Uc,Vc,Gc,ee,xr,jc,Hc,zr,Mc,Xc,Er,Yc,Jc,$r,Kc,Qc,Zc,Je,Et,el,Pr,tl,ol,Ke,$t,nl,qr,rl,sl,ue,Pt,al,Dr,il,dl,qt,cl,Lr,ll,hl,pl,_e,Dt,ml,Fr,fl,ul,Lt,_l,Ir,gl,kl,bl,ge,Ft,vl,It,Tl,Nr,yl,wl,xl,Qe,zl,Ze,Nt,El,Ar,$l,Pl,et,At,ql,Cr,Dl,Ll,tt,Ct,Fl,Or,Il,Nl,ke,Ot,Al,Sr,Cl,Ol,ot,Sl,be,St,Bl,Br,Wl,Rl,Ae,Ul,Wr,Vl,Gl,Rr,jl,Hl,Ml,ve,Bt,Xl,Ur,Yl,Jl,Vr,Kl,Ja,Ce,nt,Gr,Wt,Ql,jr,Zl,Ka,te,eh,Mo,th,oh,Rt,nh,rh,Xo,sh,ah,Qa,k,Ut,ih,Hr,dh,ch,Vt,lh,Yo,hh,ph,mh,Mr,fh,uh,Xr,_h,gh,Yr,kh,bh,A,Te,Jr,vh,Th,Kr,yh,wh,Qr,xh,zh,Eh,V,Zr,$h,Ph,es,qh,Dh,ts,Lh,Fh,os,Ih,Nh,ns,Ah,Ch,Oh,oe,rs,Sh,Bh,ss,Wh,Rh,as,Uh,Vh,is,Gh,jh,Hh,G,ds,Mh,Xh,cs,Yh,Jh,ls,Kh,Qh,hs,Zh,ep,Jo,tp,op,np,rt,ps,rp,sp,ms,ap,ip,dp,ne,fs,cp,lp,us,hp,pp,_s,mp,fp,gs,up,_p,gp,re,ks,kp,bp,bs,vp,Tp,vs,yp,wp,Ts,xp,zp,Ep,st,Gt,$p,ys,Pp,qp,at,jt,Dp,ws,Lp,Fp,ye,Ht,Ip,xs,Np,Ap,Mt,Cp,zs,Op,Sp,Bp,we,Xt,Wp,Es,Rp,Up,Yt,Vp,$s,Gp,jp,Hp,xe,Jt,Mp,Kt,Xp,Ps,Yp,Jp,Kp,it,Qp,dt,Qt,Zp,qs,em,tm,ct,Zt,om,Ds,nm,rm,lt,eo,sm,Ls,am,im,ze,to,dm,Fs,cm,lm,ht,hm,Ee,oo,pm,Is,mm,fm,Ns,um,_m,pt,no,gm,As,km,Za,Oe,mt,Cs,ro,bm,Os,vm,ei,w,so,Tm,ie,ym,ao,Ss,wm,xm,zm,Ko,Em,$m,Qo,Pm,qm,Dm,Bs,Lm,Fm,j,io,Im,Ws,Nm,Am,Rs,Cm,Om,co,Zo,Us,Sm,Bm,Wm,en,Vs,Rm,Um,Vm,Gs,Gm,jm,H,lo,Hm,js,Mm,Xm,Hs,Ym,Jm,ho,tn,Ms,Km,Qm,Zm,on,Xs,ef,tf,of,Ys,nf,rf,ft,po,sf,Js,af,df,$e,mo,cf,Ks,lf,hf,Se,nn,Qs,pf,mf,ff,rn,Zs,uf,_f,gf,sn,ea,kf,bf,vf,ut,fo,Tf,uo,yf,ta,wf,xf,zf,O,_o,Ef,oa,$f,Pf,go,qf,an,Df,Lf,Ff,ko,dn,na,If,Nf,Af,cn,ra,Cf,Of,Sf,sa,Bf,Wf,bo,ln,aa,Rf,Uf,Vf,hn,ia,Gf,jf,Hf,M,vo,Mf,Be,Xf,da,Yf,Jf,ca,Kf,Qf,Zf,la,eu,tu,To,pn,ha,ou,nu,ru,mn,pa,su,au,iu,ma,du,cu,X,yo,lu,fa,hu,pu,ua,mu,fu,wo,fn,_a,uu,_u,gu,un,ga,ku,bu,vu,ka,Tu,yu,_t,xo,wu,ba,xu,zu,gt,zo,Eu,va,$u,Pu,S,Eo,qu,Ta,Du,Lu,ya,Fu,Iu,$o,wa,Nu,Au,xa,Cu,Ou,za,Su,Bu,Po,_n,Ea,Wu,Ru,Uu,gn,$a,Vu,Gu,ju,F,qo,Hu,Pa,Mu,Xu,Do,Yu,kn,Ju,Ku,Qu,Lo,bn,qa,Zu,e_,t_,vn,Da,o_,n_,r_,La,s_,a_,Fo,Tn,Fa,i_,d_,c_,yn,Ia,l_,h_,p_,Na,m_,f_,kt,Io,u_,Aa,__,ti;return v=new Gi({}),wt=new Gi({}),xt=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/pr_19907/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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/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/pr_19907/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/pr_19907/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. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/tokenization_utils_base.py#L2414",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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/vr_19907/src/transformers/tokenization_utils_base.py#L3374",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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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/vr_19907/src/transformers/tokenization_utils_base.py#L3407",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Dt=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/pr_19907/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/pr_19907/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. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (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/pr_19907/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/vr_19907/src/transformers/tokenization_utils_base.py#L2222",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>
`}}),Ft=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:"use_auth_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:"**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 (requires a paying subscription).`,name:"private"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.use_auth_token",description:`<strong>use_auth_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:"use_auth_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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/utils/hub.py#L712"}}),Qe=new av({props:{anchor:"transformers.PreTrainedTokenizer.push_to_hub.example",$$slots:{default:[fv]},$$scope:{ctx:pe}}}),Nt=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/vr_19907/src/transformers/tokenization_utils.py#L883",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),At=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/vr_19907/src/transformers/tokenization_utils.py#L560",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/vr_19907/src/transformers/tokenization_utils.py#L369",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),Ot=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/vr_19907/src/transformers/tokenization_utils.py#L458",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ot=new sv({props:{$$slots:{default:[uv]},$$scope:{ctx:pe}}}),St=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.
kwargs &#x2014;
Keyword arguments to use for the tokenization.`,name:"is_split_into_words"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/tokenization_utils.py#L821",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/vr_19907/src/transformers/tokenization_utils.py#L481",returnDescription:`
<p>The list of tokens.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Wt=new Gi({}),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/pr_19907/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.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/vr_19907/src/transformers/tokenization_utils_fast.py#L78"}}),Gt=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/pr_19907/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/pr_19907/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. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/tokenization_utils_base.py#L2414",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),jt=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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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/vr_19907/src/transformers/tokenization_utils_base.py#L3374",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Ht=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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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/vr_19907/src/transformers/tokenization_utils_base.py#L3407",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Xt=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/pr_19907/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/pr_19907/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. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (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/pr_19907/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/vr_19907/src/transformers/tokenization_utils_base.py#L2222",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:"use_auth_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:"**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 (requires a paying subscription).`,name:"private"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.use_auth_token",description:`<strong>use_auth_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:"use_auth_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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/utils/hub.py#L712"}}),it=new av({props:{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.example",$$slots:{default:[_v]},$$scope:{ctx:pe}}}),Qt=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/vr_19907/src/transformers/tokenization_utils_fast.py#L293",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Zt=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/vr_19907/src/transformers/tokenization_utils_fast.py#L235",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),eo=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizerFast.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/tokenization_utils_fast.py#L156",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),to=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/vr_19907/src/transformers/tokenization_utils_fast.py#L272",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ht=new sv({props:{$$slots:{default:[gv]},$$scope:{ctx:pe}}}),oo=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/pr_19907/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/pr_19907/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 &gt;= 7.5 (Volta).`,name:"pad_to_multiple_of"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/tokenization_utils_fast.py#L322"}}),no=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.
kwargs &#x2014;
Additional keyword arguments passed along to the trainer from the &#x1F917; Tokenizers library.`,name:"special_tokens_map"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/tokenization_utils_fast.py#L605",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/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"
>PreTrainedTokenizerFast</a></p>
`}}),ro=new Gi({}),so=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/vr_19907/src/transformers/tokenization_utils_base.py#L163"}}),io=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/vr_19907/src/transformers/tokenization_utils_base.py#L535",returnDescription:`
<p>Index of the token.</p>
`,returnType:`
<p><code>int</code></p>
`}}),lo=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/vr_19907/src/transformers/tokenization_utils_base.py#L621",returnDescription:`
<p>Index or indices of the associated encoded token(s).</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),po=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/pr_19907/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/pr_19907/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/vr_19907/src/transformers/tokenization_utils_base.py#L660"}}),mo=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/vr_19907/src/transformers/tokenization_utils_base.py#L301",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>
`}}),fo=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/vr_19907/src/transformers/tokenization_utils_base.py#L740",returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),_o=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/vr_19907/src/transformers/tokenization_utils_base.py#L496",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/pr_19907/en/internal/tokenization_utils#transformers.CharSpan"
>CharSpan</a></p>
`}}),vo=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/vr_19907/src/transformers/tokenization_utils_base.py#L368",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),yo=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/vr_19907/src/transformers/tokenization_utils_base.py#L407",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),xo=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/vr_19907/src/transformers/tokenization_utils_base.py#L283",returnDescription:`
<p>The list of tokens at that index.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),zo=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/vr_19907/src/transformers/tokenization_utils_base.py#L349",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>
`}}),Eo=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/vr_19907/src/transformers/tokenization_utils_base.py#L576",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>
`}}),qo=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/vr_19907/src/transformers/tokenization_utils_base.py#L445",returnDescription:`
<p>Optional <a
  href="/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.TokenSpan"
>TokenSpan</a> Span of tokens in the encoded sequence. Returns <code>None</code> if
no tokens correspond to the word.</p>
`}}),Io=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/vr_19907/src/transformers/tokenization_utils_base.py#L325",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"),L=d(),q=r("h1"),E=r("a"),B=r("span"),h(v.$$.fragment),I=d(),Bn=r("span"),ji=o("Tokenizer"),Ua=d(),He=r("p"),Hi=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"),Xi=o(". The \u201CFast\u201D implementations allows:"),Va=d(),Me=r("ol"),Wn=r("li"),Yi=o("a significant speed-up in particular when doing batched tokenization and"),Ji=d(),Rn=r("li"),Ki=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).`),Ga=d(),W=r("p"),Qi=o("The base classes "),Oo=r("a"),Zi=o("PreTrainedTokenizer"),ed=o(" and "),So=r("a"),td=o("PreTrainedTokenizerFast"),od=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
`),Bo=r("a"),nd=o("PreTrainedTokenizerBase"),rd=o(` that contains the common methods, and
`),Wo=r("a"),sd=o("SpecialTokensMixin"),ad=o("."),ja=d(),Ie=r("p"),Ro=r("a"),id=o("PreTrainedTokenizer"),dd=o(" and "),Uo=r("a"),cd=o("PreTrainedTokenizerFast"),ld=o(` thus implement the main
methods for using all the tokenizers:`),Ha=d(),me=r("ul"),Un=r("li"),hd=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).`),pd=d(),Vn=r("li"),md=o("Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),fd=d(),Gn=r("li"),ud=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.`),Ma=d(),D=r("p"),Vo=r("a"),_d=o("BatchEncoding"),gd=o(` holds the output of the
`),Go=r("a"),kd=o("PreTrainedTokenizerBase"),bd=o("\u2019s encoding methods ("),jn=r("code"),vd=o("__call__"),Td=o(`,
`),Hn=r("code"),yd=o("encode_plus"),wd=o(" and "),Mn=r("code"),xd=o("batch_encode_plus"),zd=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 (`),Xn=r("code"),Ed=o("input_ids"),$d=o(", "),Yn=r("code"),Pd=o("attention_mask"),qd=o(`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=r("a"),Dd=o("tokenizers library"),Ld=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).`),Xa=d(),Ne=r("h2"),Xe=r("a"),Jn=r("span"),h(wt.$$.fragment),Fd=d(),Kn=r("span"),Id=o("PreTrainedTokenizer"),Ya=d(),g=r("div"),h(xt.$$.fragment),Nd=d(),Qn=r("p"),Ad=o("Base class for all slow tokenizers."),Cd=d(),zt=r("p"),Od=o("Inherits from "),jo=r("a"),Sd=o("PreTrainedTokenizerBase"),Bd=o("."),Wd=d(),Zn=r("p"),Rd=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.`),Ud=d(),er=r("p"),Vd=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).`),Gd=d(),tr=r("p"),jd=o("Class attributes (overridden by derived classes)"),Hd=d(),N=r("ul"),fe=r("li"),or=r("strong"),Md=o("vocab_files_names"),Xd=o(" ("),nr=r("code"),Yd=o("Dict[str, str]"),Jd=o(") \u2014 A dictionary with, as keys, the "),rr=r("code"),Kd=o("__init__"),Qd=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Zd=d(),R=r("li"),sr=r("strong"),ec=o("pretrained_vocab_files_map"),tc=o(" ("),ar=r("code"),oc=o("Dict[str, Dict[str, str]]"),nc=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ir=r("code"),rc=o("__init__"),sc=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),dr=r("code"),ac=o("short-cut-names"),ic=o(" of the pretrained models with, as associated values, the "),cr=r("code"),dc=o("url"),cc=o(` to the
associated pretrained vocabulary file.`),lc=d(),Q=r("li"),lr=r("strong"),hc=o("max_model_input_sizes"),pc=o(" ("),hr=r("code"),mc=o("Dict[str, Optional[int]]"),fc=o(") \u2014 A dictionary with, as keys, the "),pr=r("code"),uc=o("short-cut-names"),_c=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),mr=r("code"),gc=o("None"),kc=o(" if the model has no maximum input size."),bc=d(),U=r("li"),fr=r("strong"),vc=o("pretrained_init_configuration"),Tc=o(" ("),ur=r("code"),yc=o("Dict[str, Dict[str, Any]]"),wc=o(`) \u2014 A dictionary with, as keys, the
`),_r=r("code"),xc=o("short-cut-names"),zc=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),gr=r("code"),Ec=o("__init__"),$c=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Ho=r("a"),Pc=o("from_pretrained()"),qc=o(" method."),Dc=d(),Ye=r("li"),kr=r("strong"),Lc=o("model_input_names"),Fc=o(" ("),br=r("code"),Ic=o("List[str]"),Nc=o(") \u2014 A list of inputs expected in the forward pass of the model."),Ac=d(),Z=r("li"),vr=r("strong"),Cc=o("padding_side"),Oc=o(" ("),Tr=r("code"),Sc=o("str"),Bc=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),yr=r("code"),Wc=o("'right'"),Rc=o(" or "),wr=r("code"),Uc=o("'left'"),Vc=o("."),Gc=d(),ee=r("li"),xr=r("strong"),jc=o("truncation_side"),Hc=o(" ("),zr=r("code"),Mc=o("str"),Xc=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),Er=r("code"),Yc=o("'right'"),Jc=o(" or "),$r=r("code"),Kc=o("'left'"),Qc=o("."),Zc=d(),Je=r("div"),h(Et.$$.fragment),el=d(),Pr=r("p"),tl=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),ol=d(),Ke=r("div"),h($t.$$.fragment),nl=d(),qr=r("p"),rl=o("Convert a list of lists of token ids into a list of strings by calling decode."),sl=d(),ue=r("div"),h(Pt.$$.fragment),al=d(),Dr=r("p"),il=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.`),dl=d(),qt=r("p"),cl=o("Similar to doing "),Lr=r("code"),ll=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),hl=o("."),pl=d(),_e=r("div"),h(Dt.$$.fragment),ml=d(),Fr=r("p"),fl=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),ul=d(),Lt=r("p"),_l=o("Same as doing "),Ir=r("code"),gl=o("self.convert_tokens_to_ids(self.tokenize(text))"),kl=o("."),bl=d(),ge=r("div"),h(Ft.$$.fragment),vl=d(),It=r("p"),Tl=o(`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Nr=r("code"),yl=o("repo_path_or_name"),wl=o("."),xl=d(),h(Qe.$$.fragment),zl=d(),Ze=r("div"),h(Nt.$$.fragment),El=d(),Ar=r("p"),$l=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Pl=d(),et=r("div"),h(At.$$.fragment),ql=d(),Cr=r("p"),Dl=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Ll=d(),tt=r("div"),h(Ct.$$.fragment),Fl=d(),Or=r("p"),Il=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Nl=d(),ke=r("div"),h(Ot.$$.fragment),Al=d(),Sr=r("p"),Cl=o("Returns the number of added tokens when encoding a sequence with special tokens."),Ol=d(),h(ot.$$.fragment),Sl=d(),be=r("div"),h(St.$$.fragment),Bl=d(),Br=r("p"),Wl=o("Performs any necessary transformations before tokenization."),Rl=d(),Ae=r("p"),Ul=o("This method should pop the arguments from kwargs and return the remaining "),Wr=r("code"),Vl=o("kwargs"),Gl=o(` as well. We test the
`),Rr=r("code"),jl=o("kwargs"),Hl=o(" at the end of the encoding process to be sure all the arguments have been used."),Ml=d(),ve=r("div"),h(Bt.$$.fragment),Xl=d(),Ur=r("p"),Yl=o("Converts a string in a sequence of tokens, using the tokenizer."),Jl=d(),Vr=r("p"),Kl=o(`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Ja=d(),Ce=r("h2"),nt=r("a"),Gr=r("span"),h(Wt.$$.fragment),Ql=d(),jr=r("span"),Zl=o("PreTrainedTokenizerFast"),Ka=d(),te=r("p"),eh=o("The "),Mo=r("a"),th=o("PreTrainedTokenizerFast"),oh=o(" depend on the "),Rt=r("a"),nh=o("tokenizers"),rh=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 `),Xo=r("a"),sh=o("Using tokenizers from \u{1F917} tokenizers"),ah=o(" page to understand how this is done."),Qa=d(),k=r("div"),h(Ut.$$.fragment),ih=d(),Hr=r("p"),dh=o("Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),ch=d(),Vt=r("p"),lh=o("Inherits from "),Yo=r("a"),hh=o("PreTrainedTokenizerBase"),ph=o("."),mh=d(),Mr=r("p"),fh=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.`),uh=d(),Xr=r("p"),_h=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).`),gh=d(),Yr=r("p"),kh=o("Class attributes (overridden by derived classes)"),bh=d(),A=r("ul"),Te=r("li"),Jr=r("strong"),vh=o("vocab_files_names"),Th=o(" ("),Kr=r("code"),yh=o("Dict[str, str]"),wh=o(") \u2014 A dictionary with, as keys, the "),Qr=r("code"),xh=o("__init__"),zh=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Eh=d(),V=r("li"),Zr=r("strong"),$h=o("pretrained_vocab_files_map"),Ph=o(" ("),es=r("code"),qh=o("Dict[str, Dict[str, str]]"),Dh=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ts=r("code"),Lh=o("__init__"),Fh=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),os=r("code"),Ih=o("short-cut-names"),Nh=o(" of the pretrained models with, as associated values, the "),ns=r("code"),Ah=o("url"),Ch=o(` to the
associated pretrained vocabulary file.`),Oh=d(),oe=r("li"),rs=r("strong"),Sh=o("max_model_input_sizes"),Bh=o(" ("),ss=r("code"),Wh=o("Dict[str, Optional[int]]"),Rh=o(") \u2014 A dictionary with, as keys, the "),as=r("code"),Uh=o("short-cut-names"),Vh=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),is=r("code"),Gh=o("None"),jh=o(" if the model has no maximum input size."),Hh=d(),G=r("li"),ds=r("strong"),Mh=o("pretrained_init_configuration"),Xh=o(" ("),cs=r("code"),Yh=o("Dict[str, Dict[str, Any]]"),Jh=o(`) \u2014 A dictionary with, as keys, the
`),ls=r("code"),Kh=o("short-cut-names"),Qh=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),hs=r("code"),Zh=o("__init__"),ep=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Jo=r("a"),tp=o("from_pretrained()"),op=o(" method."),np=d(),rt=r("li"),ps=r("strong"),rp=o("model_input_names"),sp=o(" ("),ms=r("code"),ap=o("List[str]"),ip=o(") \u2014 A list of inputs expected in the forward pass of the model."),dp=d(),ne=r("li"),fs=r("strong"),cp=o("padding_side"),lp=o(" ("),us=r("code"),hp=o("str"),pp=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),_s=r("code"),mp=o("'right'"),fp=o(" or "),gs=r("code"),up=o("'left'"),_p=o("."),gp=d(),re=r("li"),ks=r("strong"),kp=o("truncation_side"),bp=o(" ("),bs=r("code"),vp=o("str"),Tp=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),vs=r("code"),yp=o("'right'"),wp=o(" or "),Ts=r("code"),xp=o("'left'"),zp=o("."),Ep=d(),st=r("div"),h(Gt.$$.fragment),$p=d(),ys=r("p"),Pp=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),qp=d(),at=r("div"),h(jt.$$.fragment),Dp=d(),ws=r("p"),Lp=o("Convert a list of lists of token ids into a list of strings by calling decode."),Fp=d(),ye=r("div"),h(Ht.$$.fragment),Ip=d(),xs=r("p"),Np=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.`),Ap=d(),Mt=r("p"),Cp=o("Similar to doing "),zs=r("code"),Op=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Sp=o("."),Bp=d(),we=r("div"),h(Xt.$$.fragment),Wp=d(),Es=r("p"),Rp=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Up=d(),Yt=r("p"),Vp=o("Same as doing "),$s=r("code"),Gp=o("self.convert_tokens_to_ids(self.tokenize(text))"),jp=o("."),Hp=d(),xe=r("div"),h(Jt.$$.fragment),Mp=d(),Kt=r("p"),Xp=o(`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Ps=r("code"),Yp=o("repo_path_or_name"),Jp=o("."),Kp=d(),h(it.$$.fragment),Qp=d(),dt=r("div"),h(Qt.$$.fragment),Zp=d(),qs=r("p"),em=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),tm=d(),ct=r("div"),h(Zt.$$.fragment),om=d(),Ds=r("p"),nm=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),rm=d(),lt=r("div"),h(eo.$$.fragment),sm=d(),Ls=r("p"),am=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),im=d(),ze=r("div"),h(to.$$.fragment),dm=d(),Fs=r("p"),cm=o("Returns the number of added tokens when encoding a sequence with special tokens."),lm=d(),h(ht.$$.fragment),hm=d(),Ee=r("div"),h(oo.$$.fragment),pm=d(),Is=r("p"),mm=o(`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),fm=d(),Ns=r("p"),um=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.`),_m=d(),pt=r("div"),h(no.$$.fragment),gm=d(),As=r("p"),km=o(`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Za=d(),Oe=r("h2"),mt=r("a"),Cs=r("span"),h(ro.$$.fragment),bm=d(),Os=r("span"),vm=o("BatchEncoding"),ei=d(),w=r("div"),h(so.$$.fragment),Tm=d(),ie=r("p"),ym=o("Holds the output of the "),ao=r("a"),Ss=r("strong"),wm=o("call"),xm=o("()"),zm=o(`,
`),Ko=r("a"),Em=o("encode_plus()"),$m=o(` and
`),Qo=r("a"),Pm=o("batch_encode_plus()"),qm=o(" methods (tokens, attention_masks, etc)."),Dm=d(),Bs=r("p"),Lm=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.`),Fm=d(),j=r("div"),h(io.$$.fragment),Im=d(),Ws=r("p"),Nm=o(`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),Am=d(),Rs=r("p"),Cm=o("Can be called as:"),Om=d(),co=r("ul"),Zo=r("li"),Us=r("code"),Sm=o("self.char_to_token(char_index)"),Bm=o(" if batch size is 1"),Wm=d(),en=r("li"),Vs=r("code"),Rm=o("self.char_to_token(batch_index, char_index)"),Um=o(" if batch size is greater or equal to 1"),Vm=d(),Gs=r("p"),Gm=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.`),jm=d(),H=r("div"),h(lo.$$.fragment),Hm=d(),js=r("p"),Mm=o(`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),Xm=d(),Hs=r("p"),Ym=o("Can be called as:"),Jm=d(),ho=r("ul"),tn=r("li"),Ms=r("code"),Km=o("self.char_to_word(char_index)"),Qm=o(" if batch size is 1"),Zm=d(),on=r("li"),Xs=r("code"),ef=o("self.char_to_word(batch_index, char_index)"),tf=o(" if batch size is greater than 1"),of=d(),Ys=r("p"),nf=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.`),rf=d(),ft=r("div"),h(po.$$.fragment),sf=d(),Js=r("p"),af=o("Convert the inner content to tensors."),df=d(),$e=r("div"),h(mo.$$.fragment),cf=d(),Ks=r("p"),lf=o("Return a list mapping the tokens to the id of their original sentences:"),hf=d(),Se=r("ul"),nn=r("li"),Qs=r("code"),pf=o("None"),mf=o(" for special tokens added around or between sequences,"),ff=d(),rn=r("li"),Zs=r("code"),uf=o("0"),_f=o(" for tokens corresponding to words in the first sequence,"),gf=d(),sn=r("li"),ea=r("code"),kf=o("1"),bf=o(` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),vf=d(),ut=r("div"),h(fo.$$.fragment),Tf=d(),uo=r("p"),yf=o("Send all values to device by calling "),ta=r("code"),wf=o("v.to(device)"),xf=o(" (PyTorch only)."),zf=d(),O=r("div"),h(_o.$$.fragment),Ef=d(),oa=r("p"),$f=o("Get the character span corresponding to an encoded token in a sequence of the batch."),Pf=d(),go=r("p"),qf=o("Character spans are returned as a "),an=r("a"),Df=o("CharSpan"),Lf=o(" with:"),Ff=d(),ko=r("ul"),dn=r("li"),na=r("strong"),If=o("start"),Nf=o(" \u2014 Index of the first character in the original string associated to the token."),Af=d(),cn=r("li"),ra=r("strong"),Cf=o("end"),Of=o(` \u2014 Index of the character following the last character in the original string associated to the
token.`),Sf=d(),sa=r("p"),Bf=o("Can be called as:"),Wf=d(),bo=r("ul"),ln=r("li"),aa=r("code"),Rf=o("self.token_to_chars(token_index)"),Uf=o(" if batch size is 1"),Vf=d(),hn=r("li"),ia=r("code"),Gf=o("self.token_to_chars(batch_index, token_index)"),jf=o(" if batch size is greater or equal to 1"),Hf=d(),M=r("div"),h(vo.$$.fragment),Mf=d(),Be=r("p"),Xf=o("Get the index of the sequence represented by the given token. In the general use case, this method returns "),da=r("code"),Yf=o("0"),Jf=o(`
for a single sequence or the first sequence of a pair, and `),ca=r("code"),Kf=o("1"),Qf=o(" for the second sequence of a pair"),Zf=d(),la=r("p"),eu=o("Can be called as:"),tu=d(),To=r("ul"),pn=r("li"),ha=r("code"),ou=o("self.token_to_sequence(token_index)"),nu=o(" if batch size is 1"),ru=d(),mn=r("li"),pa=r("code"),su=o("self.token_to_sequence(batch_index, token_index)"),au=o(" if batch size is greater than 1"),iu=d(),ma=r("p"),du=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.`),cu=d(),X=r("div"),h(yo.$$.fragment),lu=d(),fa=r("p"),hu=o("Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),pu=d(),ua=r("p"),mu=o("Can be called as:"),fu=d(),wo=r("ul"),fn=r("li"),_a=r("code"),uu=o("self.token_to_word(token_index)"),_u=o(" if batch size is 1"),gu=d(),un=r("li"),ga=r("code"),ku=o("self.token_to_word(batch_index, token_index)"),bu=o(" if batch size is greater than 1"),vu=d(),ka=r("p"),Tu=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.`),yu=d(),_t=r("div"),h(xo.$$.fragment),wu=d(),ba=r("p"),xu=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).`),zu=d(),gt=r("div"),h(zo.$$.fragment),Eu=d(),va=r("p"),$u=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Pu=d(),S=r("div"),h(Eo.$$.fragment),qu=d(),Ta=r("p"),Du=o("Get the character span in the original string corresponding to given word in a sequence of the batch."),Lu=d(),ya=r("p"),Fu=o("Character spans are returned as a CharSpan NamedTuple with:"),Iu=d(),$o=r("ul"),wa=r("li"),Nu=o("start: index of the first character in the original string"),Au=d(),xa=r("li"),Cu=o("end: index of the character following the last character in the original string"),Ou=d(),za=r("p"),Su=o("Can be called as:"),Bu=d(),Po=r("ul"),_n=r("li"),Ea=r("code"),Wu=o("self.word_to_chars(word_index)"),Ru=o(" if batch size is 1"),Uu=d(),gn=r("li"),$a=r("code"),Vu=o("self.word_to_chars(batch_index, word_index)"),Gu=o(" if batch size is greater or equal to 1"),ju=d(),F=r("div"),h(qo.$$.fragment),Hu=d(),Pa=r("p"),Mu=o("Get the encoded token span corresponding to a word in a sequence of the batch."),Xu=d(),Do=r("p"),Yu=o("Token spans are returned as a "),kn=r("a"),Ju=o("TokenSpan"),Ku=o(" with:"),Qu=d(),Lo=r("ul"),bn=r("li"),qa=r("strong"),Zu=o("start"),e_=o(" \u2014 Index of the first token."),t_=d(),vn=r("li"),Da=r("strong"),o_=o("end"),n_=o(" \u2014 Index of the token following the last token."),r_=d(),La=r("p"),s_=o("Can be called as:"),a_=d(),Fo=r("ul"),Tn=r("li"),Fa=r("code"),i_=o("self.word_to_tokens(word_index, sequence_index: int = 0)"),d_=o(" if batch size is 1"),c_=d(),yn=r("li"),Ia=r("code"),l_=o("self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),h_=o(` if batch size is greater or equal to
1`),p_=d(),Na=r("p"),m_=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.`),f_=d(),kt=r("div"),h(Io.$$.fragment),u_=d(),Aa=r("p"),__=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=pv('[data-svelte="svelte-1phssyn"]',document.head);y=s(b,"META",{name:!0,content:!0}),b.forEach(t),L=c(i),q=s(i,"H1",{class:!0});var No=a(q);E=s(No,"A",{id:!0,class:!0,href:!0});var Ca=a(E);B=s(Ca,"SPAN",{});var Oa=a(B);p(v.$$.fragment,Oa),Oa.forEach(t),Ca.forEach(t),I=c(No),Bn=s(No,"SPAN",{});var Sa=a(Bn);ji=n(Sa,"Tokenizer"),Sa.forEach(t),No.forEach(t),Ua=c(i),He=s(i,"P",{});var oi=a(He);Hi=n(oi,`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=s(oi,"A",{href:!0,rel:!0});var B_=a(Tt);Mi=n(B_,"\u{1F917} Tokenizers"),B_.forEach(t),Xi=n(oi,". The \u201CFast\u201D implementations allows:"),oi.forEach(t),Va=c(i),Me=s(i,"OL",{});var ni=a(Me);Wn=s(ni,"LI",{});var W_=a(Wn);Yi=n(W_,"a significant speed-up in particular when doing batched tokenization and"),W_.forEach(t),Ji=c(ni),Rn=s(ni,"LI",{});var R_=a(Rn);Ki=n(R_,`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).`),R_.forEach(t),ni.forEach(t),Ga=c(i),W=s(i,"P",{});var Pe=a(W);Qi=n(Pe,"The base classes "),Oo=s(Pe,"A",{href:!0});var U_=a(Oo);Zi=n(U_,"PreTrainedTokenizer"),U_.forEach(t),ed=n(Pe," and "),So=s(Pe,"A",{href:!0});var V_=a(So);td=n(V_,"PreTrainedTokenizerFast"),V_.forEach(t),od=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
`),Bo=s(Pe,"A",{href:!0});var G_=a(Bo);nd=n(G_,"PreTrainedTokenizerBase"),G_.forEach(t),rd=n(Pe,` that contains the common methods, and
`),Wo=s(Pe,"A",{href:!0});var j_=a(Wo);sd=n(j_,"SpecialTokensMixin"),j_.forEach(t),ad=n(Pe,"."),Pe.forEach(t),ja=c(i),Ie=s(i,"P",{});var Ba=a(Ie);Ro=s(Ba,"A",{href:!0});var H_=a(Ro);id=n(H_,"PreTrainedTokenizer"),H_.forEach(t),dd=n(Ba," and "),Uo=s(Ba,"A",{href:!0});var M_=a(Uo);cd=n(M_,"PreTrainedTokenizerFast"),M_.forEach(t),ld=n(Ba,` thus implement the main
methods for using all the tokenizers:`),Ba.forEach(t),Ha=c(i),me=s(i,"UL",{});var wn=a(me);Un=s(wn,"LI",{});var X_=a(Un);hd=n(X_,`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).`),X_.forEach(t),pd=c(wn),Vn=s(wn,"LI",{});var Y_=a(Vn);md=n(Y_,"Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),Y_.forEach(t),fd=c(wn),Gn=s(wn,"LI",{});var J_=a(Gn);ud=n(J_,`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.`),J_.forEach(t),wn.forEach(t),Ma=c(i),D=s(i,"P",{});var C=a(D);Vo=s(C,"A",{href:!0});var K_=a(Vo);_d=n(K_,"BatchEncoding"),K_.forEach(t),gd=n(C,` holds the output of the
`),Go=s(C,"A",{href:!0});var Q_=a(Go);kd=n(Q_,"PreTrainedTokenizerBase"),Q_.forEach(t),bd=n(C,"\u2019s encoding methods ("),jn=s(C,"CODE",{});var Z_=a(jn);vd=n(Z_,"__call__"),Z_.forEach(t),Td=n(C,`,
`),Hn=s(C,"CODE",{});var eg=a(Hn);yd=n(eg,"encode_plus"),eg.forEach(t),wd=n(C," and "),Mn=s(C,"CODE",{});var tg=a(Mn);xd=n(tg,"batch_encode_plus"),tg.forEach(t),zd=n(C,`) 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 (`),Xn=s(C,"CODE",{});var og=a(Xn);Ed=n(og,"input_ids"),og.forEach(t),$d=n(C,", "),Yn=s(C,"CODE",{});var ng=a(Yn);Pd=n(ng,"attention_mask"),ng.forEach(t),qd=n(C,`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=s(C,"A",{href:!0,rel:!0});var rg=a(yt);Dd=n(rg,"tokenizers library"),rg.forEach(t),Ld=n(C,`), 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).`),C.forEach(t),Xa=c(i),Ne=s(i,"H2",{class:!0});var ri=a(Ne);Xe=s(ri,"A",{id:!0,class:!0,href:!0});var sg=a(Xe);Jn=s(sg,"SPAN",{});var ag=a(Jn);p(wt.$$.fragment,ag),ag.forEach(t),sg.forEach(t),Fd=c(ri),Kn=s(ri,"SPAN",{});var ig=a(Kn);Id=n(ig,"PreTrainedTokenizer"),ig.forEach(t),ri.forEach(t),Ya=c(i),g=s(i,"DIV",{class:!0});var x=a(g);p(xt.$$.fragment,x),Nd=c(x),Qn=s(x,"P",{});var dg=a(Qn);Ad=n(dg,"Base class for all slow tokenizers."),dg.forEach(t),Cd=c(x),zt=s(x,"P",{});var si=a(zt);Od=n(si,"Inherits from "),jo=s(si,"A",{href:!0});var cg=a(jo);Sd=n(cg,"PreTrainedTokenizerBase"),cg.forEach(t),Bd=n(si,"."),si.forEach(t),Wd=c(x),Zn=s(x,"P",{});var lg=a(Zn);Rd=n(lg,`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.`),lg.forEach(t),Ud=c(x),er=s(x,"P",{});var hg=a(er);Vd=n(hg,`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).`),hg.forEach(t),Gd=c(x),tr=s(x,"P",{});var pg=a(tr);jd=n(pg,"Class attributes (overridden by derived classes)"),pg.forEach(t),Hd=c(x),N=s(x,"UL",{});var Y=a(N);fe=s(Y,"LI",{});var Ao=a(fe);or=s(Ao,"STRONG",{});var mg=a(or);Md=n(mg,"vocab_files_names"),mg.forEach(t),Xd=n(Ao," ("),nr=s(Ao,"CODE",{});var fg=a(nr);Yd=n(fg,"Dict[str, str]"),fg.forEach(t),Jd=n(Ao,") \u2014 A dictionary with, as keys, the "),rr=s(Ao,"CODE",{});var ug=a(rr);Kd=n(ug,"__init__"),ug.forEach(t),Qd=n(Ao,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Ao.forEach(t),Zd=c(Y),R=s(Y,"LI",{});var de=a(R);sr=s(de,"STRONG",{});var _g=a(sr);ec=n(_g,"pretrained_vocab_files_map"),_g.forEach(t),tc=n(de," ("),ar=s(de,"CODE",{});var gg=a(ar);oc=n(gg,"Dict[str, Dict[str, str]]"),gg.forEach(t),nc=n(de,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ir=s(de,"CODE",{});var kg=a(ir);rc=n(kg,"__init__"),kg.forEach(t),sc=n(de,` keyword name of each vocabulary file required by the model, the
low-level being the `),dr=s(de,"CODE",{});var bg=a(dr);ac=n(bg,"short-cut-names"),bg.forEach(t),ic=n(de," of the pretrained models with, as associated values, the "),cr=s(de,"CODE",{});var vg=a(cr);dc=n(vg,"url"),vg.forEach(t),cc=n(de,` to the
associated pretrained vocabulary file.`),de.forEach(t),lc=c(Y),Q=s(Y,"LI",{});var We=a(Q);lr=s(We,"STRONG",{});var Tg=a(lr);hc=n(Tg,"max_model_input_sizes"),Tg.forEach(t),pc=n(We," ("),hr=s(We,"CODE",{});var yg=a(hr);mc=n(yg,"Dict[str, Optional[int]]"),yg.forEach(t),fc=n(We,") \u2014 A dictionary with, as keys, the "),pr=s(We,"CODE",{});var wg=a(pr);uc=n(wg,"short-cut-names"),wg.forEach(t),_c=n(We,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),mr=s(We,"CODE",{});var xg=a(mr);gc=n(xg,"None"),xg.forEach(t),kc=n(We," if the model has no maximum input size."),We.forEach(t),bc=c(Y),U=s(Y,"LI",{});var ce=a(U);fr=s(ce,"STRONG",{});var zg=a(fr);vc=n(zg,"pretrained_init_configuration"),zg.forEach(t),Tc=n(ce," ("),ur=s(ce,"CODE",{});var Eg=a(ur);yc=n(Eg,"Dict[str, Dict[str, Any]]"),Eg.forEach(t),wc=n(ce,`) \u2014 A dictionary with, as keys, the
`),_r=s(ce,"CODE",{});var $g=a(_r);xc=n($g,"short-cut-names"),$g.forEach(t),zc=n(ce,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),gr=s(ce,"CODE",{});var Pg=a(gr);Ec=n(Pg,"__init__"),Pg.forEach(t),$c=n(ce,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Ho=s(ce,"A",{href:!0});var qg=a(Ho);Pc=n(qg,"from_pretrained()"),qg.forEach(t),qc=n(ce," method."),ce.forEach(t),Dc=c(Y),Ye=s(Y,"LI",{});var Wa=a(Ye);kr=s(Wa,"STRONG",{});var Dg=a(kr);Lc=n(Dg,"model_input_names"),Dg.forEach(t),Fc=n(Wa," ("),br=s(Wa,"CODE",{});var Lg=a(br);Ic=n(Lg,"List[str]"),Lg.forEach(t),Nc=n(Wa,") \u2014 A list of inputs expected in the forward pass of the model."),Wa.forEach(t),Ac=c(Y),Z=s(Y,"LI",{});var Re=a(Z);vr=s(Re,"STRONG",{});var Fg=a(vr);Cc=n(Fg,"padding_side"),Fg.forEach(t),Oc=n(Re," ("),Tr=s(Re,"CODE",{});var Ig=a(Tr);Sc=n(Ig,"str"),Ig.forEach(t),Bc=n(Re,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),yr=s(Re,"CODE",{});var Ng=a(yr);Wc=n(Ng,"'right'"),Ng.forEach(t),Rc=n(Re," or "),wr=s(Re,"CODE",{});var Ag=a(wr);Uc=n(Ag,"'left'"),Ag.forEach(t),Vc=n(Re,"."),Re.forEach(t),Gc=c(Y),ee=s(Y,"LI",{});var Ue=a(ee);xr=s(Ue,"STRONG",{});var Cg=a(xr);jc=n(Cg,"truncation_side"),Cg.forEach(t),Hc=n(Ue," ("),zr=s(Ue,"CODE",{});var Og=a(zr);Mc=n(Og,"str"),Og.forEach(t),Xc=n(Ue,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),Er=s(Ue,"CODE",{});var Sg=a(Er);Yc=n(Sg,"'right'"),Sg.forEach(t),Jc=n(Ue," or "),$r=s(Ue,"CODE",{});var Bg=a($r);Kc=n(Bg,"'left'"),Bg.forEach(t),Qc=n(Ue,"."),Ue.forEach(t),Y.forEach(t),Zc=c(x),Je=s(x,"DIV",{class:!0});var ai=a(Je);p(Et.$$.fragment,ai),el=c(ai),Pr=s(ai,"P",{});var Wg=a(Pr);tl=n(Wg,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Wg.forEach(t),ai.forEach(t),ol=c(x),Ke=s(x,"DIV",{class:!0});var ii=a(Ke);p($t.$$.fragment,ii),nl=c(ii),qr=s(ii,"P",{});var Rg=a(qr);rl=n(Rg,"Convert a list of lists of token ids into a list of strings by calling decode."),Rg.forEach(t),ii.forEach(t),sl=c(x),ue=s(x,"DIV",{class:!0});var xn=a(ue);p(Pt.$$.fragment,xn),al=c(xn),Dr=s(xn,"P",{});var Ug=a(Dr);il=n(Ug,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Ug.forEach(t),dl=c(xn),qt=s(xn,"P",{});var di=a(qt);cl=n(di,"Similar to doing "),Lr=s(di,"CODE",{});var Vg=a(Lr);ll=n(Vg,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Vg.forEach(t),hl=n(di,"."),di.forEach(t),xn.forEach(t),pl=c(x),_e=s(x,"DIV",{class:!0});var zn=a(_e);p(Dt.$$.fragment,zn),ml=c(zn),Fr=s(zn,"P",{});var Gg=a(Fr);fl=n(Gg,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Gg.forEach(t),ul=c(zn),Lt=s(zn,"P",{});var ci=a(Lt);_l=n(ci,"Same as doing "),Ir=s(ci,"CODE",{});var jg=a(Ir);gl=n(jg,"self.convert_tokens_to_ids(self.tokenize(text))"),jg.forEach(t),kl=n(ci,"."),ci.forEach(t),zn.forEach(t),bl=c(x),ge=s(x,"DIV",{class:!0});var En=a(ge);p(Ft.$$.fragment,En),vl=c(En),It=s(En,"P",{});var li=a(It);Tl=n(li,`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Nr=s(li,"CODE",{});var Hg=a(Nr);yl=n(Hg,"repo_path_or_name"),Hg.forEach(t),wl=n(li,"."),li.forEach(t),xl=c(En),p(Qe.$$.fragment,En),En.forEach(t),zl=c(x),Ze=s(x,"DIV",{class:!0});var hi=a(Ze);p(Nt.$$.fragment,hi),El=c(hi),Ar=s(hi,"P",{});var Mg=a(Ar);$l=n(Mg,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Mg.forEach(t),hi.forEach(t),Pl=c(x),et=s(x,"DIV",{class:!0});var pi=a(et);p(At.$$.fragment,pi),ql=c(pi),Cr=s(pi,"P",{});var Xg=a(Cr);Dl=n(Xg,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Xg.forEach(t),pi.forEach(t),Ll=c(x),tt=s(x,"DIV",{class:!0});var mi=a(tt);p(Ct.$$.fragment,mi),Fl=c(mi),Or=s(mi,"P",{});var Yg=a(Or);Il=n(Yg,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Yg.forEach(t),mi.forEach(t),Nl=c(x),ke=s(x,"DIV",{class:!0});var $n=a(ke);p(Ot.$$.fragment,$n),Al=c($n),Sr=s($n,"P",{});var Jg=a(Sr);Cl=n(Jg,"Returns the number of added tokens when encoding a sequence with special tokens."),Jg.forEach(t),Ol=c($n),p(ot.$$.fragment,$n),$n.forEach(t),Sl=c(x),be=s(x,"DIV",{class:!0});var Pn=a(be);p(St.$$.fragment,Pn),Bl=c(Pn),Br=s(Pn,"P",{});var Kg=a(Br);Wl=n(Kg,"Performs any necessary transformations before tokenization."),Kg.forEach(t),Rl=c(Pn),Ae=s(Pn,"P",{});var qn=a(Ae);Ul=n(qn,"This method should pop the arguments from kwargs and return the remaining "),Wr=s(qn,"CODE",{});var Qg=a(Wr);Vl=n(Qg,"kwargs"),Qg.forEach(t),Gl=n(qn,` as well. We test the
`),Rr=s(qn,"CODE",{});var Zg=a(Rr);jl=n(Zg,"kwargs"),Zg.forEach(t),Hl=n(qn," at the end of the encoding process to be sure all the arguments have been used."),qn.forEach(t),Pn.forEach(t),Ml=c(x),ve=s(x,"DIV",{class:!0});var Dn=a(ve);p(Bt.$$.fragment,Dn),Xl=c(Dn),Ur=s(Dn,"P",{});var ek=a(Ur);Yl=n(ek,"Converts a string in a sequence of tokens, using the tokenizer."),ek.forEach(t),Jl=c(Dn),Vr=s(Dn,"P",{});var tk=a(Vr);Kl=n(tk,`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),tk.forEach(t),Dn.forEach(t),x.forEach(t),Ja=c(i),Ce=s(i,"H2",{class:!0});var fi=a(Ce);nt=s(fi,"A",{id:!0,class:!0,href:!0});var ok=a(nt);Gr=s(ok,"SPAN",{});var nk=a(Gr);p(Wt.$$.fragment,nk),nk.forEach(t),ok.forEach(t),Ql=c(fi),jr=s(fi,"SPAN",{});var rk=a(jr);Zl=n(rk,"PreTrainedTokenizerFast"),rk.forEach(t),fi.forEach(t),Ka=c(i),te=s(i,"P",{});var bt=a(te);eh=n(bt,"The "),Mo=s(bt,"A",{href:!0});var sk=a(Mo);th=n(sk,"PreTrainedTokenizerFast"),sk.forEach(t),oh=n(bt," depend on the "),Rt=s(bt,"A",{href:!0,rel:!0});var ak=a(Rt);nh=n(ak,"tokenizers"),ak.forEach(t),rh=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 `),Xo=s(bt,"A",{href:!0});var ik=a(Xo);sh=n(ik,"Using tokenizers from \u{1F917} tokenizers"),ik.forEach(t),ah=n(bt," page to understand how this is done."),bt.forEach(t),Qa=c(i),k=s(i,"DIV",{class:!0});var z=a(k);p(Ut.$$.fragment,z),ih=c(z),Hr=s(z,"P",{});var dk=a(Hr);dh=n(dk,"Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),dk.forEach(t),ch=c(z),Vt=s(z,"P",{});var ui=a(Vt);lh=n(ui,"Inherits from "),Yo=s(ui,"A",{href:!0});var ck=a(Yo);hh=n(ck,"PreTrainedTokenizerBase"),ck.forEach(t),ph=n(ui,"."),ui.forEach(t),mh=c(z),Mr=s(z,"P",{});var lk=a(Mr);fh=n(lk,`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.`),lk.forEach(t),uh=c(z),Xr=s(z,"P",{});var hk=a(Xr);_h=n(hk,`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).`),hk.forEach(t),gh=c(z),Yr=s(z,"P",{});var pk=a(Yr);kh=n(pk,"Class attributes (overridden by derived classes)"),pk.forEach(t),bh=c(z),A=s(z,"UL",{});var J=a(A);Te=s(J,"LI",{});var Co=a(Te);Jr=s(Co,"STRONG",{});var mk=a(Jr);vh=n(mk,"vocab_files_names"),mk.forEach(t),Th=n(Co," ("),Kr=s(Co,"CODE",{});var fk=a(Kr);yh=n(fk,"Dict[str, str]"),fk.forEach(t),wh=n(Co,") \u2014 A dictionary with, as keys, the "),Qr=s(Co,"CODE",{});var uk=a(Qr);xh=n(uk,"__init__"),uk.forEach(t),zh=n(Co,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Co.forEach(t),Eh=c(J),V=s(J,"LI",{});var le=a(V);Zr=s(le,"STRONG",{});var _k=a(Zr);$h=n(_k,"pretrained_vocab_files_map"),_k.forEach(t),Ph=n(le," ("),es=s(le,"CODE",{});var gk=a(es);qh=n(gk,"Dict[str, Dict[str, str]]"),gk.forEach(t),Dh=n(le,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ts=s(le,"CODE",{});var kk=a(ts);Lh=n(kk,"__init__"),kk.forEach(t),Fh=n(le,` keyword name of each vocabulary file required by the model, the
low-level being the `),os=s(le,"CODE",{});var bk=a(os);Ih=n(bk,"short-cut-names"),bk.forEach(t),Nh=n(le," of the pretrained models with, as associated values, the "),ns=s(le,"CODE",{});var vk=a(ns);Ah=n(vk,"url"),vk.forEach(t),Ch=n(le,` to the
associated pretrained vocabulary file.`),le.forEach(t),Oh=c(J),oe=s(J,"LI",{});var Ve=a(oe);rs=s(Ve,"STRONG",{});var Tk=a(rs);Sh=n(Tk,"max_model_input_sizes"),Tk.forEach(t),Bh=n(Ve," ("),ss=s(Ve,"CODE",{});var yk=a(ss);Wh=n(yk,"Dict[str, Optional[int]]"),yk.forEach(t),Rh=n(Ve,") \u2014 A dictionary with, as keys, the "),as=s(Ve,"CODE",{});var wk=a(as);Uh=n(wk,"short-cut-names"),wk.forEach(t),Vh=n(Ve,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),is=s(Ve,"CODE",{});var xk=a(is);Gh=n(xk,"None"),xk.forEach(t),jh=n(Ve," if the model has no maximum input size."),Ve.forEach(t),Hh=c(J),G=s(J,"LI",{});var he=a(G);ds=s(he,"STRONG",{});var zk=a(ds);Mh=n(zk,"pretrained_init_configuration"),zk.forEach(t),Xh=n(he," ("),cs=s(he,"CODE",{});var Ek=a(cs);Yh=n(Ek,"Dict[str, Dict[str, Any]]"),Ek.forEach(t),Jh=n(he,`) \u2014 A dictionary with, as keys, the
`),ls=s(he,"CODE",{});var $k=a(ls);Kh=n($k,"short-cut-names"),$k.forEach(t),Qh=n(he,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),hs=s(he,"CODE",{});var Pk=a(hs);Zh=n(Pk,"__init__"),Pk.forEach(t),ep=n(he,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Jo=s(he,"A",{href:!0});var qk=a(Jo);tp=n(qk,"from_pretrained()"),qk.forEach(t),op=n(he," method."),he.forEach(t),np=c(J),rt=s(J,"LI",{});var Ra=a(rt);ps=s(Ra,"STRONG",{});var Dk=a(ps);rp=n(Dk,"model_input_names"),Dk.forEach(t),sp=n(Ra," ("),ms=s(Ra,"CODE",{});var Lk=a(ms);ap=n(Lk,"List[str]"),Lk.forEach(t),ip=n(Ra,") \u2014 A list of inputs expected in the forward pass of the model."),Ra.forEach(t),dp=c(J),ne=s(J,"LI",{});var Ge=a(ne);fs=s(Ge,"STRONG",{});var Fk=a(fs);cp=n(Fk,"padding_side"),Fk.forEach(t),lp=n(Ge," ("),us=s(Ge,"CODE",{});var Ik=a(us);hp=n(Ik,"str"),Ik.forEach(t),pp=n(Ge,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),_s=s(Ge,"CODE",{});var Nk=a(_s);mp=n(Nk,"'right'"),Nk.forEach(t),fp=n(Ge," or "),gs=s(Ge,"CODE",{});var Ak=a(gs);up=n(Ak,"'left'"),Ak.forEach(t),_p=n(Ge,"."),Ge.forEach(t),gp=c(J),re=s(J,"LI",{});var je=a(re);ks=s(je,"STRONG",{});var Ck=a(ks);kp=n(Ck,"truncation_side"),Ck.forEach(t),bp=n(je," ("),bs=s(je,"CODE",{});var Ok=a(bs);vp=n(Ok,"str"),Ok.forEach(t),Tp=n(je,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),vs=s(je,"CODE",{});var Sk=a(vs);yp=n(Sk,"'right'"),Sk.forEach(t),wp=n(je," or "),Ts=s(je,"CODE",{});var Bk=a(Ts);xp=n(Bk,"'left'"),Bk.forEach(t),zp=n(je,"."),je.forEach(t),J.forEach(t),Ep=c(z),st=s(z,"DIV",{class:!0});var _i=a(st);p(Gt.$$.fragment,_i),$p=c(_i),ys=s(_i,"P",{});var Wk=a(ys);Pp=n(Wk,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Wk.forEach(t),_i.forEach(t),qp=c(z),at=s(z,"DIV",{class:!0});var gi=a(at);p(jt.$$.fragment,gi),Dp=c(gi),ws=s(gi,"P",{});var Rk=a(ws);Lp=n(Rk,"Convert a list of lists of token ids into a list of strings by calling decode."),Rk.forEach(t),gi.forEach(t),Fp=c(z),ye=s(z,"DIV",{class:!0});var Ln=a(ye);p(Ht.$$.fragment,Ln),Ip=c(Ln),xs=s(Ln,"P",{});var Uk=a(xs);Np=n(Uk,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Uk.forEach(t),Ap=c(Ln),Mt=s(Ln,"P",{});var ki=a(Mt);Cp=n(ki,"Similar to doing "),zs=s(ki,"CODE",{});var Vk=a(zs);Op=n(Vk,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Vk.forEach(t),Sp=n(ki,"."),ki.forEach(t),Ln.forEach(t),Bp=c(z),we=s(z,"DIV",{class:!0});var Fn=a(we);p(Xt.$$.fragment,Fn),Wp=c(Fn),Es=s(Fn,"P",{});var Gk=a(Es);Rp=n(Gk,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Gk.forEach(t),Up=c(Fn),Yt=s(Fn,"P",{});var bi=a(Yt);Vp=n(bi,"Same as doing "),$s=s(bi,"CODE",{});var jk=a($s);Gp=n(jk,"self.convert_tokens_to_ids(self.tokenize(text))"),jk.forEach(t),jp=n(bi,"."),bi.forEach(t),Fn.forEach(t),Hp=c(z),xe=s(z,"DIV",{class:!0});var In=a(xe);p(Jt.$$.fragment,In),Mp=c(In),Kt=s(In,"P",{});var vi=a(Kt);Xp=n(vi,`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Ps=s(vi,"CODE",{});var Hk=a(Ps);Yp=n(Hk,"repo_path_or_name"),Hk.forEach(t),Jp=n(vi,"."),vi.forEach(t),Kp=c(In),p(it.$$.fragment,In),In.forEach(t),Qp=c(z),dt=s(z,"DIV",{class:!0});var Ti=a(dt);p(Qt.$$.fragment,Ti),Zp=c(Ti),qs=s(Ti,"P",{});var Mk=a(qs);em=n(Mk,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Mk.forEach(t),Ti.forEach(t),tm=c(z),ct=s(z,"DIV",{class:!0});var yi=a(ct);p(Zt.$$.fragment,yi),om=c(yi),Ds=s(yi,"P",{});var Xk=a(Ds);nm=n(Xk,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Xk.forEach(t),yi.forEach(t),rm=c(z),lt=s(z,"DIV",{class:!0});var wi=a(lt);p(eo.$$.fragment,wi),sm=c(wi),Ls=s(wi,"P",{});var Yk=a(Ls);am=n(Yk,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Yk.forEach(t),wi.forEach(t),im=c(z),ze=s(z,"DIV",{class:!0});var Nn=a(ze);p(to.$$.fragment,Nn),dm=c(Nn),Fs=s(Nn,"P",{});var Jk=a(Fs);cm=n(Jk,"Returns the number of added tokens when encoding a sequence with special tokens."),Jk.forEach(t),lm=c(Nn),p(ht.$$.fragment,Nn),Nn.forEach(t),hm=c(z),Ee=s(z,"DIV",{class:!0});var An=a(Ee);p(oo.$$.fragment,An),pm=c(An),Is=s(An,"P",{});var Kk=a(Is);mm=n(Kk,`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),Kk.forEach(t),fm=c(An),Ns=s(An,"P",{});var Qk=a(Ns);um=n(Qk,`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.`),Qk.forEach(t),An.forEach(t),_m=c(z),pt=s(z,"DIV",{class:!0});var xi=a(pt);p(no.$$.fragment,xi),gm=c(xi),As=s(xi,"P",{});var Zk=a(As);km=n(Zk,`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Zk.forEach(t),xi.forEach(t),z.forEach(t),Za=c(i),Oe=s(i,"H2",{class:!0});var zi=a(Oe);mt=s(zi,"A",{id:!0,class:!0,href:!0});var eb=a(mt);Cs=s(eb,"SPAN",{});var tb=a(Cs);p(ro.$$.fragment,tb),tb.forEach(t),eb.forEach(t),bm=c(zi),Os=s(zi,"SPAN",{});var ob=a(Os);vm=n(ob,"BatchEncoding"),ob.forEach(t),zi.forEach(t),ei=c(i),w=s(i,"DIV",{class:!0});var P=a(w);p(so.$$.fragment,P),Tm=c(P),ie=s(P,"P",{});var vt=a(ie);ym=n(vt,"Holds the output of the "),ao=s(vt,"A",{href:!0});var g_=a(ao);Ss=s(g_,"STRONG",{});var nb=a(Ss);wm=n(nb,"call"),nb.forEach(t),xm=n(g_,"()"),g_.forEach(t),zm=n(vt,`,
`),Ko=s(vt,"A",{href:!0});var rb=a(Ko);Em=n(rb,"encode_plus()"),rb.forEach(t),$m=n(vt,` and
`),Qo=s(vt,"A",{href:!0});var sb=a(Qo);Pm=n(sb,"batch_encode_plus()"),sb.forEach(t),qm=n(vt," methods (tokens, attention_masks, etc)."),vt.forEach(t),Dm=c(P),Bs=s(P,"P",{});var ab=a(Bs);Lm=n(ab,`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.`),ab.forEach(t),Fm=c(P),j=s(P,"DIV",{class:!0});var qe=a(j);p(io.$$.fragment,qe),Im=c(qe),Ws=s(qe,"P",{});var ib=a(Ws);Nm=n(ib,`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),ib.forEach(t),Am=c(qe),Rs=s(qe,"P",{});var db=a(Rs);Cm=n(db,"Can be called as:"),db.forEach(t),Om=c(qe),co=s(qe,"UL",{});var Ei=a(co);Zo=s(Ei,"LI",{});var k_=a(Zo);Us=s(k_,"CODE",{});var cb=a(Us);Sm=n(cb,"self.char_to_token(char_index)"),cb.forEach(t),Bm=n(k_," if batch size is 1"),k_.forEach(t),Wm=c(Ei),en=s(Ei,"LI",{});var b_=a(en);Vs=s(b_,"CODE",{});var lb=a(Vs);Rm=n(lb,"self.char_to_token(batch_index, char_index)"),lb.forEach(t),Um=n(b_," if batch size is greater or equal to 1"),b_.forEach(t),Ei.forEach(t),Vm=c(qe),Gs=s(qe,"P",{});var hb=a(Gs);Gm=n(hb,`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.`),hb.forEach(t),qe.forEach(t),jm=c(P),H=s(P,"DIV",{class:!0});var De=a(H);p(lo.$$.fragment,De),Hm=c(De),js=s(De,"P",{});var pb=a(js);Mm=n(pb,`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),pb.forEach(t),Xm=c(De),Hs=s(De,"P",{});var mb=a(Hs);Ym=n(mb,"Can be called as:"),mb.forEach(t),Jm=c(De),ho=s(De,"UL",{});var $i=a(ho);tn=s($i,"LI",{});var v_=a(tn);Ms=s(v_,"CODE",{});var fb=a(Ms);Km=n(fb,"self.char_to_word(char_index)"),fb.forEach(t),Qm=n(v_," if batch size is 1"),v_.forEach(t),Zm=c($i),on=s($i,"LI",{});var T_=a(on);Xs=s(T_,"CODE",{});var ub=a(Xs);ef=n(ub,"self.char_to_word(batch_index, char_index)"),ub.forEach(t),tf=n(T_," if batch size is greater than 1"),T_.forEach(t),$i.forEach(t),of=c(De),Ys=s(De,"P",{});var _b=a(Ys);nf=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),De.forEach(t),rf=c(P),ft=s(P,"DIV",{class:!0});var Pi=a(ft);p(po.$$.fragment,Pi),sf=c(Pi),Js=s(Pi,"P",{});var gb=a(Js);af=n(gb,"Convert the inner content to tensors."),gb.forEach(t),Pi.forEach(t),df=c(P),$e=s(P,"DIV",{class:!0});var Cn=a($e);p(mo.$$.fragment,Cn),cf=c(Cn),Ks=s(Cn,"P",{});var kb=a(Ks);lf=n(kb,"Return a list mapping the tokens to the id of their original sentences:"),kb.forEach(t),hf=c(Cn),Se=s(Cn,"UL",{});var On=a(Se);nn=s(On,"LI",{});var y_=a(nn);Qs=s(y_,"CODE",{});var bb=a(Qs);pf=n(bb,"None"),bb.forEach(t),mf=n(y_," for special tokens added around or between sequences,"),y_.forEach(t),ff=c(On),rn=s(On,"LI",{});var w_=a(rn);Zs=s(w_,"CODE",{});var vb=a(Zs);uf=n(vb,"0"),vb.forEach(t),_f=n(w_," for tokens corresponding to words in the first sequence,"),w_.forEach(t),gf=c(On),sn=s(On,"LI",{});var x_=a(sn);ea=s(x_,"CODE",{});var Tb=a(ea);kf=n(Tb,"1"),Tb.forEach(t),bf=n(x_,` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),x_.forEach(t),On.forEach(t),Cn.forEach(t),vf=c(P),ut=s(P,"DIV",{class:!0});var qi=a(ut);p(fo.$$.fragment,qi),Tf=c(qi),uo=s(qi,"P",{});var Di=a(uo);yf=n(Di,"Send all values to device by calling "),ta=s(Di,"CODE",{});var yb=a(ta);wf=n(yb,"v.to(device)"),yb.forEach(t),xf=n(Di," (PyTorch only)."),Di.forEach(t),qi.forEach(t),zf=c(P),O=s(P,"DIV",{class:!0});var se=a(O);p(_o.$$.fragment,se),Ef=c(se),oa=s(se,"P",{});var wb=a(oa);$f=n(wb,"Get the character span corresponding to an encoded token in a sequence of the batch."),wb.forEach(t),Pf=c(se),go=s(se,"P",{});var Li=a(go);qf=n(Li,"Character spans are returned as a "),an=s(Li,"A",{href:!0});var xb=a(an);Df=n(xb,"CharSpan"),xb.forEach(t),Lf=n(Li," with:"),Li.forEach(t),Ff=c(se),ko=s(se,"UL",{});var Fi=a(ko);dn=s(Fi,"LI",{});var z_=a(dn);na=s(z_,"STRONG",{});var zb=a(na);If=n(zb,"start"),zb.forEach(t),Nf=n(z_," \u2014 Index of the first character in the original string associated to the token."),z_.forEach(t),Af=c(Fi),cn=s(Fi,"LI",{});var E_=a(cn);ra=s(E_,"STRONG",{});var Eb=a(ra);Cf=n(Eb,"end"),Eb.forEach(t),Of=n(E_,` \u2014 Index of the character following the last character in the original string associated to the
token.`),E_.forEach(t),Fi.forEach(t),Sf=c(se),sa=s(se,"P",{});var $b=a(sa);Bf=n($b,"Can be called as:"),$b.forEach(t),Wf=c(se),bo=s(se,"UL",{});var Ii=a(bo);ln=s(Ii,"LI",{});var $_=a(ln);aa=s($_,"CODE",{});var Pb=a(aa);Rf=n(Pb,"self.token_to_chars(token_index)"),Pb.forEach(t),Uf=n($_," if batch size is 1"),$_.forEach(t),Vf=c(Ii),hn=s(Ii,"LI",{});var P_=a(hn);ia=s(P_,"CODE",{});var qb=a(ia);Gf=n(qb,"self.token_to_chars(batch_index, token_index)"),qb.forEach(t),jf=n(P_," if batch size is greater or equal to 1"),P_.forEach(t),Ii.forEach(t),se.forEach(t),Hf=c(P),M=s(P,"DIV",{class:!0});var Le=a(M);p(vo.$$.fragment,Le),Mf=c(Le),Be=s(Le,"P",{});var Sn=a(Be);Xf=n(Sn,"Get the index of the sequence represented by the given token. In the general use case, this method returns "),da=s(Sn,"CODE",{});var Db=a(da);Yf=n(Db,"0"),Db.forEach(t),Jf=n(Sn,`
for a single sequence or the first sequence of a pair, and `),ca=s(Sn,"CODE",{});var Lb=a(ca);Kf=n(Lb,"1"),Lb.forEach(t),Qf=n(Sn," for the second sequence of a pair"),Sn.forEach(t),Zf=c(Le),la=s(Le,"P",{});var Fb=a(la);eu=n(Fb,"Can be called as:"),Fb.forEach(t),tu=c(Le),To=s(Le,"UL",{});var Ni=a(To);pn=s(Ni,"LI",{});var q_=a(pn);ha=s(q_,"CODE",{});var Ib=a(ha);ou=n(Ib,"self.token_to_sequence(token_index)"),Ib.forEach(t),nu=n(q_," if batch size is 1"),q_.forEach(t),ru=c(Ni),mn=s(Ni,"LI",{});var D_=a(mn);pa=s(D_,"CODE",{});var Nb=a(pa);su=n(Nb,"self.token_to_sequence(batch_index, token_index)"),Nb.forEach(t),au=n(D_," if batch size is greater than 1"),D_.forEach(t),Ni.forEach(t),iu=c(Le),ma=s(Le,"P",{});var Ab=a(ma);du=n(Ab,`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.`),Ab.forEach(t),Le.forEach(t),cu=c(P),X=s(P,"DIV",{class:!0});var Fe=a(X);p(yo.$$.fragment,Fe),lu=c(Fe),fa=s(Fe,"P",{});var Cb=a(fa);hu=n(Cb,"Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),Cb.forEach(t),pu=c(Fe),ua=s(Fe,"P",{});var Ob=a(ua);mu=n(Ob,"Can be called as:"),Ob.forEach(t),fu=c(Fe),wo=s(Fe,"UL",{});var Ai=a(wo);fn=s(Ai,"LI",{});var L_=a(fn);_a=s(L_,"CODE",{});var Sb=a(_a);uu=n(Sb,"self.token_to_word(token_index)"),Sb.forEach(t),_u=n(L_," if batch size is 1"),L_.forEach(t),gu=c(Ai),un=s(Ai,"LI",{});var F_=a(un);ga=s(F_,"CODE",{});var Bb=a(ga);ku=n(Bb,"self.token_to_word(batch_index, token_index)"),Bb.forEach(t),bu=n(F_," if batch size is greater than 1"),F_.forEach(t),Ai.forEach(t),vu=c(Fe),ka=s(Fe,"P",{});var Wb=a(ka);Tu=n(Wb,`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.`),Wb.forEach(t),Fe.forEach(t),yu=c(P),_t=s(P,"DIV",{class:!0});var Ci=a(_t);p(xo.$$.fragment,Ci),wu=c(Ci),ba=s(Ci,"P",{});var Rb=a(ba);xu=n(Rb,`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).`),Rb.forEach(t),Ci.forEach(t),zu=c(P),gt=s(P,"DIV",{class:!0});var Oi=a(gt);p(zo.$$.fragment,Oi),Eu=c(Oi),va=s(Oi,"P",{});var Ub=a(va);$u=n(Ub,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Ub.forEach(t),Oi.forEach(t),Pu=c(P),S=s(P,"DIV",{class:!0});var ae=a(S);p(Eo.$$.fragment,ae),qu=c(ae),Ta=s(ae,"P",{});var Vb=a(Ta);Du=n(Vb,"Get the character span in the original string corresponding to given word in a sequence of the batch."),Vb.forEach(t),Lu=c(ae),ya=s(ae,"P",{});var Gb=a(ya);Fu=n(Gb,"Character spans are returned as a CharSpan NamedTuple with:"),Gb.forEach(t),Iu=c(ae),$o=s(ae,"UL",{});var Si=a($o);wa=s(Si,"LI",{});var jb=a(wa);Nu=n(jb,"start: index of the first character in the original string"),jb.forEach(t),Au=c(Si),xa=s(Si,"LI",{});var Hb=a(xa);Cu=n(Hb,"end: index of the character following the last character in the original string"),Hb.forEach(t),Si.forEach(t),Ou=c(ae),za=s(ae,"P",{});var Mb=a(za);Su=n(Mb,"Can be called as:"),Mb.forEach(t),Bu=c(ae),Po=s(ae,"UL",{});var Bi=a(Po);_n=s(Bi,"LI",{});var I_=a(_n);Ea=s(I_,"CODE",{});var Xb=a(Ea);Wu=n(Xb,"self.word_to_chars(word_index)"),Xb.forEach(t),Ru=n(I_," if batch size is 1"),I_.forEach(t),Uu=c(Bi),gn=s(Bi,"LI",{});var N_=a(gn);$a=s(N_,"CODE",{});var Yb=a($a);Vu=n(Yb,"self.word_to_chars(batch_index, word_index)"),Yb.forEach(t),Gu=n(N_," if batch size is greater or equal to 1"),N_.forEach(t),Bi.forEach(t),ae.forEach(t),ju=c(P),F=s(P,"DIV",{class:!0});var K=a(F);p(qo.$$.fragment,K),Hu=c(K),Pa=s(K,"P",{});var Jb=a(Pa);Mu=n(Jb,"Get the encoded token span corresponding to a word in a sequence of the batch."),Jb.forEach(t),Xu=c(K),Do=s(K,"P",{});var Wi=a(Do);Yu=n(Wi,"Token spans are returned as a "),kn=s(Wi,"A",{href:!0});var Kb=a(kn);Ju=n(Kb,"TokenSpan"),Kb.forEach(t),Ku=n(Wi," with:"),Wi.forEach(t),Qu=c(K),Lo=s(K,"UL",{});var Ri=a(Lo);bn=s(Ri,"LI",{});var A_=a(bn);qa=s(A_,"STRONG",{});var Qb=a(qa);Zu=n(Qb,"start"),Qb.forEach(t),e_=n(A_," \u2014 Index of the first token."),A_.forEach(t),t_=c(Ri),vn=s(Ri,"LI",{});var C_=a(vn);Da=s(C_,"STRONG",{});var Zb=a(Da);o_=n(Zb,"end"),Zb.forEach(t),n_=n(C_," \u2014 Index of the token following the last token."),C_.forEach(t),Ri.forEach(t),r_=c(K),La=s(K,"P",{});var ev=a(La);s_=n(ev,"Can be called as:"),ev.forEach(t),a_=c(K),Fo=s(K,"UL",{});var Ui=a(Fo);Tn=s(Ui,"LI",{});var O_=a(Tn);Fa=s(O_,"CODE",{});var tv=a(Fa);i_=n(tv,"self.word_to_tokens(word_index, sequence_index: int = 0)"),tv.forEach(t),d_=n(O_," if batch size is 1"),O_.forEach(t),c_=c(Ui),yn=s(Ui,"LI",{});var S_=a(yn);Ia=s(S_,"CODE",{});var ov=a(Ia);l_=n(ov,"self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),ov.forEach(t),h_=n(S_,` if batch size is greater or equal to
1`),S_.forEach(t),Ui.forEach(t),p_=c(K),Na=s(K,"P",{});var nv=a(Na);m_=n(nv,`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.`),nv.forEach(t),K.forEach(t),f_=c(P),kt=s(P,"DIV",{class:!0});var Vi=a(kt);p(Io.$$.fragment,Vi),u_=c(Vi),Aa=s(Vi,"P",{});var rv=a(Aa);__=n(rv,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),rv.forEach(t),Vi.forEach(t),P.forEach(t),this.h()},h(){l(y,"name","hf:doc:metadata"),l(y,"content",JSON.stringify(bv)),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(Oo,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(So,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Bo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Wo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.SpecialTokensMixin"),l(Ro,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Uo,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Vo,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.BatchEncoding"),l(Go,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(yt,"href","https://github.com/huggingface/tokenizers"),l(yt,"rel","nofollow"),l(Xe,"id","transformers.PreTrainedTokenizer"),l(Xe,"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(Xe,"href","#transformers.PreTrainedTokenizer"),l(Ne,"class","relative group"),l(jo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Ho,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),l(Je,"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(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(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(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(Ce,"class","relative group"),l(Mo,"href","/docs/transformers/pr_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Rt,"href","https://huggingface.co/docs/tokenizers"),l(Rt,"rel","nofollow"),l(Xo,"href","../fast_tokenizers"),l(Yo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Jo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),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(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(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(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(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(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(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(Oe,"class","relative group"),l(ao,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Ko,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode_plus"),l(Qo,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_encode_plus"),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(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(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(an,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.CharSpan"),l(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(X,"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(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kn,"href","/docs/transformers/pr_19907/en/internal/tokenization_utils#transformers.TokenSpan"),l(F,"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,L,b),$(i,q,b),e(q,E),e(E,B),m(v,B,null),e(q,I),e(q,Bn),e(Bn,ji),$(i,Ua,b),$(i,He,b),e(He,Hi),e(He,Tt),e(Tt,Mi),e(He,Xi),$(i,Va,b),$(i,Me,b),e(Me,Wn),e(Wn,Yi),e(Me,Ji),e(Me,Rn),e(Rn,Ki),$(i,Ga,b),$(i,W,b),e(W,Qi),e(W,Oo),e(Oo,Zi),e(W,ed),e(W,So),e(So,td),e(W,od),e(W,Bo),e(Bo,nd),e(W,rd),e(W,Wo),e(Wo,sd),e(W,ad),$(i,ja,b),$(i,Ie,b),e(Ie,Ro),e(Ro,id),e(Ie,dd),e(Ie,Uo),e(Uo,cd),e(Ie,ld),$(i,Ha,b),$(i,me,b),e(me,Un),e(Un,hd),e(me,pd),e(me,Vn),e(Vn,md),e(me,fd),e(me,Gn),e(Gn,ud),$(i,Ma,b),$(i,D,b),e(D,Vo),e(Vo,_d),e(D,gd),e(D,Go),e(Go,kd),e(D,bd),e(D,jn),e(jn,vd),e(D,Td),e(D,Hn),e(Hn,yd),e(D,wd),e(D,Mn),e(Mn,xd),e(D,zd),e(D,Xn),e(Xn,Ed),e(D,$d),e(D,Yn),e(Yn,Pd),e(D,qd),e(D,yt),e(yt,Dd),e(D,Ld),$(i,Xa,b),$(i,Ne,b),e(Ne,Xe),e(Xe,Jn),m(wt,Jn,null),e(Ne,Fd),e(Ne,Kn),e(Kn,Id),$(i,Ya,b),$(i,g,b),m(xt,g,null),e(g,Nd),e(g,Qn),e(Qn,Ad),e(g,Cd),e(g,zt),e(zt,Od),e(zt,jo),e(jo,Sd),e(zt,Bd),e(g,Wd),e(g,Zn),e(Zn,Rd),e(g,Ud),e(g,er),e(er,Vd),e(g,Gd),e(g,tr),e(tr,jd),e(g,Hd),e(g,N),e(N,fe),e(fe,or),e(or,Md),e(fe,Xd),e(fe,nr),e(nr,Yd),e(fe,Jd),e(fe,rr),e(rr,Kd),e(fe,Qd),e(N,Zd),e(N,R),e(R,sr),e(sr,ec),e(R,tc),e(R,ar),e(ar,oc),e(R,nc),e(R,ir),e(ir,rc),e(R,sc),e(R,dr),e(dr,ac),e(R,ic),e(R,cr),e(cr,dc),e(R,cc),e(N,lc),e(N,Q),e(Q,lr),e(lr,hc),e(Q,pc),e(Q,hr),e(hr,mc),e(Q,fc),e(Q,pr),e(pr,uc),e(Q,_c),e(Q,mr),e(mr,gc),e(Q,kc),e(N,bc),e(N,U),e(U,fr),e(fr,vc),e(U,Tc),e(U,ur),e(ur,yc),e(U,wc),e(U,_r),e(_r,xc),e(U,zc),e(U,gr),e(gr,Ec),e(U,$c),e(U,Ho),e(Ho,Pc),e(U,qc),e(N,Dc),e(N,Ye),e(Ye,kr),e(kr,Lc),e(Ye,Fc),e(Ye,br),e(br,Ic),e(Ye,Nc),e(N,Ac),e(N,Z),e(Z,vr),e(vr,Cc),e(Z,Oc),e(Z,Tr),e(Tr,Sc),e(Z,Bc),e(Z,yr),e(yr,Wc),e(Z,Rc),e(Z,wr),e(wr,Uc),e(Z,Vc),e(N,Gc),e(N,ee),e(ee,xr),e(xr,jc),e(ee,Hc),e(ee,zr),e(zr,Mc),e(ee,Xc),e(ee,Er),e(Er,Yc),e(ee,Jc),e(ee,$r),e($r,Kc),e(ee,Qc),e(g,Zc),e(g,Je),m(Et,Je,null),e(Je,el),e(Je,Pr),e(Pr,tl),e(g,ol),e(g,Ke),m($t,Ke,null),e(Ke,nl),e(Ke,qr),e(qr,rl),e(g,sl),e(g,ue),m(Pt,ue,null),e(ue,al),e(ue,Dr),e(Dr,il),e(ue,dl),e(ue,qt),e(qt,cl),e(qt,Lr),e(Lr,ll),e(qt,hl),e(g,pl),e(g,_e),m(Dt,_e,null),e(_e,ml),e(_e,Fr),e(Fr,fl),e(_e,ul),e(_e,Lt),e(Lt,_l),e(Lt,Ir),e(Ir,gl),e(Lt,kl),e(g,bl),e(g,ge),m(Ft,ge,null),e(ge,vl),e(ge,It),e(It,Tl),e(It,Nr),e(Nr,yl),e(It,wl),e(ge,xl),m(Qe,ge,null),e(g,zl),e(g,Ze),m(Nt,Ze,null),e(Ze,El),e(Ze,Ar),e(Ar,$l),e(g,Pl),e(g,et),m(At,et,null),e(et,ql),e(et,Cr),e(Cr,Dl),e(g,Ll),e(g,tt),m(Ct,tt,null),e(tt,Fl),e(tt,Or),e(Or,Il),e(g,Nl),e(g,ke),m(Ot,ke,null),e(ke,Al),e(ke,Sr),e(Sr,Cl),e(ke,Ol),m(ot,ke,null),e(g,Sl),e(g,be),m(St,be,null),e(be,Bl),e(be,Br),e(Br,Wl),e(be,Rl),e(be,Ae),e(Ae,Ul),e(Ae,Wr),e(Wr,Vl),e(Ae,Gl),e(Ae,Rr),e(Rr,jl),e(Ae,Hl),e(g,Ml),e(g,ve),m(Bt,ve,null),e(ve,Xl),e(ve,Ur),e(Ur,Yl),e(ve,Jl),e(ve,Vr),e(Vr,Kl),$(i,Ja,b),$(i,Ce,b),e(Ce,nt),e(nt,Gr),m(Wt,Gr,null),e(Ce,Ql),e(Ce,jr),e(jr,Zl),$(i,Ka,b),$(i,te,b),e(te,eh),e(te,Mo),e(Mo,th),e(te,oh),e(te,Rt),e(Rt,nh),e(te,rh),e(te,Xo),e(Xo,sh),e(te,ah),$(i,Qa,b),$(i,k,b),m(Ut,k,null),e(k,ih),e(k,Hr),e(Hr,dh),e(k,ch),e(k,Vt),e(Vt,lh),e(Vt,Yo),e(Yo,hh),e(Vt,ph),e(k,mh),e(k,Mr),e(Mr,fh),e(k,uh),e(k,Xr),e(Xr,_h),e(k,gh),e(k,Yr),e(Yr,kh),e(k,bh),e(k,A),e(A,Te),e(Te,Jr),e(Jr,vh),e(Te,Th),e(Te,Kr),e(Kr,yh),e(Te,wh),e(Te,Qr),e(Qr,xh),e(Te,zh),e(A,Eh),e(A,V),e(V,Zr),e(Zr,$h),e(V,Ph),e(V,es),e(es,qh),e(V,Dh),e(V,ts),e(ts,Lh),e(V,Fh),e(V,os),e(os,Ih),e(V,Nh),e(V,ns),e(ns,Ah),e(V,Ch),e(A,Oh),e(A,oe),e(oe,rs),e(rs,Sh),e(oe,Bh),e(oe,ss),e(ss,Wh),e(oe,Rh),e(oe,as),e(as,Uh),e(oe,Vh),e(oe,is),e(is,Gh),e(oe,jh),e(A,Hh),e(A,G),e(G,ds),e(ds,Mh),e(G,Xh),e(G,cs),e(cs,Yh),e(G,Jh),e(G,ls),e(ls,Kh),e(G,Qh),e(G,hs),e(hs,Zh),e(G,ep),e(G,Jo),e(Jo,tp),e(G,op),e(A,np),e(A,rt),e(rt,ps),e(ps,rp),e(rt,sp),e(rt,ms),e(ms,ap),e(rt,ip),e(A,dp),e(A,ne),e(ne,fs),e(fs,cp),e(ne,lp),e(ne,us),e(us,hp),e(ne,pp),e(ne,_s),e(_s,mp),e(ne,fp),e(ne,gs),e(gs,up),e(ne,_p),e(A,gp),e(A,re),e(re,ks),e(ks,kp),e(re,bp),e(re,bs),e(bs,vp),e(re,Tp),e(re,vs),e(vs,yp),e(re,wp),e(re,Ts),e(Ts,xp),e(re,zp),e(k,Ep),e(k,st),m(Gt,st,null),e(st,$p),e(st,ys),e(ys,Pp),e(k,qp),e(k,at),m(jt,at,null),e(at,Dp),e(at,ws),e(ws,Lp),e(k,Fp),e(k,ye),m(Ht,ye,null),e(ye,Ip),e(ye,xs),e(xs,Np),e(ye,Ap),e(ye,Mt),e(Mt,Cp),e(Mt,zs),e(zs,Op),e(Mt,Sp),e(k,Bp),e(k,we),m(Xt,we,null),e(we,Wp),e(we,Es),e(Es,Rp),e(we,Up),e(we,Yt),e(Yt,Vp),e(Yt,$s),e($s,Gp),e(Yt,jp),e(k,Hp),e(k,xe),m(Jt,xe,null),e(xe,Mp),e(xe,Kt),e(Kt,Xp),e(Kt,Ps),e(Ps,Yp),e(Kt,Jp),e(xe,Kp),m(it,xe,null),e(k,Qp),e(k,dt),m(Qt,dt,null),e(dt,Zp),e(dt,qs),e(qs,em),e(k,tm),e(k,ct),m(Zt,ct,null),e(ct,om),e(ct,Ds),e(Ds,nm),e(k,rm),e(k,lt),m(eo,lt,null),e(lt,sm),e(lt,Ls),e(Ls,am),e(k,im),e(k,ze),m(to,ze,null),e(ze,dm),e(ze,Fs),e(Fs,cm),e(ze,lm),m(ht,ze,null),e(k,hm),e(k,Ee),m(oo,Ee,null),e(Ee,pm),e(Ee,Is),e(Is,mm),e(Ee,fm),e(Ee,Ns),e(Ns,um),e(k,_m),e(k,pt),m(no,pt,null),e(pt,gm),e(pt,As),e(As,km),$(i,Za,b),$(i,Oe,b),e(Oe,mt),e(mt,Cs),m(ro,Cs,null),e(Oe,bm),e(Oe,Os),e(Os,vm),$(i,ei,b),$(i,w,b),m(so,w,null),e(w,Tm),e(w,ie),e(ie,ym),e(ie,ao),e(ao,Ss),e(Ss,wm),e(ao,xm),e(ie,zm),e(ie,Ko),e(Ko,Em),e(ie,$m),e(ie,Qo),e(Qo,Pm),e(ie,qm),e(w,Dm),e(w,Bs),e(Bs,Lm),e(w,Fm),e(w,j),m(io,j,null),e(j,Im),e(j,Ws),e(Ws,Nm),e(j,Am),e(j,Rs),e(Rs,Cm),e(j,Om),e(j,co),e(co,Zo),e(Zo,Us),e(Us,Sm),e(Zo,Bm),e(co,Wm),e(co,en),e(en,Vs),e(Vs,Rm),e(en,Um),e(j,Vm),e(j,Gs),e(Gs,Gm),e(w,jm),e(w,H),m(lo,H,null),e(H,Hm),e(H,js),e(js,Mm),e(H,Xm),e(H,Hs),e(Hs,Ym),e(H,Jm),e(H,ho),e(ho,tn),e(tn,Ms),e(Ms,Km),e(tn,Qm),e(ho,Zm),e(ho,on),e(on,Xs),e(Xs,ef),e(on,tf),e(H,of),e(H,Ys),e(Ys,nf),e(w,rf),e(w,ft),m(po,ft,null),e(ft,sf),e(ft,Js),e(Js,af),e(w,df),e(w,$e),m(mo,$e,null),e($e,cf),e($e,Ks),e(Ks,lf),e($e,hf),e($e,Se),e(Se,nn),e(nn,Qs),e(Qs,pf),e(nn,mf),e(Se,ff),e(Se,rn),e(rn,Zs),e(Zs,uf),e(rn,_f),e(Se,gf),e(Se,sn),e(sn,ea),e(ea,kf),e(sn,bf),e(w,vf),e(w,ut),m(fo,ut,null),e(ut,Tf),e(ut,uo),e(uo,yf),e(uo,ta),e(ta,wf),e(uo,xf),e(w,zf),e(w,O),m(_o,O,null),e(O,Ef),e(O,oa),e(oa,$f),e(O,Pf),e(O,go),e(go,qf),e(go,an),e(an,Df),e(go,Lf),e(O,Ff),e(O,ko),e(ko,dn),e(dn,na),e(na,If),e(dn,Nf),e(ko,Af),e(ko,cn),e(cn,ra),e(ra,Cf),e(cn,Of),e(O,Sf),e(O,sa),e(sa,Bf),e(O,Wf),e(O,bo),e(bo,ln),e(ln,aa),e(aa,Rf),e(ln,Uf),e(bo,Vf),e(bo,hn),e(hn,ia),e(ia,Gf),e(hn,jf),e(w,Hf),e(w,M),m(vo,M,null),e(M,Mf),e(M,Be),e(Be,Xf),e(Be,da),e(da,Yf),e(Be,Jf),e(Be,ca),e(ca,Kf),e(Be,Qf),e(M,Zf),e(M,la),e(la,eu),e(M,tu),e(M,To),e(To,pn),e(pn,ha),e(ha,ou),e(pn,nu),e(To,ru),e(To,mn),e(mn,pa),e(pa,su),e(mn,au),e(M,iu),e(M,ma),e(ma,du),e(w,cu),e(w,X),m(yo,X,null),e(X,lu),e(X,fa),e(fa,hu),e(X,pu),e(X,ua),e(ua,mu),e(X,fu),e(X,wo),e(wo,fn),e(fn,_a),e(_a,uu),e(fn,_u),e(wo,gu),e(wo,un),e(un,ga),e(ga,ku),e(un,bu),e(X,vu),e(X,ka),e(ka,Tu),e(w,yu),e(w,_t),m(xo,_t,null),e(_t,wu),e(_t,ba),e(ba,xu),e(w,zu),e(w,gt),m(zo,gt,null),e(gt,Eu),e(gt,va),e(va,$u),e(w,Pu),e(w,S),m(Eo,S,null),e(S,qu),e(S,Ta),e(Ta,Du),e(S,Lu),e(S,ya),e(ya,Fu),e(S,Iu),e(S,$o),e($o,wa),e(wa,Nu),e($o,Au),e($o,xa),e(xa,Cu),e(S,Ou),e(S,za),e(za,Su),e(S,Bu),e(S,Po),e(Po,_n),e(_n,Ea),e(Ea,Wu),e(_n,Ru),e(Po,Uu),e(Po,gn),e(gn,$a),e($a,Vu),e(gn,Gu),e(w,ju),e(w,F),m(qo,F,null),e(F,Hu),e(F,Pa),e(Pa,Mu),e(F,Xu),e(F,Do),e(Do,Yu),e(Do,kn),e(kn,Ju),e(Do,Ku),e(F,Qu),e(F,Lo),e(Lo,bn),e(bn,qa),e(qa,Zu),e(bn,e_),e(Lo,t_),e(Lo,vn),e(vn,Da),e(Da,o_),e(vn,n_),e(F,r_),e(F,La),e(La,s_),e(F,a_),e(F,Fo),e(Fo,Tn),e(Tn,Fa),e(Fa,i_),e(Tn,d_),e(Fo,c_),e(Fo,yn),e(yn,Ia),e(Ia,l_),e(yn,h_),e(F,p_),e(F,Na),e(Na,m_),e(w,f_),e(w,kt),m(Io,kt,null),e(kt,u_),e(kt,Aa),e(Aa,__),ti=!0},p(i,[b]){const No={};b&2&&(No.$$scope={dirty:b,ctx:i}),Qe.$set(No);const Ca={};b&2&&(Ca.$$scope={dirty:b,ctx:i}),ot.$set(Ca);const Oa={};b&2&&(Oa.$$scope={dirty:b,ctx:i}),it.$set(Oa);const Sa={};b&2&&(Sa.$$scope={dirty:b,ctx:i}),ht.$set(Sa)},i(i){ti||(f(v.$$.fragment,i),f(wt.$$.fragment,i),f(xt.$$.fragment,i),f(Et.$$.fragment,i),f($t.$$.fragment,i),f(Pt.$$.fragment,i),f(Dt.$$.fragment,i),f(Ft.$$.fragment,i),f(Qe.$$.fragment,i),f(Nt.$$.fragment,i),f(At.$$.fragment,i),f(Ct.$$.fragment,i),f(Ot.$$.fragment,i),f(ot.$$.fragment,i),f(St.$$.fragment,i),f(Bt.$$.fragment,i),f(Wt.$$.fragment,i),f(Ut.$$.fragment,i),f(Gt.$$.fragment,i),f(jt.$$.fragment,i),f(Ht.$$.fragment,i),f(Xt.$$.fragment,i),f(Jt.$$.fragment,i),f(it.$$.fragment,i),f(Qt.$$.fragment,i),f(Zt.$$.fragment,i),f(eo.$$.fragment,i),f(to.$$.fragment,i),f(ht.$$.fragment,i),f(oo.$$.fragment,i),f(no.$$.fragment,i),f(ro.$$.fragment,i),f(so.$$.fragment,i),f(io.$$.fragment,i),f(lo.$$.fragment,i),f(po.$$.fragment,i),f(mo.$$.fragment,i),f(fo.$$.fragment,i),f(_o.$$.fragment,i),f(vo.$$.fragment,i),f(yo.$$.fragment,i),f(xo.$$.fragment,i),f(zo.$$.fragment,i),f(Eo.$$.fragment,i),f(qo.$$.fragment,i),f(Io.$$.fragment,i),ti=!0)},o(i){u(v.$$.fragment,i),u(wt.$$.fragment,i),u(xt.$$.fragment,i),u(Et.$$.fragment,i),u($t.$$.fragment,i),u(Pt.$$.fragment,i),u(Dt.$$.fragment,i),u(Ft.$$.fragment,i),u(Qe.$$.fragment,i),u(Nt.$$.fragment,i),u(At.$$.fragment,i),u(Ct.$$.fragment,i),u(Ot.$$.fragment,i),u(ot.$$.fragment,i),u(St.$$.fragment,i),u(Bt.$$.fragment,i),u(Wt.$$.fragment,i),u(Ut.$$.fragment,i),u(Gt.$$.fragment,i),u(jt.$$.fragment,i),u(Ht.$$.fragment,i),u(Xt.$$.fragment,i),u(Jt.$$.fragment,i),u(it.$$.fragment,i),u(Qt.$$.fragment,i),u(Zt.$$.fragment,i),u(eo.$$.fragment,i),u(to.$$.fragment,i),u(ht.$$.fragment,i),u(oo.$$.fragment,i),u(no.$$.fragment,i),u(ro.$$.fragment,i),u(so.$$.fragment,i),u(io.$$.fragment,i),u(lo.$$.fragment,i),u(po.$$.fragment,i),u(mo.$$.fragment,i),u(fo.$$.fragment,i),u(_o.$$.fragment,i),u(vo.$$.fragment,i),u(yo.$$.fragment,i),u(xo.$$.fragment,i),u(zo.$$.fragment,i),u(Eo.$$.fragment,i),u(qo.$$.fragment,i),u(Io.$$.fragment,i),ti=!1},d(i){t(y),i&&t(L),i&&t(q),_(v),i&&t(Ua),i&&t(He),i&&t(Va),i&&t(Me),i&&t(Ga),i&&t(W),i&&t(ja),i&&t(Ie),i&&t(Ha),i&&t(me),i&&t(Ma),i&&t(D),i&&t(Xa),i&&t(Ne),_(wt),i&&t(Ya),i&&t(g),_(xt),_(Et),_($t),_(Pt),_(Dt),_(Ft),_(Qe),_(Nt),_(At),_(Ct),_(Ot),_(ot),_(St),_(Bt),i&&t(Ja),i&&t(Ce),_(Wt),i&&t(Ka),i&&t(te),i&&t(Qa),i&&t(k),_(Ut),_(Gt),_(jt),_(Ht),_(Xt),_(Jt),_(it),_(Qt),_(Zt),_(eo),_(to),_(ht),_(oo),_(no),i&&t(Za),i&&t(Oe),_(ro),i&&t(ei),i&&t(w),_(so),_(io),_(lo),_(po),_(mo),_(fo),_(_o),_(vo),_(yo),_(xo),_(zo),_(Eo),_(qo),_(Io)}}}const bv={local:"tokenizer",sections:[{local:"transformers.PreTrainedTokenizer",title:"PreTrainedTokenizer"},{local:"transformers.PreTrainedTokenizerFast",title:"PreTrainedTokenizerFast"},{local:"transformers.BatchEncoding",title:"BatchEncoding"}],title:"Tokenizer"};function vv(pe){return mv(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $v extends cv{constructor(y){super();lv(this,y,vv,kv,hv,{})}}export{$v as default,bv as metadata};
