import{S as Pl,i as Al,s as Ml,e as s,k as c,w as _,t as r,M as Cl,c as a,d as n,m as d,a as o,x as k,h as l,b as h,G as t,g as p,y as b,q as v,o as w,B as y,v as Fl,L as Sl}from"../../chunks/vendor-hf-doc-builder.js";import{D as Ke}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ye}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ve}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as jl}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Dl(Qe){let g,N,$,u,T;return u=new Ye({props:{code:`from transformers import NllbTokenizer

tokenizer = NllbTokenizer.from_pretrained(
    "facebook/nllb-200-distilled-600M", src_lang="eng_Latn", tgt_lang="fra_Latn"
)
example_english_phrase = " UN Chief Says There Is No Military Solution in Syria"
expected_translation_french = "Le chef de l'ONU affirme qu'il n'y a pas de solution militaire en Syrie."
inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors="pt")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NllbTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = NllbTokenizer.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>, src_lang=<span class="hljs-string">&quot;eng_Latn&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra_Latn&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_french = <span class="hljs-string">&quot;Le chef de l&#x27;ONU affirme qu&#x27;il n&#x27;y a pas de solution militaire en Syrie.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){g=s("p"),N=r("Examples:"),$=c(),_(u.$$.fragment)},l(f){g=a(f,"P",{});var q=o(g);N=l(q,"Examples:"),q.forEach(n),$=d(f),k(u.$$.fragment,f)},m(f,q){p(f,g,q),t(g,N),p(f,$,q),b(u,f,q),T=!0},p:Sl,i(f){T||(v(u.$$.fragment,f),T=!0)},o(f){w(u.$$.fragment,f),T=!1},d(f){f&&n(g),f&&n($),y(u,f)}}}function Bl(Qe){let g,N,$,u,T;return u=new Ye({props:{code:`from transformers import NllbTokenizerFast

tokenizer = NllbTokenizerFast.from_pretrained(
    "facebook/nllb-200-distilled-600M", src_lang="eng_Latn", tgt_lang="fra_Latn"
)
example_english_phrase = " UN Chief Says There Is No Military Solution in Syria"
expected_translation_french = "Le chef de l'ONU affirme qu'il n'y a pas de solution militaire en Syrie."
inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors="pt")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NllbTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = NllbTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>, src_lang=<span class="hljs-string">&quot;eng_Latn&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra_Latn&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_french = <span class="hljs-string">&quot;Le chef de l&#x27;ONU affirme qu&#x27;il n&#x27;y a pas de solution militaire en Syrie.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`}}),{c(){g=s("p"),N=r("Examples:"),$=c(),_(u.$$.fragment)},l(f){g=a(f,"P",{});var q=o(g);N=l(q,"Examples:"),q.forEach(n),$=d(f),k(u.$$.fragment,f)},m(f,q){p(f,g,q),t(g,N),p(f,$,q),b(u,f,q),T=!0},p:Sl,i(f){T||(v(u.$$.fragment,f),T=!0)},o(f){w(u.$$.fragment,f),T=!1},d(f){f&&n(g),f&&n($),y(u,f)}}}function Il(Qe){let g,N,$,u,T,f,q,qt,ys,$n,de,Et,$s,zs,zn,V,qs,Tt,Es,Ts,qn,Ze,xt,xs,En,et,Ns,Tn,pe,xn,tt,Ls,Nn,he,Ln,nt,js,jn,fe,Sn,P,Ss,ue,Ps,As,ge,Ms,Cs,Pn,O,Y,Nt,me,Fs,Lt,Ds,An,Q,Bs,_e,Is,Os,Mn,st,Hs,Cn,at,jt,Us,Fn,ot,Rs,Dn,rt,lt,Gs,it,Ws,Bn,A,Js,ke,Xs,Ks,be,Vs,Ys,In,H,Z,St,ve,Qs,Pt,Zs,On,M,ea,At,ta,na,Mt,sa,aa,Hn,C,oa,Ct,ra,la,we,ia,ca,Un,ye,Rn,U,ee,Ft,$e,da,Dt,pa,Gn,F,ha,Bt,fa,ua,It,ga,ma,Wn,ct,_a,Jn,ze,Xn,R,te,Ot,qe,ka,Ht,ba,Kn,ne,Ut,dt,va,wa,Rt,pt,ya,Vn,G,se,Gt,Ee,$a,Wt,za,Yn,E,Te,qa,Jt,Ea,Ta,S,xa,ht,Na,La,ft,ja,Sa,xe,Pa,Aa,Ma,W,Ca,Xt,Fa,Da,Kt,Ba,Ia,Oa,ae,Ha,L,Ne,Ua,Le,Ra,Vt,Ga,Wa,Ja,je,Se,Yt,Xa,Ka,Qt,Va,Ya,Pe,Zt,Qa,Za,en,eo,to,tn,no,Qn,J,oe,nn,Ae,so,sn,ao,Zn,m,Me,oo,X,ro,an,lo,io,Ce,co,po,ho,Fe,fo,ut,uo,go,mo,K,_o,on,ko,bo,rn,vo,wo,yo,re,$o,x,De,zo,ln,qo,Eo,Be,To,cn,xo,No,Lo,Ie,Oe,dn,jo,So,pn,Po,Ao,He,hn,Mo,Co,fn,Fo,Do,un,Bo,Io,le,Ue,Oo,gn,Ho,Uo,D,Re,Ro,mn,Go,Wo,Ge,_n,Jo,Xo,kn,Ko,Vo,B,We,Yo,bn,Qo,Zo,Je,vn,er,tr,wn,nr,es;return f=new Ve({}),pe=new Ye({props:{code:`from transformers import NllbTokenizer

tokenizer = NllbTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
tokenizer("How was your day?").input_ids

# 2: '</s>'
# 256047 : 'eng_Latn'`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NllbTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = NllbTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;How was your day?&quot;</span>).input_ids
[<span class="hljs-number">13374</span>, <span class="hljs-number">1398</span>, <span class="hljs-number">4260</span>, <span class="hljs-number">4039</span>, <span class="hljs-number">248130</span>, <span class="hljs-number">2</span>, <span class="hljs-number">256047</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 2: &#x27;&lt;/s&gt;&#x27;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 256047 : &#x27;eng_Latn&#x27;</span>`}}),he=new Ye({props:{code:`from transformers import NllbTokenizer

tokenizer = NllbTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
tokenizer("How was your day?").input_ids`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NllbTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = NllbTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;How was your day?&quot;</span>).input_ids
[<span class="hljs-number">256047</span>, <span class="hljs-number">13374</span>, <span class="hljs-number">1398</span>, <span class="hljs-number">4260</span>, <span class="hljs-number">4039</span>, <span class="hljs-number">248130</span>, <span class="hljs-number">2</span>]`}}),fe=new Ye({props:{code:`from transformers import NllbTokenizer

tokenizer = NllbTokenizer.from_pretrained("facebook/nllb-200-distilled-600M", legacy_behaviour=True)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NllbTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = NllbTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>, legacy_behaviour=<span class="hljs-literal">True</span>)`}}),me=new Ve({}),ve=new Ve({}),ye=new Ye({props:{code:`from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M")

article = "UN Chief says there is no military solution in Syria"
inputs = tokenizer(article, return_tensors="pt")

translated_tokens = model.generate(
    **inputs, forced_bos_token_id=tokenizer.lang_code_to_id["fra_Latn"], max_length=30
)
tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;UN Chief says there is no military solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(article, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>translated_tokens = model.generate(
<span class="hljs-meta">... </span>    **inputs, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;fra_Latn&quot;</span>], max_length=<span class="hljs-number">30</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(translated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
Le chef de l<span class="hljs-string">&#x27;ONU dit qu&#x27;</span>il n<span class="hljs-string">&#x27;y a pas de solution militaire en Syrie</span>`}}),$e=new Ve({}),ze=new Ye({props:{code:`from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    "facebook/nllb-200-distilled-600M", use_auth_token=True, src_lang="ron_Latn"
)
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M", use_auth_token=True)

article = "\u015Eeful ONU spune c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria"
inputs = tokenizer(article, return_tensors="pt")

translated_tokens = model.generate(
    **inputs, forced_bos_token_id=tokenizer.lang_code_to_id["deu_Latn"], max_length=30
)
tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>, use_auth_token=<span class="hljs-literal">True</span>, src_lang=<span class="hljs-string">&quot;ron_Latn&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;facebook/nllb-200-distilled-600M&quot;</span>, use_auth_token=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>article = <span class="hljs-string">&quot;\u015Eeful ONU spune c\u0103 nu exist\u0103 o solu\u0163ie militar\u0103 \xEEn Siria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(article, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>translated_tokens = model.generate(
<span class="hljs-meta">... </span>    **inputs, forced_bos_token_id=tokenizer.lang_code_to_id[<span class="hljs-string">&quot;deu_Latn&quot;</span>], max_length=<span class="hljs-number">30</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(translated_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
UN-Chef sagt, es gibt keine milit\xE4rische L\xF6sung <span class="hljs-keyword">in</span> Syrien`}}),qe=new Ve({}),Ee=new Ve({}),Te=new Ke({props:{name:"class transformers.NllbTokenizer",anchor:"transformers.NllbTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"tokenizer_file",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"additional_special_tokens",val:" = None"},{name:"legacy_behaviour",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NllbTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.NllbTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.NllbTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.NllbTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.NllbTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.NllbTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.NllbTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.NllbTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.NllbTokenizer.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.NllbTokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.NllbTokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.NllbTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>Dict[str, str]</code>) &#x2014;
Additional keyword arguments to pass to the model initialization.`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb.py#L49"}}),ae=new jl({props:{anchor:"transformers.NllbTokenizer.example",$$slots:{default:[Dl]},$$scope:{ctx:Qe}}}),Ne=new Ke({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.NllbTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.NllbTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.NllbTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb.py#L265",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ae=new Ve({}),Me=new Ke({props:{name:"class transformers.NllbTokenizerFast",anchor:"transformers.NllbTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"additional_special_tokens",val:" = None"},{name:"legacy_behaviour",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NllbTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.NllbTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.NllbTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.NllbTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.NllbTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.NllbTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.NllbTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.NllbTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.NllbTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.NllbTokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.NllbTokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb_fast.py#L61"}}),re=new jl({props:{anchor:"transformers.NllbTokenizerFast.example",$$slots:{default:[Bl]},$$scope:{ctx:Qe}}}),De=new Ke({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.NllbTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.NllbTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.NllbTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb_fast.py#L207",returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ue=new Ke({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.NllbTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.NllbTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.NllbTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb_fast.py#L236",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Re=new Ke({props:{name:"set_src_lang_special_tokens",anchor:"transformers.NllbTokenizerFast.set_src_lang_special_tokens",parameters:[{name:"src_lang",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb_fast.py#L291"}}),We=new Ke({props:{name:"set_tgt_lang_special_tokens",anchor:"transformers.NllbTokenizerFast.set_tgt_lang_special_tokens",parameters:[{name:"lang",val:": str"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/nllb/tokenization_nllb_fast.py#L314"}}),{c(){g=s("meta"),N=c(),$=s("h1"),u=s("a"),T=s("span"),_(f.$$.fragment),q=c(),qt=s("span"),ys=r("NLLB"),$n=c(),de=s("p"),Et=s("strong"),$s=r("DISCLAIMER:"),zs=r(" The default behaviour for the tokenizer has recently been fixed (and thus changed)!"),zn=c(),V=s("p"),qs=r("The previous version adds "),Tt=s("code"),Es=r("[self.eos_token_id, self.cur_lang_code]"),Ts=r(" at the end of the token sequence for both target and source tokenization. This is wrong as the NLLB paper mentions (page 48, 6.1.1. Model Architecture) :"),qn=c(),Ze=s("p"),xt=s("em"),xs=r(`Note that we prefix the source sequence with the source language, as opposed to the target
language as previously done in several works (Arivazhagan et al., 2019; Johnson et al.,
2017). This is primarily because we prioritize optimizing zero-shot performance of our
model on any pair of 200 languages at a minor cost to supervised performance.`),En=c(),et=s("p"),Ns=r("Previous behaviour:"),Tn=c(),_(pe.$$.fragment),xn=c(),tt=s("p"),Ls=r("New behaviour"),Nn=c(),_(he.$$.fragment),Ln=c(),nt=s("p"),js=r("Enabling the old behaviour can be done as follows:"),jn=c(),_(fe.$$.fragment),Sn=c(),P=s("p"),Ss=r("For more details, feel free to check the linked "),ue=s("a"),Ps=r("PR"),As=r(" and "),ge=s("a"),Ms=r("Issue"),Cs=r("."),Pn=c(),O=s("h2"),Y=s("a"),Nt=s("span"),_(me.$$.fragment),Fs=c(),Lt=s("span"),Ds=r("Overview of NLLB"),An=c(),Q=s("p"),Bs=r("The NLLB model was presented in "),_e=s("a"),Is=r("No Language Left Behind: Scaling Human-Centered Machine Translation"),Os=r(` by Marta R. Costa-juss\xE0, James Cross, Onur \xC7elebi,
Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, Anna Sun, Skyler Wang, Guillaume Wenzek, Al Youngblood, Bapi Akula,
Loic Barrault, Gabriel Mejia Gonzalez, Prangthip Hansanti, John Hoffman, Semarley Jarrett, Kaushik Ram Sadagopan, Dirk Rowe, Shannon Spruit, Chau Tran, Pierre Andrews,
Necip Fazil Ayan, Shruti Bhosale, Sergey Edunov, Angela Fan, Cynthia Gao, Vedanuj Goswami, Francisco Guzm\xE1n, Philipp Koehn, Alexandre Mourachko, Christophe Ropers,
Safiyyah Saleem, Holger Schwenk, and Jeff Wang.`),Mn=c(),st=s("p"),Hs=r("The abstract of the paper is the following:"),Cn=c(),at=s("p"),jt=s("em"),Us=r(`Driven by the goal of eradicating language barriers on a global scale, machine translation has solidified itself as a key focus of artificial intelligence research today.
However, such efforts have coalesced around a small subset of languages, leaving behind the vast majority of mostly low-resource languages. What does it take to break the
200 language barrier while ensuring safe, high quality results, all while keeping ethical considerations in mind? In No Language Left Behind, we took on this challenge by
first contextualizing the need for low-resource language translation support through exploratory interviews with native speakers. Then, we created datasets and models aimed
at narrowing the performance gap between low and high-resource languages. More specifically, we developed a conditional compute model based on Sparsely Gated Mixture of
Experts that is trained on data obtained with novel and effective data mining techniques tailored for low-resource languages. We propose multiple architectural and training
improvements to counteract overfitting while training on thousands of tasks. Critically, we evaluated the performance of over 40,000 different translation directions using
a human-translated benchmark, Flores-200, and combined human evaluation with a novel toxicity benchmark covering all languages in Flores-200 to assess translation safety.
Our model achieves an improvement of 44% BLEU relative to the previous state-of-the-art, laying important groundwork towards realizing a universal translation system.`),Fn=c(),ot=s("p"),Rs=r("This implementation contains the dense models available on release."),Dn=c(),rt=s("p"),lt=s("strong"),Gs=r("The sparse model NLLB-MoE (Mixture of Expert) is now available! More details "),it=s("a"),Ws=r("here"),Bn=c(),A=s("p"),Js=r("This model was contributed by "),ke=s("a"),Xs=r("Lysandre"),Ks=r(". The authors\u2019 code can be found "),be=s("a"),Vs=r("here"),Ys=r("."),In=c(),H=s("h2"),Z=s("a"),St=s("span"),_(ve.$$.fragment),Qs=c(),Pt=s("span"),Zs=r("Generating with NLLB"),On=c(),M=s("p"),ea=r("While generating the target text set the "),At=s("code"),ta=r("forced_bos_token_id"),na=r(` to the target language id. The following
example shows how to translate English to French using the `),Mt=s("em"),sa=r("facebook/nllb-200-distilled-600M"),aa=r(" model."),Hn=c(),C=s("p"),oa=r("Note that we\u2019re using the BCP-47 code for French "),Ct=s("code"),ra=r("fra_Latn"),la=r(". See "),we=s("a"),ia=r("here"),ca=r(`
for the list of all BCP-47 in the Flores 200 dataset.`),Un=c(),_(ye.$$.fragment),Rn=c(),U=s("h3"),ee=s("a"),Ft=s("span"),_($e.$$.fragment),da=c(),Dt=s("span"),pa=r("Generating from any other language than English"),Gn=c(),F=s("p"),ha=r("English ("),Bt=s("code"),fa=r("eng_Latn"),ua=r(`) is set as the default language from which to translate. In order to specify that you\u2019d like to translate from a different language,
you should specify the BCP-47 code in the `),It=s("code"),ga=r("src_lang"),ma=r(" keyword argument of the tokenizer initialization."),Wn=c(),ct=s("p"),_a=r("See example below for a translation from romanian to german:"),Jn=c(),_(ze.$$.fragment),Xn=c(),R=s("h2"),te=s("a"),Ot=s("span"),_(qe.$$.fragment),ka=c(),Ht=s("span"),ba=r("Documentation resources"),Kn=c(),ne=s("ul"),Ut=s("li"),dt=s("a"),va=r("Translation task guide"),wa=c(),Rt=s("li"),pt=s("a"),ya=r("Summarization task guide"),Vn=c(),G=s("h2"),se=s("a"),Gt=s("span"),_(Ee.$$.fragment),$a=c(),Wt=s("span"),za=r("NllbTokenizer"),Yn=c(),E=s("div"),_(Te.$$.fragment),qa=c(),Jt=s("p"),Ea=r("Construct an NLLB tokenizer."),Ta=c(),S=s("p"),xa=r("Adapted from "),ht=s("a"),Na=r("RobertaTokenizer"),La=r(" and "),ft=s("a"),ja=r("XLNetTokenizer"),Sa=r(`. Based on
`),xe=s("a"),Pa=r("SentencePiece"),Aa=r("."),Ma=c(),W=s("p"),Ca=r("The tokenization method is "),Xt=s("code"),Fa=r("<tokens> <eos> <language code>"),Da=r(" for source language documents, and "),Kt=s("code"),Ba=r("<language code> <tokens> <eos>"),Ia=r(" for target language documents."),Oa=c(),_(ae.$$.fragment),Ha=c(),L=s("div"),_(Ne.$$.fragment),Ua=c(),Le=s("p"),Ra=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An NLLB sequence has the following format, where `),Vt=s("code"),Ga=r("X"),Wa=r(" represents the sequence:"),Ja=c(),je=s("ul"),Se=s("li"),Yt=s("code"),Xa=r("input_ids"),Ka=r(" (for encoder) "),Qt=s("code"),Va=r("X [eos, src_lang_code]"),Ya=c(),Pe=s("li"),Zt=s("code"),Qa=r("decoder_input_ids"),Za=r(": (for decoder) "),en=s("code"),eo=r("X [eos, tgt_lang_code]"),to=c(),tn=s("p"),no=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Qn=c(),J=s("h2"),oe=s("a"),nn=s("span"),_(Ae.$$.fragment),so=c(),sn=s("span"),ao=r("NllbTokenizerFast"),Zn=c(),m=s("div"),_(Me.$$.fragment),oo=c(),X=s("p"),ro=r("Construct a \u201Cfast\u201D NLLB tokenizer (backed by HuggingFace\u2019s "),an=s("em"),lo=r("tokenizers"),io=r(` library). Based on
`),Ce=s("a"),co=r("BPE"),po=r("."),ho=c(),Fe=s("p"),fo=r("This tokenizer inherits from "),ut=s("a"),uo=r("PreTrainedTokenizerFast"),go=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mo=c(),K=s("p"),_o=r("The tokenization method is "),on=s("code"),ko=r("<tokens> <eos> <language code>"),bo=r(" for source language documents, and "),rn=s("code"),vo=r("<language code> <tokens> <eos>"),wo=r(" for target language documents."),yo=c(),_(re.$$.fragment),$o=c(),x=s("div"),_(De.$$.fragment),zo=c(),ln=s("p"),qo=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),Eo=c(),Be=s("p"),To=r("An NLLB sequence has the following format, where "),cn=s("code"),xo=r("X"),No=r(" represents the sequence:"),Lo=c(),Ie=s("ul"),Oe=s("li"),dn=s("code"),jo=r("input_ids"),So=r(" (for encoder) "),pn=s("code"),Po=r("X [eos, src_lang_code]"),Ao=c(),He=s("li"),hn=s("code"),Mo=r("decoder_input_ids"),Co=r(": (for decoder) "),fn=s("code"),Fo=r("X [eos, tgt_lang_code]"),Do=c(),un=s("p"),Bo=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Io=c(),le=s("div"),_(Ue.$$.fragment),Oo=c(),gn=s("p"),Ho=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. nllb does not
make use of token type ids, therefore a list of zeros is returned.`),Uo=c(),D=s("div"),_(Re.$$.fragment),Ro=c(),mn=s("p"),Go=r("Reset the special tokens to the source lang setting."),Wo=c(),Ge=s("ul"),_n=s("li"),Jo=r("In legacy mode: No prefix and suffix=[eos, src_lang_code]."),Xo=c(),kn=s("li"),Ko=r("In default mode: Prefix=[src_lang_code], suffix = [eos]"),Vo=c(),B=s("div"),_(We.$$.fragment),Yo=c(),bn=s("p"),Qo=r("Reset the special tokens to the target lang setting."),Zo=c(),Je=s("ul"),vn=s("li"),er=r("In legacy mode: No prefix and suffix=[eos, tgt_lang_code]."),tr=c(),wn=s("li"),nr=r("In default mode: Prefix=[tgt_lang_code], suffix = [eos]"),this.h()},l(e){const i=Cl('[data-svelte="svelte-1phssyn"]',document.head);g=a(i,"META",{name:!0,content:!0}),i.forEach(n),N=d(e),$=a(e,"H1",{class:!0});var Xe=o($);u=a(Xe,"A",{id:!0,class:!0,href:!0});var yn=o(u);T=a(yn,"SPAN",{});var or=o(T);k(f.$$.fragment,or),or.forEach(n),yn.forEach(n),q=d(Xe),qt=a(Xe,"SPAN",{});var rr=o(qt);ys=l(rr,"NLLB"),rr.forEach(n),Xe.forEach(n),$n=d(e),de=a(e,"P",{});var sr=o(de);Et=a(sr,"STRONG",{});var lr=o(Et);$s=l(lr,"DISCLAIMER:"),lr.forEach(n),zs=l(sr," The default behaviour for the tokenizer has recently been fixed (and thus changed)!"),sr.forEach(n),zn=d(e),V=a(e,"P",{});var ts=o(V);qs=l(ts,"The previous version adds "),Tt=a(ts,"CODE",{});var ir=o(Tt);Es=l(ir,"[self.eos_token_id, self.cur_lang_code]"),ir.forEach(n),Ts=l(ts," at the end of the token sequence for both target and source tokenization. This is wrong as the NLLB paper mentions (page 48, 6.1.1. Model Architecture) :"),ts.forEach(n),qn=d(e),Ze=a(e,"P",{});var cr=o(Ze);xt=a(cr,"EM",{});var dr=o(xt);xs=l(dr,`Note that we prefix the source sequence with the source language, as opposed to the target
language as previously done in several works (Arivazhagan et al., 2019; Johnson et al.,
2017). This is primarily because we prioritize optimizing zero-shot performance of our
model on any pair of 200 languages at a minor cost to supervised performance.`),dr.forEach(n),cr.forEach(n),En=d(e),et=a(e,"P",{});var pr=o(et);Ns=l(pr,"Previous behaviour:"),pr.forEach(n),Tn=d(e),k(pe.$$.fragment,e),xn=d(e),tt=a(e,"P",{});var hr=o(tt);Ls=l(hr,"New behaviour"),hr.forEach(n),Nn=d(e),k(he.$$.fragment,e),Ln=d(e),nt=a(e,"P",{});var fr=o(nt);js=l(fr,"Enabling the old behaviour can be done as follows:"),fr.forEach(n),jn=d(e),k(fe.$$.fragment,e),Sn=d(e),P=a(e,"P",{});var gt=o(P);Ss=l(gt,"For more details, feel free to check the linked "),ue=a(gt,"A",{href:!0,rel:!0});var ur=o(ue);Ps=l(ur,"PR"),ur.forEach(n),As=l(gt," and "),ge=a(gt,"A",{href:!0,rel:!0});var gr=o(ge);Ms=l(gr,"Issue"),gr.forEach(n),Cs=l(gt,"."),gt.forEach(n),Pn=d(e),O=a(e,"H2",{class:!0});var ns=o(O);Y=a(ns,"A",{id:!0,class:!0,href:!0});var mr=o(Y);Nt=a(mr,"SPAN",{});var _r=o(Nt);k(me.$$.fragment,_r),_r.forEach(n),mr.forEach(n),Fs=d(ns),Lt=a(ns,"SPAN",{});var kr=o(Lt);Ds=l(kr,"Overview of NLLB"),kr.forEach(n),ns.forEach(n),An=d(e),Q=a(e,"P",{});var ss=o(Q);Bs=l(ss,"The NLLB model was presented in "),_e=a(ss,"A",{href:!0,rel:!0});var br=o(_e);Is=l(br,"No Language Left Behind: Scaling Human-Centered Machine Translation"),br.forEach(n),Os=l(ss,` by Marta R. Costa-juss\xE0, James Cross, Onur \xC7elebi,
Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, Anna Sun, Skyler Wang, Guillaume Wenzek, Al Youngblood, Bapi Akula,
Loic Barrault, Gabriel Mejia Gonzalez, Prangthip Hansanti, John Hoffman, Semarley Jarrett, Kaushik Ram Sadagopan, Dirk Rowe, Shannon Spruit, Chau Tran, Pierre Andrews,
Necip Fazil Ayan, Shruti Bhosale, Sergey Edunov, Angela Fan, Cynthia Gao, Vedanuj Goswami, Francisco Guzm\xE1n, Philipp Koehn, Alexandre Mourachko, Christophe Ropers,
Safiyyah Saleem, Holger Schwenk, and Jeff Wang.`),ss.forEach(n),Mn=d(e),st=a(e,"P",{});var vr=o(st);Hs=l(vr,"The abstract of the paper is the following:"),vr.forEach(n),Cn=d(e),at=a(e,"P",{});var wr=o(at);jt=a(wr,"EM",{});var yr=o(jt);Us=l(yr,`Driven by the goal of eradicating language barriers on a global scale, machine translation has solidified itself as a key focus of artificial intelligence research today.
However, such efforts have coalesced around a small subset of languages, leaving behind the vast majority of mostly low-resource languages. What does it take to break the
200 language barrier while ensuring safe, high quality results, all while keeping ethical considerations in mind? In No Language Left Behind, we took on this challenge by
first contextualizing the need for low-resource language translation support through exploratory interviews with native speakers. Then, we created datasets and models aimed
at narrowing the performance gap between low and high-resource languages. More specifically, we developed a conditional compute model based on Sparsely Gated Mixture of
Experts that is trained on data obtained with novel and effective data mining techniques tailored for low-resource languages. We propose multiple architectural and training
improvements to counteract overfitting while training on thousands of tasks. Critically, we evaluated the performance of over 40,000 different translation directions using
a human-translated benchmark, Flores-200, and combined human evaluation with a novel toxicity benchmark covering all languages in Flores-200 to assess translation safety.
Our model achieves an improvement of 44% BLEU relative to the previous state-of-the-art, laying important groundwork towards realizing a universal translation system.`),yr.forEach(n),wr.forEach(n),Fn=d(e),ot=a(e,"P",{});var $r=o(ot);Rs=l($r,"This implementation contains the dense models available on release."),$r.forEach(n),Dn=d(e),rt=a(e,"P",{});var zr=o(rt);lt=a(zr,"STRONG",{});var ar=o(lt);Gs=l(ar,"The sparse model NLLB-MoE (Mixture of Expert) is now available! More details "),it=a(ar,"A",{href:!0});var qr=o(it);Ws=l(qr,"here"),qr.forEach(n),ar.forEach(n),zr.forEach(n),Bn=d(e),A=a(e,"P",{});var mt=o(A);Js=l(mt,"This model was contributed by "),ke=a(mt,"A",{href:!0,rel:!0});var Er=o(ke);Xs=l(Er,"Lysandre"),Er.forEach(n),Ks=l(mt,". The authors\u2019 code can be found "),be=a(mt,"A",{href:!0,rel:!0});var Tr=o(be);Vs=l(Tr,"here"),Tr.forEach(n),Ys=l(mt,"."),mt.forEach(n),In=d(e),H=a(e,"H2",{class:!0});var as=o(H);Z=a(as,"A",{id:!0,class:!0,href:!0});var xr=o(Z);St=a(xr,"SPAN",{});var Nr=o(St);k(ve.$$.fragment,Nr),Nr.forEach(n),xr.forEach(n),Qs=d(as),Pt=a(as,"SPAN",{});var Lr=o(Pt);Zs=l(Lr,"Generating with NLLB"),Lr.forEach(n),as.forEach(n),On=d(e),M=a(e,"P",{});var _t=o(M);ea=l(_t,"While generating the target text set the "),At=a(_t,"CODE",{});var jr=o(At);ta=l(jr,"forced_bos_token_id"),jr.forEach(n),na=l(_t,` to the target language id. The following
example shows how to translate English to French using the `),Mt=a(_t,"EM",{});var Sr=o(Mt);sa=l(Sr,"facebook/nllb-200-distilled-600M"),Sr.forEach(n),aa=l(_t," model."),_t.forEach(n),Hn=d(e),C=a(e,"P",{});var kt=o(C);oa=l(kt,"Note that we\u2019re using the BCP-47 code for French "),Ct=a(kt,"CODE",{});var Pr=o(Ct);ra=l(Pr,"fra_Latn"),Pr.forEach(n),la=l(kt,". See "),we=a(kt,"A",{href:!0,rel:!0});var Ar=o(we);ia=l(Ar,"here"),Ar.forEach(n),ca=l(kt,`
for the list of all BCP-47 in the Flores 200 dataset.`),kt.forEach(n),Un=d(e),k(ye.$$.fragment,e),Rn=d(e),U=a(e,"H3",{class:!0});var os=o(U);ee=a(os,"A",{id:!0,class:!0,href:!0});var Mr=o(ee);Ft=a(Mr,"SPAN",{});var Cr=o(Ft);k($e.$$.fragment,Cr),Cr.forEach(n),Mr.forEach(n),da=d(os),Dt=a(os,"SPAN",{});var Fr=o(Dt);pa=l(Fr,"Generating from any other language than English"),Fr.forEach(n),os.forEach(n),Gn=d(e),F=a(e,"P",{});var bt=o(F);ha=l(bt,"English ("),Bt=a(bt,"CODE",{});var Dr=o(Bt);fa=l(Dr,"eng_Latn"),Dr.forEach(n),ua=l(bt,`) is set as the default language from which to translate. In order to specify that you\u2019d like to translate from a different language,
you should specify the BCP-47 code in the `),It=a(bt,"CODE",{});var Br=o(It);ga=l(Br,"src_lang"),Br.forEach(n),ma=l(bt," keyword argument of the tokenizer initialization."),bt.forEach(n),Wn=d(e),ct=a(e,"P",{});var Ir=o(ct);_a=l(Ir,"See example below for a translation from romanian to german:"),Ir.forEach(n),Jn=d(e),k(ze.$$.fragment,e),Xn=d(e),R=a(e,"H2",{class:!0});var rs=o(R);te=a(rs,"A",{id:!0,class:!0,href:!0});var Or=o(te);Ot=a(Or,"SPAN",{});var Hr=o(Ot);k(qe.$$.fragment,Hr),Hr.forEach(n),Or.forEach(n),ka=d(rs),Ht=a(rs,"SPAN",{});var Ur=o(Ht);ba=l(Ur,"Documentation resources"),Ur.forEach(n),rs.forEach(n),Kn=d(e),ne=a(e,"UL",{});var ls=o(ne);Ut=a(ls,"LI",{});var Rr=o(Ut);dt=a(Rr,"A",{href:!0});var Gr=o(dt);va=l(Gr,"Translation task guide"),Gr.forEach(n),Rr.forEach(n),wa=d(ls),Rt=a(ls,"LI",{});var Wr=o(Rt);pt=a(Wr,"A",{href:!0});var Jr=o(pt);ya=l(Jr,"Summarization task guide"),Jr.forEach(n),Wr.forEach(n),ls.forEach(n),Vn=d(e),G=a(e,"H2",{class:!0});var is=o(G);se=a(is,"A",{id:!0,class:!0,href:!0});var Xr=o(se);Gt=a(Xr,"SPAN",{});var Kr=o(Gt);k(Ee.$$.fragment,Kr),Kr.forEach(n),Xr.forEach(n),$a=d(is),Wt=a(is,"SPAN",{});var Vr=o(Wt);za=l(Vr,"NllbTokenizer"),Vr.forEach(n),is.forEach(n),Yn=d(e),E=a(e,"DIV",{class:!0});var j=o(E);k(Te.$$.fragment,j),qa=d(j),Jt=a(j,"P",{});var Yr=o(Jt);Ea=l(Yr,"Construct an NLLB tokenizer."),Yr.forEach(n),Ta=d(j),S=a(j,"P",{});var ie=o(S);xa=l(ie,"Adapted from "),ht=a(ie,"A",{href:!0});var Qr=o(ht);Na=l(Qr,"RobertaTokenizer"),Qr.forEach(n),La=l(ie," and "),ft=a(ie,"A",{href:!0});var Zr=o(ft);ja=l(Zr,"XLNetTokenizer"),Zr.forEach(n),Sa=l(ie,`. Based on
`),xe=a(ie,"A",{href:!0,rel:!0});var el=o(xe);Pa=l(el,"SentencePiece"),el.forEach(n),Aa=l(ie,"."),ie.forEach(n),Ma=d(j),W=a(j,"P",{});var vt=o(W);Ca=l(vt,"The tokenization method is "),Xt=a(vt,"CODE",{});var tl=o(Xt);Fa=l(tl,"<tokens> <eos> <language code>"),tl.forEach(n),Da=l(vt," for source language documents, and "),Kt=a(vt,"CODE",{});var nl=o(Kt);Ba=l(nl,"<language code> <tokens> <eos>"),nl.forEach(n),Ia=l(vt," for target language documents."),vt.forEach(n),Oa=d(j),k(ae.$$.fragment,j),Ha=d(j),L=a(j,"DIV",{class:!0});var ce=o(L);k(Ne.$$.fragment,ce),Ua=d(ce),Le=a(ce,"P",{});var cs=o(Le);Ra=l(cs,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An NLLB sequence has the following format, where `),Vt=a(cs,"CODE",{});var sl=o(Vt);Ga=l(sl,"X"),sl.forEach(n),Wa=l(cs," represents the sequence:"),cs.forEach(n),Ja=d(ce),je=a(ce,"UL",{});var ds=o(je);Se=a(ds,"LI",{});var ps=o(Se);Yt=a(ps,"CODE",{});var al=o(Yt);Xa=l(al,"input_ids"),al.forEach(n),Ka=l(ps," (for encoder) "),Qt=a(ps,"CODE",{});var ol=o(Qt);Va=l(ol,"X [eos, src_lang_code]"),ol.forEach(n),ps.forEach(n),Ya=d(ds),Pe=a(ds,"LI",{});var hs=o(Pe);Zt=a(hs,"CODE",{});var rl=o(Zt);Qa=l(rl,"decoder_input_ids"),rl.forEach(n),Za=l(hs,": (for decoder) "),en=a(hs,"CODE",{});var ll=o(en);eo=l(ll,"X [eos, tgt_lang_code]"),ll.forEach(n),hs.forEach(n),ds.forEach(n),to=d(ce),tn=a(ce,"P",{});var il=o(tn);no=l(il,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),il.forEach(n),ce.forEach(n),j.forEach(n),Qn=d(e),J=a(e,"H2",{class:!0});var fs=o(J);oe=a(fs,"A",{id:!0,class:!0,href:!0});var cl=o(oe);nn=a(cl,"SPAN",{});var dl=o(nn);k(Ae.$$.fragment,dl),dl.forEach(n),cl.forEach(n),so=d(fs),sn=a(fs,"SPAN",{});var pl=o(sn);ao=l(pl,"NllbTokenizerFast"),pl.forEach(n),fs.forEach(n),Zn=d(e),m=a(e,"DIV",{class:!0});var z=o(m);k(Me.$$.fragment,z),oo=d(z),X=a(z,"P",{});var wt=o(X);ro=l(wt,"Construct a \u201Cfast\u201D NLLB tokenizer (backed by HuggingFace\u2019s "),an=a(wt,"EM",{});var hl=o(an);lo=l(hl,"tokenizers"),hl.forEach(n),io=l(wt,` library). Based on
`),Ce=a(wt,"A",{href:!0,rel:!0});var fl=o(Ce);co=l(fl,"BPE"),fl.forEach(n),po=l(wt,"."),wt.forEach(n),ho=d(z),Fe=a(z,"P",{});var us=o(Fe);fo=l(us,"This tokenizer inherits from "),ut=a(us,"A",{href:!0});var ul=o(ut);uo=l(ul,"PreTrainedTokenizerFast"),ul.forEach(n),go=l(us,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),us.forEach(n),mo=d(z),K=a(z,"P",{});var yt=o(K);_o=l(yt,"The tokenization method is "),on=a(yt,"CODE",{});var gl=o(on);ko=l(gl,"<tokens> <eos> <language code>"),gl.forEach(n),bo=l(yt," for source language documents, and "),rn=a(yt,"CODE",{});var ml=o(rn);vo=l(ml,"<language code> <tokens> <eos>"),ml.forEach(n),wo=l(yt," for target language documents."),yt.forEach(n),yo=d(z),k(re.$$.fragment,z),$o=d(z),x=a(z,"DIV",{class:!0});var I=o(x);k(De.$$.fragment,I),zo=d(I),ln=a(I,"P",{});var _l=o(ln);qo=l(_l,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. The special tokens depend on calling set_lang.`),_l.forEach(n),Eo=d(I),Be=a(I,"P",{});var gs=o(Be);To=l(gs,"An NLLB sequence has the following format, where "),cn=a(gs,"CODE",{});var kl=o(cn);xo=l(kl,"X"),kl.forEach(n),No=l(gs," represents the sequence:"),gs.forEach(n),Lo=d(I),Ie=a(I,"UL",{});var ms=o(Ie);Oe=a(ms,"LI",{});var _s=o(Oe);dn=a(_s,"CODE",{});var bl=o(dn);jo=l(bl,"input_ids"),bl.forEach(n),So=l(_s," (for encoder) "),pn=a(_s,"CODE",{});var vl=o(pn);Po=l(vl,"X [eos, src_lang_code]"),vl.forEach(n),_s.forEach(n),Ao=d(ms),He=a(ms,"LI",{});var ks=o(He);hn=a(ks,"CODE",{});var wl=o(hn);Mo=l(wl,"decoder_input_ids"),wl.forEach(n),Co=l(ks,": (for decoder) "),fn=a(ks,"CODE",{});var yl=o(fn);Fo=l(yl,"X [eos, tgt_lang_code]"),yl.forEach(n),ks.forEach(n),ms.forEach(n),Do=d(I),un=a(I,"P",{});var $l=o(un);Bo=l($l,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),$l.forEach(n),I.forEach(n),Io=d(z),le=a(z,"DIV",{class:!0});var bs=o(le);k(Ue.$$.fragment,bs),Oo=d(bs),gn=a(bs,"P",{});var zl=o(gn);Ho=l(zl,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. nllb does not
make use of token type ids, therefore a list of zeros is returned.`),zl.forEach(n),bs.forEach(n),Uo=d(z),D=a(z,"DIV",{class:!0});var $t=o(D);k(Re.$$.fragment,$t),Ro=d($t),mn=a($t,"P",{});var ql=o(mn);Go=l(ql,"Reset the special tokens to the source lang setting."),ql.forEach(n),Wo=d($t),Ge=a($t,"UL",{});var vs=o(Ge);_n=a(vs,"LI",{});var El=o(_n);Jo=l(El,"In legacy mode: No prefix and suffix=[eos, src_lang_code]."),El.forEach(n),Xo=d(vs),kn=a(vs,"LI",{});var Tl=o(kn);Ko=l(Tl,"In default mode: Prefix=[src_lang_code], suffix = [eos]"),Tl.forEach(n),vs.forEach(n),$t.forEach(n),Vo=d(z),B=a(z,"DIV",{class:!0});var zt=o(B);k(We.$$.fragment,zt),Yo=d(zt),bn=a(zt,"P",{});var xl=o(bn);Qo=l(xl,"Reset the special tokens to the target lang setting."),xl.forEach(n),Zo=d(zt),Je=a(zt,"UL",{});var ws=o(Je);vn=a(ws,"LI",{});var Nl=o(vn);er=l(Nl,"In legacy mode: No prefix and suffix=[eos, tgt_lang_code]."),Nl.forEach(n),tr=d(ws),wn=a(ws,"LI",{});var Ll=o(wn);nr=l(Ll,"In default mode: Prefix=[tgt_lang_code], suffix = [eos]"),Ll.forEach(n),ws.forEach(n),zt.forEach(n),z.forEach(n),this.h()},h(){h(g,"name","hf:doc:metadata"),h(g,"content",JSON.stringify(Ol)),h(u,"id","transformers.NllbTokenizer"),h(u,"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"),h(u,"href","#transformers.NllbTokenizer"),h($,"class","relative group"),h(ue,"href","https://github.com/huggingface/transformers/pull/22313"),h(ue,"rel","nofollow"),h(ge,"href","https://github.com/huggingface/transformers/issues/19943"),h(ge,"rel","nofollow"),h(Y,"id","overview-of-nllb"),h(Y,"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"),h(Y,"href","#overview-of-nllb"),h(O,"class","relative group"),h(_e,"href","https://arxiv.org/abs/2207.04672"),h(_e,"rel","nofollow"),h(it,"href","nllb-moe"),h(ke,"href","https://huggingface.co/lysandre"),h(ke,"rel","nofollow"),h(be,"href","https://github.com/facebookresearch/fairseq/tree/nllb"),h(be,"rel","nofollow"),h(Z,"id","generating-with-nllb"),h(Z,"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"),h(Z,"href","#generating-with-nllb"),h(H,"class","relative group"),h(we,"href","https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200"),h(we,"rel","nofollow"),h(ee,"id","generating-from-any-other-language-than-english"),h(ee,"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"),h(ee,"href","#generating-from-any-other-language-than-english"),h(U,"class","relative group"),h(te,"id","documentation-resources"),h(te,"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"),h(te,"href","#documentation-resources"),h(R,"class","relative group"),h(dt,"href","../tasks/translation"),h(pt,"href","../tasks/summarization"),h(se,"id","nllbtokenizer"),h(se,"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"),h(se,"href","#nllbtokenizer"),h(G,"class","relative group"),h(ht,"href","/docs/transformers/v4.29.0/en/model_doc/roberta#transformers.RobertaTokenizer"),h(ft,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),h(xe,"href","https://github.com/google/sentencepiece"),h(xe,"rel","nofollow"),h(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(oe,"id","nllbtokenizerfast"),h(oe,"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"),h(oe,"href","#nllbtokenizerfast"),h(J,"class","relative group"),h(Ce,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),h(Ce,"rel","nofollow"),h(ut,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){t(document.head,g),p(e,N,i),p(e,$,i),t($,u),t(u,T),b(f,T,null),t($,q),t($,qt),t(qt,ys),p(e,$n,i),p(e,de,i),t(de,Et),t(Et,$s),t(de,zs),p(e,zn,i),p(e,V,i),t(V,qs),t(V,Tt),t(Tt,Es),t(V,Ts),p(e,qn,i),p(e,Ze,i),t(Ze,xt),t(xt,xs),p(e,En,i),p(e,et,i),t(et,Ns),p(e,Tn,i),b(pe,e,i),p(e,xn,i),p(e,tt,i),t(tt,Ls),p(e,Nn,i),b(he,e,i),p(e,Ln,i),p(e,nt,i),t(nt,js),p(e,jn,i),b(fe,e,i),p(e,Sn,i),p(e,P,i),t(P,Ss),t(P,ue),t(ue,Ps),t(P,As),t(P,ge),t(ge,Ms),t(P,Cs),p(e,Pn,i),p(e,O,i),t(O,Y),t(Y,Nt),b(me,Nt,null),t(O,Fs),t(O,Lt),t(Lt,Ds),p(e,An,i),p(e,Q,i),t(Q,Bs),t(Q,_e),t(_e,Is),t(Q,Os),p(e,Mn,i),p(e,st,i),t(st,Hs),p(e,Cn,i),p(e,at,i),t(at,jt),t(jt,Us),p(e,Fn,i),p(e,ot,i),t(ot,Rs),p(e,Dn,i),p(e,rt,i),t(rt,lt),t(lt,Gs),t(lt,it),t(it,Ws),p(e,Bn,i),p(e,A,i),t(A,Js),t(A,ke),t(ke,Xs),t(A,Ks),t(A,be),t(be,Vs),t(A,Ys),p(e,In,i),p(e,H,i),t(H,Z),t(Z,St),b(ve,St,null),t(H,Qs),t(H,Pt),t(Pt,Zs),p(e,On,i),p(e,M,i),t(M,ea),t(M,At),t(At,ta),t(M,na),t(M,Mt),t(Mt,sa),t(M,aa),p(e,Hn,i),p(e,C,i),t(C,oa),t(C,Ct),t(Ct,ra),t(C,la),t(C,we),t(we,ia),t(C,ca),p(e,Un,i),b(ye,e,i),p(e,Rn,i),p(e,U,i),t(U,ee),t(ee,Ft),b($e,Ft,null),t(U,da),t(U,Dt),t(Dt,pa),p(e,Gn,i),p(e,F,i),t(F,ha),t(F,Bt),t(Bt,fa),t(F,ua),t(F,It),t(It,ga),t(F,ma),p(e,Wn,i),p(e,ct,i),t(ct,_a),p(e,Jn,i),b(ze,e,i),p(e,Xn,i),p(e,R,i),t(R,te),t(te,Ot),b(qe,Ot,null),t(R,ka),t(R,Ht),t(Ht,ba),p(e,Kn,i),p(e,ne,i),t(ne,Ut),t(Ut,dt),t(dt,va),t(ne,wa),t(ne,Rt),t(Rt,pt),t(pt,ya),p(e,Vn,i),p(e,G,i),t(G,se),t(se,Gt),b(Ee,Gt,null),t(G,$a),t(G,Wt),t(Wt,za),p(e,Yn,i),p(e,E,i),b(Te,E,null),t(E,qa),t(E,Jt),t(Jt,Ea),t(E,Ta),t(E,S),t(S,xa),t(S,ht),t(ht,Na),t(S,La),t(S,ft),t(ft,ja),t(S,Sa),t(S,xe),t(xe,Pa),t(S,Aa),t(E,Ma),t(E,W),t(W,Ca),t(W,Xt),t(Xt,Fa),t(W,Da),t(W,Kt),t(Kt,Ba),t(W,Ia),t(E,Oa),b(ae,E,null),t(E,Ha),t(E,L),b(Ne,L,null),t(L,Ua),t(L,Le),t(Le,Ra),t(Le,Vt),t(Vt,Ga),t(Le,Wa),t(L,Ja),t(L,je),t(je,Se),t(Se,Yt),t(Yt,Xa),t(Se,Ka),t(Se,Qt),t(Qt,Va),t(je,Ya),t(je,Pe),t(Pe,Zt),t(Zt,Qa),t(Pe,Za),t(Pe,en),t(en,eo),t(L,to),t(L,tn),t(tn,no),p(e,Qn,i),p(e,J,i),t(J,oe),t(oe,nn),b(Ae,nn,null),t(J,so),t(J,sn),t(sn,ao),p(e,Zn,i),p(e,m,i),b(Me,m,null),t(m,oo),t(m,X),t(X,ro),t(X,an),t(an,lo),t(X,io),t(X,Ce),t(Ce,co),t(X,po),t(m,ho),t(m,Fe),t(Fe,fo),t(Fe,ut),t(ut,uo),t(Fe,go),t(m,mo),t(m,K),t(K,_o),t(K,on),t(on,ko),t(K,bo),t(K,rn),t(rn,vo),t(K,wo),t(m,yo),b(re,m,null),t(m,$o),t(m,x),b(De,x,null),t(x,zo),t(x,ln),t(ln,qo),t(x,Eo),t(x,Be),t(Be,To),t(Be,cn),t(cn,xo),t(Be,No),t(x,Lo),t(x,Ie),t(Ie,Oe),t(Oe,dn),t(dn,jo),t(Oe,So),t(Oe,pn),t(pn,Po),t(Ie,Ao),t(Ie,He),t(He,hn),t(hn,Mo),t(He,Co),t(He,fn),t(fn,Fo),t(x,Do),t(x,un),t(un,Bo),t(m,Io),t(m,le),b(Ue,le,null),t(le,Oo),t(le,gn),t(gn,Ho),t(m,Uo),t(m,D),b(Re,D,null),t(D,Ro),t(D,mn),t(mn,Go),t(D,Wo),t(D,Ge),t(Ge,_n),t(_n,Jo),t(Ge,Xo),t(Ge,kn),t(kn,Ko),t(m,Vo),t(m,B),b(We,B,null),t(B,Yo),t(B,bn),t(bn,Qo),t(B,Zo),t(B,Je),t(Je,vn),t(vn,er),t(Je,tr),t(Je,wn),t(wn,nr),es=!0},p(e,[i]){const Xe={};i&2&&(Xe.$$scope={dirty:i,ctx:e}),ae.$set(Xe);const yn={};i&2&&(yn.$$scope={dirty:i,ctx:e}),re.$set(yn)},i(e){es||(v(f.$$.fragment,e),v(pe.$$.fragment,e),v(he.$$.fragment,e),v(fe.$$.fragment,e),v(me.$$.fragment,e),v(ve.$$.fragment,e),v(ye.$$.fragment,e),v($e.$$.fragment,e),v(ze.$$.fragment,e),v(qe.$$.fragment,e),v(Ee.$$.fragment,e),v(Te.$$.fragment,e),v(ae.$$.fragment,e),v(Ne.$$.fragment,e),v(Ae.$$.fragment,e),v(Me.$$.fragment,e),v(re.$$.fragment,e),v(De.$$.fragment,e),v(Ue.$$.fragment,e),v(Re.$$.fragment,e),v(We.$$.fragment,e),es=!0)},o(e){w(f.$$.fragment,e),w(pe.$$.fragment,e),w(he.$$.fragment,e),w(fe.$$.fragment,e),w(me.$$.fragment,e),w(ve.$$.fragment,e),w(ye.$$.fragment,e),w($e.$$.fragment,e),w(ze.$$.fragment,e),w(qe.$$.fragment,e),w(Ee.$$.fragment,e),w(Te.$$.fragment,e),w(ae.$$.fragment,e),w(Ne.$$.fragment,e),w(Ae.$$.fragment,e),w(Me.$$.fragment,e),w(re.$$.fragment,e),w(De.$$.fragment,e),w(Ue.$$.fragment,e),w(Re.$$.fragment,e),w(We.$$.fragment,e),es=!1},d(e){n(g),e&&n(N),e&&n($),y(f),e&&n($n),e&&n(de),e&&n(zn),e&&n(V),e&&n(qn),e&&n(Ze),e&&n(En),e&&n(et),e&&n(Tn),y(pe,e),e&&n(xn),e&&n(tt),e&&n(Nn),y(he,e),e&&n(Ln),e&&n(nt),e&&n(jn),y(fe,e),e&&n(Sn),e&&n(P),e&&n(Pn),e&&n(O),y(me),e&&n(An),e&&n(Q),e&&n(Mn),e&&n(st),e&&n(Cn),e&&n(at),e&&n(Fn),e&&n(ot),e&&n(Dn),e&&n(rt),e&&n(Bn),e&&n(A),e&&n(In),e&&n(H),y(ve),e&&n(On),e&&n(M),e&&n(Hn),e&&n(C),e&&n(Un),y(ye,e),e&&n(Rn),e&&n(U),y($e),e&&n(Gn),e&&n(F),e&&n(Wn),e&&n(ct),e&&n(Jn),y(ze,e),e&&n(Xn),e&&n(R),y(qe),e&&n(Kn),e&&n(ne),e&&n(Vn),e&&n(G),y(Ee),e&&n(Yn),e&&n(E),y(Te),y(ae),y(Ne),e&&n(Qn),e&&n(J),y(Ae),e&&n(Zn),e&&n(m),y(Me),y(re),y(De),y(Ue),y(Re),y(We)}}}const Ol={local:"transformers.NllbTokenizer",title:"NLLB"};function Hl(Qe){return Fl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xl extends Pl{constructor(g){super();Al(this,g,Hl,Il,Ml,{})}}export{Xl as default,Ol as metadata};
