import{s as Kr,o as ei,n as B}from"../chunks/scheduler.9bc65507.js";import{S as ti,i as oi,g as i,s as n,r as m,A as ni,h as d,f as t,c as s,j as x,u as p,x as c,k as M,y as r,a,v as h,d as f,t as g,w as u}from"../chunks/index.707bf1b6.js";import{T as Pe}from"../chunks/Tip.c2ecdbf4.js";import{D as S}from"../chunks/Docstring.17db21ae.js";import{C as ge}from"../chunks/CodeBlock.54a9f38d.js";import{E as Wa}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as z}from"../chunks/Heading.342b1fa6.js";function si(C){let l,v=`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.`,_,k,I=`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=v,T=n(),b=i("p"),b.innerHTML=w,_=n(),k=i("p"),k.innerHTML=I},l(y){l=d(y,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=v),T=s(y),b=d(y,"P",{"data-svelte-h":!0}),c(b)!=="svelte-x1gqs1"&&(b.innerHTML=w),_=s(y),k=d(y,"P",{"data-svelte-h":!0}),c(k)!=="svelte-nzkxpe"&&(k.innerHTML=I)},m(y,F){a(y,l,F),a(y,T,F),a(y,b,F),a(y,_,F),a(y,k,F)},p:B,d(y){y&&(t(l),t(T),t(b),t(_),t(k))}}}function ai(C){let l,v=`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.`,_,k,I=`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=v,T=n(),b=i("p"),b.innerHTML=w,_=n(),k=i("p"),k.innerHTML=I},l(y){l=d(y,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=v),T=s(y),b=d(y,"P",{"data-svelte-h":!0}),c(b)!=="svelte-f4qe4d"&&(b.innerHTML=w),_=s(y),k=d(y,"P",{"data-svelte-h":!0}),c(k)!=="svelte-nzkxpe"&&(k.innerHTML=I)},m(y,F){a(y,l,F),a(y,T,F),a(y,b,F),a(y,_,F),a(y,k,F)},p:B,d(y){y&&(t(l),t(T),t(b),t(_),t(k))}}}function ri(C){let l,v=`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.`,_,k,I=`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=v,T=n(),b=i("p"),b.innerHTML=w,_=n(),k=i("p"),k.innerHTML=I},l(y){l=d(y,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=v),T=s(y),b=d(y,"P",{"data-svelte-h":!0}),c(b)!=="svelte-v2xo2a"&&(b.innerHTML=w),_=s(y),k=d(y,"P",{"data-svelte-h":!0}),c(k)!=="svelte-nzkxpe"&&(k.innerHTML=I)},m(y,F){a(y,l,F),a(y,T,F),a(y,b,F),a(y,_,F),a(y,k,F)},p:B,d(y){y&&(t(l),t(T),t(b),t(_),t(k))}}}function ii(C){let l,v=`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=v},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=v)},m(T,b){a(T,l,b)},p:B,d(T){T&&t(l)}}}function di(C){let l,v=`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=v,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=v),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,k){a(_,l,k),a(_,T,k),a(_,b,k)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function li(C){let l,v=`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=v},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=v)},m(T,b){a(T,l,b)},p:B,d(T){T&&t(l)}}}function ci(C){let l,v=`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=v,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=v),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,k){a(_,l,k),a(_,T,k),a(_,b,k)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function mi(C){let l,v;return l=new ge({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){h(l,T,b),v=!0},p:B,i(T){v||(f(l.$$.fragment,T),v=!0)},o(T){g(l.$$.fragment,T),v=!1},d(T){u(l,T)}}}function pi(C){let l,v="Examples:",T,b,w;return b=new ge({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=v,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=v),T=s(_),p(b.$$.fragment,_)},m(_,k){a(_,l,k),a(_,T,k),h(b,_,k),w=!0},p:B,i(_){w||(f(b.$$.fragment,_),w=!0)},o(_){g(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),u(b,_)}}}function hi(C){let l,v="Examples:",T,b,w;return b=new ge({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=v,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=v),T=s(_),p(b.$$.fragment,_)},m(_,k){a(_,l,k),a(_,T,k),h(b,_,k),w=!0},p:B,i(_){w||(f(b.$$.fragment,_),w=!0)},o(_){g(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),u(b,_)}}}function fi(C){let l,v=`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=v},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=v)},m(T,b){a(T,l,b)},p:B,d(T){T&&t(l)}}}function gi(C){let l,v,T,b,w,_,k,I,y,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.',rn,Ge,Va="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.",dn,je,Za="SeamlessM4T enables multiple tasks without relying on separate models:",ln,Je,Ea="<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>",cn,He,Da='<a href="/docs/transformers/main/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.',mn,We,Oa="The abstract from the paper is the following:",pn,Ve,Ra='<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>',hn,Ze,fn,Ee,Ba="First, load the processor and a checkpoint of the model:",gn,De,un,Oe,Xa="You can seamlessly use this model on text or on audio, to generated either translated text or translated audio.",_n,Re,Ya="Here is how to use the processor to process text and audio:",Tn,Be,bn,Xe,yn,Ye,Aa='<a href="/docs/transformers/main/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:',kn,Ae,vn,Qe,Qa="With basically the same code, I’ve translated English text and Arabic speech to Russian speech samples.",xn,Ke,Mn,et,Ka=`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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel.generate">SeamlessM4TModel.generate()</a>.
This time, let’s translate to French.`,wn,tt,Sn,ot,$n,nt,zn,st,er=`<a href="/docs/transformers/main/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:`,Cn,at,Fn,rt,tr="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>.",qn,it,Ln,dt,or='Feel free to try out <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> and <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">SeamlessM4TForTextToSpeech</a> as well.',Un,lt,In,ct,nr="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!",Nn,mt,Pn,pt,sr='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.',Gn,ht,jn,ft,ar='Use <code>return_intermediate_token_ids=True</code> with <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> to return both speech and text !',Jn,gt,Hn,ut,rr="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.",Wn,_t,ir='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.',Vn,Tt,dr="Here’s how the generation process works:",Zn,bt,lr="<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>",En,yt,cr='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>.',Dn,kt,On,V,vt,zs,fo,mr=`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.`,Cs,X,xt,Fs,go,pr="Generates translated token ids and/or translated audio waveforms.",qs,ue,Rn,Mt,Bn,Z,wt,Ls,uo,hr=`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.`,Us,Y,St,Is,_o,fr="Generates translated audio waveforms.",Ns,_e,Xn,$t,Yn,E,zt,Ps,To,gr=`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.`,Gs,A,Ct,js,bo,ur="Generates translated audio waveforms.",Js,Te,An,Ft,Qn,N,qt,Hs,yo,_r=`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.`,Ws,Q,Lt,Vs,ko,Tr='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToText">SeamlessM4TForTextToText</a> forward method, overrides the <code>__call__</code> special method.',Zs,be,Es,K,Ut,Ds,vo,br="Generates sequences of token ids.",Os,ye,Kn,It,es,P,Nt,Rs,xo,yr=`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.`,Bs,ee,Pt,Xs,Mo,kr='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',Ys,ke,As,te,Gt,Qs,wo,vr="Generates sequences of token ids.",Ks,ve,ts,jt,os,G,Jt,ea,So,xr=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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.`,ta,$o,Mr=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,oa,xe,ns,Ht,ss,$,Wt,na,zo,wr="Construct a SeamlessM4T tokenizer.",sa,Co,Sr=`Adapted from <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer">XLNetTokenizer</a>. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,aa,Fo,$r="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.",ra,Me,ia,qo,Vt,da,H,Zt,la,Lo,zr=`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:`,ca,Uo,Cr="<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>",ma,Io,Fr=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,pa,we,Et,ha,No,qr=`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.`,fa,Se,Dt,ga,Po,Lr=`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.`,ua,Go,Ot,as,Rt,rs,L,Bt,_a,jo,Ur=`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>.`,Ta,Jo,Ir=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,ba,Ho,Nr="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.",ya,$e,ka,Wo,Xt,is,Yt,ds,U,At,va,Vo,Pr="Constructs a SeamlessM4T feature extractor.",xa,Zo,Gr=`This feature extractor inherits from <a href="/docs/transformers/main/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.`,Ma,Eo,jr="This class extracts mel-filter bank features from raw speech.",wa,ze,Qt,Sa,Do,Jr="Main method to featurize and prepare for the model one or several sequence(s).",ls,Kt,cs,j,eo,$a,Oo,Hr=`Constructs a SeamlessM4T processor which wraps a SeamlessM4T feature extractor and a SeamlessM4T tokenizer into a
single processor.`,za,Ro,Wr=`<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> and
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizerFast">SeamlessM4TTokenizerFast</a>. See the <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for
more information.`,Ca,Ce,to,Fa,Bo,Vr=`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/main/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/main/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.`,ms,oo,ps,J,no,qa,Xo,Zr=`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/main/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.)`,La,Yo,Er=`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.`,Ua,Ao,so,hs,ao,fs,se,ro,Ia,Fe,io,Na,Qo,Dr=`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.`,gs,lo,us,ae,co,Pa,Ko,Or=`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.`,_s,mo,Ts,D,po,Ga,en,Rr=`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.`,ja,oe,ho,Ja,tn,Br='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTextToUnitForConditionalGeneration">SeamlessM4TTextToUnitForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Ha,qe,bs,an,ys;return w=new z({props:{title:"SeamlessM4T",local:"seamlessm4t",headingTag:"h1"}}),k=new z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ze=new z({props:{title:"Usage",local:"usage",headingTag:"h2"}}),De=new ge({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}}),Be=new ge({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}}),Xe=new z({props:{title:"Speech",local:"speech",headingTag:"h3"}}),Ae=new ge({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}}),Ke=new z({props:{title:"Text",local:"text",headingTag:"h3"}}),tt=new ge({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}}),ot=new z({props:{title:"Tips",local:"tips",headingTag:"h3"}}),nt=new z({props:{title:"1. Use dedicated models",local:"1-use-dedicated-models",headingTag:"h4"}}),at=new ge({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}}),it=new ge({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}}),lt=new z({props:{title:"2. Change the speaker identity",local:"2-change-the-speaker-identity",headingTag:"h4"}}),mt=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"}}),vt=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L4124"}}),xt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TModel.generate",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 0"},{name:"generate_speech",val:": typing.Optional[bool] = 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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L4330",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>
`}}),ue=new Pe({props:{$$slots:{default:[si]},$$scope:{ctx:C}}}),Mt=new z({props:{title:"SeamlessM4TForTextToSpeech",local:"transformers.SeamlessM4TForTextToSpeech",headingTag:"h2"}}),wt=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3391"}}),St=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToSpeech.generate",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3539",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:[ai]},$$scope:{ctx:C}}}),$t=new z({props:{title:"SeamlessM4TForSpeechToSpeech",local:"transformers.SeamlessM4TForSpeechToSpeech",headingTag:"h2"}}),zt=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3751"}}),Ct=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate",parameters:[{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3902",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:[ri]},$$scope:{ctx:C}}}),Ft=new z({props:{title:"SeamlessM4TForTextToText",local:"transformers.SeamlessM4TForTextToText",headingTag:"h2"}}),qt=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2796"}}),Lt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForTextToText.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SeamlessM4TForTextToText.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2838"}}),be=new Pe({props:{$$slots:{default:[ii]},$$scope:{ctx:C}}}),Ut=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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2936",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.GreedySearchEncoderDecoderOutput"
>GreedySearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.SampleEncoderDecoderOutput"
>SampleEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSearchEncoderDecoderOutput"
>BeamSearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSampleEncoderDecoderOutput"
>BeamSampleEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ye=new Pe({props:{warning:!0,$$slots:{default:[di]},$$scope:{ctx:C}}}),It=new z({props:{title:"SeamlessM4TForSpeechToText",local:"transformers.SeamlessM4TForSpeechToText",headingTag:"h2"}}),Nt=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3092"}}),Pt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForSpeechToText.forward",parameters:[{name:"input_features",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3129"}}),ke=new Pe({props:{$$slots:{default:[li]},$$scope:{ctx:C}}}),Gt=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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3234",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.GreedySearchEncoderDecoderOutput"
>GreedySearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.SampleEncoderDecoderOutput"
>SampleEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSearchEncoderDecoderOutput"
>BeamSearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSampleEncoderDecoderOutput"
>BeamSampleEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ve=new Pe({props:{warning:!0,$$slots:{default:[ci]},$$scope:{ctx:C}}}),jt=new z({props:{title:"SeamlessM4TConfig",local:"transformers.SeamlessM4TConfig",headingTag:"h2"}}),Jt=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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>, <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">~SeamlessM4TForTextToSpeech</a> or
<a href="/docs/transformers/main/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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>,
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToSpeech">~SeamlessM4TForSpeechToSpeech</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">~SeamlessM4TForTextToSpeech</a>.`,name:"t2u_vocab_size"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/configuration_seamless_m4t.py#L29",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/main/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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">~SeamlessM4TModel</a>,
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToSpeech">~SeamlessM4TForSpeechToSpeech</a> or <a href="/docs/transformers/main/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 probabilitiy 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"}]}]}}),xe=new Wa({props:{anchor:"transformers.SeamlessM4TConfig.example",$$slots:{default:[mi]},$$scope:{ctx:C}}}),Ht=new z({props:{title:"SeamlessM4TTokenizer",local:"transformers.SeamlessM4TTokenizer",headingTag:"h2"}}),Wt=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:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"additional_special_tokens",val:" = None"},{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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L54"}}),Me=new Wa({props:{anchor:"transformers.SeamlessM4TTokenizer.example",$$slots:{default:[pi]},$$scope:{ctx:C}}}),Vt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = 2"},{name:"src_lang",val:": typing.Optional[str] = None"},{name:"tgt_lang",val:": typing.Optional[str] = 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/main/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/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L217"}}),Zt=new S({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SeamlessM4TTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.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/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L347",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>
`}}),Et=new S({props:{name:"get_special_tokens_mask",anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.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/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L316",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>
`}}),Dt=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:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = 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/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L375",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:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L498"}}),Rt=new z({props:{title:"SeamlessM4TTokenizerFast",local:"transformers.SeamlessM4TTokenizerFast",headingTag:"h2"}}),Bt=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/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L52"}}),$e=new Wa({props:{anchor:"transformers.SeamlessM4TTokenizerFast.example",$$slots:{default:[hi]},$$scope:{ctx:C}}}),Xt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizerFast.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = 2"},{name:"src_lang",val:": typing.Optional[str] = None"},{name:"tgt_lang",val:": typing.Optional[str] = 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/main/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/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizerFast.<strong>call</strong>()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L388"}}),Yt=new z({props:{title:"SeamlessM4TFeatureExtractor",local:"transformers.SeamlessM4TFeatureExtractor",headingTag:"h2"}}),At=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/main/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L33"}}),Qt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = 2"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"do_normalize_per_mel_bins",val:": typing.Optional[bool] = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.raw_speech",description:`<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>, <code>List[List[List[float]]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays, 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> 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> 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:"raw_speech"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L139"}}),Kt=new z({props:{title:"SeamlessM4TProcessor",local:"transformers.SeamlessM4TProcessor",headingTag:"h2"}}),eo=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/main/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/main/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/main/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L22"}}),to=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/main/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L43",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),oo=new z({props:{title:"SeamlessM4TCodeHifiGan",local:"transformers.SeamlessM4TCodeHifiGan",headingTag:"h2"}}),no=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/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2636"}}),so=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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2712"}}),ao=new z({props:{title:"SeamlessM4THifiGan",local:"transformers.SeamlessM4THifiGan",headingTag:"h2"}}),ro=new S({props:{name:"class transformers.SeamlessM4THifiGan",anchor:"transformers.SeamlessM4THifiGan",parameters:[{name:"config",val:": SeamlessM4TConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2560"}}),io=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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2595",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>
`}}),lo=new z({props:{title:"SeamlessM4TTextToUnitModel",local:"transformers.SeamlessM4TTextToUnitModel",headingTag:"h2"}}),co=new S({props:{name:"class transformers.SeamlessM4TTextToUnitModel",anchor:"transformers.SeamlessM4TTextToUnitModel",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": typing.Optional[torch.nn.modules.sparse.Embedding] = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2182"}}),mo=new z({props:{title:"SeamlessM4TTextToUnitForConditionalGeneration",local:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",headingTag:"h2"}}),po=new S({props:{name:"class transformers.SeamlessM4TTextToUnitForConditionalGeneration",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": typing.Optional[torch.nn.modules.sparse.Embedding] = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2278"}}),ho=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2324"}}),qe=new Pe({props:{$$slots:{default:[fi]},$$scope:{ctx:C}}}),{c(){l=i("meta"),v=n(),T=i("p"),b=n(),m(w.$$.fragment),_=n(),m(k.$$.fragment),I=n(),y=i("p"),y.innerHTML=F,rn=n(),Ge=i("p"),Ge.textContent=Va,dn=n(),je=i("p"),je.textContent=Za,ln=n(),Je=i("ul"),Je.innerHTML=Ea,cn=n(),He=i("p"),He.innerHTML=Da,mn=n(),We=i("p"),We.textContent=Oa,pn=n(),Ve=i("p"),Ve.innerHTML=Ra,hn=n(),m(Ze.$$.fragment),fn=n(),Ee=i("p"),Ee.textContent=Ba,gn=n(),m(De.$$.fragment),un=n(),Oe=i("p"),Oe.textContent=Xa,_n=n(),Re=i("p"),Re.textContent=Ya,Tn=n(),m(Be.$$.fragment),bn=n(),m(Xe.$$.fragment),yn=n(),Ye=i("p"),Ye.innerHTML=Aa,kn=n(),m(Ae.$$.fragment),vn=n(),Qe=i("p"),Qe.textContent=Qa,xn=n(),m(Ke.$$.fragment),Mn=n(),et=i("p"),et.innerHTML=Ka,wn=n(),m(tt.$$.fragment),Sn=n(),m(ot.$$.fragment),$n=n(),m(nt.$$.fragment),zn=n(),st=i("p"),st.innerHTML=er,Cn=n(),m(at.$$.fragment),Fn=n(),rt=i("p"),rt.innerHTML=tr,qn=n(),m(it.$$.fragment),Ln=n(),dt=i("p"),dt.innerHTML=or,Un=n(),m(lt.$$.fragment),In=n(),ct=i("p"),ct.innerHTML=nr,Nn=n(),m(mt.$$.fragment),Pn=n(),pt=i("p"),pt.innerHTML=sr,Gn=n(),m(ht.$$.fragment),jn=n(),ft=i("p"),ft.innerHTML=ar,Jn=n(),m(gt.$$.fragment),Hn=n(),ut=i("p"),ut.textContent=rr,Wn=n(),_t=i("p"),_t.innerHTML=ir,Vn=n(),Tt=i("p"),Tt.textContent=dr,Zn=n(),bt=i("ul"),bt.innerHTML=lr,En=n(),yt=i("p"),yt.innerHTML=cr,Dn=n(),m(kt.$$.fragment),On=n(),V=i("div"),m(vt.$$.fragment),zs=n(),fo=i("p"),fo.innerHTML=mr,Cs=n(),X=i("div"),m(xt.$$.fragment),Fs=n(),go=i("p"),go.textContent=pr,qs=n(),m(ue.$$.fragment),Rn=n(),m(Mt.$$.fragment),Bn=n(),Z=i("div"),m(wt.$$.fragment),Ls=n(),uo=i("p"),uo.innerHTML=hr,Us=n(),Y=i("div"),m(St.$$.fragment),Is=n(),_o=i("p"),_o.textContent=fr,Ns=n(),m(_e.$$.fragment),Xn=n(),m($t.$$.fragment),Yn=n(),E=i("div"),m(zt.$$.fragment),Ps=n(),To=i("p"),To.innerHTML=gr,Gs=n(),A=i("div"),m(Ct.$$.fragment),js=n(),bo=i("p"),bo.textContent=ur,Js=n(),m(Te.$$.fragment),An=n(),m(Ft.$$.fragment),Qn=n(),N=i("div"),m(qt.$$.fragment),Hs=n(),yo=i("p"),yo.innerHTML=_r,Ws=n(),Q=i("div"),m(Lt.$$.fragment),Vs=n(),ko=i("p"),ko.innerHTML=Tr,Zs=n(),m(be.$$.fragment),Es=n(),K=i("div"),m(Ut.$$.fragment),Ds=n(),vo=i("p"),vo.textContent=br,Os=n(),m(ye.$$.fragment),Kn=n(),m(It.$$.fragment),es=n(),P=i("div"),m(Nt.$$.fragment),Rs=n(),xo=i("p"),xo.innerHTML=yr,Bs=n(),ee=i("div"),m(Pt.$$.fragment),Xs=n(),Mo=i("p"),Mo.innerHTML=kr,Ys=n(),m(ke.$$.fragment),As=n(),te=i("div"),m(Gt.$$.fragment),Qs=n(),wo=i("p"),wo.textContent=vr,Ks=n(),m(ve.$$.fragment),ts=n(),m(jt.$$.fragment),os=n(),G=i("div"),m(Jt.$$.fragment),ea=n(),So=i("p"),So.innerHTML=xr,ta=n(),$o=i("p"),$o.innerHTML=Mr,oa=n(),m(xe.$$.fragment),ns=n(),m(Ht.$$.fragment),ss=n(),$=i("div"),m(Wt.$$.fragment),na=n(),zo=i("p"),zo.textContent=wr,sa=n(),Co=i("p"),Co.innerHTML=Sr,aa=n(),Fo=i("p"),Fo.innerHTML=$r,ra=n(),m(Me.$$.fragment),ia=n(),qo=i("div"),m(Vt.$$.fragment),da=n(),H=i("div"),m(Zt.$$.fragment),la=n(),Lo=i("p"),Lo.innerHTML=zr,ca=n(),Uo=i("ul"),Uo.innerHTML=Cr,ma=n(),Io=i("p"),Io.textContent=Fr,pa=n(),we=i("div"),m(Et.$$.fragment),ha=n(),No=i("p"),No.innerHTML=qr,fa=n(),Se=i("div"),m(Dt.$$.fragment),ga=n(),Po=i("p"),Po.textContent=Lr,ua=n(),Go=i("div"),m(Ot.$$.fragment),as=n(),m(Rt.$$.fragment),rs=n(),L=i("div"),m(Bt.$$.fragment),_a=n(),jo=i("p"),jo.innerHTML=Ur,Ta=n(),Jo=i("p"),Jo.innerHTML=Ir,ba=n(),Ho=i("p"),Ho.innerHTML=Nr,ya=n(),m($e.$$.fragment),ka=n(),Wo=i("div"),m(Xt.$$.fragment),is=n(),m(Yt.$$.fragment),ds=n(),U=i("div"),m(At.$$.fragment),va=n(),Vo=i("p"),Vo.textContent=Pr,xa=n(),Zo=i("p"),Zo.innerHTML=Gr,Ma=n(),Eo=i("p"),Eo.textContent=jr,wa=n(),ze=i("div"),m(Qt.$$.fragment),Sa=n(),Do=i("p"),Do.textContent=Jr,ls=n(),m(Kt.$$.fragment),cs=n(),j=i("div"),m(eo.$$.fragment),$a=n(),Oo=i("p"),Oo.textContent=Hr,za=n(),Ro=i("p"),Ro.innerHTML=Wr,Ca=n(),Ce=i("div"),m(to.$$.fragment),Fa=n(),Bo=i("p"),Bo.innerHTML=Vr,ms=n(),m(oo.$$.fragment),ps=n(),J=i("div"),m(no.$$.fragment),qa=n(),Xo=i("p"),Xo.innerHTML=Zr,La=n(),Yo=i("p"),Yo.innerHTML=Er,Ua=n(),Ao=i("div"),m(so.$$.fragment),hs=n(),m(ao.$$.fragment),fs=n(),se=i("div"),m(ro.$$.fragment),Ia=n(),Fe=i("div"),m(io.$$.fragment),Na=n(),Qo=i("p"),Qo.textContent=Dr,gs=n(),m(lo.$$.fragment),us=n(),ae=i("div"),m(co.$$.fragment),Pa=n(),Ko=i("p"),Ko.innerHTML=Or,_s=n(),m(mo.$$.fragment),Ts=n(),D=i("div"),m(po.$$.fragment),Ga=n(),en=i("p"),en.innerHTML=Rr,ja=n(),oe=i("div"),m(ho.$$.fragment),Ja=n(),tn=i("p"),tn.innerHTML=Br,Ha=n(),m(qe.$$.fragment),bs=n(),an=i("p"),this.h()},l(e){const o=ni("svelte-u9bgzb",document.head);l=d(o,"META",{name:!0,content:!0}),o.forEach(t),v=s(e),T=d(e,"P",{}),x(T).forEach(t),b=s(e),p(w.$$.fragment,e),_=s(e),p(k.$$.fragment,e),I=s(e),y=d(e,"P",{"data-svelte-h":!0}),c(y)!=="svelte-1wkib9v"&&(y.innerHTML=F),rn=s(e),Ge=d(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-1ocrm51"&&(Ge.textContent=Va),dn=s(e),je=d(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-17llv5s"&&(je.textContent=Za),ln=s(e),Je=d(e,"UL",{"data-svelte-h":!0}),c(Je)!=="svelte-7ymha8"&&(Je.innerHTML=Ea),cn=s(e),He=d(e,"P",{"data-svelte-h":!0}),c(He)!=="svelte-2swekv"&&(He.innerHTML=Da),mn=s(e),We=d(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-vfdo9a"&&(We.textContent=Oa),pn=s(e),Ve=d(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-oypae0"&&(Ve.innerHTML=Ra),hn=s(e),p(Ze.$$.fragment,e),fn=s(e),Ee=d(e,"P",{"data-svelte-h":!0}),c(Ee)!=="svelte-msm04g"&&(Ee.textContent=Ba),gn=s(e),p(De.$$.fragment,e),un=s(e),Oe=d(e,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-1x6apd2"&&(Oe.textContent=Xa),_n=s(e),Re=d(e,"P",{"data-svelte-h":!0}),c(Re)!=="svelte-skz2b1"&&(Re.textContent=Ya),Tn=s(e),p(Be.$$.fragment,e),bn=s(e),p(Xe.$$.fragment,e),yn=s(e),Ye=d(e,"P",{"data-svelte-h":!0}),c(Ye)!=="svelte-1g0gag9"&&(Ye.innerHTML=Aa),kn=s(e),p(Ae.$$.fragment,e),vn=s(e),Qe=d(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-vy622i"&&(Qe.textContent=Qa),xn=s(e),p(Ke.$$.fragment,e),Mn=s(e),et=d(e,"P",{"data-svelte-h":!0}),c(et)!=="svelte-zczrfl"&&(et.innerHTML=Ka),wn=s(e),p(tt.$$.fragment,e),Sn=s(e),p(ot.$$.fragment,e),$n=s(e),p(nt.$$.fragment,e),zn=s(e),st=d(e,"P",{"data-svelte-h":!0}),c(st)!=="svelte-o2081q"&&(st.innerHTML=er),Cn=s(e),p(at.$$.fragment,e),Fn=s(e),rt=d(e,"P",{"data-svelte-h":!0}),c(rt)!=="svelte-65k8ai"&&(rt.innerHTML=tr),qn=s(e),p(it.$$.fragment,e),Ln=s(e),dt=d(e,"P",{"data-svelte-h":!0}),c(dt)!=="svelte-ynkzlj"&&(dt.innerHTML=or),Un=s(e),p(lt.$$.fragment,e),In=s(e),ct=d(e,"P",{"data-svelte-h":!0}),c(ct)!=="svelte-1fv3rh2"&&(ct.innerHTML=nr),Nn=s(e),p(mt.$$.fragment,e),Pn=s(e),pt=d(e,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-9rou0u"&&(pt.innerHTML=sr),Gn=s(e),p(ht.$$.fragment,e),jn=s(e),ft=d(e,"P",{"data-svelte-h":!0}),c(ft)!=="svelte-1kknmy3"&&(ft.innerHTML=ar),Jn=s(e),p(gt.$$.fragment,e),Hn=s(e),ut=d(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-1btdeyd"&&(ut.textContent=rr),Wn=s(e),_t=d(e,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-10jpqyx"&&(_t.innerHTML=ir),Vn=s(e),Tt=d(e,"P",{"data-svelte-h":!0}),c(Tt)!=="svelte-8kbcuu"&&(Tt.textContent=dr),Zn=s(e),bt=d(e,"UL",{"data-svelte-h":!0}),c(bt)!=="svelte-lmn79"&&(bt.innerHTML=lr),En=s(e),yt=d(e,"P",{"data-svelte-h":!0}),c(yt)!=="svelte-mez4is"&&(yt.innerHTML=cr),Dn=s(e),p(kt.$$.fragment,e),On=s(e),V=d(e,"DIV",{class:!0});var re=x(V);p(vt.$$.fragment,re),zs=s(re),fo=d(re,"P",{"data-svelte-h":!0}),c(fo)!=="svelte-1d7595s"&&(fo.innerHTML=mr),Cs=s(re),X=d(re,"DIV",{class:!0});var ie=x(X);p(xt.$$.fragment,ie),Fs=s(ie),go=d(ie,"P",{"data-svelte-h":!0}),c(go)!=="svelte-1v5cwae"&&(go.textContent=pr),qs=s(ie),p(ue.$$.fragment,ie),ie.forEach(t),re.forEach(t),Rn=s(e),p(Mt.$$.fragment,e),Bn=s(e),Z=d(e,"DIV",{class:!0});var de=x(Z);p(wt.$$.fragment,de),Ls=s(de),uo=d(de,"P",{"data-svelte-h":!0}),c(uo)!=="svelte-1tcnd3d"&&(uo.innerHTML=hr),Us=s(de),Y=d(de,"DIV",{class:!0});var le=x(Y);p(St.$$.fragment,le),Is=s(le),_o=d(le,"P",{"data-svelte-h":!0}),c(_o)!=="svelte-1lcmkdu"&&(_o.textContent=fr),Ns=s(le),p(_e.$$.fragment,le),le.forEach(t),de.forEach(t),Xn=s(e),p($t.$$.fragment,e),Yn=s(e),E=d(e,"DIV",{class:!0});var ce=x(E);p(zt.$$.fragment,ce),Ps=s(ce),To=d(ce,"P",{"data-svelte-h":!0}),c(To)!=="svelte-1js90x5"&&(To.innerHTML=gr),Gs=s(ce),A=d(ce,"DIV",{class:!0});var me=x(A);p(Ct.$$.fragment,me),js=s(me),bo=d(me,"P",{"data-svelte-h":!0}),c(bo)!=="svelte-1lcmkdu"&&(bo.textContent=ur),Js=s(me),p(Te.$$.fragment,me),me.forEach(t),ce.forEach(t),An=s(e),p(Ft.$$.fragment,e),Qn=s(e),N=d(e,"DIV",{class:!0});var O=x(N);p(qt.$$.fragment,O),Hs=s(O),yo=d(O,"P",{"data-svelte-h":!0}),c(yo)!=="svelte-eorsfx"&&(yo.innerHTML=_r),Ws=s(O),Q=d(O,"DIV",{class:!0});var pe=x(Q);p(Lt.$$.fragment,pe),Vs=s(pe),ko=d(pe,"P",{"data-svelte-h":!0}),c(ko)!=="svelte-k3sjca"&&(ko.innerHTML=Tr),Zs=s(pe),p(be.$$.fragment,pe),pe.forEach(t),Es=s(O),K=d(O,"DIV",{class:!0});var he=x(K);p(Ut.$$.fragment,he),Ds=s(he),vo=d(he,"P",{"data-svelte-h":!0}),c(vo)!=="svelte-1puovtq"&&(vo.textContent=br),Os=s(he),p(ye.$$.fragment,he),he.forEach(t),O.forEach(t),Kn=s(e),p(It.$$.fragment,e),es=s(e),P=d(e,"DIV",{class:!0});var R=x(P);p(Nt.$$.fragment,R),Rs=s(R),xo=d(R,"P",{"data-svelte-h":!0}),c(xo)!=="svelte-1cndbjh"&&(xo.innerHTML=yr),Bs=s(R),ee=d(R,"DIV",{class:!0});var fe=x(ee);p(Pt.$$.fragment,fe),Xs=s(fe),Mo=d(fe,"P",{"data-svelte-h":!0}),c(Mo)!=="svelte-ge2d2g"&&(Mo.innerHTML=kr),Ys=s(fe),p(ke.$$.fragment,fe),fe.forEach(t),As=s(R),te=d(R,"DIV",{class:!0});var on=x(te);p(Gt.$$.fragment,on),Qs=s(on),wo=d(on,"P",{"data-svelte-h":!0}),c(wo)!=="svelte-1puovtq"&&(wo.textContent=vr),Ks=s(on),p(ve.$$.fragment,on),on.forEach(t),R.forEach(t),ts=s(e),p(jt.$$.fragment,e),os=s(e),G=d(e,"DIV",{class:!0});var Le=x(G);p(Jt.$$.fragment,Le),ea=s(Le),So=d(Le,"P",{"data-svelte-h":!0}),c(So)!=="svelte-1u0clpv"&&(So.innerHTML=xr),ta=s(Le),$o=d(Le,"P",{"data-svelte-h":!0}),c($o)!=="svelte-o55m63"&&($o.innerHTML=Mr),oa=s(Le),p(xe.$$.fragment,Le),Le.forEach(t),ns=s(e),p(Ht.$$.fragment,e),ss=s(e),$=d(e,"DIV",{class:!0});var q=x($);p(Wt.$$.fragment,q),na=s(q),zo=d(q,"P",{"data-svelte-h":!0}),c(zo)!=="svelte-1yrb5nn"&&(zo.textContent=wr),sa=s(q),Co=d(q,"P",{"data-svelte-h":!0}),c(Co)!=="svelte-1serjol"&&(Co.innerHTML=Sr),aa=s(q),Fo=d(q,"P",{"data-svelte-h":!0}),c(Fo)!=="svelte-18kdu26"&&(Fo.innerHTML=$r),ra=s(q),p(Me.$$.fragment,q),ia=s(q),qo=d(q,"DIV",{class:!0});var Xr=x(qo);p(Vt.$$.fragment,Xr),Xr.forEach(t),da=s(q),H=d(q,"DIV",{class:!0});var Ue=x(H);p(Zt.$$.fragment,Ue),la=s(Ue),Lo=d(Ue,"P",{"data-svelte-h":!0}),c(Lo)!=="svelte-nkpot4"&&(Lo.innerHTML=zr),ca=s(Ue),Uo=d(Ue,"UL",{"data-svelte-h":!0}),c(Uo)!=="svelte-mlrsks"&&(Uo.innerHTML=Cr),ma=s(Ue),Io=d(Ue,"P",{"data-svelte-h":!0}),c(Io)!=="svelte-46aam0"&&(Io.textContent=Fr),Ue.forEach(t),pa=s(q),we=d(q,"DIV",{class:!0});var ks=x(we);p(Et.$$.fragment,ks),ha=s(ks),No=d(ks,"P",{"data-svelte-h":!0}),c(No)!=="svelte-1f4f5kp"&&(No.innerHTML=qr),ks.forEach(t),fa=s(q),Se=d(q,"DIV",{class:!0});var vs=x(Se);p(Dt.$$.fragment,vs),ga=s(vs),Po=d(vs,"P",{"data-svelte-h":!0}),c(Po)!=="svelte-1bcwf97"&&(Po.textContent=Lr),vs.forEach(t),ua=s(q),Go=d(q,"DIV",{class:!0});var Yr=x(Go);p(Ot.$$.fragment,Yr),Yr.forEach(t),q.forEach(t),as=s(e),p(Rt.$$.fragment,e),rs=s(e),L=d(e,"DIV",{class:!0});var W=x(L);p(Bt.$$.fragment,W),_a=s(W),jo=d(W,"P",{"data-svelte-h":!0}),c(jo)!=="svelte-162k0i1"&&(jo.innerHTML=Ur),Ta=s(W),Jo=d(W,"P",{"data-svelte-h":!0}),c(Jo)!=="svelte-fh0aq"&&(Jo.innerHTML=Ir),ba=s(W),Ho=d(W,"P",{"data-svelte-h":!0}),c(Ho)!=="svelte-18kdu26"&&(Ho.innerHTML=Nr),ya=s(W),p($e.$$.fragment,W),ka=s(W),Wo=d(W,"DIV",{class:!0});var Ar=x(Wo);p(Xt.$$.fragment,Ar),Ar.forEach(t),W.forEach(t),is=s(e),p(Yt.$$.fragment,e),ds=s(e),U=d(e,"DIV",{class:!0});var ne=x(U);p(At.$$.fragment,ne),va=s(ne),Vo=d(ne,"P",{"data-svelte-h":!0}),c(Vo)!=="svelte-h20f9h"&&(Vo.textContent=Pr),xa=s(ne),Zo=d(ne,"P",{"data-svelte-h":!0}),c(Zo)!=="svelte-xnfjot"&&(Zo.innerHTML=Gr),Ma=s(ne),Eo=d(ne,"P",{"data-svelte-h":!0}),c(Eo)!=="svelte-1icaz7y"&&(Eo.textContent=jr),wa=s(ne),ze=d(ne,"DIV",{class:!0});var xs=x(ze);p(Qt.$$.fragment,xs),Sa=s(xs),Do=d(xs,"P",{"data-svelte-h":!0}),c(Do)!=="svelte-1a6wgfx"&&(Do.textContent=Jr),xs.forEach(t),ne.forEach(t),ls=s(e),p(Kt.$$.fragment,e),cs=s(e),j=d(e,"DIV",{class:!0});var Ie=x(j);p(eo.$$.fragment,Ie),$a=s(Ie),Oo=d(Ie,"P",{"data-svelte-h":!0}),c(Oo)!=="svelte-137g986"&&(Oo.textContent=Hr),za=s(Ie),Ro=d(Ie,"P",{"data-svelte-h":!0}),c(Ro)!=="svelte-12ghvpz"&&(Ro.innerHTML=Wr),Ca=s(Ie),Ce=d(Ie,"DIV",{class:!0});var Ms=x(Ce);p(to.$$.fragment,Ms),Fa=s(Ms),Bo=d(Ms,"P",{"data-svelte-h":!0}),c(Bo)!=="svelte-jj7pyv"&&(Bo.innerHTML=Vr),Ms.forEach(t),Ie.forEach(t),ms=s(e),p(oo.$$.fragment,e),ps=s(e),J=d(e,"DIV",{class:!0});var Ne=x(J);p(no.$$.fragment,Ne),qa=s(Ne),Xo=d(Ne,"P",{"data-svelte-h":!0}),c(Xo)!=="svelte-1ylqa15"&&(Xo.innerHTML=Zr),La=s(Ne),Yo=d(Ne,"P",{"data-svelte-h":!0}),c(Yo)!=="svelte-hswkmf"&&(Yo.innerHTML=Er),Ua=s(Ne),Ao=d(Ne,"DIV",{class:!0});var Qr=x(Ao);p(so.$$.fragment,Qr),Qr.forEach(t),Ne.forEach(t),hs=s(e),p(ao.$$.fragment,e),fs=s(e),se=d(e,"DIV",{class:!0});var ws=x(se);p(ro.$$.fragment,ws),Ia=s(ws),Fe=d(ws,"DIV",{class:!0});var Ss=x(Fe);p(io.$$.fragment,Ss),Na=s(Ss),Qo=d(Ss,"P",{"data-svelte-h":!0}),c(Qo)!=="svelte-qef8w5"&&(Qo.textContent=Dr),Ss.forEach(t),ws.forEach(t),gs=s(e),p(lo.$$.fragment,e),us=s(e),ae=d(e,"DIV",{class:!0});var $s=x(ae);p(co.$$.fragment,$s),Pa=s($s),Ko=d($s,"P",{"data-svelte-h":!0}),c(Ko)!=="svelte-1dvnsz8"&&(Ko.innerHTML=Or),$s.forEach(t),_s=s(e),p(mo.$$.fragment,e),Ts=s(e),D=d(e,"DIV",{class:!0});var nn=x(D);p(po.$$.fragment,nn),Ga=s(nn),en=d(nn,"P",{"data-svelte-h":!0}),c(en)!=="svelte-82v1ej"&&(en.innerHTML=Rr),ja=s(nn),oe=d(nn,"DIV",{class:!0});var sn=x(oe);p(ho.$$.fragment,sn),Ja=s(sn),tn=d(sn,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-1d5sxxm"&&(tn.innerHTML=Br),Ha=s(sn),p(qe.$$.fragment,sn),sn.forEach(t),nn.forEach(t),bs=s(e),an=d(e,"P",{}),x(an).forEach(t),this.h()},h(){M(l,"name","hf:doc:metadata"),M(l,"content",ui),M(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(A,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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){r(document.head,l),a(e,v,o),a(e,T,o),a(e,b,o),h(w,e,o),a(e,_,o),h(k,e,o),a(e,I,o),a(e,y,o),a(e,rn,o),a(e,Ge,o),a(e,dn,o),a(e,je,o),a(e,ln,o),a(e,Je,o),a(e,cn,o),a(e,He,o),a(e,mn,o),a(e,We,o),a(e,pn,o),a(e,Ve,o),a(e,hn,o),h(Ze,e,o),a(e,fn,o),a(e,Ee,o),a(e,gn,o),h(De,e,o),a(e,un,o),a(e,Oe,o),a(e,_n,o),a(e,Re,o),a(e,Tn,o),h(Be,e,o),a(e,bn,o),h(Xe,e,o),a(e,yn,o),a(e,Ye,o),a(e,kn,o),h(Ae,e,o),a(e,vn,o),a(e,Qe,o),a(e,xn,o),h(Ke,e,o),a(e,Mn,o),a(e,et,o),a(e,wn,o),h(tt,e,o),a(e,Sn,o),h(ot,e,o),a(e,$n,o),h(nt,e,o),a(e,zn,o),a(e,st,o),a(e,Cn,o),h(at,e,o),a(e,Fn,o),a(e,rt,o),a(e,qn,o),h(it,e,o),a(e,Ln,o),a(e,dt,o),a(e,Un,o),h(lt,e,o),a(e,In,o),a(e,ct,o),a(e,Nn,o),h(mt,e,o),a(e,Pn,o),a(e,pt,o),a(e,Gn,o),h(ht,e,o),a(e,jn,o),a(e,ft,o),a(e,Jn,o),h(gt,e,o),a(e,Hn,o),a(e,ut,o),a(e,Wn,o),a(e,_t,o),a(e,Vn,o),a(e,Tt,o),a(e,Zn,o),a(e,bt,o),a(e,En,o),a(e,yt,o),a(e,Dn,o),h(kt,e,o),a(e,On,o),a(e,V,o),h(vt,V,null),r(V,zs),r(V,fo),r(V,Cs),r(V,X),h(xt,X,null),r(X,Fs),r(X,go),r(X,qs),h(ue,X,null),a(e,Rn,o),h(Mt,e,o),a(e,Bn,o),a(e,Z,o),h(wt,Z,null),r(Z,Ls),r(Z,uo),r(Z,Us),r(Z,Y),h(St,Y,null),r(Y,Is),r(Y,_o),r(Y,Ns),h(_e,Y,null),a(e,Xn,o),h($t,e,o),a(e,Yn,o),a(e,E,o),h(zt,E,null),r(E,Ps),r(E,To),r(E,Gs),r(E,A),h(Ct,A,null),r(A,js),r(A,bo),r(A,Js),h(Te,A,null),a(e,An,o),h(Ft,e,o),a(e,Qn,o),a(e,N,o),h(qt,N,null),r(N,Hs),r(N,yo),r(N,Ws),r(N,Q),h(Lt,Q,null),r(Q,Vs),r(Q,ko),r(Q,Zs),h(be,Q,null),r(N,Es),r(N,K),h(Ut,K,null),r(K,Ds),r(K,vo),r(K,Os),h(ye,K,null),a(e,Kn,o),h(It,e,o),a(e,es,o),a(e,P,o),h(Nt,P,null),r(P,Rs),r(P,xo),r(P,Bs),r(P,ee),h(Pt,ee,null),r(ee,Xs),r(ee,Mo),r(ee,Ys),h(ke,ee,null),r(P,As),r(P,te),h(Gt,te,null),r(te,Qs),r(te,wo),r(te,Ks),h(ve,te,null),a(e,ts,o),h(jt,e,o),a(e,os,o),a(e,G,o),h(Jt,G,null),r(G,ea),r(G,So),r(G,ta),r(G,$o),r(G,oa),h(xe,G,null),a(e,ns,o),h(Ht,e,o),a(e,ss,o),a(e,$,o),h(Wt,$,null),r($,na),r($,zo),r($,sa),r($,Co),r($,aa),r($,Fo),r($,ra),h(Me,$,null),r($,ia),r($,qo),h(Vt,qo,null),r($,da),r($,H),h(Zt,H,null),r(H,la),r(H,Lo),r(H,ca),r(H,Uo),r(H,ma),r(H,Io),r($,pa),r($,we),h(Et,we,null),r(we,ha),r(we,No),r($,fa),r($,Se),h(Dt,Se,null),r(Se,ga),r(Se,Po),r($,ua),r($,Go),h(Ot,Go,null),a(e,as,o),h(Rt,e,o),a(e,rs,o),a(e,L,o),h(Bt,L,null),r(L,_a),r(L,jo),r(L,Ta),r(L,Jo),r(L,ba),r(L,Ho),r(L,ya),h($e,L,null),r(L,ka),r(L,Wo),h(Xt,Wo,null),a(e,is,o),h(Yt,e,o),a(e,ds,o),a(e,U,o),h(At,U,null),r(U,va),r(U,Vo),r(U,xa),r(U,Zo),r(U,Ma),r(U,Eo),r(U,wa),r(U,ze),h(Qt,ze,null),r(ze,Sa),r(ze,Do),a(e,ls,o),h(Kt,e,o),a(e,cs,o),a(e,j,o),h(eo,j,null),r(j,$a),r(j,Oo),r(j,za),r(j,Ro),r(j,Ca),r(j,Ce),h(to,Ce,null),r(Ce,Fa),r(Ce,Bo),a(e,ms,o),h(oo,e,o),a(e,ps,o),a(e,J,o),h(no,J,null),r(J,qa),r(J,Xo),r(J,La),r(J,Yo),r(J,Ua),r(J,Ao),h(so,Ao,null),a(e,hs,o),h(ao,e,o),a(e,fs,o),a(e,se,o),h(ro,se,null),r(se,Ia),r(se,Fe),h(io,Fe,null),r(Fe,Na),r(Fe,Qo),a(e,gs,o),h(lo,e,o),a(e,us,o),a(e,ae,o),h(co,ae,null),r(ae,Pa),r(ae,Ko),a(e,_s,o),h(mo,e,o),a(e,Ts,o),a(e,D,o),h(po,D,null),r(D,Ga),r(D,en),r(D,ja),r(D,oe),h(ho,oe,null),r(oe,Ja),r(oe,tn),r(oe,Ha),h(qe,oe,null),a(e,bs,o),a(e,an,o),ys=!0},p(e,[o]){const re={};o&2&&(re.$$scope={dirty:o,ctx:e}),ue.$set(re);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}),ye.$set(ce);const me={};o&2&&(me.$$scope={dirty:o,ctx:e}),ke.$set(me);const O={};o&2&&(O.$$scope={dirty:o,ctx:e}),ve.$set(O);const pe={};o&2&&(pe.$$scope={dirty:o,ctx:e}),xe.$set(pe);const he={};o&2&&(he.$$scope={dirty:o,ctx:e}),Me.$set(he);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),$e.$set(R);const fe={};o&2&&(fe.$$scope={dirty:o,ctx:e}),qe.$set(fe)},i(e){ys||(f(w.$$.fragment,e),f(k.$$.fragment,e),f(Ze.$$.fragment,e),f(De.$$.fragment,e),f(Be.$$.fragment,e),f(Xe.$$.fragment,e),f(Ae.$$.fragment,e),f(Ke.$$.fragment,e),f(tt.$$.fragment,e),f(ot.$$.fragment,e),f(nt.$$.fragment,e),f(at.$$.fragment,e),f(it.$$.fragment,e),f(lt.$$.fragment,e),f(mt.$$.fragment,e),f(ht.$$.fragment,e),f(gt.$$.fragment,e),f(kt.$$.fragment,e),f(vt.$$.fragment,e),f(xt.$$.fragment,e),f(ue.$$.fragment,e),f(Mt.$$.fragment,e),f(wt.$$.fragment,e),f(St.$$.fragment,e),f(_e.$$.fragment,e),f($t.$$.fragment,e),f(zt.$$.fragment,e),f(Ct.$$.fragment,e),f(Te.$$.fragment,e),f(Ft.$$.fragment,e),f(qt.$$.fragment,e),f(Lt.$$.fragment,e),f(be.$$.fragment,e),f(Ut.$$.fragment,e),f(ye.$$.fragment,e),f(It.$$.fragment,e),f(Nt.$$.fragment,e),f(Pt.$$.fragment,e),f(ke.$$.fragment,e),f(Gt.$$.fragment,e),f(ve.$$.fragment,e),f(jt.$$.fragment,e),f(Jt.$$.fragment,e),f(xe.$$.fragment,e),f(Ht.$$.fragment,e),f(Wt.$$.fragment,e),f(Me.$$.fragment,e),f(Vt.$$.fragment,e),f(Zt.$$.fragment,e),f(Et.$$.fragment,e),f(Dt.$$.fragment,e),f(Ot.$$.fragment,e),f(Rt.$$.fragment,e),f(Bt.$$.fragment,e),f($e.$$.fragment,e),f(Xt.$$.fragment,e),f(Yt.$$.fragment,e),f(At.$$.fragment,e),f(Qt.$$.fragment,e),f(Kt.$$.fragment,e),f(eo.$$.fragment,e),f(to.$$.fragment,e),f(oo.$$.fragment,e),f(no.$$.fragment,e),f(so.$$.fragment,e),f(ao.$$.fragment,e),f(ro.$$.fragment,e),f(io.$$.fragment,e),f(lo.$$.fragment,e),f(co.$$.fragment,e),f(mo.$$.fragment,e),f(po.$$.fragment,e),f(ho.$$.fragment,e),f(qe.$$.fragment,e),ys=!0)},o(e){g(w.$$.fragment,e),g(k.$$.fragment,e),g(Ze.$$.fragment,e),g(De.$$.fragment,e),g(Be.$$.fragment,e),g(Xe.$$.fragment,e),g(Ae.$$.fragment,e),g(Ke.$$.fragment,e),g(tt.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(at.$$.fragment,e),g(it.$$.fragment,e),g(lt.$$.fragment,e),g(mt.$$.fragment,e),g(ht.$$.fragment,e),g(gt.$$.fragment,e),g(kt.$$.fragment,e),g(vt.$$.fragment,e),g(xt.$$.fragment,e),g(ue.$$.fragment,e),g(Mt.$$.fragment,e),g(wt.$$.fragment,e),g(St.$$.fragment,e),g(_e.$$.fragment,e),g($t.$$.fragment,e),g(zt.$$.fragment,e),g(Ct.$$.fragment,e),g(Te.$$.fragment,e),g(Ft.$$.fragment,e),g(qt.$$.fragment,e),g(Lt.$$.fragment,e),g(be.$$.fragment,e),g(Ut.$$.fragment,e),g(ye.$$.fragment,e),g(It.$$.fragment,e),g(Nt.$$.fragment,e),g(Pt.$$.fragment,e),g(ke.$$.fragment,e),g(Gt.$$.fragment,e),g(ve.$$.fragment,e),g(jt.$$.fragment,e),g(Jt.$$.fragment,e),g(xe.$$.fragment,e),g(Ht.$$.fragment,e),g(Wt.$$.fragment,e),g(Me.$$.fragment,e),g(Vt.$$.fragment,e),g(Zt.$$.fragment,e),g(Et.$$.fragment,e),g(Dt.$$.fragment,e),g(Ot.$$.fragment,e),g(Rt.$$.fragment,e),g(Bt.$$.fragment,e),g($e.$$.fragment,e),g(Xt.$$.fragment,e),g(Yt.$$.fragment,e),g(At.$$.fragment,e),g(Qt.$$.fragment,e),g(Kt.$$.fragment,e),g(eo.$$.fragment,e),g(to.$$.fragment,e),g(oo.$$.fragment,e),g(no.$$.fragment,e),g(so.$$.fragment,e),g(ao.$$.fragment,e),g(ro.$$.fragment,e),g(io.$$.fragment,e),g(lo.$$.fragment,e),g(co.$$.fragment,e),g(mo.$$.fragment,e),g(po.$$.fragment,e),g(ho.$$.fragment,e),g(qe.$$.fragment,e),ys=!1},d(e){e&&(t(v),t(T),t(b),t(_),t(I),t(y),t(rn),t(Ge),t(dn),t(je),t(ln),t(Je),t(cn),t(He),t(mn),t(We),t(pn),t(Ve),t(hn),t(fn),t(Ee),t(gn),t(un),t(Oe),t(_n),t(Re),t(Tn),t(bn),t(yn),t(Ye),t(kn),t(vn),t(Qe),t(xn),t(Mn),t(et),t(wn),t(Sn),t($n),t(zn),t(st),t(Cn),t(Fn),t(rt),t(qn),t(Ln),t(dt),t(Un),t(In),t(ct),t(Nn),t(Pn),t(pt),t(Gn),t(jn),t(ft),t(Jn),t(Hn),t(ut),t(Wn),t(_t),t(Vn),t(Tt),t(Zn),t(bt),t(En),t(yt),t(Dn),t(On),t(V),t(Rn),t(Bn),t(Z),t(Xn),t(Yn),t(E),t(An),t(Qn),t(N),t(Kn),t(es),t(P),t(ts),t(os),t(G),t(ns),t(ss),t($),t(as),t(rs),t(L),t(is),t(ds),t(U),t(ls),t(cs),t(j),t(ms),t(ps),t(J),t(hs),t(fs),t(se),t(gs),t(us),t(ae),t(_s),t(Ts),t(D),t(bs),t(an)),t(l),u(w,e),u(k,e),u(Ze,e),u(De,e),u(Be,e),u(Xe,e),u(Ae,e),u(Ke,e),u(tt,e),u(ot,e),u(nt,e),u(at,e),u(it,e),u(lt,e),u(mt,e),u(ht,e),u(gt,e),u(kt,e),u(vt),u(xt),u(ue),u(Mt,e),u(wt),u(St),u(_e),u($t,e),u(zt),u(Ct),u(Te),u(Ft,e),u(qt),u(Lt),u(be),u(Ut),u(ye),u(It,e),u(Nt),u(Pt),u(ke),u(Gt),u(ve),u(jt,e),u(Jt),u(xe),u(Ht,e),u(Wt),u(Me),u(Vt),u(Zt),u(Et),u(Dt),u(Ot),u(Rt,e),u(Bt),u($e),u(Xt),u(Yt,e),u(At),u(Qt),u(Kt,e),u(eo),u(to),u(oo,e),u(no),u(so),u(ao,e),u(ro),u(io),u(lo,e),u(co),u(mo,e),u(po),u(ho),u(qe)}}}const ui='{"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 _i(C){return ei(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wi extends ti{constructor(l){super(),oi(this,l,_i,gi,Kr,{})}}export{wi as component};
