import{S as ql,i as Il,s as Gl,e as n,k as c,w as b,t as r,M as Ll,c as s,d as a,m as d,a as o,x as k,h as l,b as h,G as t,g as p,y as _,q as y,o as v,B as w,v as Zl,L as xl}from"../../chunks/vendor-hf-doc-builder.js";import{D as Ye}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Qe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as He}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ul}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bl(Oe){let m,N,M,u,j;return u=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5sbGJUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBObGxiVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbmdfTGF0biUyMiUyQyUyMHRndF9sYW5nJTNEJTIyZnJhX0xhdG4lMjIlMEEpJTBBZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyMCUzRCUyMCUyMiUyMFVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEFleHBlY3RlZF90cmFuc2xhdGlvbl9mcmVuY2glMjAlM0QlMjAlMjJMZSUyMGNoZWYlMjBkZSUyMGwnT05VJTIwYWZmaXJtZSUyMHF1J2lsJTIwbid5JTIwYSUyMHBhcyUyMGRlJTIwc29sdXRpb24lMjBtaWxpdGFpcmUlMjBlbiUyMFN5cmllLiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9mcmVuY2glMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",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(){m=n("p"),N=r("Examples:"),M=c(),b(u.$$.fragment)},l(f){m=s(f,"P",{});var E=o(m);N=l(E,"Examples:"),E.forEach(a),M=d(f),k(u.$$.fragment,f)},m(f,E){p(f,m,E),t(m,N),p(f,M,E),_(u,f,E),j=!0},p:xl,i(f){j||(y(u.$$.fragment,f),j=!0)},o(f){v(u.$$.fragment,f),j=!1},d(f){f&&a(m),f&&a(M),w(u,f)}}}function Fl(Oe){let m,N,M,u,j;return u=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5sbGJUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwTmxsYlRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhY2Vib29rJTJGbmxsYi0yMDAtZGlzdGlsbGVkLTYwME0lMjIlMkMlMjBzcmNfbGFuZyUzRCUyMmVuZ19MYXRuJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJmcmFfTGF0biUyMiUwQSklMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQWV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyMCUzRCUyMCUyMkxlJTIwY2hlZiUyMGRlJTIwbCdPTlUlMjBhZmZpcm1lJTIwcXUnaWwlMjBuJ3klMjBhJTIwcGFzJTIwZGUlMjBzb2x1dGlvbiUyMG1pbGl0YWlyZSUyMGVuJTIwU3lyaWUuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKGV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMkMlMjB0ZXh0X3RhcmdldCUzRGV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIp",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(){m=n("p"),N=r("Examples:"),M=c(),b(u.$$.fragment)},l(f){m=s(f,"P",{});var E=o(m);N=l(E,"Examples:"),E.forEach(a),M=d(f),k(u.$$.fragment,f)},m(f,E){p(f,m,E),t(m,N),p(f,M,E),_(u,f,E),j=!0},p:xl,i(f){j||(y(u.$$.fragment,f),j=!0)},o(f){v(u.$$.fragment,f),j=!1},d(f){f&&a(m),f&&a(M),w(u,f)}}}function Rl(Oe){let m,N,M,u,j,f,E,Et,wn,wa,de,Jt,Mn,Tn,Ma,H,En,jt,Jn,jn,Ta,Ke,zt,zn,Ea,et,Nn,Ja,pe,ja,tt,$n,za,he,Na,at,Un,$a,fe,Ua,q,xn,ue,qn,In,me,Gn,Ln,xa,C,Q,Nt,ge,Zn,$t,Bn,qa,O,Fn,be,Rn,Cn,Ia,nt,Wn,Ga,st,Ut,Sn,La,ot,Xn,Za,rt,lt,Vn,it,An,Ba,I,Dn,ke,Pn,Yn,_e,Hn,Qn,Fa,W,K,xt,ye,On,qt,Kn,Ra,G,es,It,ts,as,Gt,ns,ss,Ca,L,os,Lt,rs,ls,ve,is,cs,Wa,we,Sa,S,ee,Zt,Me,ds,Bt,ps,Xa,Z,hs,Ft,fs,us,Rt,ms,gs,Va,ct,bs,Aa,Te,Da,X,te,Ct,Ee,ks,Wt,_s,Pa,ae,St,dt,ys,vs,Xt,pt,ws,Ya,V,ne,Vt,Je,Ms,At,Ts,Ha,J,je,Es,Dt,Js,js,x,zs,ht,Ns,$s,ft,Us,xs,ze,qs,Is,Gs,A,Ls,Pt,Zs,Bs,Yt,Fs,Rs,Cs,se,Ws,$,Ne,Ss,$e,Xs,Ht,Vs,As,Ds,Ue,xe,Qt,Ps,Ys,Ot,Hs,Qs,qe,Kt,Os,Ks,ea,eo,to,ta,ao,Qa,D,oe,aa,Ie,no,na,so,Oa,g,Ge,oo,P,ro,sa,lo,io,Le,co,po,ho,Ze,fo,ut,uo,mo,go,Y,bo,oa,ko,_o,ra,yo,vo,wo,re,Mo,z,Be,To,la,Eo,Jo,Fe,jo,ia,zo,No,$o,Re,Ce,ca,Uo,xo,da,qo,Io,We,pa,Go,Lo,ha,Zo,Bo,fa,Fo,Ro,le,Se,Co,ua,Wo,So,B,Xe,Xo,ma,Vo,Ao,Ve,ga,Do,Po,ba,Yo,Ho,F,Ae,Qo,ka,Oo,Ko,De,_a,er,tr,ya,ar,Ka;return f=new He({}),pe=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5sbGJUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBObGxiVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyKSUwQXRva2VuaXplciglMjJIb3clMjB3YXMlMjB5b3VyJTIwZGF5JTNGJTIyKS5pbnB1dF9pZHMlMEElMEElMjMlMjAyJTNBJTIwJyUzQyUyRnMlM0UnJTBBJTIzJTIwMjU2MDQ3JTIwJTNBJTIwJ2VuZ19MYXRuJw==",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 Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5sbGJUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBObGxiVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyKSUwQXRva2VuaXplciglMjJIb3clMjB3YXMlMjB5b3VyJTIwZGF5JTNGJTIyKS5pbnB1dF9pZHM=",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 Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5sbGJUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBObGxiVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyJTJDJTIwbGVnYWN5X2JlaGF2aW91ciUzRFRydWUp",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>)`}}),ge=new He({}),ye=new He({}),we=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxMlNlcUxNLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyKSUwQSUwQWFydGljbGUlMjAlM0QlMjAlMjJVTiUyMENoaWVmJTIwc2F5cyUyMHRoZXJlJTIwaXMlMjBubyUyMG1pbGl0YXJ5JTIwc29sdXRpb24lMjBpbiUyMFN5cmlhJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKGFydGljbGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXRyYW5zbGF0ZWRfdG9rZW5zJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwKippbnB1dHMlMkMlMjBmb3JjZWRfYm9zX3Rva2VuX2lkJTNEdG9rZW5pemVyLmxhbmdfY29kZV90b19pZCU1QiUyMmZyYV9MYXRuJTIyJTVEJTJDJTIwbWF4X2xlbmd0aCUzRDMwJTBBKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUodHJhbnNsYXRlZF90b2tlbnMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVE",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>`}}),Me=new He({}),Te=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWNlYm9vayUyRm5sbGItMjAwLWRpc3RpbGxlZC02MDBNJTIyJTJDJTIwdXNlX2F1dGhfdG9rZW4lM0RUcnVlJTJDJTIwc3JjX2xhbmclM0QlMjJyb25fTGF0biUyMiUwQSklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZubGxiLTIwMC1kaXN0aWxsZWQtNjAwTSUyMiUyQyUyMHVzZV9hdXRoX3Rva2VuJTNEVHJ1ZSklMEElMEFhcnRpY2xlJTIwJTNEJTIwJTIyJUM1JTlFZWZ1bCUyME9OVSUyMHNwdW5lJTIwYyVDNCU4MyUyMG51JTIwZXhpc3QlQzQlODMlMjBvJTIwc29sdSVDNSVBM2llJTIwbWlsaXRhciVDNCU4MyUyMCVDMyVBRW4lMjBTaXJpYSUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihhcnRpY2xlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF0cmFuc2xhdGVkX3Rva2VucyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCUwQSUyMCUyMCUyMCUyMCoqaW5wdXRzJTJDJTIwZm9yY2VkX2Jvc190b2tlbl9pZCUzRHRva2VuaXplci5sYW5nX2NvZGVfdG9faWQlNUIlMjJkZXVfTGF0biUyMiU1RCUyQyUyMG1heF9sZW5ndGglM0QzMCUwQSklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKHRyYW5zbGF0ZWRfdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RA==",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`}}),Ee=new He({}),Je=new He({}),je=new Ye({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/main/src/transformers/models/nllb/tokenization_nllb.py#L49"}}),se=new Ul({props:{anchor:"transformers.NllbTokenizer.example",$$slots:{default:[Bl]},$$scope:{ctx:Oe}}}),Ne=new Ye({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/main/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>
`}}),Ie=new He({}),Ge=new Ye({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/main/src/transformers/models/nllb/tokenization_nllb_fast.py#L61"}}),re=new Ul({props:{anchor:"transformers.NllbTokenizerFast.example",$$slots:{default:[Fl]},$$scope:{ctx:Oe}}}),Be=new Ye({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/main/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>
`}}),Se=new Ye({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/main/src/transformers/models/nllb/tokenization_nllb_fast.py#L236",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Xe=new Ye({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/main/src/transformers/models/nllb/tokenization_nllb_fast.py#L291"}}),Ae=new Ye({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/main/src/transformers/models/nllb/tokenization_nllb_fast.py#L314"}}),{c(){m=n("meta"),N=c(),M=n("h1"),u=n("a"),j=n("span"),b(f.$$.fragment),E=c(),Et=n("span"),wn=r("NLLB"),wa=c(),de=n("p"),Jt=n("strong"),Mn=r("DISCLAIMER:"),Tn=r(" The default behaviour for the tokenizer has recently been fixed (and thus changed)!"),Ma=c(),H=n("p"),En=r("The previous version adds "),jt=n("code"),Jn=r("[self.eos_token_id, self.cur_lang_code]"),jn=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) :"),Ta=c(),Ke=n("p"),zt=n("em"),zn=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.`),Ea=c(),et=n("p"),Nn=r("Previous behaviour:"),Ja=c(),b(pe.$$.fragment),ja=c(),tt=n("p"),$n=r("New behaviour"),za=c(),b(he.$$.fragment),Na=c(),at=n("p"),Un=r("Enabling the old behaviour can be done as follows:"),$a=c(),b(fe.$$.fragment),Ua=c(),q=n("p"),xn=r("For more details, feel free to check the linked "),ue=n("a"),qn=r("PR"),In=r(" and "),me=n("a"),Gn=r("Issue"),Ln=r("."),xa=c(),C=n("h2"),Q=n("a"),Nt=n("span"),b(ge.$$.fragment),Zn=c(),$t=n("span"),Bn=r("Overview of NLLB"),qa=c(),O=n("p"),Fn=r("The NLLB model was presented in "),be=n("a"),Rn=r("No Language Left Behind: Scaling Human-Centered Machine Translation"),Cn=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.`),Ia=c(),nt=n("p"),Wn=r("The abstract of the paper is the following:"),Ga=c(),st=n("p"),Ut=n("em"),Sn=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.`),La=c(),ot=n("p"),Xn=r("This implementation contains the dense models available on release."),Za=c(),rt=n("p"),lt=n("strong"),Vn=r("The sparse model NLLB-MoE (Mixture of Expert) is now available! More details "),it=n("a"),An=r("here"),Ba=c(),I=n("p"),Dn=r("This model was contributed by "),ke=n("a"),Pn=r("Lysandre"),Yn=r(". The authors\u2019 code can be found "),_e=n("a"),Hn=r("here"),Qn=r("."),Fa=c(),W=n("h2"),K=n("a"),xt=n("span"),b(ye.$$.fragment),On=c(),qt=n("span"),Kn=r("Generating with NLLB"),Ra=c(),G=n("p"),es=r("While generating the target text set the "),It=n("code"),ts=r("forced_bos_token_id"),as=r(` to the target language id. The following
example shows how to translate English to French using the `),Gt=n("em"),ns=r("facebook/nllb-200-distilled-600M"),ss=r(" model."),Ca=c(),L=n("p"),os=r("Note that we\u2019re using the BCP-47 code for French "),Lt=n("code"),rs=r("fra_Latn"),ls=r(". See "),ve=n("a"),is=r("here"),cs=r(`
for the list of all BCP-47 in the Flores 200 dataset.`),Wa=c(),b(we.$$.fragment),Sa=c(),S=n("h3"),ee=n("a"),Zt=n("span"),b(Me.$$.fragment),ds=c(),Bt=n("span"),ps=r("Generating from any other language than English"),Xa=c(),Z=n("p"),hs=r("English ("),Ft=n("code"),fs=r("eng_Latn"),us=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 `),Rt=n("code"),ms=r("src_lang"),gs=r(" keyword argument of the tokenizer initialization."),Va=c(),ct=n("p"),bs=r("See example below for a translation from romanian to german:"),Aa=c(),b(Te.$$.fragment),Da=c(),X=n("h2"),te=n("a"),Ct=n("span"),b(Ee.$$.fragment),ks=c(),Wt=n("span"),_s=r("Documentation resources"),Pa=c(),ae=n("ul"),St=n("li"),dt=n("a"),ys=r("Translation task guide"),vs=c(),Xt=n("li"),pt=n("a"),ws=r("Summarization task guide"),Ya=c(),V=n("h2"),ne=n("a"),Vt=n("span"),b(Je.$$.fragment),Ms=c(),At=n("span"),Ts=r("NllbTokenizer"),Ha=c(),J=n("div"),b(je.$$.fragment),Es=c(),Dt=n("p"),Js=r("Construct an NLLB tokenizer."),js=c(),x=n("p"),zs=r("Adapted from "),ht=n("a"),Ns=r("RobertaTokenizer"),$s=r(" and "),ft=n("a"),Us=r("XLNetTokenizer"),xs=r(`. Based on
`),ze=n("a"),qs=r("SentencePiece"),Is=r("."),Gs=c(),A=n("p"),Ls=r("The tokenization method is "),Pt=n("code"),Zs=r("<tokens> <eos> <language code>"),Bs=r(" for source language documents, and "),Yt=n("code"),Fs=r("<language code> <tokens> <eos>"),Rs=r(" for target language documents."),Cs=c(),b(se.$$.fragment),Ws=c(),$=n("div"),b(Ne.$$.fragment),Ss=c(),$e=n("p"),Xs=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 `),Ht=n("code"),Vs=r("X"),As=r(" represents the sequence:"),Ds=c(),Ue=n("ul"),xe=n("li"),Qt=n("code"),Ps=r("input_ids"),Ys=r(" (for encoder) "),Ot=n("code"),Hs=r("X [eos, src_lang_code]"),Qs=c(),qe=n("li"),Kt=n("code"),Os=r("decoder_input_ids"),Ks=r(": (for decoder) "),ea=n("code"),eo=r("X [eos, tgt_lang_code]"),to=c(),ta=n("p"),ao=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Qa=c(),D=n("h2"),oe=n("a"),aa=n("span"),b(Ie.$$.fragment),no=c(),na=n("span"),so=r("NllbTokenizerFast"),Oa=c(),g=n("div"),b(Ge.$$.fragment),oo=c(),P=n("p"),ro=r("Construct a \u201Cfast\u201D NLLB tokenizer (backed by HuggingFace\u2019s "),sa=n("em"),lo=r("tokenizers"),io=r(` library). Based on
`),Le=n("a"),co=r("BPE"),po=r("."),ho=c(),Ze=n("p"),fo=r("This tokenizer inherits from "),ut=n("a"),uo=r("PreTrainedTokenizerFast"),mo=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),go=c(),Y=n("p"),bo=r("The tokenization method is "),oa=n("code"),ko=r("<tokens> <eos> <language code>"),_o=r(" for source language documents, and "),ra=n("code"),yo=r("<language code> <tokens> <eos>"),vo=r(" for target language documents."),wo=c(),b(re.$$.fragment),Mo=c(),z=n("div"),b(Be.$$.fragment),To=c(),la=n("p"),Eo=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.`),Jo=c(),Fe=n("p"),jo=r("An NLLB sequence has the following format, where "),ia=n("code"),zo=r("X"),No=r(" represents the sequence:"),$o=c(),Re=n("ul"),Ce=n("li"),ca=n("code"),Uo=r("input_ids"),xo=r(" (for encoder) "),da=n("code"),qo=r("X [eos, src_lang_code]"),Io=c(),We=n("li"),pa=n("code"),Go=r("decoder_input_ids"),Lo=r(": (for decoder) "),ha=n("code"),Zo=r("X [eos, tgt_lang_code]"),Bo=c(),fa=n("p"),Fo=r(`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Ro=c(),le=n("div"),b(Se.$$.fragment),Co=c(),ua=n("p"),Wo=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.`),So=c(),B=n("div"),b(Xe.$$.fragment),Xo=c(),ma=n("p"),Vo=r("Reset the special tokens to the source lang setting."),Ao=c(),Ve=n("ul"),ga=n("li"),Do=r("In legacy mode: No prefix and suffix=[eos, src_lang_code]."),Po=c(),ba=n("li"),Yo=r("In default mode: Prefix=[src_lang_code], suffix = [eos]"),Ho=c(),F=n("div"),b(Ae.$$.fragment),Qo=c(),ka=n("p"),Oo=r("Reset the special tokens to the target lang setting."),Ko=c(),De=n("ul"),_a=n("li"),er=r("In legacy mode: No prefix and suffix=[eos, tgt_lang_code]."),tr=c(),ya=n("li"),ar=r("In default mode: Prefix=[tgt_lang_code], suffix = [eos]"),this.h()},l(e){const i=Ll('[data-svelte="svelte-1phssyn"]',document.head);m=s(i,"META",{name:!0,content:!0}),i.forEach(a),N=d(e),M=s(e,"H1",{class:!0});var Pe=o(M);u=s(Pe,"A",{id:!0,class:!0,href:!0});var va=o(u);j=s(va,"SPAN",{});var or=o(j);k(f.$$.fragment,or),or.forEach(a),va.forEach(a),E=d(Pe),Et=s(Pe,"SPAN",{});var rr=o(Et);wn=l(rr,"NLLB"),rr.forEach(a),Pe.forEach(a),wa=d(e),de=s(e,"P",{});var nr=o(de);Jt=s(nr,"STRONG",{});var lr=o(Jt);Mn=l(lr,"DISCLAIMER:"),lr.forEach(a),Tn=l(nr," The default behaviour for the tokenizer has recently been fixed (and thus changed)!"),nr.forEach(a),Ma=d(e),H=s(e,"P",{});var en=o(H);En=l(en,"The previous version adds "),jt=s(en,"CODE",{});var ir=o(jt);Jn=l(ir,"[self.eos_token_id, self.cur_lang_code]"),ir.forEach(a),jn=l(en," 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) :"),en.forEach(a),Ta=d(e),Ke=s(e,"P",{});var cr=o(Ke);zt=s(cr,"EM",{});var dr=o(zt);zn=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(a),cr.forEach(a),Ea=d(e),et=s(e,"P",{});var pr=o(et);Nn=l(pr,"Previous behaviour:"),pr.forEach(a),Ja=d(e),k(pe.$$.fragment,e),ja=d(e),tt=s(e,"P",{});var hr=o(tt);$n=l(hr,"New behaviour"),hr.forEach(a),za=d(e),k(he.$$.fragment,e),Na=d(e),at=s(e,"P",{});var fr=o(at);Un=l(fr,"Enabling the old behaviour can be done as follows:"),fr.forEach(a),$a=d(e),k(fe.$$.fragment,e),Ua=d(e),q=s(e,"P",{});var mt=o(q);xn=l(mt,"For more details, feel free to check the linked "),ue=s(mt,"A",{href:!0,rel:!0});var ur=o(ue);qn=l(ur,"PR"),ur.forEach(a),In=l(mt," and "),me=s(mt,"A",{href:!0,rel:!0});var mr=o(me);Gn=l(mr,"Issue"),mr.forEach(a),Ln=l(mt,"."),mt.forEach(a),xa=d(e),C=s(e,"H2",{class:!0});var tn=o(C);Q=s(tn,"A",{id:!0,class:!0,href:!0});var gr=o(Q);Nt=s(gr,"SPAN",{});var br=o(Nt);k(ge.$$.fragment,br),br.forEach(a),gr.forEach(a),Zn=d(tn),$t=s(tn,"SPAN",{});var kr=o($t);Bn=l(kr,"Overview of NLLB"),kr.forEach(a),tn.forEach(a),qa=d(e),O=s(e,"P",{});var an=o(O);Fn=l(an,"The NLLB model was presented in "),be=s(an,"A",{href:!0,rel:!0});var _r=o(be);Rn=l(_r,"No Language Left Behind: Scaling Human-Centered Machine Translation"),_r.forEach(a),Cn=l(an,` 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.`),an.forEach(a),Ia=d(e),nt=s(e,"P",{});var yr=o(nt);Wn=l(yr,"The abstract of the paper is the following:"),yr.forEach(a),Ga=d(e),st=s(e,"P",{});var vr=o(st);Ut=s(vr,"EM",{});var wr=o(Ut);Sn=l(wr,`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.`),wr.forEach(a),vr.forEach(a),La=d(e),ot=s(e,"P",{});var Mr=o(ot);Xn=l(Mr,"This implementation contains the dense models available on release."),Mr.forEach(a),Za=d(e),rt=s(e,"P",{});var Tr=o(rt);lt=s(Tr,"STRONG",{});var sr=o(lt);Vn=l(sr,"The sparse model NLLB-MoE (Mixture of Expert) is now available! More details "),it=s(sr,"A",{href:!0});var Er=o(it);An=l(Er,"here"),Er.forEach(a),sr.forEach(a),Tr.forEach(a),Ba=d(e),I=s(e,"P",{});var gt=o(I);Dn=l(gt,"This model was contributed by "),ke=s(gt,"A",{href:!0,rel:!0});var Jr=o(ke);Pn=l(Jr,"Lysandre"),Jr.forEach(a),Yn=l(gt,". The authors\u2019 code can be found "),_e=s(gt,"A",{href:!0,rel:!0});var jr=o(_e);Hn=l(jr,"here"),jr.forEach(a),Qn=l(gt,"."),gt.forEach(a),Fa=d(e),W=s(e,"H2",{class:!0});var nn=o(W);K=s(nn,"A",{id:!0,class:!0,href:!0});var zr=o(K);xt=s(zr,"SPAN",{});var Nr=o(xt);k(ye.$$.fragment,Nr),Nr.forEach(a),zr.forEach(a),On=d(nn),qt=s(nn,"SPAN",{});var $r=o(qt);Kn=l($r,"Generating with NLLB"),$r.forEach(a),nn.forEach(a),Ra=d(e),G=s(e,"P",{});var bt=o(G);es=l(bt,"While generating the target text set the "),It=s(bt,"CODE",{});var Ur=o(It);ts=l(Ur,"forced_bos_token_id"),Ur.forEach(a),as=l(bt,` to the target language id. The following
example shows how to translate English to French using the `),Gt=s(bt,"EM",{});var xr=o(Gt);ns=l(xr,"facebook/nllb-200-distilled-600M"),xr.forEach(a),ss=l(bt," model."),bt.forEach(a),Ca=d(e),L=s(e,"P",{});var kt=o(L);os=l(kt,"Note that we\u2019re using the BCP-47 code for French "),Lt=s(kt,"CODE",{});var qr=o(Lt);rs=l(qr,"fra_Latn"),qr.forEach(a),ls=l(kt,". See "),ve=s(kt,"A",{href:!0,rel:!0});var Ir=o(ve);is=l(Ir,"here"),Ir.forEach(a),cs=l(kt,`
for the list of all BCP-47 in the Flores 200 dataset.`),kt.forEach(a),Wa=d(e),k(we.$$.fragment,e),Sa=d(e),S=s(e,"H3",{class:!0});var sn=o(S);ee=s(sn,"A",{id:!0,class:!0,href:!0});var Gr=o(ee);Zt=s(Gr,"SPAN",{});var Lr=o(Zt);k(Me.$$.fragment,Lr),Lr.forEach(a),Gr.forEach(a),ds=d(sn),Bt=s(sn,"SPAN",{});var Zr=o(Bt);ps=l(Zr,"Generating from any other language than English"),Zr.forEach(a),sn.forEach(a),Xa=d(e),Z=s(e,"P",{});var _t=o(Z);hs=l(_t,"English ("),Ft=s(_t,"CODE",{});var Br=o(Ft);fs=l(Br,"eng_Latn"),Br.forEach(a),us=l(_t,`) 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 `),Rt=s(_t,"CODE",{});var Fr=o(Rt);ms=l(Fr,"src_lang"),Fr.forEach(a),gs=l(_t," keyword argument of the tokenizer initialization."),_t.forEach(a),Va=d(e),ct=s(e,"P",{});var Rr=o(ct);bs=l(Rr,"See example below for a translation from romanian to german:"),Rr.forEach(a),Aa=d(e),k(Te.$$.fragment,e),Da=d(e),X=s(e,"H2",{class:!0});var on=o(X);te=s(on,"A",{id:!0,class:!0,href:!0});var Cr=o(te);Ct=s(Cr,"SPAN",{});var Wr=o(Ct);k(Ee.$$.fragment,Wr),Wr.forEach(a),Cr.forEach(a),ks=d(on),Wt=s(on,"SPAN",{});var Sr=o(Wt);_s=l(Sr,"Documentation resources"),Sr.forEach(a),on.forEach(a),Pa=d(e),ae=s(e,"UL",{});var rn=o(ae);St=s(rn,"LI",{});var Xr=o(St);dt=s(Xr,"A",{href:!0});var Vr=o(dt);ys=l(Vr,"Translation task guide"),Vr.forEach(a),Xr.forEach(a),vs=d(rn),Xt=s(rn,"LI",{});var Ar=o(Xt);pt=s(Ar,"A",{href:!0});var Dr=o(pt);ws=l(Dr,"Summarization task guide"),Dr.forEach(a),Ar.forEach(a),rn.forEach(a),Ya=d(e),V=s(e,"H2",{class:!0});var ln=o(V);ne=s(ln,"A",{id:!0,class:!0,href:!0});var Pr=o(ne);Vt=s(Pr,"SPAN",{});var Yr=o(Vt);k(Je.$$.fragment,Yr),Yr.forEach(a),Pr.forEach(a),Ms=d(ln),At=s(ln,"SPAN",{});var Hr=o(At);Ts=l(Hr,"NllbTokenizer"),Hr.forEach(a),ln.forEach(a),Ha=d(e),J=s(e,"DIV",{class:!0});var U=o(J);k(je.$$.fragment,U),Es=d(U),Dt=s(U,"P",{});var Qr=o(Dt);Js=l(Qr,"Construct an NLLB tokenizer."),Qr.forEach(a),js=d(U),x=s(U,"P",{});var ie=o(x);zs=l(ie,"Adapted from "),ht=s(ie,"A",{href:!0});var Or=o(ht);Ns=l(Or,"RobertaTokenizer"),Or.forEach(a),$s=l(ie," and "),ft=s(ie,"A",{href:!0});var Kr=o(ft);Us=l(Kr,"XLNetTokenizer"),Kr.forEach(a),xs=l(ie,`. Based on
`),ze=s(ie,"A",{href:!0,rel:!0});var el=o(ze);qs=l(el,"SentencePiece"),el.forEach(a),Is=l(ie,"."),ie.forEach(a),Gs=d(U),A=s(U,"P",{});var yt=o(A);Ls=l(yt,"The tokenization method is "),Pt=s(yt,"CODE",{});var tl=o(Pt);Zs=l(tl,"<tokens> <eos> <language code>"),tl.forEach(a),Bs=l(yt," for source language documents, and "),Yt=s(yt,"CODE",{});var al=o(Yt);Fs=l(al,"<language code> <tokens> <eos>"),al.forEach(a),Rs=l(yt," for target language documents."),yt.forEach(a),Cs=d(U),k(se.$$.fragment,U),Ws=d(U),$=s(U,"DIV",{class:!0});var ce=o($);k(Ne.$$.fragment,ce),Ss=d(ce),$e=s(ce,"P",{});var cn=o($e);Xs=l(cn,`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 `),Ht=s(cn,"CODE",{});var nl=o(Ht);Vs=l(nl,"X"),nl.forEach(a),As=l(cn," represents the sequence:"),cn.forEach(a),Ds=d(ce),Ue=s(ce,"UL",{});var dn=o(Ue);xe=s(dn,"LI",{});var pn=o(xe);Qt=s(pn,"CODE",{});var sl=o(Qt);Ps=l(sl,"input_ids"),sl.forEach(a),Ys=l(pn," (for encoder) "),Ot=s(pn,"CODE",{});var ol=o(Ot);Hs=l(ol,"X [eos, src_lang_code]"),ol.forEach(a),pn.forEach(a),Qs=d(dn),qe=s(dn,"LI",{});var hn=o(qe);Kt=s(hn,"CODE",{});var rl=o(Kt);Os=l(rl,"decoder_input_ids"),rl.forEach(a),Ks=l(hn,": (for decoder) "),ea=s(hn,"CODE",{});var ll=o(ea);eo=l(ll,"X [eos, tgt_lang_code]"),ll.forEach(a),hn.forEach(a),dn.forEach(a),to=d(ce),ta=s(ce,"P",{});var il=o(ta);ao=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(a),ce.forEach(a),U.forEach(a),Qa=d(e),D=s(e,"H2",{class:!0});var fn=o(D);oe=s(fn,"A",{id:!0,class:!0,href:!0});var cl=o(oe);aa=s(cl,"SPAN",{});var dl=o(aa);k(Ie.$$.fragment,dl),dl.forEach(a),cl.forEach(a),no=d(fn),na=s(fn,"SPAN",{});var pl=o(na);so=l(pl,"NllbTokenizerFast"),pl.forEach(a),fn.forEach(a),Oa=d(e),g=s(e,"DIV",{class:!0});var T=o(g);k(Ge.$$.fragment,T),oo=d(T),P=s(T,"P",{});var vt=o(P);ro=l(vt,"Construct a \u201Cfast\u201D NLLB tokenizer (backed by HuggingFace\u2019s "),sa=s(vt,"EM",{});var hl=o(sa);lo=l(hl,"tokenizers"),hl.forEach(a),io=l(vt,` library). Based on
`),Le=s(vt,"A",{href:!0,rel:!0});var fl=o(Le);co=l(fl,"BPE"),fl.forEach(a),po=l(vt,"."),vt.forEach(a),ho=d(T),Ze=s(T,"P",{});var un=o(Ze);fo=l(un,"This tokenizer inherits from "),ut=s(un,"A",{href:!0});var ul=o(ut);uo=l(ul,"PreTrainedTokenizerFast"),ul.forEach(a),mo=l(un,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),un.forEach(a),go=d(T),Y=s(T,"P",{});var wt=o(Y);bo=l(wt,"The tokenization method is "),oa=s(wt,"CODE",{});var ml=o(oa);ko=l(ml,"<tokens> <eos> <language code>"),ml.forEach(a),_o=l(wt," for source language documents, and "),ra=s(wt,"CODE",{});var gl=o(ra);yo=l(gl,"<language code> <tokens> <eos>"),gl.forEach(a),vo=l(wt," for target language documents."),wt.forEach(a),wo=d(T),k(re.$$.fragment,T),Mo=d(T),z=s(T,"DIV",{class:!0});var R=o(z);k(Be.$$.fragment,R),To=d(R),la=s(R,"P",{});var bl=o(la);Eo=l(bl,`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.`),bl.forEach(a),Jo=d(R),Fe=s(R,"P",{});var mn=o(Fe);jo=l(mn,"An NLLB sequence has the following format, where "),ia=s(mn,"CODE",{});var kl=o(ia);zo=l(kl,"X"),kl.forEach(a),No=l(mn," represents the sequence:"),mn.forEach(a),$o=d(R),Re=s(R,"UL",{});var gn=o(Re);Ce=s(gn,"LI",{});var bn=o(Ce);ca=s(bn,"CODE",{});var _l=o(ca);Uo=l(_l,"input_ids"),_l.forEach(a),xo=l(bn," (for encoder) "),da=s(bn,"CODE",{});var yl=o(da);qo=l(yl,"X [eos, src_lang_code]"),yl.forEach(a),bn.forEach(a),Io=d(gn),We=s(gn,"LI",{});var kn=o(We);pa=s(kn,"CODE",{});var vl=o(pa);Go=l(vl,"decoder_input_ids"),vl.forEach(a),Lo=l(kn,": (for decoder) "),ha=s(kn,"CODE",{});var wl=o(ha);Zo=l(wl,"X [eos, tgt_lang_code]"),wl.forEach(a),kn.forEach(a),gn.forEach(a),Bo=d(R),fa=s(R,"P",{});var Ml=o(fa);Fo=l(Ml,`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`),Ml.forEach(a),R.forEach(a),Ro=d(T),le=s(T,"DIV",{class:!0});var _n=o(le);k(Se.$$.fragment,_n),Co=d(_n),ua=s(_n,"P",{});var Tl=o(ua);Wo=l(Tl,`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.`),Tl.forEach(a),_n.forEach(a),So=d(T),B=s(T,"DIV",{class:!0});var Mt=o(B);k(Xe.$$.fragment,Mt),Xo=d(Mt),ma=s(Mt,"P",{});var El=o(ma);Vo=l(El,"Reset the special tokens to the source lang setting."),El.forEach(a),Ao=d(Mt),Ve=s(Mt,"UL",{});var yn=o(Ve);ga=s(yn,"LI",{});var Jl=o(ga);Do=l(Jl,"In legacy mode: No prefix and suffix=[eos, src_lang_code]."),Jl.forEach(a),Po=d(yn),ba=s(yn,"LI",{});var jl=o(ba);Yo=l(jl,"In default mode: Prefix=[src_lang_code], suffix = [eos]"),jl.forEach(a),yn.forEach(a),Mt.forEach(a),Ho=d(T),F=s(T,"DIV",{class:!0});var Tt=o(F);k(Ae.$$.fragment,Tt),Qo=d(Tt),ka=s(Tt,"P",{});var zl=o(ka);Oo=l(zl,"Reset the special tokens to the target lang setting."),zl.forEach(a),Ko=d(Tt),De=s(Tt,"UL",{});var vn=o(De);_a=s(vn,"LI",{});var Nl=o(_a);er=l(Nl,"In legacy mode: No prefix and suffix=[eos, tgt_lang_code]."),Nl.forEach(a),tr=d(vn),ya=s(vn,"LI",{});var $l=o(ya);ar=l($l,"In default mode: Prefix=[tgt_lang_code], suffix = [eos]"),$l.forEach(a),vn.forEach(a),Tt.forEach(a),T.forEach(a),this.h()},h(){h(m,"name","hf:doc:metadata"),h(m,"content",JSON.stringify(Cl)),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(M,"class","relative group"),h(ue,"href","https://github.com/huggingface/transformers/pull/22313"),h(ue,"rel","nofollow"),h(me,"href","https://github.com/huggingface/transformers/issues/19943"),h(me,"rel","nofollow"),h(Q,"id","overview-of-nllb"),h(Q,"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(Q,"href","#overview-of-nllb"),h(C,"class","relative group"),h(be,"href","https://arxiv.org/abs/2207.04672"),h(be,"rel","nofollow"),h(it,"href","nllb-moe"),h(ke,"href","https://huggingface.co/lysandre"),h(ke,"rel","nofollow"),h(_e,"href","https://github.com/facebookresearch/fairseq/tree/nllb"),h(_e,"rel","nofollow"),h(K,"id","generating-with-nllb"),h(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(K,"href","#generating-with-nllb"),h(W,"class","relative group"),h(ve,"href","https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200"),h(ve,"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(S,"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(X,"class","relative group"),h(dt,"href","../tasks/translation"),h(pt,"href","../tasks/summarization"),h(ne,"id","nllbtokenizer"),h(ne,"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(ne,"href","#nllbtokenizer"),h(V,"class","relative group"),h(ht,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer"),h(ft,"href","/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer"),h(ze,"href","https://github.com/google/sentencepiece"),h(ze,"rel","nofollow"),h($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(J,"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(D,"class","relative group"),h(Le,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),h(Le,"rel","nofollow"),h(ut,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(z,"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(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(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(g,"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,m),p(e,N,i),p(e,M,i),t(M,u),t(u,j),_(f,j,null),t(M,E),t(M,Et),t(Et,wn),p(e,wa,i),p(e,de,i),t(de,Jt),t(Jt,Mn),t(de,Tn),p(e,Ma,i),p(e,H,i),t(H,En),t(H,jt),t(jt,Jn),t(H,jn),p(e,Ta,i),p(e,Ke,i),t(Ke,zt),t(zt,zn),p(e,Ea,i),p(e,et,i),t(et,Nn),p(e,Ja,i),_(pe,e,i),p(e,ja,i),p(e,tt,i),t(tt,$n),p(e,za,i),_(he,e,i),p(e,Na,i),p(e,at,i),t(at,Un),p(e,$a,i),_(fe,e,i),p(e,Ua,i),p(e,q,i),t(q,xn),t(q,ue),t(ue,qn),t(q,In),t(q,me),t(me,Gn),t(q,Ln),p(e,xa,i),p(e,C,i),t(C,Q),t(Q,Nt),_(ge,Nt,null),t(C,Zn),t(C,$t),t($t,Bn),p(e,qa,i),p(e,O,i),t(O,Fn),t(O,be),t(be,Rn),t(O,Cn),p(e,Ia,i),p(e,nt,i),t(nt,Wn),p(e,Ga,i),p(e,st,i),t(st,Ut),t(Ut,Sn),p(e,La,i),p(e,ot,i),t(ot,Xn),p(e,Za,i),p(e,rt,i),t(rt,lt),t(lt,Vn),t(lt,it),t(it,An),p(e,Ba,i),p(e,I,i),t(I,Dn),t(I,ke),t(ke,Pn),t(I,Yn),t(I,_e),t(_e,Hn),t(I,Qn),p(e,Fa,i),p(e,W,i),t(W,K),t(K,xt),_(ye,xt,null),t(W,On),t(W,qt),t(qt,Kn),p(e,Ra,i),p(e,G,i),t(G,es),t(G,It),t(It,ts),t(G,as),t(G,Gt),t(Gt,ns),t(G,ss),p(e,Ca,i),p(e,L,i),t(L,os),t(L,Lt),t(Lt,rs),t(L,ls),t(L,ve),t(ve,is),t(L,cs),p(e,Wa,i),_(we,e,i),p(e,Sa,i),p(e,S,i),t(S,ee),t(ee,Zt),_(Me,Zt,null),t(S,ds),t(S,Bt),t(Bt,ps),p(e,Xa,i),p(e,Z,i),t(Z,hs),t(Z,Ft),t(Ft,fs),t(Z,us),t(Z,Rt),t(Rt,ms),t(Z,gs),p(e,Va,i),p(e,ct,i),t(ct,bs),p(e,Aa,i),_(Te,e,i),p(e,Da,i),p(e,X,i),t(X,te),t(te,Ct),_(Ee,Ct,null),t(X,ks),t(X,Wt),t(Wt,_s),p(e,Pa,i),p(e,ae,i),t(ae,St),t(St,dt),t(dt,ys),t(ae,vs),t(ae,Xt),t(Xt,pt),t(pt,ws),p(e,Ya,i),p(e,V,i),t(V,ne),t(ne,Vt),_(Je,Vt,null),t(V,Ms),t(V,At),t(At,Ts),p(e,Ha,i),p(e,J,i),_(je,J,null),t(J,Es),t(J,Dt),t(Dt,Js),t(J,js),t(J,x),t(x,zs),t(x,ht),t(ht,Ns),t(x,$s),t(x,ft),t(ft,Us),t(x,xs),t(x,ze),t(ze,qs),t(x,Is),t(J,Gs),t(J,A),t(A,Ls),t(A,Pt),t(Pt,Zs),t(A,Bs),t(A,Yt),t(Yt,Fs),t(A,Rs),t(J,Cs),_(se,J,null),t(J,Ws),t(J,$),_(Ne,$,null),t($,Ss),t($,$e),t($e,Xs),t($e,Ht),t(Ht,Vs),t($e,As),t($,Ds),t($,Ue),t(Ue,xe),t(xe,Qt),t(Qt,Ps),t(xe,Ys),t(xe,Ot),t(Ot,Hs),t(Ue,Qs),t(Ue,qe),t(qe,Kt),t(Kt,Os),t(qe,Ks),t(qe,ea),t(ea,eo),t($,to),t($,ta),t(ta,ao),p(e,Qa,i),p(e,D,i),t(D,oe),t(oe,aa),_(Ie,aa,null),t(D,no),t(D,na),t(na,so),p(e,Oa,i),p(e,g,i),_(Ge,g,null),t(g,oo),t(g,P),t(P,ro),t(P,sa),t(sa,lo),t(P,io),t(P,Le),t(Le,co),t(P,po),t(g,ho),t(g,Ze),t(Ze,fo),t(Ze,ut),t(ut,uo),t(Ze,mo),t(g,go),t(g,Y),t(Y,bo),t(Y,oa),t(oa,ko),t(Y,_o),t(Y,ra),t(ra,yo),t(Y,vo),t(g,wo),_(re,g,null),t(g,Mo),t(g,z),_(Be,z,null),t(z,To),t(z,la),t(la,Eo),t(z,Jo),t(z,Fe),t(Fe,jo),t(Fe,ia),t(ia,zo),t(Fe,No),t(z,$o),t(z,Re),t(Re,Ce),t(Ce,ca),t(ca,Uo),t(Ce,xo),t(Ce,da),t(da,qo),t(Re,Io),t(Re,We),t(We,pa),t(pa,Go),t(We,Lo),t(We,ha),t(ha,Zo),t(z,Bo),t(z,fa),t(fa,Fo),t(g,Ro),t(g,le),_(Se,le,null),t(le,Co),t(le,ua),t(ua,Wo),t(g,So),t(g,B),_(Xe,B,null),t(B,Xo),t(B,ma),t(ma,Vo),t(B,Ao),t(B,Ve),t(Ve,ga),t(ga,Do),t(Ve,Po),t(Ve,ba),t(ba,Yo),t(g,Ho),t(g,F),_(Ae,F,null),t(F,Qo),t(F,ka),t(ka,Oo),t(F,Ko),t(F,De),t(De,_a),t(_a,er),t(De,tr),t(De,ya),t(ya,ar),Ka=!0},p(e,[i]){const Pe={};i&2&&(Pe.$$scope={dirty:i,ctx:e}),se.$set(Pe);const va={};i&2&&(va.$$scope={dirty:i,ctx:e}),re.$set(va)},i(e){Ka||(y(f.$$.fragment,e),y(pe.$$.fragment,e),y(he.$$.fragment,e),y(fe.$$.fragment,e),y(ge.$$.fragment,e),y(ye.$$.fragment,e),y(we.$$.fragment,e),y(Me.$$.fragment,e),y(Te.$$.fragment,e),y(Ee.$$.fragment,e),y(Je.$$.fragment,e),y(je.$$.fragment,e),y(se.$$.fragment,e),y(Ne.$$.fragment,e),y(Ie.$$.fragment,e),y(Ge.$$.fragment,e),y(re.$$.fragment,e),y(Be.$$.fragment,e),y(Se.$$.fragment,e),y(Xe.$$.fragment,e),y(Ae.$$.fragment,e),Ka=!0)},o(e){v(f.$$.fragment,e),v(pe.$$.fragment,e),v(he.$$.fragment,e),v(fe.$$.fragment,e),v(ge.$$.fragment,e),v(ye.$$.fragment,e),v(we.$$.fragment,e),v(Me.$$.fragment,e),v(Te.$$.fragment,e),v(Ee.$$.fragment,e),v(Je.$$.fragment,e),v(je.$$.fragment,e),v(se.$$.fragment,e),v(Ne.$$.fragment,e),v(Ie.$$.fragment,e),v(Ge.$$.fragment,e),v(re.$$.fragment,e),v(Be.$$.fragment,e),v(Se.$$.fragment,e),v(Xe.$$.fragment,e),v(Ae.$$.fragment,e),Ka=!1},d(e){a(m),e&&a(N),e&&a(M),w(f),e&&a(wa),e&&a(de),e&&a(Ma),e&&a(H),e&&a(Ta),e&&a(Ke),e&&a(Ea),e&&a(et),e&&a(Ja),w(pe,e),e&&a(ja),e&&a(tt),e&&a(za),w(he,e),e&&a(Na),e&&a(at),e&&a($a),w(fe,e),e&&a(Ua),e&&a(q),e&&a(xa),e&&a(C),w(ge),e&&a(qa),e&&a(O),e&&a(Ia),e&&a(nt),e&&a(Ga),e&&a(st),e&&a(La),e&&a(ot),e&&a(Za),e&&a(rt),e&&a(Ba),e&&a(I),e&&a(Fa),e&&a(W),w(ye),e&&a(Ra),e&&a(G),e&&a(Ca),e&&a(L),e&&a(Wa),w(we,e),e&&a(Sa),e&&a(S),w(Me),e&&a(Xa),e&&a(Z),e&&a(Va),e&&a(ct),e&&a(Aa),w(Te,e),e&&a(Da),e&&a(X),w(Ee),e&&a(Pa),e&&a(ae),e&&a(Ya),e&&a(V),w(Je),e&&a(Ha),e&&a(J),w(je),w(se),w(Ne),e&&a(Qa),e&&a(D),w(Ie),e&&a(Oa),e&&a(g),w(Ge),w(re),w(Be),w(Se),w(Xe),w(Ae)}}}const Cl={local:"transformers.NllbTokenizer",title:"NLLB"};function Wl(Oe){return Zl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pl extends ql{constructor(m){super();Il(this,m,Wl,Rl,Gl,{})}}export{Pl as default,Cl as metadata};
