import{s as si,o as ri,n as B}from"../chunks/scheduler.25b97de1.js";import{S as ai,i as ii,g as i,s as n,r as m,A as di,h as d,f as t,c as s,j as M,u as p,x as c,k as y,y as a,a as r,v as f,d as h,t as u,w as g}from"../chunks/index.d9030fc9.js";import{T as Pe}from"../chunks/Tip.baa67368.js";import{D as S}from"../chunks/Docstring.e257edda.js";import{C as ue}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Dr}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as z,E as li}from"../chunks/EditOnGithub.91d95064.js";function ci(C){let l,k=`This method successively calls the <code>.generate</code> function of two different sub-models. You can specify keyword
arguments at two different levels: general arguments that will be passed to both models, or prefixed arguments
that will be passed to one of them.`,T,b,w=`For example, calling <code>.generate(input_ids=input_ids, num_beams=4, speech_do_sample=True)</code> will successively
perform beam-search decoding on the text model, and multinomial beam-search sampling on the speech model.`,_,x,L=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=k,T=n(),b=i("p"),b.innerHTML=w,_=n(),x=i("p"),x.innerHTML=L},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=k),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-x1gqs1"&&(b.innerHTML=w),_=s(v),x=d(v,"P",{"data-svelte-h":!0}),c(x)!=="svelte-nzkxpe"&&(x.innerHTML=L)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,x,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(x))}}}function mi(C){let l,k=`This method successively calls the <code>.generate</code> function of two different sub-models. You can specify keyword
arguments at two different levels: general arguments that will be passed to both models, or prefixed arguments
that will be passed to one of them.`,T,b,w=`For example, calling <code>.generate(input_ids, num_beams=4, speech_do_sample=True)</code> will successively perform
beam-search decoding on the text model, and multinomial beam-search sampling on the speech model.`,_,x,L=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=k,T=n(),b=i("p"),b.innerHTML=w,_=n(),x=i("p"),x.innerHTML=L},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=k),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-f4qe4d"&&(b.innerHTML=w),_=s(v),x=d(v,"P",{"data-svelte-h":!0}),c(x)!=="svelte-nzkxpe"&&(x.innerHTML=L)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,x,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(x))}}}function pi(C){let l,k=`This method successively calls the <code>.generate</code> function of two different sub-models. You can specify keyword
arguments at two different levels: general arguments that will be passed to both models, or prefixed arguments
that will be passed to one of them.`,T,b,w=`For example, calling <code>.generate(input_features, num_beams=4, speech_do_sample=True)</code> will successively perform
beam-search decoding on the text model, and multinomial beam-search sampling on the speech model.`,_,x,L=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=k,T=n(),b=i("p"),b.innerHTML=w,_=n(),x=i("p"),x.innerHTML=L},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=k),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-v2xo2a"&&(b.innerHTML=w),_=s(v),x=d(v,"P",{"data-svelte-h":!0}),c(x)!=="svelte-nzkxpe"&&(x.innerHTML=L)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,x,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(x))}}}function fi(C){let l,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=i("p"),l.innerHTML=k},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=k)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function hi(C){let l,k=`Most generation-controlling parameters are set in <code>generation_config</code> which, if not passed, will be set to the
model’s default generation configuration. You can override any <code>generation_config</code> by passing the corresponding
parameters to generate(), e.g. <code>.generate(inputs, num_beams=4, do_sample=True)</code>.`,T,b,w=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=k,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=k),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,x){r(_,l,x),r(_,T,x),r(_,b,x)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function ui(C){let l,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=i("p"),l.innerHTML=k},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=k)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function gi(C){let l,k=`Most generation-controlling parameters are set in <code>generation_config</code> which, if not passed, will be set to the
model’s default generation configuration. You can override any <code>generation_config</code> by passing the corresponding
parameters to generate(), e.g. <code>.generate(inputs, num_beams=4, do_sample=True)</code>.`,T,b,w=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=k,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=k),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,x){r(_,l,x),r(_,T,x),r(_,b,x)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function _i(C){let l,k;return l=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUTW9kZWwlMkMlMjBTZWFtbGVzc000VENvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTZWFtbGVzc000VCUyMCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTZWFtbGVzc000VENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TModel, SeamlessM4TConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SeamlessM4T &quot;facebook/hf-seamless-m4t-medium&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SeamlessM4TConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the &quot;facebook/hf-seamless-m4t-medium&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){m(l.$$.fragment)},l(T){p(l.$$.fragment,T)},m(T,b){f(l,T,b),k=!0},p:B,i(T){k||(h(l.$$.fragment,T),k=!0)},o(T){u(l.$$.fragment,T),k=!1},d(T){g(l,T)}}}function Ti(C){let l,k="Examples:",T,b,w;return b=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUVG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwU2VhbWxlc3NNNFRUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMiUyQyUyMHNyY19sYW5nJTNEJTIyZW5nJTIyJTJDJTIwdGd0X2xhbmclM0QlMjJmcmElMjIlMEEpJTBBZXhhbXBsZV9lbmdsaXNoX3BocmFzZSUyMCUzRCUyMCUyMiUyMFVOJTIwQ2hpZWYlMjBTYXlzJTIwVGhlcmUlMjBJcyUyME5vJTIwTWlsaXRhcnklMjBTb2x1dGlvbiUyMGluJTIwU3lyaWElMjIlMEFleHBlY3RlZF90cmFuc2xhdGlvbl9mcmVuY2glMjAlM0QlMjAlMjJMZSUyMGNoZWYlMjBkZSUyMGwnT05VJTIwYWZmaXJtZSUyMHF1J2lsJTIwbid5JTIwYSUyMHBhcyUyMGRlJTIwc29sdXRpb24lMjBtaWxpdGFpcmUlMjBlbiUyMFN5cmllLiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTJDJTIwdGV4dF90YXJnZXQlM0RleHBlY3RlZF90cmFuc2xhdGlvbl9mcmVuY2glMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SeamlessM4TTokenizer.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra&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(){l=i("p"),l.textContent=k,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=k),T=s(_),p(b.$$.fragment,_)},m(_,x){r(_,l,x),r(_,T,x),f(b,_,x),w=!0},p:B,i(_){w||(h(b.$$.fragment,_),w=!0)},o(_){u(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),g(b,_)}}}function bi(C){let l,k="Examples:",T,b,w;return b=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUVG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyMFNlYW1sZXNzTTRUVG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbmclMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMmZyYSUyMiUwQSklMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQWV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyMCUzRCUyMCUyMkxlJTIwY2hlZiUyMGRlJTIwbCdPTlUlMjBhZmZpcm1lJTIwcXUnaWwlMjBuJ3klMjBhJTIwcGFzJTIwZGUlMjBzb2x1dGlvbiUyMG1pbGl0YWlyZSUyMGVuJTIwU3lyaWUuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKGV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMkMlMjB0ZXh0X3RhcmdldCUzRGV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SeamlessM4TTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra&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(){l=i("p"),l.textContent=k,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=k),T=s(_),p(b.$$.fragment,_)},m(_,x){r(_,l,x),r(_,T,x),f(b,_,x),w=!0},p:B,i(_){w||(h(b.$$.fragment,_),w=!0)},o(_){u(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),g(b,_)}}}function vi(C){let l,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=i("p"),l.innerHTML=k},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=k)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function xi(C){let l,k,T,b,w,_,x,L,v,F='The SeamlessM4T model was proposed in <a href="https://dl.fbaipublicfiles.com/seamless/seamless_m4t_paper.pdf" rel="nofollow">SeamlessM4T — Massively Multilingual &amp; Multimodal Machine Translation</a> by the Seamless Communication team from Meta AI.',ln,Ge,Rr='This is the <strong>version 1</strong> release of the model. For the updated <strong>version 2</strong> release, refer to the <a href="https://huggingface.co/docs/transformers/main/model_doc/seamless_m4t_v2" rel="nofollow">Seamless M4T v2 docs</a>.',cn,Je,Or="SeamlessM4T is a collection of models designed to provide high quality translation, allowing people from different linguistic communities to communicate effortlessly through speech and text.",mn,je,Br="SeamlessM4T enables multiple tasks without relying on separate models:",pn,He,Xr="<li>Speech-to-speech translation (S2ST)</li> <li>Speech-to-text translation (S2TT)</li> <li>Text-to-speech translation (T2ST)</li> <li>Text-to-text translation (T2TT)</li> <li>Automatic speech recognition (ASR)</li>",fn,We,Yr='<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> can perform all the above tasks, but each task also has its own dedicated sub-model.',hn,Ve,Ar="The abstract from the paper is the following:",un,Ze,Qr='<em>What does it take to create the Babel Fish, a tool that can help individuals translate speech between any two languages? While recent breakthroughs in text-based models have pushed machine translation coverage beyond 200 languages, unified speech-to-speech translation models have yet to achieve similar strides. More specifically, conventional speech-to-speech translation systems rely on cascaded systems that perform translation progressively, putting high-performing unified systems out of reach. To address these gaps, we introduce SeamlessM4T, a single model that supports speech-to-speech translation, speech-to-text translation, text-to-speech translation, text-to-text translation, and automatic speech recognition for up to 100 languages. To build this, we used 1 million hours of open speech audio data to learn self-supervised speech representations with w2v-BERT 2.0. Subsequently, we created a multimodal corpus of automatically aligned speech translations. Filtered and combined with human-labeled and pseudo-labeled data, we developed the first multilingual system capable of translating from and into English for both speech and text. On FLEURS, SeamlessM4T sets a new standard for translations into multiple target languages, achieving an improvement of 20% BLEU over the previous SOTA in direct speech-to-text translation. Compared to strong cascaded models, SeamlessM4T improves the quality of into-English translation by 1.3 BLEU points in speech-to-text and by 2.6 ASR-BLEU points in speech-to-speech. Tested for robustness, our system performs better against background noises and speaker variations in speech-to-text tasks compared to the current SOTA model. Critically, we evaluated SeamlessM4T on gender bias and added toxicity to assess translation safety. Finally, all contributions in this work are open-sourced and accessible at <a href="https://github.com/facebookresearch/seamless_communication" rel="nofollow">https://github.com/facebookresearch/seamless_communication</a></em>',gn,Ee,_n,De,Kr="First, load the processor and a checkpoint of the model:",Tn,Re,bn,Oe,ea="You can seamlessly use this model on text or on audio, to generated either translated text or translated audio.",vn,Be,ta="Here is how to use the processor to process text and audio:",xn,Xe,kn,Ye,Mn,Ae,oa='<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> can <em>seamlessly</em> generate text or speech with few or no changes. Let’s target Russian voice translation:',yn,Qe,wn,Ke,na="With basically the same code, I’ve translated English text and Arabic speech to Russian speech samples.",Sn,et,$n,tt,sa=`Similarly, you can generate translated text from audio files or from text with the same model. You only have to pass <code>generate_speech=False</code> to <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel.generate">SeamlessM4TModel.generate()</a>.
This time, let’s translate to French.`,zn,ot,Cn,nt,Fn,st,qn,rt,ra=`<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> is transformers top level model to generate speech and text, but you can also use dedicated models that perform the task without additional components, thus reducing the memory footprint.
For example, you can replace the audio-to-audio generation snippet with the model dedicated to the S2ST task, the rest is exactly the same code:`,In,at,Un,it,aa="Or you can replace the text-to-text generation snippet with the model dedicated to the T2TT task, you only have to remove <code>generate_speech=False</code>.",Ln,dt,Nn,lt,ia='Feel free to try out <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> and <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">SeamlessM4TForTextToSpeech</a> as well.',Pn,ct,Gn,mt,da="You have the possibility to change the speaker used for speech synthesis with the <code>spkr_id</code> argument. Some <code>spkr_id</code> works better than other for some languages!",Jn,pt,jn,ft,la='You can use different <a href="./generation_strategies">generation strategies</a> for speech and text generation, e.g <code>.generate(input_ids=input_ids, text_num_beams=4, speech_do_sample=True)</code> which will successively perform beam-search decoding on the text model, and multinomial sampling on the speech model.',Hn,ht,Wn,ut,ca='Use <code>return_intermediate_token_ids=True</code> with <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> to return both speech and text !',Vn,gt,Zn,_t,ma="SeamlessM4T features a versatile architecture that smoothly handles the sequential generation of text and speech. This setup comprises two sequence-to-sequence (seq2seq) models. The first model translates the input modality into translated text, while the second model generates speech tokens, known as “unit tokens,” from the translated text.",En,Tt,pa='Each modality has its own dedicated encoder with a unique architecture. Additionally, for speech output, a vocoder inspired by the <a href="https://arxiv.org/abs/2010.05646" rel="nofollow">HiFi-GAN</a> architecture is placed on top of the second seq2seq model.',Dn,bt,fa="Here’s how the generation process works:",Rn,vt,ha="<li>Input text or speech is processed through its specific encoder.</li> <li>A decoder creates text tokens in the desired language.</li> <li>If speech generation is required, the second seq2seq model, following a standard encoder-decoder structure, generates unit tokens.</li> <li>These unit tokens are then passed through the final vocoder to produce the actual speech.</li>",On,xt,ua='This model was contributed by <a href="https://huggingface.co/ylacombe" rel="nofollow">ylacombe</a>. The original code can be found <a href="https://github.com/facebookresearch/seamless_communication" rel="nofollow">here</a>.',Bn,kt,Xn,V,Mt,Is,go,ga=`The original SeamlessM4T Model transformer which can be used for every tasks available (S2ST, S2TT, T2TT, T2ST).
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Us,X,yt,Ls,_o,_a="Generates translated token ids and/or translated audio waveforms.",Ns,ge,Yn,wt,An,Z,St,Ps,To,Ta=`The text-to-speech SeamlessM4T Model transformer which can be used for T2ST.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Gs,Y,$t,Js,bo,ba="Generates translated audio waveforms.",js,_e,Qn,zt,Kn,E,Ct,Hs,vo,va=`The speech-to-speech SeamlessM4T Model transformer which can be used for S2ST.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Ws,A,Ft,Vs,xo,xa="Generates translated audio waveforms.",Zs,Te,es,qt,ts,N,It,Es,ko,ka=`The text-to-text SeamlessM4T Model transformer which can be used for T2TT.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Ds,Q,Ut,Rs,Mo,Ma='The <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToText">SeamlessM4TForTextToText</a> forward method, overrides the <code>__call__</code> special method.',Os,be,Bs,K,Lt,Xs,yo,ya="Generates sequences of token ids.",Ys,ve,os,Nt,ns,P,Pt,As,wo,wa=`The speech-to-text SeamlessM4T Model transformer which can be used for S2TT.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Qs,ee,Gt,Ks,So,Sa='The <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',er,xe,tr,te,Jt,or,$o,$a="Generates sequences of token ids.",nr,ke,ss,jt,rs,G,Ht,sr,zo,za=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>. It is used to instantiate an
SeamlessM4T 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 SeamlessM4T
<a href="https://huggingface.co/%22facebook/hf-seamless-m4t-medium%22" rel="nofollow">“facebook/hf-seamless-m4t-medium”</a> architecture.`,rr,Co,Ca=`Configuration objects inherit from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ar,Me,as,Wt,is,$,Vt,ir,Fo,Fa="Construct a SeamlessM4T tokenizer.",dr,qo,qa=`Adapted from <a href="/docs/transformers/pr_30674/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> and <a href="/docs/transformers/pr_30674/en/model_doc/xlnet#transformers.XLNetTokenizer">XLNetTokenizer</a>. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,lr,Io,Ia="The tokenization method is <code>&lt;language code&gt; &lt;tokens&gt; &lt;eos&gt;</code> for source language documents, and <code>&lt;eos&gt; &lt;language code&gt; &lt;tokens&gt; &lt;eos&gt;</code> for target language documents.",cr,ye,mr,Uo,Zt,pr,H,Et,fr,Lo,Ua=`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:`,hr,No,La="<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>",ur,Po,Na=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,gr,we,Dt,_r,Go,Pa=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Tr,Se,Rt,br,Jo,Ga=`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.`,vr,jo,Ot,ds,Bt,ls,I,Xt,xr,Ho,Ja=`Construct a “fast” SeamlessM4T 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>.`,kr,Wo,ja=`This tokenizer inherits from <a href="/docs/transformers/pr_30674/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.`,Mr,Vo,Ha="The tokenization method is <code>&lt;language code&gt; &lt;tokens&gt; &lt;eos&gt;</code> for source language documents, and <code>&lt;eos&gt; &lt;language code&gt; &lt;tokens&gt; &lt;eos&gt;</code> for target language documents.",yr,$e,wr,Zo,Yt,cs,At,ms,U,Qt,Sr,Eo,Wa="Constructs a SeamlessM4T feature extractor.",$r,Do,Va=`This feature extractor inherits from <a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`,zr,Ro,Za="This class extracts mel-filter bank features from raw speech.",Cr,ze,Kt,Fr,Oo,Ea="Main method to featurize and prepare for the model one or several sequence(s).",ps,eo,fs,J,to,qr,Bo,Da=`Constructs a SeamlessM4T processor which wraps a SeamlessM4T feature extractor and a SeamlessM4T tokenizer into a
single processor.`,Ir,Xo,Ra=`<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> offers all the functionalities of <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> and
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizerFast">SeamlessM4TTokenizerFast</a>. See the <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for
more information.`,Ur,Ce,oo,Lr,Yo,Oa=`Main method to prepare for the model one or several sequences(s) and audio(s). This method forwards the <code>text</code>
and <code>kwargs</code> arguments to SeamlessM4TTokenizerFast’s <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizerFast.__call__"><strong>call</strong>()</a> if <code>text</code> is not
<code>None</code> to encode the text. To prepare the audio(s), this method forwards the <code>audios</code> and <code>kwrags</code> arguments to
SeamlessM4TFeatureExtractor’s <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__"><strong>call</strong>()</a> if <code>audios</code> is not <code>None</code>. Please refer
to the doctsring of the above two methods for more information.`,hs,no,us,j,so,Nr,Ao,Ba=`Code HiFi-GAN vocoder as described in this <a href="https://github.com/facebookresearch/speech-resynthesis" rel="nofollow">repository</a>.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,Pr,Qo,Xa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Gr,Ko,ro,gs,ao,_s,se,io,Jr,Fe,lo,jr,en,Ya=`Converts a log-mel spectrogram into a speech waveform. Passing a batch of log-mel spectrograms returns a batch
of speech waveforms. Passing a single, un-batched log-mel spectrogram returns a single, un-batched speech
waveform.`,Ts,co,bs,re,mo,Hr,tn,Aa=`Transformer bare text-to-unit encoder-decoder. The encoder is a <code>SeamlessM4TEncoder</code> without embeddings and the decoder is a <code>SeamlessM4TDecoder</code>.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,vs,po,xs,D,fo,Wr,on,Qa=`Transformer text-to-unit encoder-decoder with a language model head. The base encoder-decoder model is a <code>SeamlessM4TTextToUnit</code>.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Vr,oe,ho,Zr,nn,Ka='The <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTextToUnitForConditionalGeneration">SeamlessM4TTextToUnitForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Er,qe,ks,uo,Ms,dn,ys;return w=new z({props:{title:"SeamlessM4T",local:"seamlessm4t",headingTag:"h1"}}),x=new z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ee=new z({props:{title:"Usage",local:"usage",headingTag:"h2"}}),Re=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTZWFtbGVzc000VE1vZGVsJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKSUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SeamlessM4TModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TModel.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),Xe=new ue({props:{code:"JTIzJTIwbGV0J3MlMjBsb2FkJTIwYW4lMjBhdWRpbyUyMHNhbXBsZSUyMGZyb20lMjBhbiUyMEFyYWJpYyUyMHNwZWVjaCUyMGNvcnB1cyUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXJhYmljX3NwZWVjaF9jb3JwdXMlMjIlMkMlMjBzcGxpdCUzRCUyMnRlc3QlMjIlMkMlMjBzdHJlYW1pbmclM0RUcnVlKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMG5leHQoaXRlcihkYXRhc2V0KSklNUIlMjJhdWRpbyUyMiU1RCUwQSUwQSUyMyUyMG5vdyUyQyUyMHByb2Nlc3MlMjBpdCUwQWF1ZGlvX2lucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpb3MlM0RhdWRpb19zYW1wbGUlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwbm93JTJDJTIwcHJvY2VzcyUyMHNvbWUlMjBFbmdsaXNoJTIwdGVzdCUyMGFzJTIwd2VsbCUwQXRleHRfaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlMjAlM0QlMjAlMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbmclMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s load an audio sample from an Arabic speech corpus</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;arabic_speech_corpus&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(dataset))[<span class="hljs-string">&quot;audio&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now, process it</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_inputs = processor(audios=audio_sample[<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now, process some English test as well</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text_inputs = processor(text = <span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),Ye=new z({props:{title:"Speech",local:"speech",headingTag:"h3"}}),Qe=new ue({props:{code:"YXVkaW9fYXJyYXlfZnJvbV90ZXh0JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKip0ZXh0X2lucHV0cyUyQyUyMHRndF9sYW5nJTNEJTIycnVzJTIyKSU1QjAlNUQuY3B1KCkubnVtcHkoKS5zcXVlZXplKCklMEFhdWRpb19hcnJheV9mcm9tX2F1ZGlvJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKiphdWRpb19pbnB1dHMlMkMlMjB0Z3RfbGFuZyUzRCUyMnJ1cyUyMiklNUIwJTVELmNwdSgpLm51bXB5KCkuc3F1ZWV6ZSgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array_from_text = model.generate(**text_inputs, tgt_lang=<span class="hljs-string">&quot;rus&quot;</span>)[<span class="hljs-number">0</span>].cpu().numpy().squeeze()
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array_from_audio = model.generate(**audio_inputs, tgt_lang=<span class="hljs-string">&quot;rus&quot;</span>)[<span class="hljs-number">0</span>].cpu().numpy().squeeze()`,wrap:!1}}),et=new z({props:{title:"Text",local:"text",headingTag:"h3"}}),ot=new ue({props:{code:"JTIzJTIwZnJvbSUyMGF1ZGlvJTBBb3V0cHV0X3Rva2VucyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqYXVkaW9faW5wdXRzJTJDJTIwdGd0X2xhbmclM0QlMjJmcmElMjIlMkMlMjBnZW5lcmF0ZV9zcGVlY2glM0RGYWxzZSklMEF0cmFuc2xhdGVkX3RleHRfZnJvbV9hdWRpbyUyMCUzRCUyMHByb2Nlc3Nvci5kZWNvZGUob3V0cHV0X3Rva2VucyU1QjAlNUQudG9saXN0KCklNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTBBJTIzJTIwZnJvbSUyMHRleHQlMEFvdXRwdXRfdG9rZW5zJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKip0ZXh0X2lucHV0cyUyQyUyMHRndF9sYW5nJTNEJTIyZnJhJTIyJTJDJTIwZ2VuZXJhdGVfc3BlZWNoJTNERmFsc2UpJTBBdHJhbnNsYXRlZF90ZXh0X2Zyb21fdGV4dCUyMCUzRCUyMHByb2Nlc3Nvci5kZWNvZGUob3V0cHV0X3Rva2VucyU1QjAlNUQudG9saXN0KCklNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># from audio</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output_tokens = model.generate(**audio_inputs, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>, generate_speech=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_text_from_audio = processor.decode(output_tokens[<span class="hljs-number">0</span>].tolist()[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># from text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output_tokens = model.generate(**text_inputs, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>, generate_speech=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_text_from_text = processor.decode(output_tokens[<span class="hljs-number">0</span>].tolist()[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)`,wrap:!1}}),nt=new z({props:{title:"Tips",local:"tips",headingTag:"h3"}}),st=new z({props:{title:"1. Use dedicated models",local:"1-use-dedicated-models",headingTag:"h4"}}),at=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2glMEFtb2RlbCUyMCUzRCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2guZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForSpeechToSpeech
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForSpeechToSpeech.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),dt=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yVGV4dFRvVGV4dCUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRGb3JUZXh0VG9UZXh0LmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmhmLXNlYW1sZXNzLW00dC1tZWRpdW0lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForTextToText
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForTextToText.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),ct=new z({props:{title:"2. Change the speaker identity",local:"2-change-the-speaker-identity",headingTag:"h4"}}),pt=new z({props:{title:"3. Change the generation strategy",local:"3-change-the-generation-strategy",headingTag:"h4"}}),ht=new z({props:{title:"4. Generate speech and text at the same time",local:"4-generate-speech-and-text-at-the-same-time",headingTag:"h4"}}),gt=new z({props:{title:"Model architecture",local:"model-architecture",headingTag:"h2"}}),kt=new z({props:{title:"SeamlessM4TModel",local:"transformers.SeamlessM4TModel",headingTag:"h2"}}),Mt=new S({props:{name:"class transformers.SeamlessM4TModel",anchor:"transformers.SeamlessM4TModel",parameters:[{name:"config",val:""},{name:"current_modality",val:" = 'text'"}],parametersDescription:[{anchor:"transformers.SeamlessM4TModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.SeamlessM4TModel.current_modality",description:`<strong>current_modality</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;text&quot;</code>) &#x2014;
Default modality. Used to initialize the model.`,name:"current_modality"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3942"}}),yt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TModel.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"generate_speech",val:": Optional = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TModel.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.SeamlessM4TModel.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>, <em>optional</em>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4TModel.generate.return_intermediate_token_ids",description:`<strong>return_intermediate_token_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, also returns the intermediate generated text and unit tokens. Set to <code>True</code> if you also want
to get translated text alongside the audio. Note that if <code>generate_speech=True</code>, this parameter will be
ignored.`,name:"return_intermediate_token_ids"},{anchor:"transformers.SeamlessM4TModel.generate.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.SeamlessM4TModel.generate.spkr_id",description:`<strong>spkr_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the speaker used for speech synthesis. Must be lower than <code>config.vocoder_num_spkrs</code>.`,name:"spkr_id"},{anchor:"transformers.SeamlessM4TModel.generate.generate_speech",description:`<strong>generate_speech</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If <code>False</code>, will only returns the text tokens and won&#x2019;t generate speech.`,name:"generate_speech"},{anchor:"transformers.SeamlessM4TModel.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/pr_30674/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L4156",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>generate_speech</code> and <code>return_intermediate_token_ids</code>, returns <code>SeamlessM4TGenerationOutput</code>.</li>
<li>If <code>generate_speech</code> and not <code>return_intermediate_token_ids</code>, returns a tuple composed of waveforms of
shape <code>(batch_size, sequence_length)</code>and and <code>waveform_lengths</code> which gives the length of each sample.</li>
<li>If <code>generate_speech=False</code>, it will returns <code>ModelOutput</code>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Union[SeamlessM4TGenerationOutput, Tuple[Tensor], ModelOutput]</code></p>
`}}),ge=new Pe({props:{$$slots:{default:[ci]},$$scope:{ctx:C}}}),wt=new z({props:{title:"SeamlessM4TForTextToSpeech",local:"transformers.SeamlessM4TForTextToSpeech",headingTag:"h2"}}),St=new S({props:{name:"class transformers.SeamlessM4TForTextToSpeech",anchor:"transformers.SeamlessM4TForTextToSpeech",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3230"}}),$t=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToSpeech.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.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>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.SeamlessM4TForTextToSpeech.generate.return_intermediate_token_ids",description:`<strong>return_intermediate_token_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, also returns the intermediate generated text and unit tokens. Set to <code>True</code> if you also want
to get translated text alongside the audio.`,name:"return_intermediate_token_ids"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.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.SeamlessM4TForTextToSpeech.generate.spkr_id",description:`<strong>spkr_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the speaker used for speech synthesis. Must be lower than <code>config.vocoder_num_spkrs</code>.`,name:"spkr_id"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/pr_30674/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3382",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>return_intermediate_token_ids</code>, returns <code>SeamlessM4TGenerationOutput</code>.</li>
<li>If not <code>return_intermediate_token_ids</code>, returns a tuple composed of waveforms of shape <code>(batch_size, sequence_length)</code>and and <code>waveform_lengths</code> which gives the length of each sample.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Union[SeamlessM4TGenerationOutput, Tuple[Tensor]]</code></p>
`}}),_e=new Pe({props:{$$slots:{default:[mi]},$$scope:{ctx:C}}}),zt=new z({props:{title:"SeamlessM4TForSpeechToSpeech",local:"transformers.SeamlessM4TForSpeechToSpeech",headingTag:"h2"}}),Ct=new S({props:{name:"class transformers.SeamlessM4TForSpeechToSpeech",anchor:"transformers.SeamlessM4TForSpeechToSpeech",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3581"}}),Ft=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate",parameters:[{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.return_intermediate_token_ids",description:`<strong>return_intermediate_token_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, also returns the intermediate generated text and unit tokens. Set to <code>True</code> if you also want
to get translated text alongside the audio.`,name:"return_intermediate_token_ids"},{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.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.SeamlessM4TForSpeechToSpeech.generate.spkr_id",description:`<strong>spkr_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the speaker used for speech synthesis. Must be lower than <code>config.vocoder_num_spkrs</code>.`,name:"spkr_id"},{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/pr_30674/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3736",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>return_intermediate_token_ids</code>, returns <code>SeamlessM4TGenerationOutput</code>.</li>
<li>If not <code>return_intermediate_token_ids</code>, returns a tuple composed of waveforms of shape <code>(batch_size, sequence_length)</code>and and <code>waveform_lengths</code> which gives the length of each sample.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Union[SeamlessM4TGenerationOutput, Tuple[Tensor]]</code></p>
`}}),Te=new Pe({props:{$$slots:{default:[pi]},$$scope:{ctx:C}}}),qt=new z({props:{title:"SeamlessM4TForTextToText",local:"transformers.SeamlessM4TForTextToText",headingTag:"h2"}}),It=new S({props:{name:"class transformers.SeamlessM4TForTextToText",anchor:"transformers.SeamlessM4TForTextToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2653"}}),Ut=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForTextToText.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.SeamlessM4TForTextToText.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.SeamlessM4TForTextToText.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_30674/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart 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>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TForTextToText.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(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>, <em>optional</em>) 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.SeamlessM4TForTextToText.forward.past_key_values",description:`<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>) &#x2014;
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>
<p>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.SeamlessM4TForTextToText.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TForTextToText.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 be in <code>[-100, 0, ..., config.vocab_size]</code> (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"},{anchor:"transformers.SeamlessM4TForTextToText.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#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.SeamlessM4TForTextToText.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.SeamlessM4TForTextToText.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.SeamlessM4TForTextToText.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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2705"}}),be=new Pe({props:{$$slots:{default:[fi]},$$scope:{ctx:C}}}),Lt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToText.generate",parameters:[{name:"input_ids",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"generation_config",val:" = None"},{name:"logits_processor",val:" = None"},{name:"stopping_criteria",val:" = None"},{name:"prefix_allowed_tokens_fn",val:" = None"},{name:"synced_gpus",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of varying shape depending on the modality, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.SeamlessM4TForTextToText.generate.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.SeamlessM4TForTextToText.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/pr_30674/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>&#x2019;s
default values, whose documentation should be checked to parameterize generation.`,name:"generation_config"},{anchor:"transformers.SeamlessM4TForTextToText.generate.logits_processor",description:`<strong>logits_processor</strong> (<code>LogitsProcessorList</code>, <em>optional</em>) &#x2014;
Custom logits processors that complement the default logits processors built from arguments and
generation config. If a logit processor is passed that is already created with the arguments or a
generation config an error is thrown. This feature is intended for advanced users.`,name:"logits_processor"},{anchor:"transformers.SeamlessM4TForTextToText.generate.stopping_criteria",description:`<strong>stopping_criteria</strong> (<code>StoppingCriteriaList</code>, <em>optional</em>) &#x2014;
Custom stopping criteria that complement the default stopping criteria built from arguments and a
generation config. If a stopping criteria is passed that is already created with the arguments or a
generation config an error is thrown. This feature is intended for advanced users.`,name:"stopping_criteria"},{anchor:"transformers.SeamlessM4TForTextToText.generate.prefix_allowed_tokens_fn",description:`<strong>prefix_allowed_tokens_fn</strong> (<code>Callable[[int, torch.Tensor], List[int]]</code>, <em>optional</em>) &#x2014;
If provided, this function constraints the beam search to allowed tokens only at each step. If not
provided no constraint is applied. This function takes 2 arguments: the batch ID <code>batch_id</code> and
<code>input_ids</code>. It has to return a list with the allowed tokens for the next generation step conditioned
on the batch ID <code>batch_id</code> and the previously generated tokens <code>inputs_ids</code>. This argument is useful
for constrained generation conditioned on the prefix, as described in <a href="https://arxiv.org/abs/2010.00904" rel="nofollow">Autoregressive Entity
Retrieval</a>.`,name:"prefix_allowed_tokens_fn"},{anchor:"transformers.SeamlessM4TForTextToText.generate.synced_gpus",description:`<strong>synced_gpus</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to continue running the while loop until max_length (needed for ZeRO stage 3)`,name:"synced_gpus"},{anchor:"transformers.SeamlessM4TForTextToText.generate.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Ad hoc parametrization of <code>generate_config</code> and/or additional model-specific kwargs that will be
forwarded to the <code>forward</code> function of the model.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2797",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> (if <code>return_dict_in_generate=True</code>
or when <code>config.return_dict_in_generate=True</code>) or a <code>torch.FloatTensor</code>. The possible
<a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/pr_30674/en/internal/generation_utils#transformers.generation.GenerateEncoderDecoderOutput"
>GenerateEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/pr_30674/en/internal/generation_utils#transformers.generation.GenerateBeamEncoderDecoderOutput"
>GenerateBeamEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ve=new Pe({props:{warning:!0,$$slots:{default:[hi]},$$scope:{ctx:C}}}),Nt=new z({props:{title:"SeamlessM4TForSpeechToText",local:"transformers.SeamlessM4TForSpeechToText",headingTag:"h2"}}),Pt=new S({props:{name:"class transformers.SeamlessM4TForSpeechToText",anchor:"transformers.SeamlessM4TForSpeechToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2940"}}),Gt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForSpeechToText.forward",parameters:[{name:"input_features",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.SeamlessM4TForSpeechToText.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_30674/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart 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>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(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>, <em>optional</em>) 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.SeamlessM4TForSpeechToText.forward.past_key_values",description:`<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>) &#x2014;
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>
<p>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.SeamlessM4TForSpeechToText.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TForSpeechToText.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 be in <code>[-100, 0, ..., config.vocab_size]</code> (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"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#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.SeamlessM4TForSpeechToText.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.SeamlessM4TForSpeechToText.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.SeamlessM4TForSpeechToText.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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2987"}}),xe=new Pe({props:{$$slots:{default:[ui]},$$scope:{ctx:C}}}),Jt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToText.generate",parameters:[{name:"input_features",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"generation_config",val:" = None"},{name:"logits_processor",val:" = None"},{name:"stopping_criteria",val:" = None"},{name:"prefix_allowed_tokens_fn",val:" = None"},{name:"synced_gpus",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.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.SeamlessM4TForSpeechToText.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/pr_30674/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>&#x2019;s
default values, whose documentation should be checked to parameterize generation.`,name:"generation_config"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.logits_processor",description:`<strong>logits_processor</strong> (<code>LogitsProcessorList</code>, <em>optional</em>) &#x2014;
Custom logits processors that complement the default logits processors built from arguments and
generation config. If a logit processor is passed that is already created with the arguments or a
generation config an error is thrown. This feature is intended for advanced users.`,name:"logits_processor"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.stopping_criteria",description:`<strong>stopping_criteria</strong> (<code>StoppingCriteriaList</code>, <em>optional</em>) &#x2014;
Custom stopping criteria that complement the default stopping criteria built from arguments and a
generation config. If a stopping criteria is passed that is already created with the arguments or a
generation config an error is thrown. This feature is intended for advanced users.`,name:"stopping_criteria"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.prefix_allowed_tokens_fn",description:`<strong>prefix_allowed_tokens_fn</strong> (<code>Callable[[int, torch.Tensor], List[int]]</code>, <em>optional</em>) &#x2014;
If provided, this function constraints the beam search to allowed tokens only at each step. If not
provided no constraint is applied. This function takes 2 arguments: the batch ID <code>batch_id</code> and
<code>input_ids</code>. It has to return a list with the allowed tokens for the next generation step conditioned
on the batch ID <code>batch_id</code> and the previously generated tokens <code>inputs_ids</code>. This argument is useful
for constrained generation conditioned on the prefix, as described in <a href="https://arxiv.org/abs/2010.00904" rel="nofollow">Autoregressive Entity
Retrieval</a>.`,name:"prefix_allowed_tokens_fn"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.synced_gpus",description:`<strong>synced_gpus</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to continue running the while loop until max_length (needed for ZeRO stage 3)`,name:"synced_gpus"},{anchor:"transformers.SeamlessM4TForSpeechToText.generate.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Ad hoc parametrization of <code>generate_config</code> and/or additional model-specific kwargs that will be
forwarded to the <code>forward</code> function of the model.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3086",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> (if <code>return_dict_in_generate=True</code>
or when <code>config.return_dict_in_generate=True</code>) or a <code>torch.FloatTensor</code>. The possible
<a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/pr_30674/en/internal/generation_utils#transformers.generation.GenerateEncoderDecoderOutput"
>GenerateEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/pr_30674/en/internal/generation_utils#transformers.generation.GenerateBeamEncoderDecoderOutput"
>GenerateBeamEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ke=new Pe({props:{warning:!0,$$slots:{default:[gi]},$$scope:{ctx:C}}}),jt=new z({props:{title:"SeamlessM4TConfig",local:"transformers.SeamlessM4TConfig",headingTag:"h2"}}),Ht=new S({props:{name:"class transformers.SeamlessM4TConfig",anchor:"transformers.SeamlessM4TConfig",parameters:[{name:"vocab_size",val:" = 256102"},{name:"t2u_vocab_size",val:" = 10082"},{name:"hidden_size",val:" = 1024"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"max_position_embeddings",val:" = 1024"},{name:"is_encoder_decoder",val:" = True"},{name:"encoder_layerdrop",val:" = 0.05"},{name:"decoder_layerdrop",val:" = 0.05"},{name:"activation_function",val:" = 'relu'"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = True"},{name:"encoder_layers",val:" = 24"},{name:"encoder_ffn_dim",val:" = 8192"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 24"},{name:"decoder_ffn_dim",val:" = 8192"},{name:"decoder_attention_heads",val:" = 16"},{name:"decoder_start_token_id",val:" = 3"},{name:"max_new_tokens",val:" = 256"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 2"},{name:"eos_token_id",val:" = 3"},{name:"speech_encoder_layers",val:" = 24"},{name:"speech_encoder_attention_heads",val:" = 16"},{name:"speech_encoder_intermediate_size",val:" = 4096"},{name:"speech_encoder_hidden_act",val:" = 'swish'"},{name:"speech_encoder_dropout",val:" = 0.0"},{name:"add_adapter",val:" = True"},{name:"speech_encoder_layerdrop",val:" = 0.1"},{name:"feature_projection_input_dim",val:" = 160"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"adaptor_kernel_size",val:" = 8"},{name:"adaptor_stride",val:" = 8"},{name:"adaptor_dropout",val:" = 0.1"},{name:"num_adapter_layers",val:" = 1"},{name:"position_embeddings_type",val:" = 'relative'"},{name:"rotary_embedding_base",val:" = 10000"},{name:"max_source_positions",val:" = 4096"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"t2u_bos_token_id",val:" = 0"},{name:"t2u_pad_token_id",val:" = 1"},{name:"t2u_eos_token_id",val:" = 2"},{name:"t2u_decoder_start_token_id",val:" = 2"},{name:"t2u_max_new_tokens",val:" = 1024"},{name:"t2u_encoder_layers",val:" = 6"},{name:"t2u_encoder_ffn_dim",val:" = 8192"},{name:"t2u_encoder_attention_heads",val:" = 16"},{name:"t2u_decoder_layers",val:" = 6"},{name:"t2u_decoder_ffn_dim",val:" = 8192"},{name:"t2u_decoder_attention_heads",val:" = 16"},{name:"t2u_max_position_embeddings",val:" = 2048"},{name:"sampling_rate",val:" = 16000"},{name:"upsample_initial_channel",val:" = 512"},{name:"upsample_rates",val:" = [5, 4, 4, 2, 2]"},{name:"upsample_kernel_sizes",val:" = [11, 8, 8, 4, 4]"},{name:"resblock_kernel_sizes",val:" = [3, 7, 11]"},{name:"resblock_dilation_sizes",val:" = [[1, 3, 5], [1, 3, 5], [1, 3, 5]]"},{name:"leaky_relu_slope",val:" = 0.1"},{name:"unit_hifi_gan_vocab_size",val:" = 10000"},{name:"unit_embed_dim",val:" = 1280"},{name:"lang_embed_dim",val:" = 256"},{name:"spkr_embed_dim",val:" = 256"},{name:"vocoder_num_langs",val:" = 36"},{name:"vocoder_num_spkrs",val:" = 200"},{name:"variance_predictor_kernel_size",val:" = 3"},{name:"var_pred_dropout",val:" = 0.5"},{name:"vocoder_offset",val:" = 4"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256102) &#x2014;
Vocabulary size of the SeamlessM4T model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>, <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">~SeamlessM4TForTextToSpeech</a> or
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToText">~SeamlessM4TForTextToText</a>.`,name:"vocab_size"},{anchor:"transformers.SeamlessM4TConfig.t2u_vocab_size",description:`<strong>t2u_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10082) &#x2014;
Unit vocabulary size of the SeamlessM4T model. Defines the number of different unit tokens that can be
represented by the <code>inputs_ids</code> passed when calling the Text-To-Units sub-model of <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>,
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToSpeech">~SeamlessM4TForSpeechToSpeech</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">~SeamlessM4TForTextToSpeech</a>.`,name:"t2u_vocab_size"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/configuration_seamless_m4t.py#L24",parameterGroups:[{title:"Parameters shared across sub-models",parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; layers in the architecture.`,name:"hidden_size"},{anchor:"transformers.SeamlessM4TConfig.initializer_range",description:`<strong>initializer_range</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:"initializer_range"},{anchor:"transformers.SeamlessM4TConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SeamlessM4TConfig.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.SeamlessM4TConfig.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 text encoder and decoder 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.SeamlessM4TConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model is used as an encoder/decoder or not.`,name:"is_encoder_decoder"},{anchor:"transformers.SeamlessM4TConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
The LayerDrop probability for the encoders. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.SeamlessM4TConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
The LayerDrop probability for the decoders. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.SeamlessM4TConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder and feed-forward layers. If string,
<code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code>, <code>&quot;swish&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.SeamlessM4TConfig.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, decoder, and pooler.`,name:"dropout"},{anchor:"transformers.SeamlessM4TConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all attention layers.`,name:"attention_dropout"},{anchor:"transformers.SeamlessM4TConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all activation layers in the model.`,name:"activation_dropout"},{anchor:"transformers.SeamlessM4TConfig.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"}]},{title:"Text encoder and text decoder specific parameters",parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer text encoder.`,name:"encoder_layers"},{anchor:"transformers.SeamlessM4TConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer text encoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.SeamlessM4TConfig.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 text encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.SeamlessM4TConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer text decoder.`,name:"decoder_layers"},{anchor:"transformers.SeamlessM4TConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer text decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.SeamlessM4TConfig.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 text decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.SeamlessM4TConfig.decoder_start_token_id",description:`<strong>decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
If an encoder-decoder model starts decoding with a different token than <em>bos</em>, the id of that token. Only
applied in the text decoder.`,name:"decoder_start_token_id"},{anchor:"transformers.SeamlessM4TConfig.max_new_tokens",description:`<strong>max_new_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The maximum numbers of text tokens to generate, ignoring the number of tokens in the prompt.`,name:"max_new_tokens"},{anchor:"transformers.SeamlessM4TConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the <em>padding</em> text token. Only applied to the text-decoder model.`,name:"pad_token_id"},{anchor:"transformers.SeamlessM4TConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the <em>beginning-of-stream</em> text token. Only applied to the text-decoder model.`,name:"bos_token_id"},{anchor:"transformers.SeamlessM4TConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The id of the <em>end-of-stream</em> text token. Only applied to the text-decoder model.`,name:"eos_token_id"}]},{title:"Speech encoder specific parameters",parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.speech_encoder_layers",description:`<strong>speech_encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer speech encoder.`,name:"speech_encoder_layers"},{anchor:"transformers.SeamlessM4TConfig.speech_encoder_attention_heads",description:`<strong>speech_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 speech encoder.`,name:"speech_encoder_attention_heads"},{anchor:"transformers.SeamlessM4TConfig.speech_encoder_intermediate_size",description:`<strong>speech_encoder_intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer speech encoder.`,name:"speech_encoder_intermediate_size"},{anchor:"transformers.SeamlessM4TConfig.speech_encoder_hidden_act",description:`<strong>speech_encoder_hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;swish&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the speech encoder. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code>, <code>&quot;swish&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"speech_encoder_hidden_act"},{anchor:"transformers.SeamlessM4TConfig.speech_encoder_dropout",description:`<strong>speech_encoder_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all layers in the speech encoder.`,name:"speech_encoder_dropout"},{anchor:"transformers.SeamlessM4TConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Add an adapter layer on top of the speech encoder.`,name:"add_adapter"},{anchor:"transformers.SeamlessM4TConfig.speech_encoder_layerdrop",description:`<strong>speech_encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability for the speech encoder. See the [LayerDrop paper](see
<a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>) for more details.`,name:"speech_encoder_layerdrop"},{anchor:"transformers.SeamlessM4TConfig.feature_projection_input_dim",description:`<strong>feature_projection_input_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 160) &#x2014;
Input dimension of the input feature projection of the speech encoder, i.e the dimension after processing
input audios with <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a>.`,name:"feature_projection_input_dim"},{anchor:"transformers.SeamlessM4TConfig.num_conv_pos_embeddings",description:`<strong>num_conv_pos_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of convolutional positional embeddings. Defines the kernel size of 1D convolutional positional
embeddings layer of the speech encoder.`,name:"num_conv_pos_embeddings"},{anchor:"transformers.SeamlessM4TConfig.num_conv_pos_embedding_groups",description:`<strong>num_conv_pos_embedding_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of groups of 1D convolutional positional embeddings layer of the speech encoder.`,name:"num_conv_pos_embedding_groups"},{anchor:"transformers.SeamlessM4TConfig.adaptor_kernel_size",description:`<strong>adaptor_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adaptor_kernel_size"},{anchor:"transformers.SeamlessM4TConfig.adaptor_stride",description:`<strong>adaptor_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adaptor_stride"},{anchor:"transformers.SeamlessM4TConfig.adaptor_dropout",description:`<strong>adaptor_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all layers in the speech adapter.`,name:"adaptor_dropout"},{anchor:"transformers.SeamlessM4TConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of convolutional layers that should be used in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"num_adapter_layers"},{anchor:"transformers.SeamlessM4TConfig.position_embeddings_type",description:`<strong>position_embeddings_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative&quot;</code>) &#x2014;
Can be specified to <code>relative</code> or <code>rotary</code> for relative or rotary position embeddings respectively. If left
<code>None</code> no relative position embedding is applied. Only applied to the speech encoder.`,name:"position_embeddings_type"},{anchor:"transformers.SeamlessM4TConfig.rotary_embedding_base",description:`<strong>rotary_embedding_base</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) &#x2014;
If <code>&quot;rotary&quot;</code> position embeddings are used, defines the size of the embedding base. Only applied to the
speech encoder.`,name:"rotary_embedding_base"},{anchor:"transformers.SeamlessM4TConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
if <code>&quot;relative&quot;</code> position embeddings are used, defines the maximum source input positions. Only applied to
the speech encoder.`,name:"max_source_positions"},{anchor:"transformers.SeamlessM4TConfig.conv_depthwise_kernel_size",description:`<strong>conv_depthwise_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 31) &#x2014;
Kernel size of convolutional depthwise 1D layer in Conformer blocks. Only applied to the speech encoder.`,name:"conv_depthwise_kernel_size"}]},{title:"Text-To-Unit (t2u) model specific parameters",parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.t2u_bos_token_id",description:`<strong>t2u_bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the <em>beginning-of-stream</em> unit token. Only applied to the text-to-unit seq2seq model.`,name:"t2u_bos_token_id"},{anchor:"transformers.SeamlessM4TConfig.t2u_pad_token_id",description:`<strong>t2u_pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The id of the <em>padding</em> unit token. Only applied to the text-to-unit seq2seq model.`,name:"t2u_pad_token_id"},{anchor:"transformers.SeamlessM4TConfig.t2u_eos_token_id",description:`<strong>t2u_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the <em>end-of-stream</em> unit token. Only applied to the text-to-unit seq2seq model.`,name:"t2u_eos_token_id"},{anchor:"transformers.SeamlessM4TConfig.t2u_decoder_start_token_id",description:`<strong>t2u_decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
If an encoder-decoder model starts decoding with a different token than <em>bos</em>, the id of that token. Only
applied to the text-to-unit seq2seq model.`,name:"t2u_decoder_start_token_id"},{anchor:"transformers.SeamlessM4TConfig.t2u_max_new_tokens",description:`<strong>t2u_max_new_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum numbers of unit tokens to generate, ignoring the number of tokens in the prompt. Only applied
to the text-to-unit seq2seq model.`,name:"t2u_max_new_tokens"},{anchor:"transformers.SeamlessM4TConfig.t2u_encoder_layers",description:`<strong>t2u_encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer text-to-unit encoder.`,name:"t2u_encoder_layers"},{anchor:"transformers.SeamlessM4TConfig.t2u_encoder_ffn_dim",description:`<strong>t2u_encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer text-to-unit encoder.`,name:"t2u_encoder_ffn_dim"},{anchor:"transformers.SeamlessM4TConfig.t2u_encoder_attention_heads",description:`<strong>t2u_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 text-to-unit encoder.`,name:"t2u_encoder_attention_heads"},{anchor:"transformers.SeamlessM4TConfig.t2u_decoder_layers",description:`<strong>t2u_decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer text-to-unit decoder.`,name:"t2u_decoder_layers"},{anchor:"transformers.SeamlessM4TConfig.t2u_decoder_ffn_dim",description:`<strong>t2u_decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer text-to-unit decoder.`,name:"t2u_decoder_ffn_dim"},{anchor:"transformers.SeamlessM4TConfig.t2u_decoder_attention_heads",description:`<strong>t2u_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 text-to-unit decoder.`,name:"t2u_decoder_attention_heads"},{anchor:"transformers.SeamlessM4TConfig.t2u_max_position_embeddings",description:`<strong>t2u_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model text-to-unit component might ever be used with. Typically set
this to something large just in case (e.g., 512 or 1024 or 2048).</p>
<blockquote>
<p>Hifi-Gan Vocoder specific parameters</p>
</blockquote>`,name:"t2u_max_position_embeddings"},{anchor:"transformers.SeamlessM4TConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the output audio will be generated, expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SeamlessM4TConfig.upsample_initial_channel",description:`<strong>upsample_initial_channel</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The number of input channels into the hifi-gan upsampling network. Applies to the vocoder only.`,name:"upsample_initial_channel"},{anchor:"transformers.SeamlessM4TConfig.upsample_rates",description:`<strong>upsample_rates</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[5, 4, 4, 2, 2]</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the vocoder upsampling network.
The length of <em>upsample_rates</em> defines the number of convolutional layers and has to match the length of
<em>upsample_kernel_sizes</em>. Applies to the vocoder only.`,name:"upsample_rates"},{anchor:"transformers.SeamlessM4TConfig.upsample_kernel_sizes",description:`<strong>upsample_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[11, 8, 8, 4, 4]</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the vocoder upsampling
network. The length of <em>upsample_kernel_sizes</em> defines the number of convolutional layers and has to match
the length of <em>upsample_rates</em>. Applies to the vocoder only.`,name:"upsample_kernel_sizes"},{anchor:"transformers.SeamlessM4TConfig.resblock_kernel_sizes",description:`<strong>resblock_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 7, 11]</code>) &#x2014;
A tuple of integers defining the kernel sizes of the vocoder 1D convolutional layers in the multi-receptive
field fusion (MRF) module. Applies to the vocoder only.`,name:"resblock_kernel_sizes"},{anchor:"transformers.SeamlessM4TConfig.resblock_dilation_sizes",description:`<strong>resblock_dilation_sizes</strong> (<code>Tuple[Tuple[int]]</code> or <code>List[List[int]]</code>, <em>optional</em>, defaults to <code>[[1, 3, 5], [1, 3, 5], [1, 3, 5]]</code>) &#x2014;
A nested tuple of integers defining the dilation rates of the vocoder dilated 1D convolutional layers in
the multi-receptive field fusion (MRF) module. Applies to the vocoder only.`,name:"resblock_dilation_sizes"},{anchor:"transformers.SeamlessM4TConfig.leaky_relu_slope",description:`<strong>leaky_relu_slope</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The angle of the negative slope used by the leaky ReLU activation in the vocoder. Applies to the vocoder
only.`,name:"leaky_relu_slope"},{anchor:"transformers.SeamlessM4TConfig.unit_hifi_gan_vocab_size",description:`<strong>unit_hifi_gan_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) &#x2014;
Vocabulary size of the SeamlessM4T vocoder. Defines the number of different unit tokens that can be
represented by the <code>inputs_ids</code> passed when calling the vocoder of <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>,
<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToSpeech">~SeamlessM4TForSpeechToSpeech</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">~SeamlessM4TForTextToSpeech</a>.`,name:"unit_hifi_gan_vocab_size"},{anchor:"transformers.SeamlessM4TConfig.unit_embed_dim",description:`<strong>unit_embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1280) &#x2014;
The projection dimension of the input ids given to the hifi-gan vocoder. Applies to the vocoder only.`,name:"unit_embed_dim"},{anchor:"transformers.SeamlessM4TConfig.lang_embed_dim",description:`<strong>lang_embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The projection dimension of the target language given to the hifi-gan vocoder. Applies to the vocoder only.`,name:"lang_embed_dim"},{anchor:"transformers.SeamlessM4TConfig.spkr_embed_dim",description:`<strong>spkr_embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The projection dimension of the speaker id given to the hifi-gan vocoder. Applies to the vocoder only.`,name:"spkr_embed_dim"},{anchor:"transformers.SeamlessM4TConfig.vocoder_num_langs",description:`<strong>vocoder_num_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 36) &#x2014;
Number of langs supported by the vocoder. Might be different from <code>t2u_num_langs</code>.`,name:"vocoder_num_langs"},{anchor:"transformers.SeamlessM4TConfig.vocoder_num_spkrs",description:`<strong>vocoder_num_spkrs</strong> (<code>int</code>, <em>optional</em>, defaults to 200) &#x2014;
Number of speakers supported by the vocoder.`,name:"vocoder_num_spkrs"},{anchor:"transformers.SeamlessM4TConfig.variance_predictor_kernel_size",description:`<strong>variance_predictor_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the duration predictor. Applies to the vocoder only.`,name:"variance_predictor_kernel_size"},{anchor:"transformers.SeamlessM4TConfig.var_pred_dropout",description:`<strong>var_pred_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout probability of the duration predictor. Applies to the vocoder only.`,name:"var_pred_dropout"},{anchor:"transformers.SeamlessM4TConfig.vocoder_offset",description:`<strong>vocoder_offset</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Offset the unit token ids by this number to account for symbol tokens. Applies to the vocoder only.`,name:"vocoder_offset"}]}]}}),Me=new Dr({props:{anchor:"transformers.SeamlessM4TConfig.example",$$slots:{default:[_i]},$$scope:{ctx:C}}}),Wt=new z({props:{title:"SeamlessM4TTokenizer",local:"transformers.SeamlessM4TTokenizer",headingTag:"h2"}}),Vt=new S({props:{name:"class transformers.SeamlessM4TTokenizer",anchor:"transformers.SeamlessM4TTokenizer",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:"tokenizer_file",val:" = None"},{name:"src_lang",val:" = 'eng'"},{name:"tgt_lang",val:" = 'fra'"},{name:"sp_model_kwargs",val:": Optional = None"},{name:"additional_special_tokens",val:" = None"},{name:"add_prefix_space",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eng&quot;</code>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fra&quot;</code>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the model initialization.`,name:"sp_model_kwargs"},{anchor:"transformers.SeamlessM4TTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Can be used to specify the list of languages that will be
supported by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.SeamlessM4TTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word.`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L43"}}),ye=new Dr({props:{anchor:"transformers.SeamlessM4TTokenizer.example",$$slots:{default:[Ti]},$$scope:{ctx:C}}}),Zt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizer.__call__",parameters:[{name:"text",val:": Union = None"},{name:"text_pair",val:": Union = None"},{name:"text_target",val:": Union = None"},{name:"text_pair_target",val:": Union = None"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"src_lang",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language. If not specified, the last <code>src_lang</code> specified (either
during initialization or when calling this tokenizer) will be used.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language. If not specified, the last <code>tgt_lang</code> specified (either
during initialization or when calling this tokenizer) will be used.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L210"}}),Et=new S({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SeamlessM4TTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L340",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>
`}}),Dt=new S({props:{name:"get_special_tokens_mask",anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L309",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Rt=new S({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SeamlessM4TTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.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.SeamlessM4TTokenizer.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_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L368",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>
`}}),Ot=new S({props:{name:"save_vocabulary",anchor:"transformers.SeamlessM4TTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L496"}}),Bt=new z({props:{title:"SeamlessM4TTokenizerFast",local:"transformers.SeamlessM4TTokenizerFast",headingTag:"h2"}}),Xt=new S({props:{name:"class transformers.SeamlessM4TTokenizerFast",anchor:"transformers.SeamlessM4TTokenizerFast",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:"src_lang",val:" = 'eng'"},{name:"tgt_lang",val:" = 'fra'"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.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.SeamlessM4TTokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eng&quot;</code>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fra&quot;</code>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L42"}}),$e=new Dr({props:{anchor:"transformers.SeamlessM4TTokenizerFast.example",$$slots:{default:[bi]},$$scope:{ctx:C}}}),Yt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizerFast.__call__",parameters:[{name:"text",val:": Union = None"},{name:"text_pair",val:": Union = None"},{name:"text_target",val:": Union = None"},{name:"text_pair_target",val:": Union = None"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"src_lang",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the source language. If not specified, the last <code>src_lang</code> specified (either
during initialization or when calling this tokenizer) will be used.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language. If not specified, the last <code>tgt_lang</code> specified (either
during initialization or when calling this tokenizer) will be used.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizerFast.<strong>call</strong>()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L376"}}),At=new z({props:{title:"SeamlessM4TFeatureExtractor",local:"transformers.SeamlessM4TFeatureExtractor",headingTag:"h2"}}),Qt=new S({props:{name:"class transformers.SeamlessM4TFeatureExtractor",anchor:"transformers.SeamlessM4TFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"num_mel_bins",val:" = 80"},{name:"padding_value",val:" = 0.0"},{name:"stride",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.SeamlessM4TFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SeamlessM4TFeatureExtractor.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of Mel-frequency bins.`,name:"num_mel_bins"},{anchor:"transformers.SeamlessM4TFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The value that is used to fill the padding vectors.`,name:"padding_value"},{anchor:"transformers.SeamlessM4TFeatureExtractor.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride used to reshape audios from shape (batch_size,num_frames,num_mel_bins) to
(batch_size,num_frames//stride,num_mel_bins*stride).`,name:"stride"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L38"}}),Kt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": Union"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"max_length",val:": Optional = None"},{name:"truncation",val:": bool = False"},{name:"return_tensors",val:": Union = None"},{name:"sampling_rate",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = None"},{name:"do_normalize_per_mel_bins",val:": Optional = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.raw_speech",description:"<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>, &#x2014;",name:"raw_speech"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.List[List[float]],",description:`<strong><code>List[List[float]]</code>,</strong> <code>List[List[List[float]]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array,
a torch tensor, a list of float values, a list of numpy arrays, a list of torch tensors,
a list of list of float values or a list of a list of list of float values.
If <code>raw_speech</code> is a one-dimensional <code>np.ndarray</code>, <code>torch.Tensor</code> or a <code>List[float]</code>, <code>raw_speech</code> is
considered a single-channel, single-sample sound. In all other cases, the first dimension of
<code>raw_speech</code>, whether from an <code>np.ndarray</code>, a <code>torch.Tensor</code> or a <code>List[...]</code>,
corresponds to the number of samples in the batch, and the number of channels
(i.e. mono or stereo character) is derived from the other dimensions
(1D -&gt; single-channel waveform batches; 2D-&gt; stereo-channel waveform batches).`,name:"List[List[float]],"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128.`,name:"pad_to_multiple_of"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>) &#x2014;
Activates truncation to cut input sequences longer than <em>max_length</em> to <em>max_length</em>.`,name:"truncation"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific feature_extractor&#x2019;s default.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></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>For SeamlessM4T models, <code>attention_mask</code> should always be passed for batched inference, to avoid subtle
bugs.</p>

					</div>`,name:"return_attention_mask"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The sampling rate at which the <code>raw_speech</code> input was sampled. It is strongly recommended to pass
<code>sampling_rate</code> at the forward call to prevent silent errors.`,name:"sampling_rate"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.do_normalize_per_mel_bins",description:`<strong>do_normalize_per_mel_bins</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to zero-mean unit-variance normalize the input per mel-channel.`,name:"do_normalize_per_mel_bins"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to the tokenizer or the feature
extractor.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L144"}}),eo=new z({props:{title:"SeamlessM4TProcessor",local:"transformers.SeamlessM4TProcessor",headingTag:"h2"}}),to=new S({props:{name:"class transformers.SeamlessM4TProcessor",anchor:"transformers.SeamlessM4TProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a>) &#x2014;
The audio processor is a required input.`,name:"feature_extractor"},{anchor:"transformers.SeamlessM4TProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizerFast">SeamlessM4TTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L22"}}),oo=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TProcessor.__call__",parameters:[{name:"text",val:" = None"},{name:"audios",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TProcessor.__call__.audios",description:`<strong>audios</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The audio or batch of audios to be prepared. Each audio can be NumPy array or PyTorch tensor. In case
of a NumPy array/PyTorch tensor, each audio should be of shape (C, T), where C is a number of channels,
and T the sample length of the audio.`,name:"audios"},{anchor:"transformers.SeamlessM4TProcessor.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language code of the input texts/audios. If not specified, the last <code>src_lang</code> specified will be
used.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The code of the target language. If not specified, the last <code>tgt_lang</code> specified will be used.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to the feature extractor and/or the
tokenizer.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L44",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li><strong>input_ids</strong> — List of token ids to be fed to a model. Returned when <code>text</code> is not <code>None</code>.</li>
<li><strong>attention_mask</strong> — List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>“attention_mask”</em> is in <code>self.model_input_names</code> and if <code>text</code> is not
<code>None</code>).</li>
<li><strong>input_features</strong> — Audio input features to be fed to a model. Returned when <code>audios</code> is not <code>None</code>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),no=new z({props:{title:"SeamlessM4TCodeHifiGan",local:"transformers.SeamlessM4TCodeHifiGan",headingTag:"h2"}}),so=new S({props:{name:"class transformers.SeamlessM4TCodeHifiGan",anchor:"transformers.SeamlessM4TCodeHifiGan",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TCodeHifiGan.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">SeamlessM4TConfig</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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2493"}}),ro=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TCodeHifiGan.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"spkr_id",val:": Tensor"},{name:"lang_id",val:": Tensor"}],parametersDescription:[{anchor:"transformers.SeamlessM4TCodeHifiGan.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>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTextToUnitForConditionalGeneration">SeamlessM4TTextToUnitForConditionalGeneration</a>. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TCodeHifiGan.forward.spkr_id",description:`<strong>spkr_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the speaker used for speech synthesis. Must be lower than <code>config.vocoder_num_spkrs</code>.`,name:"spkr_id"},{anchor:"transformers.SeamlessM4TCodeHifiGan.forward.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language id to use as target language for translation.`,name:"tgt_lang"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2573"}}),ao=new z({props:{title:"SeamlessM4THifiGan",local:"transformers.SeamlessM4THifiGan",headingTag:"h2"}}),io=new S({props:{name:"class transformers.SeamlessM4THifiGan",anchor:"transformers.SeamlessM4THifiGan",parameters:[{name:"config",val:": SeamlessM4TConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2421"}}),lo=new S({props:{name:"forward",anchor:"transformers.SeamlessM4THifiGan.forward",parameters:[{name:"input_embeds",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.SeamlessM4THifiGan.forward.spectrogram",description:`<strong>spectrogram</strong> (<code>torch.FloatTensor</code>) &#x2014;
Tensor containing the log-mel spectrograms. Can be batched and of shape <code>(batch_size, sequence_length, model_in_dim)</code>, or un-batched and of shape <code>(sequence_length, model_in_dim)</code>. Note that <code>model_in_dim</code>
is the sum of <code>config.unit_embed_dim</code>, <code>config.lang_embed_dim</code> and <code>config.spkr_embed_dim</code>.`,name:"spectrogram"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2456",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tensor containing the speech waveform. If the input spectrogram is batched, will be of
shape <code>(batch_size, num_frames,)</code>. If un-batched, will be of shape <code>(num_frames,)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),co=new z({props:{title:"SeamlessM4TTextToUnitModel",local:"transformers.SeamlessM4TTextToUnitModel",headingTag:"h2"}}),mo=new S({props:{name:"class transformers.SeamlessM4TTextToUnitModel",anchor:"transformers.SeamlessM4TTextToUnitModel",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.SeamlessM4TTextToUnitModel.embed_tokens_decoder",description:"<strong>embed_tokens_decoder</strong> (<code>nn.Embedding</code>, <em>optional</em>) &#x2014; input embedding of the decoder.",name:"embed_tokens_decoder"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2055"}}),po=new z({props:{title:"SeamlessM4TTextToUnitForConditionalGeneration",local:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",headingTag:"h2"}}),fo=new S({props:{name:"class transformers.SeamlessM4TTextToUnitForConditionalGeneration",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TConfig">~SeamlessM4TConfig</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_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.embed_tokens_decoder",description:"<strong>embed_tokens_decoder</strong> (<code>nn.Embedding</code>, <em>optional</em>) &#x2014; input embedding of the decoder.",name:"embed_tokens_decoder"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2144"}}),ho=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/pr_30674/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.SeamlessM4TTextToUnitForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.SeamlessM4TTextToUnitForConditionalGeneration.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_30674/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart 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>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</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.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(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>, <em>optional</em>) 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.SeamlessM4TTextToUnitForConditionalGeneration.forward.past_key_values",description:`<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>) &#x2014;
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>
<p>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.SeamlessM4TTextToUnitForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.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 be in <code>[-100, 0, ..., config.vocab_size]</code> (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"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#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.SeamlessM4TTextToUnitForConditionalGeneration.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.SeamlessM4TTextToUnitForConditionalGeneration.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.SeamlessM4TTextToUnitForConditionalGeneration.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_30674/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_30674/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2197"}}),qe=new Pe({props:{$$slots:{default:[vi]},$$scope:{ctx:C}}}),uo=new li({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/seamless_m4t.md"}}),{c(){l=i("meta"),k=n(),T=i("p"),b=n(),m(w.$$.fragment),_=n(),m(x.$$.fragment),L=n(),v=i("p"),v.innerHTML=F,ln=n(),Ge=i("p"),Ge.innerHTML=Rr,cn=n(),Je=i("p"),Je.textContent=Or,mn=n(),je=i("p"),je.textContent=Br,pn=n(),He=i("ul"),He.innerHTML=Xr,fn=n(),We=i("p"),We.innerHTML=Yr,hn=n(),Ve=i("p"),Ve.textContent=Ar,un=n(),Ze=i("p"),Ze.innerHTML=Qr,gn=n(),m(Ee.$$.fragment),_n=n(),De=i("p"),De.textContent=Kr,Tn=n(),m(Re.$$.fragment),bn=n(),Oe=i("p"),Oe.textContent=ea,vn=n(),Be=i("p"),Be.textContent=ta,xn=n(),m(Xe.$$.fragment),kn=n(),m(Ye.$$.fragment),Mn=n(),Ae=i("p"),Ae.innerHTML=oa,yn=n(),m(Qe.$$.fragment),wn=n(),Ke=i("p"),Ke.textContent=na,Sn=n(),m(et.$$.fragment),$n=n(),tt=i("p"),tt.innerHTML=sa,zn=n(),m(ot.$$.fragment),Cn=n(),m(nt.$$.fragment),Fn=n(),m(st.$$.fragment),qn=n(),rt=i("p"),rt.innerHTML=ra,In=n(),m(at.$$.fragment),Un=n(),it=i("p"),it.innerHTML=aa,Ln=n(),m(dt.$$.fragment),Nn=n(),lt=i("p"),lt.innerHTML=ia,Pn=n(),m(ct.$$.fragment),Gn=n(),mt=i("p"),mt.innerHTML=da,Jn=n(),m(pt.$$.fragment),jn=n(),ft=i("p"),ft.innerHTML=la,Hn=n(),m(ht.$$.fragment),Wn=n(),ut=i("p"),ut.innerHTML=ca,Vn=n(),m(gt.$$.fragment),Zn=n(),_t=i("p"),_t.textContent=ma,En=n(),Tt=i("p"),Tt.innerHTML=pa,Dn=n(),bt=i("p"),bt.textContent=fa,Rn=n(),vt=i("ul"),vt.innerHTML=ha,On=n(),xt=i("p"),xt.innerHTML=ua,Bn=n(),m(kt.$$.fragment),Xn=n(),V=i("div"),m(Mt.$$.fragment),Is=n(),go=i("p"),go.innerHTML=ga,Us=n(),X=i("div"),m(yt.$$.fragment),Ls=n(),_o=i("p"),_o.textContent=_a,Ns=n(),m(ge.$$.fragment),Yn=n(),m(wt.$$.fragment),An=n(),Z=i("div"),m(St.$$.fragment),Ps=n(),To=i("p"),To.innerHTML=Ta,Gs=n(),Y=i("div"),m($t.$$.fragment),Js=n(),bo=i("p"),bo.textContent=ba,js=n(),m(_e.$$.fragment),Qn=n(),m(zt.$$.fragment),Kn=n(),E=i("div"),m(Ct.$$.fragment),Hs=n(),vo=i("p"),vo.innerHTML=va,Ws=n(),A=i("div"),m(Ft.$$.fragment),Vs=n(),xo=i("p"),xo.textContent=xa,Zs=n(),m(Te.$$.fragment),es=n(),m(qt.$$.fragment),ts=n(),N=i("div"),m(It.$$.fragment),Es=n(),ko=i("p"),ko.innerHTML=ka,Ds=n(),Q=i("div"),m(Ut.$$.fragment),Rs=n(),Mo=i("p"),Mo.innerHTML=Ma,Os=n(),m(be.$$.fragment),Bs=n(),K=i("div"),m(Lt.$$.fragment),Xs=n(),yo=i("p"),yo.textContent=ya,Ys=n(),m(ve.$$.fragment),os=n(),m(Nt.$$.fragment),ns=n(),P=i("div"),m(Pt.$$.fragment),As=n(),wo=i("p"),wo.innerHTML=wa,Qs=n(),ee=i("div"),m(Gt.$$.fragment),Ks=n(),So=i("p"),So.innerHTML=Sa,er=n(),m(xe.$$.fragment),tr=n(),te=i("div"),m(Jt.$$.fragment),or=n(),$o=i("p"),$o.textContent=$a,nr=n(),m(ke.$$.fragment),ss=n(),m(jt.$$.fragment),rs=n(),G=i("div"),m(Ht.$$.fragment),sr=n(),zo=i("p"),zo.innerHTML=za,rr=n(),Co=i("p"),Co.innerHTML=Ca,ar=n(),m(Me.$$.fragment),as=n(),m(Wt.$$.fragment),is=n(),$=i("div"),m(Vt.$$.fragment),ir=n(),Fo=i("p"),Fo.textContent=Fa,dr=n(),qo=i("p"),qo.innerHTML=qa,lr=n(),Io=i("p"),Io.innerHTML=Ia,cr=n(),m(ye.$$.fragment),mr=n(),Uo=i("div"),m(Zt.$$.fragment),pr=n(),H=i("div"),m(Et.$$.fragment),fr=n(),Lo=i("p"),Lo.innerHTML=Ua,hr=n(),No=i("ul"),No.innerHTML=La,ur=n(),Po=i("p"),Po.textContent=Na,gr=n(),we=i("div"),m(Dt.$$.fragment),_r=n(),Go=i("p"),Go.innerHTML=Pa,Tr=n(),Se=i("div"),m(Rt.$$.fragment),br=n(),Jo=i("p"),Jo.textContent=Ga,vr=n(),jo=i("div"),m(Ot.$$.fragment),ds=n(),m(Bt.$$.fragment),ls=n(),I=i("div"),m(Xt.$$.fragment),xr=n(),Ho=i("p"),Ho.innerHTML=Ja,kr=n(),Wo=i("p"),Wo.innerHTML=ja,Mr=n(),Vo=i("p"),Vo.innerHTML=Ha,yr=n(),m($e.$$.fragment),wr=n(),Zo=i("div"),m(Yt.$$.fragment),cs=n(),m(At.$$.fragment),ms=n(),U=i("div"),m(Qt.$$.fragment),Sr=n(),Eo=i("p"),Eo.textContent=Wa,$r=n(),Do=i("p"),Do.innerHTML=Va,zr=n(),Ro=i("p"),Ro.textContent=Za,Cr=n(),ze=i("div"),m(Kt.$$.fragment),Fr=n(),Oo=i("p"),Oo.textContent=Ea,ps=n(),m(eo.$$.fragment),fs=n(),J=i("div"),m(to.$$.fragment),qr=n(),Bo=i("p"),Bo.textContent=Da,Ir=n(),Xo=i("p"),Xo.innerHTML=Ra,Ur=n(),Ce=i("div"),m(oo.$$.fragment),Lr=n(),Yo=i("p"),Yo.innerHTML=Oa,hs=n(),m(no.$$.fragment),us=n(),j=i("div"),m(so.$$.fragment),Nr=n(),Ao=i("p"),Ao.innerHTML=Ba,Pr=n(),Qo=i("p"),Qo.innerHTML=Xa,Gr=n(),Ko=i("div"),m(ro.$$.fragment),gs=n(),m(ao.$$.fragment),_s=n(),se=i("div"),m(io.$$.fragment),Jr=n(),Fe=i("div"),m(lo.$$.fragment),jr=n(),en=i("p"),en.textContent=Ya,Ts=n(),m(co.$$.fragment),bs=n(),re=i("div"),m(mo.$$.fragment),Hr=n(),tn=i("p"),tn.innerHTML=Aa,vs=n(),m(po.$$.fragment),xs=n(),D=i("div"),m(fo.$$.fragment),Wr=n(),on=i("p"),on.innerHTML=Qa,Vr=n(),oe=i("div"),m(ho.$$.fragment),Zr=n(),nn=i("p"),nn.innerHTML=Ka,Er=n(),m(qe.$$.fragment),ks=n(),m(uo.$$.fragment),Ms=n(),dn=i("p"),this.h()},l(e){const o=di("svelte-u9bgzb",document.head);l=d(o,"META",{name:!0,content:!0}),o.forEach(t),k=s(e),T=d(e,"P",{}),M(T).forEach(t),b=s(e),p(w.$$.fragment,e),_=s(e),p(x.$$.fragment,e),L=s(e),v=d(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1wkib9v"&&(v.innerHTML=F),ln=s(e),Ge=d(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-a6a6ro"&&(Ge.innerHTML=Rr),cn=s(e),Je=d(e,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-1ocrm51"&&(Je.textContent=Or),mn=s(e),je=d(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-17llv5s"&&(je.textContent=Br),pn=s(e),He=d(e,"UL",{"data-svelte-h":!0}),c(He)!=="svelte-7ymha8"&&(He.innerHTML=Xr),fn=s(e),We=d(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-1xxfpkj"&&(We.innerHTML=Yr),hn=s(e),Ve=d(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-vfdo9a"&&(Ve.textContent=Ar),un=s(e),Ze=d(e,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-oypae0"&&(Ze.innerHTML=Qr),gn=s(e),p(Ee.$$.fragment,e),_n=s(e),De=d(e,"P",{"data-svelte-h":!0}),c(De)!=="svelte-msm04g"&&(De.textContent=Kr),Tn=s(e),p(Re.$$.fragment,e),bn=s(e),Oe=d(e,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-1x6apd2"&&(Oe.textContent=ea),vn=s(e),Be=d(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-skz2b1"&&(Be.textContent=ta),xn=s(e),p(Xe.$$.fragment,e),kn=s(e),p(Ye.$$.fragment,e),Mn=s(e),Ae=d(e,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-12hlg4d"&&(Ae.innerHTML=oa),yn=s(e),p(Qe.$$.fragment,e),wn=s(e),Ke=d(e,"P",{"data-svelte-h":!0}),c(Ke)!=="svelte-vy622i"&&(Ke.textContent=na),Sn=s(e),p(et.$$.fragment,e),$n=s(e),tt=d(e,"P",{"data-svelte-h":!0}),c(tt)!=="svelte-wleoh9"&&(tt.innerHTML=sa),zn=s(e),p(ot.$$.fragment,e),Cn=s(e),p(nt.$$.fragment,e),Fn=s(e),p(st.$$.fragment,e),qn=s(e),rt=d(e,"P",{"data-svelte-h":!0}),c(rt)!=="svelte-2yqnoy"&&(rt.innerHTML=ra),In=s(e),p(at.$$.fragment,e),Un=s(e),it=d(e,"P",{"data-svelte-h":!0}),c(it)!=="svelte-65k8ai"&&(it.innerHTML=aa),Ln=s(e),p(dt.$$.fragment,e),Nn=s(e),lt=d(e,"P",{"data-svelte-h":!0}),c(lt)!=="svelte-11wawrr"&&(lt.innerHTML=ia),Pn=s(e),p(ct.$$.fragment,e),Gn=s(e),mt=d(e,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-1fv3rh2"&&(mt.innerHTML=da),Jn=s(e),p(pt.$$.fragment,e),jn=s(e),ft=d(e,"P",{"data-svelte-h":!0}),c(ft)!=="svelte-9rou0u"&&(ft.innerHTML=la),Hn=s(e),p(ht.$$.fragment,e),Wn=s(e),ut=d(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-19ayyhr"&&(ut.innerHTML=ca),Vn=s(e),p(gt.$$.fragment,e),Zn=s(e),_t=d(e,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-1btdeyd"&&(_t.textContent=ma),En=s(e),Tt=d(e,"P",{"data-svelte-h":!0}),c(Tt)!=="svelte-10jpqyx"&&(Tt.innerHTML=pa),Dn=s(e),bt=d(e,"P",{"data-svelte-h":!0}),c(bt)!=="svelte-8kbcuu"&&(bt.textContent=fa),Rn=s(e),vt=d(e,"UL",{"data-svelte-h":!0}),c(vt)!=="svelte-lmn79"&&(vt.innerHTML=ha),On=s(e),xt=d(e,"P",{"data-svelte-h":!0}),c(xt)!=="svelte-mez4is"&&(xt.innerHTML=ua),Bn=s(e),p(kt.$$.fragment,e),Xn=s(e),V=d(e,"DIV",{class:!0});var ae=M(V);p(Mt.$$.fragment,ae),Is=s(ae),go=d(ae,"P",{"data-svelte-h":!0}),c(go)!=="svelte-1d7595s"&&(go.innerHTML=ga),Us=s(ae),X=d(ae,"DIV",{class:!0});var ie=M(X);p(yt.$$.fragment,ie),Ls=s(ie),_o=d(ie,"P",{"data-svelte-h":!0}),c(_o)!=="svelte-1v5cwae"&&(_o.textContent=_a),Ns=s(ie),p(ge.$$.fragment,ie),ie.forEach(t),ae.forEach(t),Yn=s(e),p(wt.$$.fragment,e),An=s(e),Z=d(e,"DIV",{class:!0});var de=M(Z);p(St.$$.fragment,de),Ps=s(de),To=d(de,"P",{"data-svelte-h":!0}),c(To)!=="svelte-1tcnd3d"&&(To.innerHTML=Ta),Gs=s(de),Y=d(de,"DIV",{class:!0});var le=M(Y);p($t.$$.fragment,le),Js=s(le),bo=d(le,"P",{"data-svelte-h":!0}),c(bo)!=="svelte-1lcmkdu"&&(bo.textContent=ba),js=s(le),p(_e.$$.fragment,le),le.forEach(t),de.forEach(t),Qn=s(e),p(zt.$$.fragment,e),Kn=s(e),E=d(e,"DIV",{class:!0});var ce=M(E);p(Ct.$$.fragment,ce),Hs=s(ce),vo=d(ce,"P",{"data-svelte-h":!0}),c(vo)!=="svelte-1js90x5"&&(vo.innerHTML=va),Ws=s(ce),A=d(ce,"DIV",{class:!0});var me=M(A);p(Ft.$$.fragment,me),Vs=s(me),xo=d(me,"P",{"data-svelte-h":!0}),c(xo)!=="svelte-1lcmkdu"&&(xo.textContent=xa),Zs=s(me),p(Te.$$.fragment,me),me.forEach(t),ce.forEach(t),es=s(e),p(qt.$$.fragment,e),ts=s(e),N=d(e,"DIV",{class:!0});var R=M(N);p(It.$$.fragment,R),Es=s(R),ko=d(R,"P",{"data-svelte-h":!0}),c(ko)!=="svelte-eorsfx"&&(ko.innerHTML=ka),Ds=s(R),Q=d(R,"DIV",{class:!0});var pe=M(Q);p(Ut.$$.fragment,pe),Rs=s(pe),Mo=d(pe,"P",{"data-svelte-h":!0}),c(Mo)!=="svelte-1kvctxq"&&(Mo.innerHTML=Ma),Os=s(pe),p(be.$$.fragment,pe),pe.forEach(t),Bs=s(R),K=d(R,"DIV",{class:!0});var fe=M(K);p(Lt.$$.fragment,fe),Xs=s(fe),yo=d(fe,"P",{"data-svelte-h":!0}),c(yo)!=="svelte-1puovtq"&&(yo.textContent=ya),Ys=s(fe),p(ve.$$.fragment,fe),fe.forEach(t),R.forEach(t),os=s(e),p(Nt.$$.fragment,e),ns=s(e),P=d(e,"DIV",{class:!0});var O=M(P);p(Pt.$$.fragment,O),As=s(O),wo=d(O,"P",{"data-svelte-h":!0}),c(wo)!=="svelte-1cndbjh"&&(wo.innerHTML=wa),Qs=s(O),ee=d(O,"DIV",{class:!0});var he=M(ee);p(Gt.$$.fragment,he),Ks=s(he),So=d(he,"P",{"data-svelte-h":!0}),c(So)!=="svelte-rzn618"&&(So.innerHTML=Sa),er=s(he),p(xe.$$.fragment,he),he.forEach(t),tr=s(O),te=d(O,"DIV",{class:!0});var sn=M(te);p(Jt.$$.fragment,sn),or=s(sn),$o=d(sn,"P",{"data-svelte-h":!0}),c($o)!=="svelte-1puovtq"&&($o.textContent=$a),nr=s(sn),p(ke.$$.fragment,sn),sn.forEach(t),O.forEach(t),ss=s(e),p(jt.$$.fragment,e),rs=s(e),G=d(e,"DIV",{class:!0});var Ie=M(G);p(Ht.$$.fragment,Ie),sr=s(Ie),zo=d(Ie,"P",{"data-svelte-h":!0}),c(zo)!=="svelte-1usxotr"&&(zo.innerHTML=za),rr=s(Ie),Co=d(Ie,"P",{"data-svelte-h":!0}),c(Co)!=="svelte-5wo8g3"&&(Co.innerHTML=Ca),ar=s(Ie),p(Me.$$.fragment,Ie),Ie.forEach(t),as=s(e),p(Wt.$$.fragment,e),is=s(e),$=d(e,"DIV",{class:!0});var q=M($);p(Vt.$$.fragment,q),ir=s(q),Fo=d(q,"P",{"data-svelte-h":!0}),c(Fo)!=="svelte-1yrb5nn"&&(Fo.textContent=Fa),dr=s(q),qo=d(q,"P",{"data-svelte-h":!0}),c(qo)!=="svelte-db9w7h"&&(qo.innerHTML=qa),lr=s(q),Io=d(q,"P",{"data-svelte-h":!0}),c(Io)!=="svelte-18kdu26"&&(Io.innerHTML=Ia),cr=s(q),p(ye.$$.fragment,q),mr=s(q),Uo=d(q,"DIV",{class:!0});var ei=M(Uo);p(Zt.$$.fragment,ei),ei.forEach(t),pr=s(q),H=d(q,"DIV",{class:!0});var Ue=M(H);p(Et.$$.fragment,Ue),fr=s(Ue),Lo=d(Ue,"P",{"data-svelte-h":!0}),c(Lo)!=="svelte-nkpot4"&&(Lo.innerHTML=Ua),hr=s(Ue),No=d(Ue,"UL",{"data-svelte-h":!0}),c(No)!=="svelte-mlrsks"&&(No.innerHTML=La),ur=s(Ue),Po=d(Ue,"P",{"data-svelte-h":!0}),c(Po)!=="svelte-46aam0"&&(Po.textContent=Na),Ue.forEach(t),gr=s(q),we=d(q,"DIV",{class:!0});var ws=M(we);p(Dt.$$.fragment,ws),_r=s(ws),Go=d(ws,"P",{"data-svelte-h":!0}),c(Go)!=="svelte-1f4f5kp"&&(Go.innerHTML=Pa),ws.forEach(t),Tr=s(q),Se=d(q,"DIV",{class:!0});var Ss=M(Se);p(Rt.$$.fragment,Ss),br=s(Ss),Jo=d(Ss,"P",{"data-svelte-h":!0}),c(Jo)!=="svelte-1bcwf97"&&(Jo.textContent=Ga),Ss.forEach(t),vr=s(q),jo=d(q,"DIV",{class:!0});var ti=M(jo);p(Ot.$$.fragment,ti),ti.forEach(t),q.forEach(t),ds=s(e),p(Bt.$$.fragment,e),ls=s(e),I=d(e,"DIV",{class:!0});var W=M(I);p(Xt.$$.fragment,W),xr=s(W),Ho=d(W,"P",{"data-svelte-h":!0}),c(Ho)!=="svelte-162k0i1"&&(Ho.innerHTML=Ja),kr=s(W),Wo=d(W,"P",{"data-svelte-h":!0}),c(Wo)!=="svelte-z66ci6"&&(Wo.innerHTML=ja),Mr=s(W),Vo=d(W,"P",{"data-svelte-h":!0}),c(Vo)!=="svelte-18kdu26"&&(Vo.innerHTML=Ha),yr=s(W),p($e.$$.fragment,W),wr=s(W),Zo=d(W,"DIV",{class:!0});var oi=M(Zo);p(Yt.$$.fragment,oi),oi.forEach(t),W.forEach(t),cs=s(e),p(At.$$.fragment,e),ms=s(e),U=d(e,"DIV",{class:!0});var ne=M(U);p(Qt.$$.fragment,ne),Sr=s(ne),Eo=d(ne,"P",{"data-svelte-h":!0}),c(Eo)!=="svelte-h20f9h"&&(Eo.textContent=Wa),$r=s(ne),Do=d(ne,"P",{"data-svelte-h":!0}),c(Do)!=="svelte-18r7o15"&&(Do.innerHTML=Va),zr=s(ne),Ro=d(ne,"P",{"data-svelte-h":!0}),c(Ro)!=="svelte-1icaz7y"&&(Ro.textContent=Za),Cr=s(ne),ze=d(ne,"DIV",{class:!0});var $s=M(ze);p(Kt.$$.fragment,$s),Fr=s($s),Oo=d($s,"P",{"data-svelte-h":!0}),c(Oo)!=="svelte-1a6wgfx"&&(Oo.textContent=Ea),$s.forEach(t),ne.forEach(t),ps=s(e),p(eo.$$.fragment,e),fs=s(e),J=d(e,"DIV",{class:!0});var Le=M(J);p(to.$$.fragment,Le),qr=s(Le),Bo=d(Le,"P",{"data-svelte-h":!0}),c(Bo)!=="svelte-137g986"&&(Bo.textContent=Da),Ir=s(Le),Xo=d(Le,"P",{"data-svelte-h":!0}),c(Xo)!=="svelte-baswkn"&&(Xo.innerHTML=Ra),Ur=s(Le),Ce=d(Le,"DIV",{class:!0});var zs=M(Ce);p(oo.$$.fragment,zs),Lr=s(zs),Yo=d(zs,"P",{"data-svelte-h":!0}),c(Yo)!=="svelte-hxvkbr"&&(Yo.innerHTML=Oa),zs.forEach(t),Le.forEach(t),hs=s(e),p(no.$$.fragment,e),us=s(e),j=d(e,"DIV",{class:!0});var Ne=M(j);p(so.$$.fragment,Ne),Nr=s(Ne),Ao=d(Ne,"P",{"data-svelte-h":!0}),c(Ao)!=="svelte-336elp"&&(Ao.innerHTML=Ba),Pr=s(Ne),Qo=d(Ne,"P",{"data-svelte-h":!0}),c(Qo)!=="svelte-hswkmf"&&(Qo.innerHTML=Xa),Gr=s(Ne),Ko=d(Ne,"DIV",{class:!0});var ni=M(Ko);p(ro.$$.fragment,ni),ni.forEach(t),Ne.forEach(t),gs=s(e),p(ao.$$.fragment,e),_s=s(e),se=d(e,"DIV",{class:!0});var Cs=M(se);p(io.$$.fragment,Cs),Jr=s(Cs),Fe=d(Cs,"DIV",{class:!0});var Fs=M(Fe);p(lo.$$.fragment,Fs),jr=s(Fs),en=d(Fs,"P",{"data-svelte-h":!0}),c(en)!=="svelte-qef8w5"&&(en.textContent=Ya),Fs.forEach(t),Cs.forEach(t),Ts=s(e),p(co.$$.fragment,e),bs=s(e),re=d(e,"DIV",{class:!0});var qs=M(re);p(mo.$$.fragment,qs),Hr=s(qs),tn=d(qs,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-1dvnsz8"&&(tn.innerHTML=Aa),qs.forEach(t),vs=s(e),p(po.$$.fragment,e),xs=s(e),D=d(e,"DIV",{class:!0});var rn=M(D);p(fo.$$.fragment,rn),Wr=s(rn),on=d(rn,"P",{"data-svelte-h":!0}),c(on)!=="svelte-82v1ej"&&(on.innerHTML=Qa),Vr=s(rn),oe=d(rn,"DIV",{class:!0});var an=M(oe);p(ho.$$.fragment,an),Zr=s(an),nn=d(an,"P",{"data-svelte-h":!0}),c(nn)!=="svelte-1uxafu6"&&(nn.innerHTML=Ka),Er=s(an),p(qe.$$.fragment,an),an.forEach(t),rn.forEach(t),ks=s(e),p(uo.$$.fragment,e),Ms=s(e),dn=d(e,"P",{}),M(dn).forEach(t),this.h()},h(){y(l,"name","hf:doc:metadata"),y(l,"content",ki),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"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,o){a(document.head,l),r(e,k,o),r(e,T,o),r(e,b,o),f(w,e,o),r(e,_,o),f(x,e,o),r(e,L,o),r(e,v,o),r(e,ln,o),r(e,Ge,o),r(e,cn,o),r(e,Je,o),r(e,mn,o),r(e,je,o),r(e,pn,o),r(e,He,o),r(e,fn,o),r(e,We,o),r(e,hn,o),r(e,Ve,o),r(e,un,o),r(e,Ze,o),r(e,gn,o),f(Ee,e,o),r(e,_n,o),r(e,De,o),r(e,Tn,o),f(Re,e,o),r(e,bn,o),r(e,Oe,o),r(e,vn,o),r(e,Be,o),r(e,xn,o),f(Xe,e,o),r(e,kn,o),f(Ye,e,o),r(e,Mn,o),r(e,Ae,o),r(e,yn,o),f(Qe,e,o),r(e,wn,o),r(e,Ke,o),r(e,Sn,o),f(et,e,o),r(e,$n,o),r(e,tt,o),r(e,zn,o),f(ot,e,o),r(e,Cn,o),f(nt,e,o),r(e,Fn,o),f(st,e,o),r(e,qn,o),r(e,rt,o),r(e,In,o),f(at,e,o),r(e,Un,o),r(e,it,o),r(e,Ln,o),f(dt,e,o),r(e,Nn,o),r(e,lt,o),r(e,Pn,o),f(ct,e,o),r(e,Gn,o),r(e,mt,o),r(e,Jn,o),f(pt,e,o),r(e,jn,o),r(e,ft,o),r(e,Hn,o),f(ht,e,o),r(e,Wn,o),r(e,ut,o),r(e,Vn,o),f(gt,e,o),r(e,Zn,o),r(e,_t,o),r(e,En,o),r(e,Tt,o),r(e,Dn,o),r(e,bt,o),r(e,Rn,o),r(e,vt,o),r(e,On,o),r(e,xt,o),r(e,Bn,o),f(kt,e,o),r(e,Xn,o),r(e,V,o),f(Mt,V,null),a(V,Is),a(V,go),a(V,Us),a(V,X),f(yt,X,null),a(X,Ls),a(X,_o),a(X,Ns),f(ge,X,null),r(e,Yn,o),f(wt,e,o),r(e,An,o),r(e,Z,o),f(St,Z,null),a(Z,Ps),a(Z,To),a(Z,Gs),a(Z,Y),f($t,Y,null),a(Y,Js),a(Y,bo),a(Y,js),f(_e,Y,null),r(e,Qn,o),f(zt,e,o),r(e,Kn,o),r(e,E,o),f(Ct,E,null),a(E,Hs),a(E,vo),a(E,Ws),a(E,A),f(Ft,A,null),a(A,Vs),a(A,xo),a(A,Zs),f(Te,A,null),r(e,es,o),f(qt,e,o),r(e,ts,o),r(e,N,o),f(It,N,null),a(N,Es),a(N,ko),a(N,Ds),a(N,Q),f(Ut,Q,null),a(Q,Rs),a(Q,Mo),a(Q,Os),f(be,Q,null),a(N,Bs),a(N,K),f(Lt,K,null),a(K,Xs),a(K,yo),a(K,Ys),f(ve,K,null),r(e,os,o),f(Nt,e,o),r(e,ns,o),r(e,P,o),f(Pt,P,null),a(P,As),a(P,wo),a(P,Qs),a(P,ee),f(Gt,ee,null),a(ee,Ks),a(ee,So),a(ee,er),f(xe,ee,null),a(P,tr),a(P,te),f(Jt,te,null),a(te,or),a(te,$o),a(te,nr),f(ke,te,null),r(e,ss,o),f(jt,e,o),r(e,rs,o),r(e,G,o),f(Ht,G,null),a(G,sr),a(G,zo),a(G,rr),a(G,Co),a(G,ar),f(Me,G,null),r(e,as,o),f(Wt,e,o),r(e,is,o),r(e,$,o),f(Vt,$,null),a($,ir),a($,Fo),a($,dr),a($,qo),a($,lr),a($,Io),a($,cr),f(ye,$,null),a($,mr),a($,Uo),f(Zt,Uo,null),a($,pr),a($,H),f(Et,H,null),a(H,fr),a(H,Lo),a(H,hr),a(H,No),a(H,ur),a(H,Po),a($,gr),a($,we),f(Dt,we,null),a(we,_r),a(we,Go),a($,Tr),a($,Se),f(Rt,Se,null),a(Se,br),a(Se,Jo),a($,vr),a($,jo),f(Ot,jo,null),r(e,ds,o),f(Bt,e,o),r(e,ls,o),r(e,I,o),f(Xt,I,null),a(I,xr),a(I,Ho),a(I,kr),a(I,Wo),a(I,Mr),a(I,Vo),a(I,yr),f($e,I,null),a(I,wr),a(I,Zo),f(Yt,Zo,null),r(e,cs,o),f(At,e,o),r(e,ms,o),r(e,U,o),f(Qt,U,null),a(U,Sr),a(U,Eo),a(U,$r),a(U,Do),a(U,zr),a(U,Ro),a(U,Cr),a(U,ze),f(Kt,ze,null),a(ze,Fr),a(ze,Oo),r(e,ps,o),f(eo,e,o),r(e,fs,o),r(e,J,o),f(to,J,null),a(J,qr),a(J,Bo),a(J,Ir),a(J,Xo),a(J,Ur),a(J,Ce),f(oo,Ce,null),a(Ce,Lr),a(Ce,Yo),r(e,hs,o),f(no,e,o),r(e,us,o),r(e,j,o),f(so,j,null),a(j,Nr),a(j,Ao),a(j,Pr),a(j,Qo),a(j,Gr),a(j,Ko),f(ro,Ko,null),r(e,gs,o),f(ao,e,o),r(e,_s,o),r(e,se,o),f(io,se,null),a(se,Jr),a(se,Fe),f(lo,Fe,null),a(Fe,jr),a(Fe,en),r(e,Ts,o),f(co,e,o),r(e,bs,o),r(e,re,o),f(mo,re,null),a(re,Hr),a(re,tn),r(e,vs,o),f(po,e,o),r(e,xs,o),r(e,D,o),f(fo,D,null),a(D,Wr),a(D,on),a(D,Vr),a(D,oe),f(ho,oe,null),a(oe,Zr),a(oe,nn),a(oe,Er),f(qe,oe,null),r(e,ks,o),f(uo,e,o),r(e,Ms,o),r(e,dn,o),ys=!0},p(e,[o]){const ae={};o&2&&(ae.$$scope={dirty:o,ctx:e}),ge.$set(ae);const ie={};o&2&&(ie.$$scope={dirty:o,ctx:e}),_e.$set(ie);const de={};o&2&&(de.$$scope={dirty:o,ctx:e}),Te.$set(de);const le={};o&2&&(le.$$scope={dirty:o,ctx:e}),be.$set(le);const ce={};o&2&&(ce.$$scope={dirty:o,ctx:e}),ve.$set(ce);const me={};o&2&&(me.$$scope={dirty:o,ctx:e}),xe.$set(me);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),ke.$set(R);const pe={};o&2&&(pe.$$scope={dirty:o,ctx:e}),Me.$set(pe);const fe={};o&2&&(fe.$$scope={dirty:o,ctx:e}),ye.$set(fe);const O={};o&2&&(O.$$scope={dirty:o,ctx:e}),$e.$set(O);const he={};o&2&&(he.$$scope={dirty:o,ctx:e}),qe.$set(he)},i(e){ys||(h(w.$$.fragment,e),h(x.$$.fragment,e),h(Ee.$$.fragment,e),h(Re.$$.fragment,e),h(Xe.$$.fragment,e),h(Ye.$$.fragment,e),h(Qe.$$.fragment,e),h(et.$$.fragment,e),h(ot.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(at.$$.fragment,e),h(dt.$$.fragment,e),h(ct.$$.fragment,e),h(pt.$$.fragment,e),h(ht.$$.fragment,e),h(gt.$$.fragment,e),h(kt.$$.fragment,e),h(Mt.$$.fragment,e),h(yt.$$.fragment,e),h(ge.$$.fragment,e),h(wt.$$.fragment,e),h(St.$$.fragment,e),h($t.$$.fragment,e),h(_e.$$.fragment,e),h(zt.$$.fragment,e),h(Ct.$$.fragment,e),h(Ft.$$.fragment,e),h(Te.$$.fragment,e),h(qt.$$.fragment,e),h(It.$$.fragment,e),h(Ut.$$.fragment,e),h(be.$$.fragment,e),h(Lt.$$.fragment,e),h(ve.$$.fragment,e),h(Nt.$$.fragment,e),h(Pt.$$.fragment,e),h(Gt.$$.fragment,e),h(xe.$$.fragment,e),h(Jt.$$.fragment,e),h(ke.$$.fragment,e),h(jt.$$.fragment,e),h(Ht.$$.fragment,e),h(Me.$$.fragment,e),h(Wt.$$.fragment,e),h(Vt.$$.fragment,e),h(ye.$$.fragment,e),h(Zt.$$.fragment,e),h(Et.$$.fragment,e),h(Dt.$$.fragment,e),h(Rt.$$.fragment,e),h(Ot.$$.fragment,e),h(Bt.$$.fragment,e),h(Xt.$$.fragment,e),h($e.$$.fragment,e),h(Yt.$$.fragment,e),h(At.$$.fragment,e),h(Qt.$$.fragment,e),h(Kt.$$.fragment,e),h(eo.$$.fragment,e),h(to.$$.fragment,e),h(oo.$$.fragment,e),h(no.$$.fragment,e),h(so.$$.fragment,e),h(ro.$$.fragment,e),h(ao.$$.fragment,e),h(io.$$.fragment,e),h(lo.$$.fragment,e),h(co.$$.fragment,e),h(mo.$$.fragment,e),h(po.$$.fragment,e),h(fo.$$.fragment,e),h(ho.$$.fragment,e),h(qe.$$.fragment,e),h(uo.$$.fragment,e),ys=!0)},o(e){u(w.$$.fragment,e),u(x.$$.fragment,e),u(Ee.$$.fragment,e),u(Re.$$.fragment,e),u(Xe.$$.fragment,e),u(Ye.$$.fragment,e),u(Qe.$$.fragment,e),u(et.$$.fragment,e),u(ot.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(at.$$.fragment,e),u(dt.$$.fragment,e),u(ct.$$.fragment,e),u(pt.$$.fragment,e),u(ht.$$.fragment,e),u(gt.$$.fragment,e),u(kt.$$.fragment,e),u(Mt.$$.fragment,e),u(yt.$$.fragment,e),u(ge.$$.fragment,e),u(wt.$$.fragment,e),u(St.$$.fragment,e),u($t.$$.fragment,e),u(_e.$$.fragment,e),u(zt.$$.fragment,e),u(Ct.$$.fragment,e),u(Ft.$$.fragment,e),u(Te.$$.fragment,e),u(qt.$$.fragment,e),u(It.$$.fragment,e),u(Ut.$$.fragment,e),u(be.$$.fragment,e),u(Lt.$$.fragment,e),u(ve.$$.fragment,e),u(Nt.$$.fragment,e),u(Pt.$$.fragment,e),u(Gt.$$.fragment,e),u(xe.$$.fragment,e),u(Jt.$$.fragment,e),u(ke.$$.fragment,e),u(jt.$$.fragment,e),u(Ht.$$.fragment,e),u(Me.$$.fragment,e),u(Wt.$$.fragment,e),u(Vt.$$.fragment,e),u(ye.$$.fragment,e),u(Zt.$$.fragment,e),u(Et.$$.fragment,e),u(Dt.$$.fragment,e),u(Rt.$$.fragment,e),u(Ot.$$.fragment,e),u(Bt.$$.fragment,e),u(Xt.$$.fragment,e),u($e.$$.fragment,e),u(Yt.$$.fragment,e),u(At.$$.fragment,e),u(Qt.$$.fragment,e),u(Kt.$$.fragment,e),u(eo.$$.fragment,e),u(to.$$.fragment,e),u(oo.$$.fragment,e),u(no.$$.fragment,e),u(so.$$.fragment,e),u(ro.$$.fragment,e),u(ao.$$.fragment,e),u(io.$$.fragment,e),u(lo.$$.fragment,e),u(co.$$.fragment,e),u(mo.$$.fragment,e),u(po.$$.fragment,e),u(fo.$$.fragment,e),u(ho.$$.fragment,e),u(qe.$$.fragment,e),u(uo.$$.fragment,e),ys=!1},d(e){e&&(t(k),t(T),t(b),t(_),t(L),t(v),t(ln),t(Ge),t(cn),t(Je),t(mn),t(je),t(pn),t(He),t(fn),t(We),t(hn),t(Ve),t(un),t(Ze),t(gn),t(_n),t(De),t(Tn),t(bn),t(Oe),t(vn),t(Be),t(xn),t(kn),t(Mn),t(Ae),t(yn),t(wn),t(Ke),t(Sn),t($n),t(tt),t(zn),t(Cn),t(Fn),t(qn),t(rt),t(In),t(Un),t(it),t(Ln),t(Nn),t(lt),t(Pn),t(Gn),t(mt),t(Jn),t(jn),t(ft),t(Hn),t(Wn),t(ut),t(Vn),t(Zn),t(_t),t(En),t(Tt),t(Dn),t(bt),t(Rn),t(vt),t(On),t(xt),t(Bn),t(Xn),t(V),t(Yn),t(An),t(Z),t(Qn),t(Kn),t(E),t(es),t(ts),t(N),t(os),t(ns),t(P),t(ss),t(rs),t(G),t(as),t(is),t($),t(ds),t(ls),t(I),t(cs),t(ms),t(U),t(ps),t(fs),t(J),t(hs),t(us),t(j),t(gs),t(_s),t(se),t(Ts),t(bs),t(re),t(vs),t(xs),t(D),t(ks),t(Ms),t(dn)),t(l),g(w,e),g(x,e),g(Ee,e),g(Re,e),g(Xe,e),g(Ye,e),g(Qe,e),g(et,e),g(ot,e),g(nt,e),g(st,e),g(at,e),g(dt,e),g(ct,e),g(pt,e),g(ht,e),g(gt,e),g(kt,e),g(Mt),g(yt),g(ge),g(wt,e),g(St),g($t),g(_e),g(zt,e),g(Ct),g(Ft),g(Te),g(qt,e),g(It),g(Ut),g(be),g(Lt),g(ve),g(Nt,e),g(Pt),g(Gt),g(xe),g(Jt),g(ke),g(jt,e),g(Ht),g(Me),g(Wt,e),g(Vt),g(ye),g(Zt),g(Et),g(Dt),g(Rt),g(Ot),g(Bt,e),g(Xt),g($e),g(Yt),g(At,e),g(Qt),g(Kt),g(eo,e),g(to),g(oo),g(no,e),g(so),g(ro),g(ao,e),g(io),g(lo),g(co,e),g(mo),g(po,e),g(fo),g(ho),g(qe),g(uo,e)}}}const ki='{"title":"SeamlessM4T","local":"seamlessm4t","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage","local":"usage","sections":[{"title":"Speech","local":"speech","sections":[],"depth":3},{"title":"Text","local":"text","sections":[],"depth":3},{"title":"Tips","local":"tips","sections":[{"title":"1. Use dedicated models","local":"1-use-dedicated-models","sections":[],"depth":4},{"title":"2. Change the speaker identity","local":"2-change-the-speaker-identity","sections":[],"depth":4},{"title":"3. Change the generation strategy","local":"3-change-the-generation-strategy","sections":[],"depth":4},{"title":"4. Generate speech and text at the same time","local":"4-generate-speech-and-text-at-the-same-time","sections":[],"depth":4}],"depth":3}],"depth":2},{"title":"Model architecture","local":"model-architecture","sections":[],"depth":2},{"title":"SeamlessM4TModel","local":"transformers.SeamlessM4TModel","sections":[],"depth":2},{"title":"SeamlessM4TForTextToSpeech","local":"transformers.SeamlessM4TForTextToSpeech","sections":[],"depth":2},{"title":"SeamlessM4TForSpeechToSpeech","local":"transformers.SeamlessM4TForSpeechToSpeech","sections":[],"depth":2},{"title":"SeamlessM4TForTextToText","local":"transformers.SeamlessM4TForTextToText","sections":[],"depth":2},{"title":"SeamlessM4TForSpeechToText","local":"transformers.SeamlessM4TForSpeechToText","sections":[],"depth":2},{"title":"SeamlessM4TConfig","local":"transformers.SeamlessM4TConfig","sections":[],"depth":2},{"title":"SeamlessM4TTokenizer","local":"transformers.SeamlessM4TTokenizer","sections":[],"depth":2},{"title":"SeamlessM4TTokenizerFast","local":"transformers.SeamlessM4TTokenizerFast","sections":[],"depth":2},{"title":"SeamlessM4TFeatureExtractor","local":"transformers.SeamlessM4TFeatureExtractor","sections":[],"depth":2},{"title":"SeamlessM4TProcessor","local":"transformers.SeamlessM4TProcessor","sections":[],"depth":2},{"title":"SeamlessM4TCodeHifiGan","local":"transformers.SeamlessM4TCodeHifiGan","sections":[],"depth":2},{"title":"SeamlessM4THifiGan","local":"transformers.SeamlessM4THifiGan","sections":[],"depth":2},{"title":"SeamlessM4TTextToUnitModel","local":"transformers.SeamlessM4TTextToUnitModel","sections":[],"depth":2},{"title":"SeamlessM4TTextToUnitForConditionalGeneration","local":"transformers.SeamlessM4TTextToUnitForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function Mi(C){return ri(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qi extends ai{constructor(l){super(),ii(this,l,Mi,xi,si,{})}}export{qi as component};
