import{s as Gn,o as Zn,n as Ln}from"../chunks/scheduler.9bc65507.js";import{S as In,i as Wn,g as r,s as a,r as g,m as Nn,A as Fn,h as i,f as n,c as o,j as C,u,x as c,n as qn,k as L,y as l,a as s,v as h,d as f,t as b,w as k}from"../chunks/index.707bf1b6.js";import{D as _e}from"../chunks/Docstring.17db21ae.js";import{C as Me}from"../chunks/CodeBlock.54a9f38d.js";import{E as Cn}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as ye}from"../chunks/Heading.342b1fa6.js";function Rn(Te){let d,z="Examples:",w,_,M;return _=new Me({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>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=z,w=a(),g(_.$$.fragment)},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=z),w=o(p),u(_.$$.fragment,p)},m(p,v){s(p,d,v),s(p,w,v),h(_,p,v),M=!0},p:Ln,i(p){M||(f(_.$$.fragment,p),M=!0)},o(p){b(_.$$.fragment,p),M=!1},d(p){p&&(n(d),n(w)),k(_,p)}}}function Vn(Te){let d,z="Examples:",w,_,M;return _=new Me({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>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=z,w=a(),g(_.$$.fragment)},l(p){d=i(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=z),w=o(p),u(_.$$.fragment,p)},m(p,v){s(p,d,v),s(p,w,v),h(_,p,v),M=!0},p:Ln,i(p){M||(f(_.$$.fragment,p),M=!0)},o(p){b(_.$$.fragment,p),M=!1},d(p){p&&(n(d),n(w)),k(_,p)}}}function Xn(Te){let d,z,w,_,M,p,v,Dt="<strong>DISCLAIMER:</strong> The default behaviour for the tokenizer has recently been fixed (and thus changed)!",He,W,Pt="The previous version adds <code>[self.eos_token_id, self.cur_lang_code]</code> 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) :",Ee,F,At=`<em>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.</em>`,Se,R,Qt="Previous behaviour:",Ye,V,De,X,Ot="New behaviour",Pe,B,Ae,H,Kt="Enabling the old behaviour can be done as follows:",Qe,E,Oe,S,en='For more details, feel free to check the linked <a href="https://github.com/huggingface/transformers/pull/22313" rel="nofollow">PR</a> and <a href="https://github.com/huggingface/transformers/issues/19943" rel="nofollow">Issue</a>.',Ke,Y,et,D,tn=`The NLLB model was presented in <a href="https://arxiv.org/abs/2207.04672" rel="nofollow">No Language Left Behind: Scaling Human-Centered Machine Translation</a> by Marta R. Costa-jussà, James Cross, Onur Çelebi,
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án, Philipp Koehn, Alexandre Mourachko, Christophe Ropers,
Safiyyah Saleem, Holger Schwenk, and Jeff Wang.`,tt,P,nn="The abstract of the paper is the following:",nt,A,sn=`<em>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.</em>`,st,Q,an="This implementation contains the dense models available on release.",at,O,on='<strong>The sparse model NLLB-MoE (Mixture of Expert) is now available! More details <a href="nllb-moe">here</a></strong>',ot,K,ln='This model was contributed by <a href="https://huggingface.co/lysandre" rel="nofollow">Lysandre</a>. The authors’ code can be found <a href="https://github.com/facebookresearch/fairseq/tree/nllb" rel="nofollow">here</a>.',lt,ee,rt,te,rn=`While generating the target text set the <code>forced_bos_token_id</code> to the target language id. The following
example shows how to translate English to French using the <em>facebook/nllb-200-distilled-600M</em> model.`,it,ne,cn=`Note that we’re using the BCP-47 code for French <code>fra_Latn</code>. See <a href="https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200" rel="nofollow">here</a>
for the list of all BCP-47 in the Flores 200 dataset.`,ct,se,pt,ae,dt,oe,pn=`English (<code>eng_Latn</code>) is set as the default language from which to translate. In order to specify that you’d like to translate from a different language,
you should specify the BCP-47 code in the <code>src_lang</code> keyword argument of the tokenizer initialization.`,mt,le,dn="See example below for a translation from romanian to german:",gt,re,ut,ie,ht,ce,mn='<li><a href="../tasks/translation">Translation task guide</a></li> <li><a href="../tasks/summarization">Summarization task guide</a></li>',ft,pe,bt,T,de,wt,we,gn="Construct an NLLB tokenizer.",vt,ve,un=`Adapted from <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer">XLNetTokenizer</a>. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,xt,xe,hn="The tokenization method is <code>&lt;tokens&gt; &lt;eos&gt; &lt;language code&gt;</code> for source language documents, and `&lt;language code&gt;",jt,G,Jt,J,me,$t,je,fn=`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 <code>X</code> represents the sequence:`,zt,Je,bn="<li><code>input_ids</code> (for encoder) <code>X [eos, src_lang_code]</code></li> <li><code>decoder_input_ids</code>: (for decoder) <code>X [eos, tgt_lang_code]</code></li>",Ut,$e,kn=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,kt,ge,_t,m,ue,Nt,ze,_n=`Construct a “fast” NLLB tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on
<a href="https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models" rel="nofollow">BPE</a>.`,qt,Ue,yn=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Ct,Ne,Mn="The tokenization method is <code>&lt;tokens&gt; &lt;eos&gt; &lt;language code&gt;</code> for source language documents, and `&lt;language code&gt;",Lt,Z,Gt,j,he,Zt,qe,Tn=`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.`,It,Ce,wn="An NLLB sequence has the following format, where <code>X</code> represents the sequence:",Wt,Le,vn="<li><code>input_ids</code> (for encoder) <code>X [eos, src_lang_code]</code></li> <li><code>decoder_input_ids</code>: (for decoder) <code>X [eos, tgt_lang_code]</code></li>",Ft,Ge,xn=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,Rt,I,fe,Vt,Ze,jn=`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.`,Xt,U,be,Bt,Ie,Jn="Reset the special tokens to the source lang setting.",Ht,We,$n="<li>In legacy mode: No prefix and suffix=[eos, src_lang_code].</li> <li>In default mode: Prefix=[src_lang_code], suffix = [eos]</li>",Et,N,ke,St,Fe,zn="Reset the special tokens to the target lang setting.",Yt,Re,Un="<li>In legacy mode: No prefix and suffix=[eos, tgt_lang_code].</li> <li>In default mode: Prefix=[tgt_lang_code], suffix = [eos]</li>",yt,Be,Mt;return M=new ye({props:{title:"NLLB",local:"transformers.NllbTokenizer",headingTag:"h1"}}),V=new Me({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>`,wrap:!1}}),B=new Me({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>]`,wrap:!1}}),E=new Me({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>)`,wrap:!1}}),Y=new ye({props:{title:"Overview of NLLB",local:"overview-of-nllb",headingTag:"h2"}}),ee=new ye({props:{title:"Generating with NLLB",local:"generating-with-nllb",headingTag:"h2"}}),se=new Me({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>`,wrap:!1}}),ae=new ye({props:{title:"Generating from any other language than English",local:"generating-from-any-other-language-than-english",headingTag:"h3"}}),re=new Me({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;Şeful ONU spune că nu există o soluţie militară în 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ärische Lösung <span class="hljs-keyword">in</span> Syrien`,wrap:!1}}),ie=new ye({props:{title:"Documentation resources",local:"documentation-resources",headingTag:"h2"}}),pe=new ye({props:{title:"NllbTokenizer",local:"nllbtokenizer",headingTag:"h2"}}),de=new _e({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"}}),G=new Cn({props:{anchor:"transformers.NllbTokenizer.example",$$slots:{default:[Rn]},$$scope:{ctx:Te}}}),me=new _e({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#L267",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),ge=new ye({props:{title:"NllbTokenizerFast",local:"nllbtokenizerfast",headingTag:"h2"}}),ue=new _e({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"}}),Z=new Cn({props:{anchor:"transformers.NllbTokenizerFast.example",$$slots:{default:[Vn]},$$scope:{ctx:Te}}}),he=new _e({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#L210",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),fe=new _e({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#L239",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),be=new _e({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#L294"}}),ke=new _e({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#L317"}}),{c(){d=r("meta"),z=a(),w=r("p"),_=a(),g(M.$$.fragment),p=a(),v=r("p"),v.innerHTML=Dt,He=a(),W=r("p"),W.innerHTML=Pt,Ee=a(),F=r("p"),F.innerHTML=At,Se=a(),R=r("p"),R.textContent=Qt,Ye=a(),g(V.$$.fragment),De=a(),X=r("p"),X.textContent=Ot,Pe=a(),g(B.$$.fragment),Ae=a(),H=r("p"),H.textContent=Kt,Qe=a(),g(E.$$.fragment),Oe=a(),S=r("p"),S.innerHTML=en,Ke=a(),g(Y.$$.fragment),et=a(),D=r("p"),D.innerHTML=tn,tt=a(),P=r("p"),P.textContent=nn,nt=a(),A=r("p"),A.innerHTML=sn,st=a(),Q=r("p"),Q.textContent=an,at=a(),O=r("p"),O.innerHTML=on,ot=a(),K=r("p"),K.innerHTML=ln,lt=a(),g(ee.$$.fragment),rt=a(),te=r("p"),te.innerHTML=rn,it=a(),ne=r("p"),ne.innerHTML=cn,ct=a(),g(se.$$.fragment),pt=a(),g(ae.$$.fragment),dt=a(),oe=r("p"),oe.innerHTML=pn,mt=a(),le=r("p"),le.textContent=dn,gt=a(),g(re.$$.fragment),ut=a(),g(ie.$$.fragment),ht=a(),ce=r("ul"),ce.innerHTML=mn,ft=a(),g(pe.$$.fragment),bt=a(),T=r("div"),g(de.$$.fragment),wt=a(),we=r("p"),we.textContent=gn,vt=a(),ve=r("p"),ve.innerHTML=un,xt=a(),xe=r("p"),xe.innerHTML=hn,jt=Nn(`
<tokens> <eos>\` for target language documents.
`),g(G.$$.fragment),Jt=a(),J=r("div"),g(me.$$.fragment),$t=a(),je=r("p"),je.innerHTML=fn,zt=a(),Je=r("ul"),Je.innerHTML=bn,Ut=a(),$e=r("p"),$e.textContent=kn,kt=a(),g(ge.$$.fragment),_t=a(),m=r("div"),g(ue.$$.fragment),Nt=a(),ze=r("p"),ze.innerHTML=_n,qt=a(),Ue=r("p"),Ue.innerHTML=yn,Ct=a(),Ne=r("p"),Ne.innerHTML=Mn,Lt=Nn(`
<tokens> <eos>\` for target language documents.
`),g(Z.$$.fragment),Gt=a(),j=r("div"),g(he.$$.fragment),Zt=a(),qe=r("p"),qe.textContent=Tn,It=a(),Ce=r("p"),Ce.innerHTML=wn,Wt=a(),Le=r("ul"),Le.innerHTML=vn,Ft=a(),Ge=r("p"),Ge.textContent=xn,Rt=a(),I=r("div"),g(fe.$$.fragment),Vt=a(),Ze=r("p"),Ze.textContent=jn,Xt=a(),U=r("div"),g(be.$$.fragment),Bt=a(),Ie=r("p"),Ie.textContent=Jn,Ht=a(),We=r("ul"),We.innerHTML=$n,Et=a(),N=r("div"),g(ke.$$.fragment),St=a(),Fe=r("p"),Fe.textContent=zn,Yt=a(),Re=r("ul"),Re.innerHTML=Un,yt=a(),Be=r("p"),this.h()},l(e){const t=Fn("svelte-u9bgzb",document.head);d=i(t,"META",{name:!0,content:!0}),t.forEach(n),z=o(e),w=i(e,"P",{}),C(w).forEach(n),_=o(e),u(M.$$.fragment,e),p=o(e),v=i(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-lwvup"&&(v.innerHTML=Dt),He=o(e),W=i(e,"P",{"data-svelte-h":!0}),c(W)!=="svelte-7ixket"&&(W.innerHTML=Pt),Ee=o(e),F=i(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-vrv0c7"&&(F.innerHTML=At),Se=o(e),R=i(e,"P",{"data-svelte-h":!0}),c(R)!=="svelte-vmuleo"&&(R.textContent=Qt),Ye=o(e),u(V.$$.fragment,e),De=o(e),X=i(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-1qx2sah"&&(X.textContent=Ot),Pe=o(e),u(B.$$.fragment,e),Ae=o(e),H=i(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-obd9iw"&&(H.textContent=Kt),Qe=o(e),u(E.$$.fragment,e),Oe=o(e),S=i(e,"P",{"data-svelte-h":!0}),c(S)!=="svelte-ib1bh"&&(S.innerHTML=en),Ke=o(e),u(Y.$$.fragment,e),et=o(e),D=i(e,"P",{"data-svelte-h":!0}),c(D)!=="svelte-12x4cpm"&&(D.innerHTML=tn),tt=o(e),P=i(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-wu27l3"&&(P.textContent=nn),nt=o(e),A=i(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-1j7uypk"&&(A.innerHTML=sn),st=o(e),Q=i(e,"P",{"data-svelte-h":!0}),c(Q)!=="svelte-1ayd4bm"&&(Q.textContent=an),at=o(e),O=i(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-qp2ubt"&&(O.innerHTML=on),ot=o(e),K=i(e,"P",{"data-svelte-h":!0}),c(K)!=="svelte-ywl52z"&&(K.innerHTML=ln),lt=o(e),u(ee.$$.fragment,e),rt=o(e),te=i(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-gz9jek"&&(te.innerHTML=rn),it=o(e),ne=i(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-c2ujwv"&&(ne.innerHTML=cn),ct=o(e),u(se.$$.fragment,e),pt=o(e),u(ae.$$.fragment,e),dt=o(e),oe=i(e,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-ets0jr"&&(oe.innerHTML=pn),mt=o(e),le=i(e,"P",{"data-svelte-h":!0}),c(le)!=="svelte-14hvt1f"&&(le.textContent=dn),gt=o(e),u(re.$$.fragment,e),ut=o(e),u(ie.$$.fragment,e),ht=o(e),ce=i(e,"UL",{"data-svelte-h":!0}),c(ce)!=="svelte-6ej6p2"&&(ce.innerHTML=mn),ft=o(e),u(pe.$$.fragment,e),bt=o(e),T=i(e,"DIV",{class:!0});var x=C(T);u(de.$$.fragment,x),wt=o(x),we=i(x,"P",{"data-svelte-h":!0}),c(we)!=="svelte-7mmiyn"&&(we.textContent=gn),vt=o(x),ve=i(x,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-1serjol"&&(ve.innerHTML=un),xt=o(x),xe=i(x,"P",{"data-svelte-h":!0}),c(xe)!=="svelte-1i8rh37"&&(xe.innerHTML=hn),jt=qn(x,`
<tokens> <eos>\` for target language documents.
`),u(G.$$.fragment,x),Jt=o(x),J=i(x,"DIV",{class:!0});var $=C(J);u(me.$$.fragment,$),$t=o($),je=i($,"P",{"data-svelte-h":!0}),c(je)!=="svelte-nkpot4"&&(je.innerHTML=fn),zt=o($),Je=i($,"UL",{"data-svelte-h":!0}),c(Je)!=="svelte-mlrsks"&&(Je.innerHTML=bn),Ut=o($),$e=i($,"P",{"data-svelte-h":!0}),c($e)!=="svelte-46aam0"&&($e.textContent=kn),$.forEach(n),x.forEach(n),kt=o(e),u(ge.$$.fragment,e),_t=o(e),m=i(e,"DIV",{class:!0});var y=C(m);u(ue.$$.fragment,y),Nt=o(y),ze=i(y,"P",{"data-svelte-h":!0}),c(ze)!=="svelte-g5z8ln"&&(ze.innerHTML=_n),qt=o(y),Ue=i(y,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-fh0aq"&&(Ue.innerHTML=yn),Ct=o(y),Ne=i(y,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-1i8rh37"&&(Ne.innerHTML=Mn),Lt=qn(y,`
<tokens> <eos>\` for target language documents.
`),u(Z.$$.fragment,y),Gt=o(y),j=i(y,"DIV",{class:!0});var q=C(j);u(he.$$.fragment,q),Zt=o(q),qe=i(q,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-1vll0v2"&&(qe.textContent=Tn),It=o(q),Ce=i(q,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-90np8u"&&(Ce.innerHTML=wn),Wt=o(q),Le=i(q,"UL",{"data-svelte-h":!0}),c(Le)!=="svelte-mlrsks"&&(Le.innerHTML=vn),Ft=o(q),Ge=i(q,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-46aam0"&&(Ge.textContent=xn),q.forEach(n),Rt=o(y),I=i(y,"DIV",{class:!0});var Tt=C(I);u(fe.$$.fragment,Tt),Vt=o(Tt),Ze=i(Tt,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-1bcwf97"&&(Ze.textContent=jn),Tt.forEach(n),Xt=o(y),U=i(y,"DIV",{class:!0});var Ve=C(U);u(be.$$.fragment,Ve),Bt=o(Ve),Ie=i(Ve,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1euodjq"&&(Ie.textContent=Jn),Ht=o(Ve),We=i(Ve,"UL",{"data-svelte-h":!0}),c(We)!=="svelte-rrgzfj"&&(We.innerHTML=$n),Ve.forEach(n),Et=o(y),N=i(y,"DIV",{class:!0});var Xe=C(N);u(ke.$$.fragment,Xe),St=o(Xe),Fe=i(Xe,"P",{"data-svelte-h":!0}),c(Fe)!=="svelte-1i6tlcm"&&(Fe.textContent=zn),Yt=o(Xe),Re=i(Xe,"UL",{"data-svelte-h":!0}),c(Re)!=="svelte-1durotj"&&(Re.innerHTML=Un),Xe.forEach(n),y.forEach(n),yt=o(e),Be=i(e,"P",{}),C(Be).forEach(n),this.h()},h(){L(d,"name","hf:doc:metadata"),L(d,"content",Bn),L(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,d),s(e,z,t),s(e,w,t),s(e,_,t),h(M,e,t),s(e,p,t),s(e,v,t),s(e,He,t),s(e,W,t),s(e,Ee,t),s(e,F,t),s(e,Se,t),s(e,R,t),s(e,Ye,t),h(V,e,t),s(e,De,t),s(e,X,t),s(e,Pe,t),h(B,e,t),s(e,Ae,t),s(e,H,t),s(e,Qe,t),h(E,e,t),s(e,Oe,t),s(e,S,t),s(e,Ke,t),h(Y,e,t),s(e,et,t),s(e,D,t),s(e,tt,t),s(e,P,t),s(e,nt,t),s(e,A,t),s(e,st,t),s(e,Q,t),s(e,at,t),s(e,O,t),s(e,ot,t),s(e,K,t),s(e,lt,t),h(ee,e,t),s(e,rt,t),s(e,te,t),s(e,it,t),s(e,ne,t),s(e,ct,t),h(se,e,t),s(e,pt,t),h(ae,e,t),s(e,dt,t),s(e,oe,t),s(e,mt,t),s(e,le,t),s(e,gt,t),h(re,e,t),s(e,ut,t),h(ie,e,t),s(e,ht,t),s(e,ce,t),s(e,ft,t),h(pe,e,t),s(e,bt,t),s(e,T,t),h(de,T,null),l(T,wt),l(T,we),l(T,vt),l(T,ve),l(T,xt),l(T,xe),l(T,jt),h(G,T,null),l(T,Jt),l(T,J),h(me,J,null),l(J,$t),l(J,je),l(J,zt),l(J,Je),l(J,Ut),l(J,$e),s(e,kt,t),h(ge,e,t),s(e,_t,t),s(e,m,t),h(ue,m,null),l(m,Nt),l(m,ze),l(m,qt),l(m,Ue),l(m,Ct),l(m,Ne),l(m,Lt),h(Z,m,null),l(m,Gt),l(m,j),h(he,j,null),l(j,Zt),l(j,qe),l(j,It),l(j,Ce),l(j,Wt),l(j,Le),l(j,Ft),l(j,Ge),l(m,Rt),l(m,I),h(fe,I,null),l(I,Vt),l(I,Ze),l(m,Xt),l(m,U),h(be,U,null),l(U,Bt),l(U,Ie),l(U,Ht),l(U,We),l(m,Et),l(m,N),h(ke,N,null),l(N,St),l(N,Fe),l(N,Yt),l(N,Re),s(e,yt,t),s(e,Be,t),Mt=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),G.$set(x);const $={};t&2&&($.$$scope={dirty:t,ctx:e}),Z.$set($)},i(e){Mt||(f(M.$$.fragment,e),f(V.$$.fragment,e),f(B.$$.fragment,e),f(E.$$.fragment,e),f(Y.$$.fragment,e),f(ee.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(pe.$$.fragment,e),f(de.$$.fragment,e),f(G.$$.fragment,e),f(me.$$.fragment,e),f(ge.$$.fragment,e),f(ue.$$.fragment,e),f(Z.$$.fragment,e),f(he.$$.fragment,e),f(fe.$$.fragment,e),f(be.$$.fragment,e),f(ke.$$.fragment,e),Mt=!0)},o(e){b(M.$$.fragment,e),b(V.$$.fragment,e),b(B.$$.fragment,e),b(E.$$.fragment,e),b(Y.$$.fragment,e),b(ee.$$.fragment,e),b(se.$$.fragment,e),b(ae.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(pe.$$.fragment,e),b(de.$$.fragment,e),b(G.$$.fragment,e),b(me.$$.fragment,e),b(ge.$$.fragment,e),b(ue.$$.fragment,e),b(Z.$$.fragment,e),b(he.$$.fragment,e),b(fe.$$.fragment,e),b(be.$$.fragment,e),b(ke.$$.fragment,e),Mt=!1},d(e){e&&(n(z),n(w),n(_),n(p),n(v),n(He),n(W),n(Ee),n(F),n(Se),n(R),n(Ye),n(De),n(X),n(Pe),n(Ae),n(H),n(Qe),n(Oe),n(S),n(Ke),n(et),n(D),n(tt),n(P),n(nt),n(A),n(st),n(Q),n(at),n(O),n(ot),n(K),n(lt),n(rt),n(te),n(it),n(ne),n(ct),n(pt),n(dt),n(oe),n(mt),n(le),n(gt),n(ut),n(ht),n(ce),n(ft),n(bt),n(T),n(kt),n(_t),n(m),n(yt),n(Be)),n(d),k(M,e),k(V,e),k(B,e),k(E,e),k(Y,e),k(ee,e),k(se,e),k(ae,e),k(re,e),k(ie,e),k(pe,e),k(de),k(G),k(me),k(ge,e),k(ue),k(Z),k(he),k(fe),k(be),k(ke)}}}const Bn='{"title":"NLLB","local":"transformers.NllbTokenizer","sections":[{"title":"Overview of NLLB","local":"overview-of-nllb","sections":[],"depth":2},{"title":"Generating with NLLB","local":"generating-with-nllb","sections":[{"title":"Generating from any other language than English","local":"generating-from-any-other-language-than-english","sections":[],"depth":3}],"depth":2},{"title":"Documentation resources","local":"documentation-resources","sections":[],"depth":2},{"title":"NllbTokenizer","local":"nllbtokenizer","sections":[],"depth":2},{"title":"NllbTokenizerFast","local":"nllbtokenizerfast","sections":[],"depth":2}],"depth":1}';function Hn(Te){return Zn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qn extends In{constructor(d){super(),Wn(this,d,Hn,Xn,Gn,{})}}export{Qn as component};
