import{S as Ga,i as Wa,s as Ba,e as n,k as c,w as v,t as a,M as Ra,c as s,d as o,m as h,a as r,x as b,h as i,b as l,G as e,g as _,y,q as w,o as M,B as F,v as Va,L as Yo}from"../../chunks/vendor-hf-doc-builder.js";import{T as ja}from"../../chunks/Tip-hf-doc-builder.js";import{D as N}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Jo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as st}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ko}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ua(E){let p,k,g,f,T;return f=new Jo({props:{code:`from transformers import FSMTConfig, FSMTModel

config = FSMTConfig.from_pretrained("facebook/wmt19-en-ru")
model = FSMTModel(config)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FSMTConfig, FSMTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>config = FSMTConfig.from_pretrained(<span class="hljs-string">&quot;facebook/wmt19-en-ru&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FSMTModel(config)`}}),{c(){p=n("p"),k=a("Examples:"),g=c(),v(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Examples:"),u.forEach(o),g=h(d),b(f.$$.fragment,d)},m(d,u){_(d,p,u),e(p,k),_(d,g,u),y(f,d,u),T=!0},p:Yo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){M(f.$$.fragment,d),T=!1},d(d){d&&o(p),d&&o(g),F(f,d)}}}function Ha(E){let p,k,g,f,T;return f=new Jo({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){p=n("p"),k=a("Transformer sequence pair mask has the following format:"),g=c(),v(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Transformer sequence pair mask has the following format:"),u.forEach(o),g=h(d),b(f.$$.fragment,d)},m(d,u){_(d,p,u),e(p,k),_(d,g,u),y(f,d,u),T=!0},p:Yo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){M(f.$$.fragment,d),T=!1},d(d){d&&o(p),d&&o(g),F(f,d)}}}function Qa(E){let p,k,g,f,T;return{c(){p=n("p"),k=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=a("Module"),T=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var A=r(g);f=i(A,"Module"),A.forEach(o),T=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(d,u){_(d,p,u),e(p,k),e(p,g),e(g,f),e(p,T)},d(d){d&&o(p)}}}function Xa(E){let p,k,g,f,T;return f=new Jo({props:{code:`from transformers import FSMTTokenizer, FSMTModel
import torch

tokenizer = FSMTTokenizer.from_pretrained("facebook/wmt19-ru-en")
model = FSMTModel.from_pretrained("facebook/wmt19-ru-en")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FSMTTokenizer, FSMTModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = FSMTTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/wmt19-ru-en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FSMTModel.from_pretrained(<span class="hljs-string">&quot;facebook/wmt19-ru-en&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){p=n("p"),k=a("Example:"),g=c(),v(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Example:"),u.forEach(o),g=h(d),b(f.$$.fragment,d)},m(d,u){_(d,p,u),e(p,k),_(d,g,u),y(f,d,u),T=!0},p:Yo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){M(f.$$.fragment,d),T=!1},d(d){d&&o(p),d&&o(g),F(f,d)}}}function Ka(E){let p,k,g,f,T;return{c(){p=n("p"),k=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=a("Module"),T=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s(u,"CODE",{});var A=r(g);f=i(A,"Module"),A.forEach(o),T=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(d,u){_(d,p,u),e(p,k),e(p,g),e(g,f),e(p,T)},d(d){d&&o(p)}}}function Ya(E){let p,k,g,f,T;return f=new Jo({props:{code:`from transformers import FSMTTokenizer, FSMTForConditionalGeneration

mname = "facebook/wmt19-ru-en"
model = FSMTForConditionalGeneration.from_pretrained(mname)
tokenizer = FSMTTokenizer.from_pretrained(mname)

src_text = "\u041C\u0430\u0448\u0438\u043D\u043D\u043E\u0435 \u043E\u0431\u0443\u0447\u0435\u043D\u0438\u0435 - \u044D\u0442\u043E \u0437\u0434\u043E\u0440\u043E\u0432\u043E, \u043D\u0435 \u0442\u0430\u043A \u043B\u0438?"
input_ids = tokenizer(src_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids, num_beams=5, num_return_sequences=3)
tokenizer.decode(outputs[0], skip_special_tokens=True)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FSMTTokenizer, FSMTForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/wmt19-ru-en&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FSMTForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = FSMTTokenizer.from_pretrained(mname)

<span class="hljs-meta">&gt;&gt;&gt; </span>src_text = <span class="hljs-string">&quot;\u041C\u0430\u0448\u0438\u043D\u043D\u043E\u0435 \u043E\u0431\u0443\u0447\u0435\u043D\u0438\u0435 - \u044D\u0442\u043E \u0437\u0434\u043E\u0440\u043E\u0432\u043E, \u043D\u0435 \u0442\u0430\u043A \u043B\u0438?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(src_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(input_ids, num_beams=<span class="hljs-number">5</span>, num_return_sequences=<span class="hljs-number">3</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&quot;Machine learning is great, isn&#x27;t it?&quot;</span>`}}),{c(){p=n("p"),k=a("Translation example::"),g=c(),v(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);k=i(u,"Translation example::"),u.forEach(o),g=h(d),b(f.$$.fragment,d)},m(d,u){_(d,p,u),e(p,k),_(d,g,u),y(f,d,u),T=!0},p:Yo,i(d){T||(w(f.$$.fragment,d),T=!0)},o(d){M(f.$$.fragment,d),T=!1},d(d){d&&o(p),d&&o(g),F(f,d)}}}function Ja(E){let p,k,g,f,T,d,u,A,Zo,_o,V,xt,en,tn,Fe,on,nn,go,U,re,Et,$e,sn,Ct,rn,To,ae,an,Se,dn,ln,ko,rt,cn,vo,at,Pt,hn,bo,L,pn,ze,mn,fn,qe,un,_n,yo,H,ie,It,xe,gn,At,Tn,wo,it,Q,kn,dt,vn,bn,lt,yn,wn,Mo,X,de,Ot,Ee,Mn,Dt,Fn,Fo,z,Ce,$n,K,Sn,ct,zn,qn,Pe,xn,En,Cn,Y,Pn,ht,In,An,pt,On,Dn,Nn,le,Ln,ce,Ie,jn,J,Gn,Nt,Wn,Bn,Lt,Rn,Vn,$o,Z,he,jt,Ae,Un,Gt,Hn,So,$,Oe,Qn,Wt,Xn,Kn,O,Bt,Yn,Jn,Rt,Zn,es,D,ts,Vt,os,ns,Ut,ss,rs,Ht,as,is,ds,De,ls,Qt,cs,hs,ps,Ne,ms,mt,fs,us,_s,j,Le,gs,Xt,Ts,ks,je,ft,vs,Kt,bs,ys,ut,ws,Yt,Ms,Fs,pe,Ge,$s,We,Ss,Jt,zs,qs,xs,C,Be,Es,Zt,Cs,Ps,me,Is,ee,As,eo,Os,Ds,to,Ns,Ls,js,oo,Gs,Ws,_t,Re,zo,te,fe,no,Ve,Bs,so,Rs,qo,q,Ue,Vs,ro,Us,Hs,He,Qs,gt,Xs,Ks,Ys,Qe,Js,Xe,Zs,er,tr,P,Ke,or,oe,nr,Tt,sr,rr,ao,ar,ir,dr,ue,lr,_e,xo,ne,ge,io,Ye,cr,lo,hr,Eo,x,Je,pr,co,mr,fr,Ze,ur,kt,_r,gr,Tr,et,kr,tt,vr,br,yr,I,ot,wr,se,Mr,vt,Fr,$r,ho,Sr,zr,qr,Te,xr,ke,Co;return d=new st({}),$e=new st({}),xe=new st({}),Ee=new st({}),Ce=new N({props:{name:"class transformers.FSMTConfig",anchor:"transformers.FSMTConfig",parameters:[{name:"langs",val:" = ['en', 'de']"},{name:"src_vocab_size",val:" = 42024"},{name:"tgt_vocab_size",val:" = 42024"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 1024"},{name:"max_length",val:" = 200"},{name:"max_position_embeddings",val:" = 1024"},{name:"encoder_ffn_dim",val:" = 4096"},{name:"encoder_layers",val:" = 12"},{name:"encoder_attention_heads",val:" = 16"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_ffn_dim",val:" = 4096"},{name:"decoder_layers",val:" = 12"},{name:"decoder_attention_heads",val:" = 16"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 2"},{name:"is_encoder_decoder",val:" = True"},{name:"scale_embedding",val:" = True"},{name:"tie_word_embeddings",val:" = False"},{name:"num_beams",val:" = 5"},{name:"length_penalty",val:" = 1.0"},{name:"early_stopping",val:" = False"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"**common_kwargs",val:""}],parametersDescription:[{anchor:"transformers.FSMTConfig.langs",description:`<strong>langs</strong> (<code>List[str]</code>) &#x2014;
A list with source language and target_language (e.g., [&#x2018;en&#x2019;, &#x2018;ru&#x2019;]).`,name:"langs"},{anchor:"transformers.FSMTConfig.src_vocab_size",description:`<strong>src_vocab_size</strong> (<code>int</code>) &#x2014;
Vocabulary size of the encoder. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed to the forward method in the encoder.`,name:"src_vocab_size"},{anchor:"transformers.FSMTConfig.tgt_vocab_size",description:`<strong>tgt_vocab_size</strong> (<code>int</code>) &#x2014;
Vocabulary size of the decoder. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed to the forward method in the decoder.`,name:"tgt_vocab_size"},{anchor:"transformers.FSMTConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.FSMTConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.FSMTConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.FSMTConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.FSMTConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.FSMTConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.FSMTConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.FSMTConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.FSMTConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.FSMTConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.FSMTConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.FSMTConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.FSMTConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.FSMTConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.FSMTConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.FSMTConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.FSMTConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.FSMTConfig.decoder_start_token_id",description:`<strong>decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
This model starts decoding with <code>eos_token_id</code>
encoder_layerdrop &#x2014; (<code>float</code>, <em>optional</em>, defaults to 0.0):
Google &#x201C;layerdrop arxiv&#x201D;, as its not explainable in one line.
decoder_layerdrop &#x2014; (<code>float</code>, <em>optional</em>, defaults to 0.0):
Google &#x201C;layerdrop arxiv&#x201D;, as its not explainable in one line.`,name:"decoder_start_token_id"},{anchor:"transformers.FSMTConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether this is an encoder/decoder model.`,name:"is_encoder_decoder"},{anchor:"transformers.FSMTConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie input and output embeddings.`,name:"tie_word_embeddings"},{anchor:"transformers.FSMTConfig.num_beams",description:`<strong>num_beams</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of beams for beam search that will be used by default in the <code>generate</code> method of the model. 1 means
no beam search.`,name:"num_beams"},{anchor:"transformers.FSMTConfig.length_penalty",description:`<strong>length_penalty</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Exponential penalty to the length that will be used by default in the <code>generate</code> method of the model.`,name:"length_penalty"},{anchor:"transformers.FSMTConfig.early_stopping",description:`<strong>early_stopping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag that will be used by default in the <code>generate</code> method of the model. Whether to stop the beam search
when at least <code>num_beams</code> sentences are finished per batch or not.`,name:"early_stopping"},{anchor:"transformers.FSMTConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.FSMTConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Usually set to
<code>eos_token_id</code>.`,name:"forced_eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/configuration_fsmt.py#L41"}}),le=new Ko({props:{anchor:"transformers.FSMTConfig.example",$$slots:{default:[Ua]},$$scope:{ctx:E}}}),Ie=new N({props:{name:"to_dict",anchor:"transformers.FSMTConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/configuration_fsmt.py#L211",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, any]</code></p>
`}}),Ae=new st({}),Oe=new N({props:{name:"class transformers.FSMTTokenizer",anchor:"transformers.FSMTTokenizer",parameters:[{name:"langs",val:" = None"},{name:"src_vocab_file",val:" = None"},{name:"tgt_vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FSMTTokenizer.langs",description:`<strong>langs</strong> (<code>List[str]</code>) &#x2014;
A list of two languages to translate from and to, for instance <code>[&quot;en&quot;, &quot;ru&quot;]</code>.`,name:"langs"},{anchor:"transformers.FSMTTokenizer.src_vocab_file",description:`<strong>src_vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary for the source language.`,name:"src_vocab_file"},{anchor:"transformers.FSMTTokenizer.tgt_vocab_file",description:`<strong>tgt_vocab_file</strong> (<code>st</code>) &#x2014;
File containing the vocabulary for the target language.`,name:"tgt_vocab_file"},{anchor:"transformers.FSMTTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
File containing the merges.`,name:"merges_file"},{anchor:"transformers.FSMTTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FSMTTokenizer.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.FSMTTokenizer.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.FSMTTokenizer.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.FSMTTokenizer.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"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/tokenization_fsmt.py#L135"}}),Le=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FSMTTokenizer.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.FSMTTokenizer.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.FSMTTokenizer.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/vr_17548/src/transformers/models/fsmt/tokenization_fsmt.py#L405",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>
`}}),Ge=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.FSMTTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.FSMTTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FSMTTokenizer.get_special_tokens_mask.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"},{anchor:"transformers.FSMTTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/tokenization_fsmt.py#L431",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Be=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FSMTTokenizer.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.FSMTTokenizer.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.FSMTTokenizer.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/vr_17548/src/transformers/models/fsmt/tokenization_fsmt.py#L459",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),me=new Ko({props:{anchor:"transformers.FSMTTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Ha]},$$scope:{ctx:E}}}),Re=new N({props:{name:"save_vocabulary",anchor:"transformers.FSMTTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/tokenization_fsmt.py#L492"}}),Ve=new st({}),Ue=new N({props:{name:"class transformers.FSMTModel",anchor:"transformers.FSMTModel",parameters:[{name:"config",val:": FSMTConfig"}],parametersDescription:[{anchor:"transformers.FSMTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTConfig">FSMTConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/modeling_fsmt.py#L990"}}),Ke=new N({props:{name:"forward",anchor:"transformers.FSMTModel.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FSMTModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>IIndices can be obtained using <code>FSTMTokenizer</code>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FSMTModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FSMTModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTTokenizer">FSMTTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>FSMT uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.FSMTModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.FSMTModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FSMTModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.FSMTModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.FSMTModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>Tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of hidden-states at
the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FSMTModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden-states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.FSMTModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.FSMTModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FSMTModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FSMTModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/modeling_fsmt.py#L1004",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTConfig"
>FSMTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new ja({props:{$$slots:{default:[Qa]},$$scope:{ctx:E}}}),_e=new Ko({props:{anchor:"transformers.FSMTModel.forward.example",$$slots:{default:[Xa]},$$scope:{ctx:E}}}),Ye=new st({}),Je=new N({props:{name:"class transformers.FSMTForConditionalGeneration",anchor:"transformers.FSMTForConditionalGeneration",parameters:[{name:"config",val:": FSMTConfig"}],parametersDescription:[{anchor:"transformers.FSMTForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTConfig">FSMTConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/modeling_fsmt.py#L1114"}}),ot=new N({props:{name:"forward",anchor:"transformers.FSMTForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FSMTForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>IIndices can be obtained using <code>FSTMTokenizer</code>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FSMTForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FSMTForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTTokenizer">FSMTTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>FSMT uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.FSMTForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.FSMTForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FSMTForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.FSMTForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.FSMTForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>Tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of hidden-states at
the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FSMTForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden-states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.FSMTForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.FSMTForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FSMTForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FSMTForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FSMTForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/fsmt/modeling_fsmt.py#L1130",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTConfig"
>FSMTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new ja({props:{$$slots:{default:[Ka]},$$scope:{ctx:E}}}),ke=new Ko({props:{anchor:"transformers.FSMTForConditionalGeneration.forward.example",$$slots:{default:[Ya]},$$scope:{ctx:E}}}),{c(){p=n("meta"),k=c(),g=n("h1"),f=n("a"),T=n("span"),v(d.$$.fragment),u=c(),A=n("span"),Zo=a("FSMT"),_o=c(),V=n("p"),xt=n("strong"),en=a("DISCLAIMER:"),tn=a(" If you see something strange, file a "),Fe=n("a"),on=a("Github Issue"),nn=a(` and assign
@stas00.`),go=c(),U=n("h2"),re=n("a"),Et=n("span"),v($e.$$.fragment),sn=c(),Ct=n("span"),rn=a("Overview"),To=c(),ae=n("p"),an=a("FSMT (FairSeq MachineTranslation) models were introduced in "),Se=n("a"),dn=a("Facebook FAIR\u2019s WMT19 News Translation Task Submission"),ln=a(" by Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, Sergey Edunov."),ko=c(),rt=n("p"),cn=a("The abstract of the paper is the following:"),vo=c(),at=n("p"),Pt=n("em"),hn=a(`This paper describes Facebook FAIR\u2019s submission to the WMT19 shared news translation task. We participate in two
language pairs and four language directions, English <-> German and English <-> Russian. Following our submission from
last year, our baseline systems are large BPE-based transformer models trained with the Fairseq sequence modeling
toolkit which rely on sampled back-translations. This year we experiment with different bitext data filtering schemes,
as well as with adding filtered back-translated data. We also ensemble and fine-tune our models on domain-specific
data, then decode using noisy channel model reranking. Our submissions are ranked first in all four directions of the
human evaluation campaign. On En->De, our system significantly outperforms other systems as well as human translations.
This system improves upon our WMT\u201918 submission by 4.5 BLEU points.`),bo=c(),L=n("p"),pn=a("This model was contributed by "),ze=n("a"),mn=a("stas"),fn=a(`. The original code can be found
`),qe=n("a"),un=a("here"),_n=a("."),yo=c(),H=n("h2"),ie=n("a"),It=n("span"),v(xe.$$.fragment),gn=c(),At=n("span"),Tn=a("Implementation Notes"),wo=c(),it=n("ul"),Q=n("li"),kn=a(`FSMT uses source and target vocabulary pairs that aren\u2019t combined into one. It doesn\u2019t share embeddings tokens
either. Its tokenizer is very similar to `),dt=n("a"),vn=a("XLMTokenizer"),bn=a(` and the main model is derived from
`),lt=n("a"),yn=a("BartModel"),wn=a("."),Mo=c(),X=n("h2"),de=n("a"),Ot=n("span"),v(Ee.$$.fragment),Mn=c(),Dt=n("span"),Fn=a("FSMTConfig"),Fo=c(),z=n("div"),v(Ce.$$.fragment),$n=c(),K=n("p"),Sn=a("This is the configuration class to store the configuration of a "),ct=n("a"),zn=a("FSMTModel"),qn=a(`. It is used to instantiate a FSMT
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the FSMT
`),Pe=n("a"),xn=a("facebook/wmt19-en-ru"),En=a(" architecture."),Cn=c(),Y=n("p"),Pn=a("Configuration objects inherit from "),ht=n("a"),In=a("PretrainedConfig"),An=a(` and can be used to control the model outputs. Read the
documentation from `),pt=n("a"),On=a("PretrainedConfig"),Dn=a(" for more information."),Nn=c(),v(le.$$.fragment),Ln=c(),ce=n("div"),v(Ie.$$.fragment),jn=c(),J=n("p"),Gn=a("Serializes this instance to a Python dictionary. Override the default "),Nt=n("em"),Wn=a("to_dict()"),Bn=a(" from "),Lt=n("em"),Rn=a("PretrainedConfig"),Vn=a("."),$o=c(),Z=n("h2"),he=n("a"),jt=n("span"),v(Ae.$$.fragment),Un=c(),Gt=n("span"),Hn=a("FSMTTokenizer"),So=c(),$=n("div"),v(Oe.$$.fragment),Qn=c(),Wt=n("p"),Xn=a("Construct an FAIRSEQ Transformer tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),Kn=c(),O=n("ul"),Bt=n("li"),Yn=a("Moses preprocessing and tokenization."),Jn=c(),Rt=n("li"),Zn=a("Normalizing all inputs text."),es=c(),D=n("li"),ts=a("The arguments "),Vt=n("code"),os=a("special_tokens"),ns=a(" and the function "),Ut=n("code"),ss=a("set_special_tokens"),rs=a(`, can be used to add additional symbols (like
\u201D`),Ht=n("strong"),as=a("classify"),is=a("\u201D) to a vocabulary."),ds=c(),De=n("li"),ls=a("The argument "),Qt=n("code"),cs=a("langs"),hs=a(" defines a pair of languages."),ps=c(),Ne=n("p"),ms=a("This tokenizer inherits from "),mt=n("a"),fs=a("PreTrainedTokenizer"),us=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_s=c(),j=n("div"),v(Le.$$.fragment),gs=c(),Xt=n("p"),Ts=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A FAIRSEQ Transformer sequence has the following format:`),ks=c(),je=n("ul"),ft=n("li"),vs=a("single sequence: "),Kt=n("code"),bs=a("<s> X </s>"),ys=c(),ut=n("li"),ws=a("pair of sequences: "),Yt=n("code"),Ms=a("<s> A </s> B </s>"),Fs=c(),pe=n("div"),v(Ge.$$.fragment),$s=c(),We=n("p"),Ss=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Jt=n("code"),zs=a("prepare_for_model"),qs=a(" method."),xs=c(),C=n("div"),v(Be.$$.fragment),Es=c(),Zt=n("p"),Cs=a("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A FAIRSEQ"),Ps=c(),v(me.$$.fragment),Is=c(),ee=n("p"),As=a("If "),eo=n("code"),Os=a("token_ids_1"),Ds=a(" is "),to=n("code"),Ns=a("None"),Ls=a(", this method only returns the first portion of the mask (0s)."),js=c(),oo=n("p"),Gs=a(`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An
FAIRSEQ_TRANSFORMER sequence pair mask has the following format:`),Ws=c(),_t=n("div"),v(Re.$$.fragment),zo=c(),te=n("h2"),fe=n("a"),no=n("span"),v(Ve.$$.fragment),Bs=c(),so=n("span"),Rs=a("FSMTModel"),qo=c(),q=n("div"),v(Ue.$$.fragment),Vs=c(),ro=n("p"),Us=a("The bare FSMT Model outputting raw hidden-states without any specific head on top."),Hs=c(),He=n("p"),Qs=a("This model inherits from "),gt=n("a"),Xs=a("PreTrainedModel"),Ks=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ys=c(),Qe=n("p"),Js=a("This model is also a PyTorch "),Xe=n("a"),Zs=a("torch.nn.Module"),er=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tr=c(),P=n("div"),v(Ke.$$.fragment),or=c(),oe=n("p"),nr=a("The "),Tt=n("a"),sr=a("FSMTModel"),rr=a(" forward method, overrides the "),ao=n("code"),ar=a("__call__"),ir=a(" special method."),dr=c(),v(ue.$$.fragment),lr=c(),v(_e.$$.fragment),xo=c(),ne=n("h2"),ge=n("a"),io=n("span"),v(Ye.$$.fragment),cr=c(),lo=n("span"),hr=a("FSMTForConditionalGeneration"),Eo=c(),x=n("div"),v(Je.$$.fragment),pr=c(),co=n("p"),mr=a("The FSMT Model with a language modeling head. Can be used for summarization."),fr=c(),Ze=n("p"),ur=a("This model inherits from "),kt=n("a"),_r=a("PreTrainedModel"),gr=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tr=c(),et=n("p"),kr=a("This model is also a PyTorch "),tt=n("a"),vr=a("torch.nn.Module"),br=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yr=c(),I=n("div"),v(ot.$$.fragment),wr=c(),se=n("p"),Mr=a("The "),vt=n("a"),Fr=a("FSMTForConditionalGeneration"),$r=a(" forward method, overrides the "),ho=n("code"),Sr=a("__call__"),zr=a(" special method."),qr=c(),v(Te.$$.fragment),xr=c(),v(ke.$$.fragment),this.h()},l(t){const m=Ra('[data-svelte="svelte-1phssyn"]',document.head);p=s(m,"META",{name:!0,content:!0}),m.forEach(o),k=h(t),g=s(t,"H1",{class:!0});var nt=r(g);f=s(nt,"A",{id:!0,class:!0,href:!0});var po=r(f);T=s(po,"SPAN",{});var mo=r(T);b(d.$$.fragment,mo),mo.forEach(o),po.forEach(o),u=h(nt),A=s(nt,"SPAN",{});var fo=r(A);Zo=i(fo,"FSMT"),fo.forEach(o),nt.forEach(o),_o=h(t),V=s(t,"P",{});var ve=r(V);xt=s(ve,"STRONG",{});var uo=r(xt);en=i(uo,"DISCLAIMER:"),uo.forEach(o),tn=i(ve," If you see something strange, file a "),Fe=s(ve,"A",{href:!0,rel:!0});var Pr=r(Fe);on=i(Pr,"Github Issue"),Pr.forEach(o),nn=i(ve,` and assign
@stas00.`),ve.forEach(o),go=h(t),U=s(t,"H2",{class:!0});var Po=r(U);re=s(Po,"A",{id:!0,class:!0,href:!0});var Ir=r(re);Et=s(Ir,"SPAN",{});var Ar=r(Et);b($e.$$.fragment,Ar),Ar.forEach(o),Ir.forEach(o),sn=h(Po),Ct=s(Po,"SPAN",{});var Or=r(Ct);rn=i(Or,"Overview"),Or.forEach(o),Po.forEach(o),To=h(t),ae=s(t,"P",{});var Io=r(ae);an=i(Io,"FSMT (FairSeq MachineTranslation) models were introduced in "),Se=s(Io,"A",{href:!0,rel:!0});var Dr=r(Se);dn=i(Dr,"Facebook FAIR\u2019s WMT19 News Translation Task Submission"),Dr.forEach(o),ln=i(Io," by Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, Sergey Edunov."),Io.forEach(o),ko=h(t),rt=s(t,"P",{});var Nr=r(rt);cn=i(Nr,"The abstract of the paper is the following:"),Nr.forEach(o),vo=h(t),at=s(t,"P",{});var Lr=r(at);Pt=s(Lr,"EM",{});var jr=r(Pt);hn=i(jr,`This paper describes Facebook FAIR\u2019s submission to the WMT19 shared news translation task. We participate in two
language pairs and four language directions, English <-> German and English <-> Russian. Following our submission from
last year, our baseline systems are large BPE-based transformer models trained with the Fairseq sequence modeling
toolkit which rely on sampled back-translations. This year we experiment with different bitext data filtering schemes,
as well as with adding filtered back-translated data. We also ensemble and fine-tune our models on domain-specific
data, then decode using noisy channel model reranking. Our submissions are ranked first in all four directions of the
human evaluation campaign. On En->De, our system significantly outperforms other systems as well as human translations.
This system improves upon our WMT\u201918 submission by 4.5 BLEU points.`),jr.forEach(o),Lr.forEach(o),bo=h(t),L=s(t,"P",{});var bt=r(L);pn=i(bt,"This model was contributed by "),ze=s(bt,"A",{href:!0,rel:!0});var Gr=r(ze);mn=i(Gr,"stas"),Gr.forEach(o),fn=i(bt,`. The original code can be found
`),qe=s(bt,"A",{href:!0,rel:!0});var Wr=r(qe);un=i(Wr,"here"),Wr.forEach(o),_n=i(bt,"."),bt.forEach(o),yo=h(t),H=s(t,"H2",{class:!0});var Ao=r(H);ie=s(Ao,"A",{id:!0,class:!0,href:!0});var Br=r(ie);It=s(Br,"SPAN",{});var Rr=r(It);b(xe.$$.fragment,Rr),Rr.forEach(o),Br.forEach(o),gn=h(Ao),At=s(Ao,"SPAN",{});var Vr=r(At);Tn=i(Vr,"Implementation Notes"),Vr.forEach(o),Ao.forEach(o),wo=h(t),it=s(t,"UL",{});var Ur=r(it);Q=s(Ur,"LI",{});var yt=r(Q);kn=i(yt,`FSMT uses source and target vocabulary pairs that aren\u2019t combined into one. It doesn\u2019t share embeddings tokens
either. Its tokenizer is very similar to `),dt=s(yt,"A",{href:!0});var Hr=r(dt);vn=i(Hr,"XLMTokenizer"),Hr.forEach(o),bn=i(yt,` and the main model is derived from
`),lt=s(yt,"A",{href:!0});var Qr=r(lt);yn=i(Qr,"BartModel"),Qr.forEach(o),wn=i(yt,"."),yt.forEach(o),Ur.forEach(o),Mo=h(t),X=s(t,"H2",{class:!0});var Oo=r(X);de=s(Oo,"A",{id:!0,class:!0,href:!0});var Xr=r(de);Ot=s(Xr,"SPAN",{});var Kr=r(Ot);b(Ee.$$.fragment,Kr),Kr.forEach(o),Xr.forEach(o),Mn=h(Oo),Dt=s(Oo,"SPAN",{});var Yr=r(Dt);Fn=i(Yr,"FSMTConfig"),Yr.forEach(o),Oo.forEach(o),Fo=h(t),z=s(t,"DIV",{class:!0});var G=r(z);b(Ce.$$.fragment,G),$n=h(G),K=s(G,"P",{});var wt=r(K);Sn=i(wt,"This is the configuration class to store the configuration of a "),ct=s(wt,"A",{href:!0});var Jr=r(ct);zn=i(Jr,"FSMTModel"),Jr.forEach(o),qn=i(wt,`. It is used to instantiate a FSMT
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the FSMT
`),Pe=s(wt,"A",{href:!0,rel:!0});var Zr=r(Pe);xn=i(Zr,"facebook/wmt19-en-ru"),Zr.forEach(o),En=i(wt," architecture."),wt.forEach(o),Cn=h(G),Y=s(G,"P",{});var Mt=r(Y);Pn=i(Mt,"Configuration objects inherit from "),ht=s(Mt,"A",{href:!0});var ea=r(ht);In=i(ea,"PretrainedConfig"),ea.forEach(o),An=i(Mt,` and can be used to control the model outputs. Read the
documentation from `),pt=s(Mt,"A",{href:!0});var ta=r(pt);On=i(ta,"PretrainedConfig"),ta.forEach(o),Dn=i(Mt," for more information."),Mt.forEach(o),Nn=h(G),b(le.$$.fragment,G),Ln=h(G),ce=s(G,"DIV",{class:!0});var Do=r(ce);b(Ie.$$.fragment,Do),jn=h(Do),J=s(Do,"P",{});var Ft=r(J);Gn=i(Ft,"Serializes this instance to a Python dictionary. Override the default "),Nt=s(Ft,"EM",{});var oa=r(Nt);Wn=i(oa,"to_dict()"),oa.forEach(o),Bn=i(Ft," from "),Lt=s(Ft,"EM",{});var na=r(Lt);Rn=i(na,"PretrainedConfig"),na.forEach(o),Vn=i(Ft,"."),Ft.forEach(o),Do.forEach(o),G.forEach(o),$o=h(t),Z=s(t,"H2",{class:!0});var No=r(Z);he=s(No,"A",{id:!0,class:!0,href:!0});var sa=r(he);jt=s(sa,"SPAN",{});var ra=r(jt);b(Ae.$$.fragment,ra),ra.forEach(o),sa.forEach(o),Un=h(No),Gt=s(No,"SPAN",{});var aa=r(Gt);Hn=i(aa,"FSMTTokenizer"),aa.forEach(o),No.forEach(o),So=h(t),$=s(t,"DIV",{class:!0});var S=r($);b(Oe.$$.fragment,S),Qn=h(S),Wt=s(S,"P",{});var ia=r(Wt);Xn=i(ia,"Construct an FAIRSEQ Transformer tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),ia.forEach(o),Kn=h(S),O=s(S,"UL",{});var be=r(O);Bt=s(be,"LI",{});var da=r(Bt);Yn=i(da,"Moses preprocessing and tokenization."),da.forEach(o),Jn=h(be),Rt=s(be,"LI",{});var la=r(Rt);Zn=i(la,"Normalizing all inputs text."),la.forEach(o),es=h(be),D=s(be,"LI",{});var ye=r(D);ts=i(ye,"The arguments "),Vt=s(ye,"CODE",{});var ca=r(Vt);os=i(ca,"special_tokens"),ca.forEach(o),ns=i(ye," and the function "),Ut=s(ye,"CODE",{});var ha=r(Ut);ss=i(ha,"set_special_tokens"),ha.forEach(o),rs=i(ye,`, can be used to add additional symbols (like
\u201D`),Ht=s(ye,"STRONG",{});var pa=r(Ht);as=i(pa,"classify"),pa.forEach(o),is=i(ye,"\u201D) to a vocabulary."),ye.forEach(o),ds=h(be),De=s(be,"LI",{});var Lo=r(De);ls=i(Lo,"The argument "),Qt=s(Lo,"CODE",{});var ma=r(Qt);cs=i(ma,"langs"),ma.forEach(o),hs=i(Lo," defines a pair of languages."),Lo.forEach(o),be.forEach(o),ps=h(S),Ne=s(S,"P",{});var jo=r(Ne);ms=i(jo,"This tokenizer inherits from "),mt=s(jo,"A",{href:!0});var fa=r(mt);fs=i(fa,"PreTrainedTokenizer"),fa.forEach(o),us=i(jo,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),jo.forEach(o),_s=h(S),j=s(S,"DIV",{class:!0});var $t=r(j);b(Le.$$.fragment,$t),gs=h($t),Xt=s($t,"P",{});var ua=r(Xt);Ts=i(ua,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A FAIRSEQ Transformer sequence has the following format:`),ua.forEach(o),ks=h($t),je=s($t,"UL",{});var Go=r(je);ft=s(Go,"LI",{});var Er=r(ft);vs=i(Er,"single sequence: "),Kt=s(Er,"CODE",{});var _a=r(Kt);bs=i(_a,"<s> X </s>"),_a.forEach(o),Er.forEach(o),ys=h(Go),ut=s(Go,"LI",{});var Cr=r(ut);ws=i(Cr,"pair of sequences: "),Yt=s(Cr,"CODE",{});var ga=r(Yt);Ms=i(ga,"<s> A </s> B </s>"),ga.forEach(o),Cr.forEach(o),Go.forEach(o),$t.forEach(o),Fs=h(S),pe=s(S,"DIV",{class:!0});var Wo=r(pe);b(Ge.$$.fragment,Wo),$s=h(Wo),We=s(Wo,"P",{});var Bo=r(We);Ss=i(Bo,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Jt=s(Bo,"CODE",{});var Ta=r(Jt);zs=i(Ta,"prepare_for_model"),Ta.forEach(o),qs=i(Bo," method."),Bo.forEach(o),Wo.forEach(o),xs=h(S),C=s(S,"DIV",{class:!0});var W=r(C);b(Be.$$.fragment,W),Es=h(W),Zt=s(W,"P",{});var ka=r(Zt);Cs=i(ka,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A FAIRSEQ"),ka.forEach(o),Ps=h(W),b(me.$$.fragment,W),Is=h(W),ee=s(W,"P",{});var St=r(ee);As=i(St,"If "),eo=s(St,"CODE",{});var va=r(eo);Os=i(va,"token_ids_1"),va.forEach(o),Ds=i(St," is "),to=s(St,"CODE",{});var ba=r(to);Ns=i(ba,"None"),ba.forEach(o),Ls=i(St,", this method only returns the first portion of the mask (0s)."),St.forEach(o),js=h(W),oo=s(W,"P",{});var ya=r(oo);Gs=i(ya,`Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An
FAIRSEQ_TRANSFORMER sequence pair mask has the following format:`),ya.forEach(o),W.forEach(o),Ws=h(S),_t=s(S,"DIV",{class:!0});var wa=r(_t);b(Re.$$.fragment,wa),wa.forEach(o),S.forEach(o),zo=h(t),te=s(t,"H2",{class:!0});var Ro=r(te);fe=s(Ro,"A",{id:!0,class:!0,href:!0});var Ma=r(fe);no=s(Ma,"SPAN",{});var Fa=r(no);b(Ve.$$.fragment,Fa),Fa.forEach(o),Ma.forEach(o),Bs=h(Ro),so=s(Ro,"SPAN",{});var $a=r(so);Rs=i($a,"FSMTModel"),$a.forEach(o),Ro.forEach(o),qo=h(t),q=s(t,"DIV",{class:!0});var B=r(q);b(Ue.$$.fragment,B),Vs=h(B),ro=s(B,"P",{});var Sa=r(ro);Us=i(Sa,"The bare FSMT Model outputting raw hidden-states without any specific head on top."),Sa.forEach(o),Hs=h(B),He=s(B,"P",{});var Vo=r(He);Qs=i(Vo,"This model inherits from "),gt=s(Vo,"A",{href:!0});var za=r(gt);Xs=i(za,"PreTrainedModel"),za.forEach(o),Ks=i(Vo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vo.forEach(o),Ys=h(B),Qe=s(B,"P",{});var Uo=r(Qe);Js=i(Uo,"This model is also a PyTorch "),Xe=s(Uo,"A",{href:!0,rel:!0});var qa=r(Xe);Zs=i(qa,"torch.nn.Module"),qa.forEach(o),er=i(Uo,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uo.forEach(o),tr=h(B),P=s(B,"DIV",{class:!0});var we=r(P);b(Ke.$$.fragment,we),or=h(we),oe=s(we,"P",{});var zt=r(oe);nr=i(zt,"The "),Tt=s(zt,"A",{href:!0});var xa=r(Tt);sr=i(xa,"FSMTModel"),xa.forEach(o),rr=i(zt," forward method, overrides the "),ao=s(zt,"CODE",{});var Ea=r(ao);ar=i(Ea,"__call__"),Ea.forEach(o),ir=i(zt," special method."),zt.forEach(o),dr=h(we),b(ue.$$.fragment,we),lr=h(we),b(_e.$$.fragment,we),we.forEach(o),B.forEach(o),xo=h(t),ne=s(t,"H2",{class:!0});var Ho=r(ne);ge=s(Ho,"A",{id:!0,class:!0,href:!0});var Ca=r(ge);io=s(Ca,"SPAN",{});var Pa=r(io);b(Ye.$$.fragment,Pa),Pa.forEach(o),Ca.forEach(o),cr=h(Ho),lo=s(Ho,"SPAN",{});var Ia=r(lo);hr=i(Ia,"FSMTForConditionalGeneration"),Ia.forEach(o),Ho.forEach(o),Eo=h(t),x=s(t,"DIV",{class:!0});var R=r(x);b(Je.$$.fragment,R),pr=h(R),co=s(R,"P",{});var Aa=r(co);mr=i(Aa,"The FSMT Model with a language modeling head. Can be used for summarization."),Aa.forEach(o),fr=h(R),Ze=s(R,"P",{});var Qo=r(Ze);ur=i(Qo,"This model inherits from "),kt=s(Qo,"A",{href:!0});var Oa=r(kt);_r=i(Oa,"PreTrainedModel"),Oa.forEach(o),gr=i(Qo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Qo.forEach(o),Tr=h(R),et=s(R,"P",{});var Xo=r(et);kr=i(Xo,"This model is also a PyTorch "),tt=s(Xo,"A",{href:!0,rel:!0});var Da=r(tt);vr=i(Da,"torch.nn.Module"),Da.forEach(o),br=i(Xo,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xo.forEach(o),yr=h(R),I=s(R,"DIV",{class:!0});var Me=r(I);b(ot.$$.fragment,Me),wr=h(Me),se=s(Me,"P",{});var qt=r(se);Mr=i(qt,"The "),vt=s(qt,"A",{href:!0});var Na=r(vt);Fr=i(Na,"FSMTForConditionalGeneration"),Na.forEach(o),$r=i(qt," forward method, overrides the "),ho=s(qt,"CODE",{});var La=r(ho);Sr=i(La,"__call__"),La.forEach(o),zr=i(qt," special method."),qt.forEach(o),qr=h(Me),b(Te.$$.fragment,Me),xr=h(Me),b(ke.$$.fragment,Me),Me.forEach(o),R.forEach(o),this.h()},h(){l(p,"name","hf:doc:metadata"),l(p,"content",JSON.stringify(Za)),l(f,"id","fsmt"),l(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(f,"href","#fsmt"),l(g,"class","relative group"),l(Fe,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),l(Fe,"rel","nofollow"),l(re,"id","overview"),l(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(re,"href","#overview"),l(U,"class","relative group"),l(Se,"href","https://arxiv.org/abs/1907.06616"),l(Se,"rel","nofollow"),l(ze,"href","https://huggingface.co/stas"),l(ze,"rel","nofollow"),l(qe,"href","https://github.com/pytorch/fairseq/tree/master/examples/wmt19"),l(qe,"rel","nofollow"),l(ie,"id","implementation-notes"),l(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ie,"href","#implementation-notes"),l(H,"class","relative group"),l(dt,"href","/docs/transformers/pr_17548/en/model_doc/xlm#transformers.XLMTokenizer"),l(lt,"href","/docs/transformers/pr_17548/en/model_doc/bart#transformers.BartModel"),l(de,"id","transformers.FSMTConfig"),l(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(de,"href","#transformers.FSMTConfig"),l(X,"class","relative group"),l(ct,"href","/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTModel"),l(Pe,"href","https://huggingface.co/facebook/wmt19-en-ru"),l(Pe,"rel","nofollow"),l(ht,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),l(pt,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),l(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(he,"id","transformers.FSMTTokenizer"),l(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(he,"href","#transformers.FSMTTokenizer"),l(Z,"class","relative group"),l(mt,"href","/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"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($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(fe,"id","transformers.FSMTModel"),l(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(fe,"href","#transformers.FSMTModel"),l(te,"class","relative group"),l(gt,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),l(Xe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Xe,"rel","nofollow"),l(Tt,"href","/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTModel"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"id","transformers.FSMTForConditionalGeneration"),l(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ge,"href","#transformers.FSMTForConditionalGeneration"),l(ne,"class","relative group"),l(kt,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),l(tt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(tt,"rel","nofollow"),l(vt,"href","/docs/transformers/pr_17548/en/model_doc/fsmt#transformers.FSMTForConditionalGeneration"),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(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,p),_(t,k,m),_(t,g,m),e(g,f),e(f,T),y(d,T,null),e(g,u),e(g,A),e(A,Zo),_(t,_o,m),_(t,V,m),e(V,xt),e(xt,en),e(V,tn),e(V,Fe),e(Fe,on),e(V,nn),_(t,go,m),_(t,U,m),e(U,re),e(re,Et),y($e,Et,null),e(U,sn),e(U,Ct),e(Ct,rn),_(t,To,m),_(t,ae,m),e(ae,an),e(ae,Se),e(Se,dn),e(ae,ln),_(t,ko,m),_(t,rt,m),e(rt,cn),_(t,vo,m),_(t,at,m),e(at,Pt),e(Pt,hn),_(t,bo,m),_(t,L,m),e(L,pn),e(L,ze),e(ze,mn),e(L,fn),e(L,qe),e(qe,un),e(L,_n),_(t,yo,m),_(t,H,m),e(H,ie),e(ie,It),y(xe,It,null),e(H,gn),e(H,At),e(At,Tn),_(t,wo,m),_(t,it,m),e(it,Q),e(Q,kn),e(Q,dt),e(dt,vn),e(Q,bn),e(Q,lt),e(lt,yn),e(Q,wn),_(t,Mo,m),_(t,X,m),e(X,de),e(de,Ot),y(Ee,Ot,null),e(X,Mn),e(X,Dt),e(Dt,Fn),_(t,Fo,m),_(t,z,m),y(Ce,z,null),e(z,$n),e(z,K),e(K,Sn),e(K,ct),e(ct,zn),e(K,qn),e(K,Pe),e(Pe,xn),e(K,En),e(z,Cn),e(z,Y),e(Y,Pn),e(Y,ht),e(ht,In),e(Y,An),e(Y,pt),e(pt,On),e(Y,Dn),e(z,Nn),y(le,z,null),e(z,Ln),e(z,ce),y(Ie,ce,null),e(ce,jn),e(ce,J),e(J,Gn),e(J,Nt),e(Nt,Wn),e(J,Bn),e(J,Lt),e(Lt,Rn),e(J,Vn),_(t,$o,m),_(t,Z,m),e(Z,he),e(he,jt),y(Ae,jt,null),e(Z,Un),e(Z,Gt),e(Gt,Hn),_(t,So,m),_(t,$,m),y(Oe,$,null),e($,Qn),e($,Wt),e(Wt,Xn),e($,Kn),e($,O),e(O,Bt),e(Bt,Yn),e(O,Jn),e(O,Rt),e(Rt,Zn),e(O,es),e(O,D),e(D,ts),e(D,Vt),e(Vt,os),e(D,ns),e(D,Ut),e(Ut,ss),e(D,rs),e(D,Ht),e(Ht,as),e(D,is),e(O,ds),e(O,De),e(De,ls),e(De,Qt),e(Qt,cs),e(De,hs),e($,ps),e($,Ne),e(Ne,ms),e(Ne,mt),e(mt,fs),e(Ne,us),e($,_s),e($,j),y(Le,j,null),e(j,gs),e(j,Xt),e(Xt,Ts),e(j,ks),e(j,je),e(je,ft),e(ft,vs),e(ft,Kt),e(Kt,bs),e(je,ys),e(je,ut),e(ut,ws),e(ut,Yt),e(Yt,Ms),e($,Fs),e($,pe),y(Ge,pe,null),e(pe,$s),e(pe,We),e(We,Ss),e(We,Jt),e(Jt,zs),e(We,qs),e($,xs),e($,C),y(Be,C,null),e(C,Es),e(C,Zt),e(Zt,Cs),e(C,Ps),y(me,C,null),e(C,Is),e(C,ee),e(ee,As),e(ee,eo),e(eo,Os),e(ee,Ds),e(ee,to),e(to,Ns),e(ee,Ls),e(C,js),e(C,oo),e(oo,Gs),e($,Ws),e($,_t),y(Re,_t,null),_(t,zo,m),_(t,te,m),e(te,fe),e(fe,no),y(Ve,no,null),e(te,Bs),e(te,so),e(so,Rs),_(t,qo,m),_(t,q,m),y(Ue,q,null),e(q,Vs),e(q,ro),e(ro,Us),e(q,Hs),e(q,He),e(He,Qs),e(He,gt),e(gt,Xs),e(He,Ks),e(q,Ys),e(q,Qe),e(Qe,Js),e(Qe,Xe),e(Xe,Zs),e(Qe,er),e(q,tr),e(q,P),y(Ke,P,null),e(P,or),e(P,oe),e(oe,nr),e(oe,Tt),e(Tt,sr),e(oe,rr),e(oe,ao),e(ao,ar),e(oe,ir),e(P,dr),y(ue,P,null),e(P,lr),y(_e,P,null),_(t,xo,m),_(t,ne,m),e(ne,ge),e(ge,io),y(Ye,io,null),e(ne,cr),e(ne,lo),e(lo,hr),_(t,Eo,m),_(t,x,m),y(Je,x,null),e(x,pr),e(x,co),e(co,mr),e(x,fr),e(x,Ze),e(Ze,ur),e(Ze,kt),e(kt,_r),e(Ze,gr),e(x,Tr),e(x,et),e(et,kr),e(et,tt),e(tt,vr),e(et,br),e(x,yr),e(x,I),y(ot,I,null),e(I,wr),e(I,se),e(se,Mr),e(se,vt),e(vt,Fr),e(se,$r),e(se,ho),e(ho,Sr),e(se,zr),e(I,qr),y(Te,I,null),e(I,xr),y(ke,I,null),Co=!0},p(t,[m]){const nt={};m&2&&(nt.$$scope={dirty:m,ctx:t}),le.$set(nt);const po={};m&2&&(po.$$scope={dirty:m,ctx:t}),me.$set(po);const mo={};m&2&&(mo.$$scope={dirty:m,ctx:t}),ue.$set(mo);const fo={};m&2&&(fo.$$scope={dirty:m,ctx:t}),_e.$set(fo);const ve={};m&2&&(ve.$$scope={dirty:m,ctx:t}),Te.$set(ve);const uo={};m&2&&(uo.$$scope={dirty:m,ctx:t}),ke.$set(uo)},i(t){Co||(w(d.$$.fragment,t),w($e.$$.fragment,t),w(xe.$$.fragment,t),w(Ee.$$.fragment,t),w(Ce.$$.fragment,t),w(le.$$.fragment,t),w(Ie.$$.fragment,t),w(Ae.$$.fragment,t),w(Oe.$$.fragment,t),w(Le.$$.fragment,t),w(Ge.$$.fragment,t),w(Be.$$.fragment,t),w(me.$$.fragment,t),w(Re.$$.fragment,t),w(Ve.$$.fragment,t),w(Ue.$$.fragment,t),w(Ke.$$.fragment,t),w(ue.$$.fragment,t),w(_e.$$.fragment,t),w(Ye.$$.fragment,t),w(Je.$$.fragment,t),w(ot.$$.fragment,t),w(Te.$$.fragment,t),w(ke.$$.fragment,t),Co=!0)},o(t){M(d.$$.fragment,t),M($e.$$.fragment,t),M(xe.$$.fragment,t),M(Ee.$$.fragment,t),M(Ce.$$.fragment,t),M(le.$$.fragment,t),M(Ie.$$.fragment,t),M(Ae.$$.fragment,t),M(Oe.$$.fragment,t),M(Le.$$.fragment,t),M(Ge.$$.fragment,t),M(Be.$$.fragment,t),M(me.$$.fragment,t),M(Re.$$.fragment,t),M(Ve.$$.fragment,t),M(Ue.$$.fragment,t),M(Ke.$$.fragment,t),M(ue.$$.fragment,t),M(_e.$$.fragment,t),M(Ye.$$.fragment,t),M(Je.$$.fragment,t),M(ot.$$.fragment,t),M(Te.$$.fragment,t),M(ke.$$.fragment,t),Co=!1},d(t){o(p),t&&o(k),t&&o(g),F(d),t&&o(_o),t&&o(V),t&&o(go),t&&o(U),F($e),t&&o(To),t&&o(ae),t&&o(ko),t&&o(rt),t&&o(vo),t&&o(at),t&&o(bo),t&&o(L),t&&o(yo),t&&o(H),F(xe),t&&o(wo),t&&o(it),t&&o(Mo),t&&o(X),F(Ee),t&&o(Fo),t&&o(z),F(Ce),F(le),F(Ie),t&&o($o),t&&o(Z),F(Ae),t&&o(So),t&&o($),F(Oe),F(Le),F(Ge),F(Be),F(me),F(Re),t&&o(zo),t&&o(te),F(Ve),t&&o(qo),t&&o(q),F(Ue),F(Ke),F(ue),F(_e),t&&o(xo),t&&o(ne),F(Ye),t&&o(Eo),t&&o(x),F(Je),F(ot),F(Te),F(ke)}}}const Za={local:"fsmt",sections:[{local:"overview",title:"Overview"},{local:"implementation-notes",title:"Implementation Notes"},{local:"transformers.FSMTConfig",title:"FSMTConfig"},{local:"transformers.FSMTTokenizer",title:"FSMTTokenizer"},{local:"transformers.FSMTModel",title:"FSMTModel"},{local:"transformers.FSMTForConditionalGeneration",title:"FSMTForConditionalGeneration"}],title:"FSMT"};function ei(E){return Va(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ii extends Ga{constructor(p){super();Wa(this,p,ei,Ja,Ba,{})}}export{ii as default,Za as metadata};
