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