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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SeamlessM4TTokenizer.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_french = <span class="hljs-string">&quot;Le chef de l&#x27;ONU affirme qu&#x27;il n&#x27;y a pas de solution militaire en Syrie.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),{c(){l=i("p"),l.textContent=k,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=k),T=s(_),p(b.$$.fragment,_)},m(_,x){a(_,l,x),a(_,T,x),f(b,_,x),w=!0},p:B,i(_){w||(h(b.$$.fragment,_),w=!0)},o(_){u(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),g(b,_)}}}function gi(C){let l,k="Examples:",T,b,w;return b=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUVG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyMFNlYW1sZXNzTTRUVG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbmclMjIlMkMlMjB0Z3RfbGFuZyUzRCUyMmZyYSUyMiUwQSklMEFleGFtcGxlX2VuZ2xpc2hfcGhyYXNlJTIwJTNEJTIwJTIyJTIwVU4lMjBDaGllZiUyMFNheXMlMjBUaGVyZSUyMElzJTIwTm8lMjBNaWxpdGFyeSUyMFNvbHV0aW9uJTIwaW4lMjBTeXJpYSUyMiUwQWV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyMCUzRCUyMCUyMkxlJTIwY2hlZiUyMGRlJTIwbCdPTlUlMjBhZmZpcm1lJTIwcXUnaWwlMjBuJ3klMjBhJTIwcGFzJTIwZGUlMjBzb2x1dGlvbiUyMG1pbGl0YWlyZSUyMGVuJTIwU3lyaWUuJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKGV4YW1wbGVfZW5nbGlzaF9waHJhc2UlMkMlMjB0ZXh0X3RhcmdldCUzRGV4cGVjdGVkX3RyYW5zbGF0aW9uX2ZyZW5jaCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SeamlessM4TTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_french = <span class="hljs-string">&quot;Le chef de l&#x27;ONU affirme qu&#x27;il n&#x27;y a pas de solution militaire en Syrie.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),{c(){l=i("p"),l.textContent=k,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=k),T=s(_),p(b.$$.fragment,_)},m(_,x){a(_,l,x),a(_,T,x),f(b,_,x),w=!0},p:B,i(_){w||(h(b.$$.fragment,_),w=!0)},o(_){u(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),g(b,_)}}}function _i(C){let l,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=i("p"),l.innerHTML=k},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=k)},m(T,b){a(T,l,b)},p:B,d(T){T&&t(l)}}}function Ti(C){let l,k,T,b,w,_,x,L,v,F='The SeamlessM4T model was proposed in <a href="https://dl.fbaipublicfiles.com/seamless/seamless_m4t_paper.pdf" rel="nofollow">SeamlessM4T — Massively Multilingual &amp; Multimodal Machine Translation</a> by the Seamless Communication team from Meta AI.',dn,je,Ea='This is the <strong>version 1</strong> release of the model. For the updated <strong>version 2</strong> release, refer to the <a href="https://huggingface.co/docs/transformers/main/model_doc/seamless_m4t_v2" rel="nofollow">Seamless M4T v2 docs</a>.',ln,Ge,Da="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.",cn,Je,Ra="SeamlessM4T enables multiple tasks without relying on separate models:",mn,He,Oa="<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>",pn,We,Ba='<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.',fn,Ve,Xa="The abstract from the paper is the following:",hn,Ze,Ya='<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>',un,Ee,gn,De,Aa="First, load the processor and a checkpoint of the model:",_n,Re,Tn,Oe,Qa="You can seamlessly use this model on text or on audio, to generated either translated text or translated audio.",bn,Be,Ka="Here is how to use the processor to process text and audio:",vn,Xe,xn,Ye,kn,Ae,er='<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:',Mn,Qe,yn,Ke,tr="With basically the same code, I’ve translated English text and Arabic speech to Russian speech samples.",wn,et,Sn,tt,or=`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.`,$n,ot,zn,nt,Cn,st,Fn,at,nr=`<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:`,qn,rt,In,it,sr="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>.",Un,dt,Ln,lt,ar='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.',Nn,ct,Pn,mt,rr="You have the possibility to change the speaker used for speech synthesis with the <code>spkr_id</code> argument. Some <code>spkr_id</code> works better than other for some languages!",jn,pt,Gn,ft,ir='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.',Jn,ht,Hn,ut,dr='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 !',Wn,gt,Vn,_t,lr="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.",Zn,Tt,cr='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.',En,bt,mr="Here’s how the generation process works:",Dn,vt,pr="<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>",Rn,xt,fr='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>.',On,kt,Bn,V,Mt,Fs,uo,hr=`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.`,qs,X,yt,Is,go,ur="Generates translated token ids and/or translated audio waveforms.",Us,ge,Xn,wt,Yn,Z,St,Ls,_o,gr=`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.`,Ns,Y,$t,Ps,To,_r="Generates translated audio waveforms.",js,_e,An,zt,Qn,E,Ct,Gs,bo,Tr=`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.`,Js,A,Ft,Hs,vo,br="Generates translated audio waveforms.",Ws,Te,Kn,qt,es,N,It,Vs,xo,vr=`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.`,Zs,Q,Ut,Es,ko,xr='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToText">SeamlessM4TForTextToText</a> forward method, overrides the <code>__call__</code> special method.',Ds,be,Rs,K,Lt,Os,Mo,kr="Generates sequences of token ids.",Bs,ve,ts,Nt,os,P,Pt,Xs,yo,Mr=`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.`,Ys,ee,jt,As,wo,yr='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',Qs,xe,Ks,te,Gt,ea,So,wr="Generates sequences of token ids.",ta,ke,ns,Jt,ss,j,Ht,oa,$o,Sr=`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.`,na,zo,$r=`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.`,sa,Me,as,Wt,rs,$,Vt,aa,Co,zr="Construct a SeamlessM4T tokenizer.",ra,Fo,Cr=`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>.`,ia,qo,Fr="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.",da,ye,la,Io,Zt,ca,H,Et,ma,Uo,qr=`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:`,pa,Lo,Ir="<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>",fa,No,Ur=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,ha,we,Dt,ua,Po,Lr=`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.`,ga,Se,Rt,_a,jo,Nr=`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.`,Ta,Go,Ot,is,Bt,ds,I,Xt,ba,Jo,Pr=`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>.`,va,Ho,jr=`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.`,xa,Wo,Gr="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.",ka,$e,Ma,Vo,Yt,ls,At,cs,U,Qt,ya,Zo,Jr="Constructs a SeamlessM4T feature extractor.",wa,Eo,Hr=`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.`,Sa,Do,Wr="This class extracts mel-filter bank features from raw speech.",$a,ze,Kt,za,Ro,Vr="Main method to featurize and prepare for the model one or several sequence(s).",ms,eo,ps,G,to,Ca,Oo,Zr=`Constructs a SeamlessM4T processor which wraps a SeamlessM4T feature extractor and a SeamlessM4T tokenizer into a
single processor.`,Fa,Bo,Er=`<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.`,qa,Ce,oo,Ia,Xo,Dr=`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.`,fs,no,hs,J,so,Ua,Yo,Rr=`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,Ao,Or=`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.`,Na,Qo,ao,us,ro,gs,se,io,Pa,Fe,lo,ja,Ko,Br=`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.`,_s,co,Ts,ae,mo,Ga,en,Xr=`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.`,bs,po,vs,D,fo,Ja,tn,Yr=`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.`,Ha,oe,ho,Wa,on,Ar='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTextToUnitForConditionalGeneration">SeamlessM4TTextToUnitForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Va,qe,xs,rn,ks;return w=new z({props:{title:"SeamlessM4T",local:"seamlessm4t",headingTag:"h1"}}),x=new z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ee=new z({props:{title:"Usage",local:"usage",headingTag:"h2"}}),Re=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTZWFtbGVzc000VE1vZGVsJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKSUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SeamlessM4TModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># from text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output_tokens = model.generate(**text_inputs, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>, generate_speech=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_text_from_text = processor.decode(output_tokens[<span class="hljs-number">0</span>].tolist()[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)`,wrap:!1}}),nt=new z({props:{title:"Tips",local:"tips",headingTag:"h3"}}),st=new z({props:{title:"1. Use dedicated models",local:"1-use-dedicated-models",headingTag:"h4"}}),rt=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2glMEFtb2RlbCUyMCUzRCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2guZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForSpeechToSpeech
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForSpeechToSpeech.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),dt=new ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yVGV4dFRvVGV4dCUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRGb3JUZXh0VG9UZXh0LmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmhmLXNlYW1sZXNzLW00dC1tZWRpdW0lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForTextToText
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForTextToText.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),ct=new z({props:{title:"2. Change the speaker identity",local:"2-change-the-speaker-identity",headingTag:"h4"}}),pt=new z({props:{title:"3. Change the generation strategy",local:"3-change-the-generation-strategy",headingTag:"h4"}}),ht=new z({props:{title:"4. Generate speech and text at the same time",local:"4-generate-speech-and-text-at-the-same-time",headingTag:"h4"}}),gt=new z({props:{title:"Model architecture",local:"model-architecture",headingTag:"h2"}}),kt=new z({props:{title:"SeamlessM4TModel",local:"transformers.SeamlessM4TModel",headingTag:"h2"}}),Mt=new S({props:{name:"class transformers.SeamlessM4TModel",anchor:"transformers.SeamlessM4TModel",parameters:[{name:"config",val:""},{name:"current_modality",val:" = 'text'"}],parametersDescription:[{anchor:"transformers.SeamlessM4TModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L3927"}}),yt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TModel.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"generate_speech",val:": Optional = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TModel.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TModel.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>, <em>optional</em>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/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/model_doc/phi#transformers.PhiForCausalLM.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#L4141",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>Union[SeamlessM4TGenerationOutput, Tuple[Tensor], ModelOutput]</code></p>
`}}),ge=new Pe({props:{$$slots:{default:[ii]},$$scope:{ctx:C}}}),wt=new z({props:{title:"SeamlessM4TForTextToSpeech",local:"transformers.SeamlessM4TForTextToSpeech",headingTag:"h2"}}),St=new S({props:{name:"class transformers.SeamlessM4TForTextToSpeech",anchor:"transformers.SeamlessM4TForTextToSpeech",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L3214"}}),$t=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToSpeech.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.return_intermediate_token_ids",description:`<strong>return_intermediate_token_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, also returns the intermediate generated text and unit tokens. Set to <code>True</code> if you also want
to get translated text alongside the audio.`,name:"return_intermediate_token_ids"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.spkr_id",description:`<strong>spkr_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the speaker used for speech synthesis. Must be lower than <code>config.vocoder_num_spkrs</code>.`,name:"spkr_id"},{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/main/en/model_doc/phi#transformers.PhiForCausalLM.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#L3366",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:[di]},$$scope:{ctx:C}}}),zt=new z({props:{title:"SeamlessM4TForSpeechToSpeech",local:"transformers.SeamlessM4TForSpeechToSpeech",headingTag:"h2"}}),Ct=new S({props:{name:"class transformers.SeamlessM4TForSpeechToSpeech",anchor:"transformers.SeamlessM4TForSpeechToSpeech",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L3566"}}),Ft=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate",parameters:[{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"spkr_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/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/model_doc/phi#transformers.PhiForCausalLM.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#L3721",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:[li]},$$scope:{ctx:C}}}),qt=new z({props:{title:"SeamlessM4TForTextToText",local:"transformers.SeamlessM4TForTextToText",headingTag:"h2"}}),It=new S({props:{name:"class transformers.SeamlessM4TForTextToText",anchor:"transformers.SeamlessM4TForTextToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L2637"}}),Ut=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForTextToText.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TForTextToText.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TForTextToText.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SeamlessM4TForTextToText.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.SeamlessM4TForTextToText.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TForTextToText.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TForTextToText.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.SeamlessM4TForTextToText.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SeamlessM4TForTextToText.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SeamlessM4TForTextToText.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.SeamlessM4TForTextToText.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/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#L2689"}}),be=new Pe({props:{$$slots:{default:[ci]},$$scope:{ctx:C}}}),Lt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToText.generate",parameters:[{name:"input_ids",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"generation_config",val:" = None"},{name:"logits_processor",val:" = None"},{name:"stopping_criteria",val:" = None"},{name:"prefix_allowed_tokens_fn",val:" = None"},{name:"synced_gpus",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of varying shape depending on the modality, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TForTextToText.generate.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TForTextToText.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/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#L2781",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.GenerateEncoderDecoderOutput"
>GenerateEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.GenerateBeamEncoderDecoderOutput"
>GenerateBeamEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ve=new Pe({props:{warning:!0,$$slots:{default:[mi]},$$scope:{ctx:C}}}),Nt=new z({props:{title:"SeamlessM4TForSpeechToText",local:"transformers.SeamlessM4TForSpeechToText",headingTag:"h2"}}),Pt=new S({props:{name:"class transformers.SeamlessM4TForSpeechToText",anchor:"transformers.SeamlessM4TForSpeechToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L2924"}}),jt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForSpeechToText.forward",parameters:[{name:"input_features",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.SeamlessM4TForSpeechToText.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/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#L2971"}}),xe=new Pe({props:{$$slots:{default:[pi]},$$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#L3070",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.GenerateEncoderDecoderOutput"
>GenerateEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.GenerateBeamEncoderDecoderOutput"
>GenerateBeamEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ke=new Pe({props:{warning:!0,$$slots:{default:[fi]},$$scope:{ctx:C}}}),Jt=new z({props:{title:"SeamlessM4TConfig",local:"transformers.SeamlessM4TConfig",headingTag:"h2"}}),Ht=new S({props:{name:"class transformers.SeamlessM4TConfig",anchor:"transformers.SeamlessM4TConfig",parameters:[{name:"vocab_size",val:" = 256102"},{name:"t2u_vocab_size",val:" = 10082"},{name:"hidden_size",val:" = 1024"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"max_position_embeddings",val:" = 1024"},{name:"is_encoder_decoder",val:" = True"},{name:"encoder_layerdrop",val:" = 0.05"},{name:"decoder_layerdrop",val:" = 0.05"},{name:"activation_function",val:" = 'relu'"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = True"},{name:"encoder_layers",val:" = 24"},{name:"encoder_ffn_dim",val:" = 8192"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 24"},{name:"decoder_ffn_dim",val:" = 8192"},{name:"decoder_attention_heads",val:" = 16"},{name:"decoder_start_token_id",val:" = 3"},{name:"max_new_tokens",val:" = 256"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 2"},{name:"eos_token_id",val:" = 3"},{name:"speech_encoder_layers",val:" = 24"},{name:"speech_encoder_attention_heads",val:" = 16"},{name:"speech_encoder_intermediate_size",val:" = 4096"},{name:"speech_encoder_hidden_act",val:" = 'swish'"},{name:"speech_encoder_dropout",val:" = 0.0"},{name:"add_adapter",val:" = True"},{name:"speech_encoder_layerdrop",val:" = 0.1"},{name:"feature_projection_input_dim",val:" = 160"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"adaptor_kernel_size",val:" = 8"},{name:"adaptor_stride",val:" = 8"},{name:"adaptor_dropout",val:" = 0.1"},{name:"num_adapter_layers",val:" = 1"},{name:"position_embeddings_type",val:" = 'relative'"},{name:"rotary_embedding_base",val:" = 10000"},{name:"max_source_positions",val:" = 4096"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"t2u_bos_token_id",val:" = 0"},{name:"t2u_pad_token_id",val:" = 1"},{name:"t2u_eos_token_id",val:" = 2"},{name:"t2u_decoder_start_token_id",val:" = 2"},{name:"t2u_max_new_tokens",val:" = 1024"},{name:"t2u_encoder_layers",val:" = 6"},{name:"t2u_encoder_ffn_dim",val:" = 8192"},{name:"t2u_encoder_attention_heads",val:" = 16"},{name:"t2u_decoder_layers",val:" = 6"},{name:"t2u_decoder_ffn_dim",val:" = 8192"},{name:"t2u_decoder_attention_heads",val:" = 16"},{name:"t2u_max_position_embeddings",val:" = 2048"},{name:"sampling_rate",val:" = 16000"},{name:"upsample_initial_channel",val:" = 512"},{name:"upsample_rates",val:" = [5, 4, 4, 2, 2]"},{name:"upsample_kernel_sizes",val:" = [11, 8, 8, 4, 4]"},{name:"resblock_kernel_sizes",val:" = [3, 7, 11]"},{name:"resblock_dilation_sizes",val:" = [[1, 3, 5], [1, 3, 5], [1, 3, 5]]"},{name:"leaky_relu_slope",val:" = 0.1"},{name:"unit_hifi_gan_vocab_size",val:" = 10000"},{name:"unit_embed_dim",val:" = 1280"},{name:"lang_embed_dim",val:" = 256"},{name:"spkr_embed_dim",val:" = 256"},{name:"vocoder_num_langs",val:" = 36"},{name:"vocoder_num_spkrs",val:" = 200"},{name:"variance_predictor_kernel_size",val:" = 3"},{name:"var_pred_dropout",val:" = 0.5"},{name:"vocoder_offset",val:" = 4"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256102) &#x2014;
Vocabulary size of the SeamlessM4T model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/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 probability of the duration predictor. Applies to the vocoder only.`,name:"var_pred_dropout"},{anchor:"transformers.SeamlessM4TConfig.vocoder_offset",description:`<strong>vocoder_offset</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Offset the unit token ids by this number to account for symbol tokens. Applies to the vocoder only.`,name:"vocoder_offset"}]}]}}),Me=new Za({props:{anchor:"transformers.SeamlessM4TConfig.example",$$slots:{default:[hi]},$$scope:{ctx:C}}}),Wt=new z({props:{title:"SeamlessM4TTokenizer",local:"transformers.SeamlessM4TTokenizer",headingTag:"h2"}}),Vt=new S({props:{name:"class transformers.SeamlessM4TTokenizer",anchor:"transformers.SeamlessM4TTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"tokenizer_file",val:" = None"},{name:"src_lang",val:" = 'eng'"},{name:"tgt_lang",val:" = 'fra'"},{name:"sp_model_kwargs",val:": Optional = None"},{name:"additional_special_tokens",val:" = None"},{name:"add_prefix_space",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.SeamlessM4TTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.SeamlessM4TTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.SeamlessM4TTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.SeamlessM4TTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.SeamlessM4TTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SeamlessM4TTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SeamlessM4TTokenizer.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.SeamlessM4TTokenizer.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eng&quot;</code>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fra&quot;</code>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments to pass to the model initialization.`,name:"sp_model_kwargs"},{anchor:"transformers.SeamlessM4TTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Can be used to specify the list of languages that will be
supported by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.SeamlessM4TTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word.`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L54"}}),ye=new Za({props:{anchor:"transformers.SeamlessM4TTokenizer.example",$$slots:{default:[ui]},$$scope:{ctx:C}}}),Zt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizer.__call__",parameters:[{name:"text",val:": Union = None"},{name:"text_pair",val:": Union = None"},{name:"text_target",val:": Union = None"},{name:"text_pair_target",val:": Union = None"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"src_lang",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SeamlessM4TTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L223"}}),Et=new S({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SeamlessM4TTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.SeamlessM4TTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L353",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>List[int]</code></p>
`}}),Dt=new S({props:{name:"get_special_tokens_mask",anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.SeamlessM4TTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L322",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>List[int]</code></p>
`}}),Rt=new S({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SeamlessM4TTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SeamlessM4TTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L381",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>List[int]</code></p>
`}}),Ot=new S({props:{name:"save_vocabulary",anchor:"transformers.SeamlessM4TTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t.py#L509"}}),Bt=new z({props:{title:"SeamlessM4TTokenizerFast",local:"transformers.SeamlessM4TTokenizerFast",headingTag:"h2"}}),Xt=new S({props:{name:"class transformers.SeamlessM4TTokenizerFast",anchor:"transformers.SeamlessM4TTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"src_lang",val:" = 'eng'"},{name:"tgt_lang",val:" = 'fra'"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.SeamlessM4TTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to a tokenizer file to use instead of the vocab file.`,name:"tokenizer_file"},{anchor:"transformers.SeamlessM4TTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eng&quot;</code>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fra&quot;</code>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L54"}}),$e=new Za({props:{anchor:"transformers.SeamlessM4TTokenizerFast.example",$$slots:{default:[gi]},$$scope:{ctx:C}}}),Yt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizerFast.__call__",parameters:[{name:"text",val:": Union = None"},{name:"text_pair",val:": Union = None"},{name:"text_target",val:": Union = None"},{name:"text_pair_target",val:": Union = None"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"src_lang",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L390"}}),At=new z({props:{title:"SeamlessM4TFeatureExtractor",local:"transformers.SeamlessM4TFeatureExtractor",headingTag:"h2"}}),Qt=new S({props:{name:"class transformers.SeamlessM4TFeatureExtractor",anchor:"transformers.SeamlessM4TFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"num_mel_bins",val:" = 80"},{name:"padding_value",val:" = 0.0"},{name:"stride",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.SeamlessM4TFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SeamlessM4TFeatureExtractor.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of Mel-frequency bins.`,name:"num_mel_bins"},{anchor:"transformers.SeamlessM4TFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The value that is used to fill the padding vectors.`,name:"padding_value"},{anchor:"transformers.SeamlessM4TFeatureExtractor.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride used to reshape audios from shape (batch_size,num_frames,num_mel_bins) to
(batch_size,num_frames//stride,num_mel_bins*stride).`,name:"stride"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L38"}}),Kt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": Union"},{name:"padding",val:": Union = True"},{name:"pad_to_multiple_of",val:": Optional = 2"},{name:"max_length",val:": Optional = None"},{name:"truncation",val:": bool = False"},{name:"return_tensors",val:": Union = None"},{name:"sampling_rate",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = None"},{name:"do_normalize_per_mel_bins",val:": Optional = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.raw_speech",description:"<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>, &#x2014;",name:"raw_speech"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.List[List[float]],",description:`<strong><code>List[List[float]]</code>,</strong> <code>List[List[List[float]]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array,
a torch tensor, a list of float values, a list of numpy arrays, a list of torch tensors,
a list of list of float values or a list of a list of list of float values.
If <code>raw_speech</code> is a one-dimensional <code>np.ndarray</code>, <code>torch.Tensor</code> or a <code>List[float]</code>, <code>raw_speech</code> is
considered a single-channel, single-sample sound. In all other cases, the first dimension of
<code>raw_speech</code>, whether from an <code>np.ndarray</code>, a <code>torch.Tensor</code> or a <code>List[...]</code>,
corresponds to the number of samples in the batch, and the number of channels
(i.e. mono or stereo character) is derived from the other dimensions
(1D -&gt; single-channel waveform batches; 2D-&gt; stereo-channel waveform batches).`,name:"List[List[float]],"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/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#L144"}}),eo=new z({props:{title:"SeamlessM4TProcessor",local:"transformers.SeamlessM4TProcessor",headingTag:"h2"}}),to=new S({props:{name:"class transformers.SeamlessM4TProcessor",anchor:"transformers.SeamlessM4TProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/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"}}),oo=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TProcessor.__call__",parameters:[{name:"text",val:" = None"},{name:"audios",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TProcessor.__call__.audios",description:`<strong>audios</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The audio or batch of audios to be prepared. Each audio can be NumPy array or PyTorch tensor. In case
of a NumPy array/PyTorch tensor, each audio should be of shape (C, T), where C is a number of channels,
and T the sample length of the audio.`,name:"audios"},{anchor:"transformers.SeamlessM4TProcessor.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language code of the input texts/audios. If not specified, the last <code>src_lang</code> specified will be
used.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The code of the target language. If not specified, the last <code>tgt_lang</code> specified will be used.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to the feature extractor and/or the
tokenizer.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L44",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/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>
`}}),no=new z({props:{title:"SeamlessM4TCodeHifiGan",local:"transformers.SeamlessM4TCodeHifiGan",headingTag:"h2"}}),so=new S({props:{name:"class transformers.SeamlessM4TCodeHifiGan",anchor:"transformers.SeamlessM4TCodeHifiGan",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TCodeHifiGan.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L2477"}}),ao=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#L2557"}}),ro=new z({props:{title:"SeamlessM4THifiGan",local:"transformers.SeamlessM4THifiGan",headingTag:"h2"}}),io=new S({props:{name:"class transformers.SeamlessM4THifiGan",anchor:"transformers.SeamlessM4THifiGan",parameters:[{name:"config",val:": SeamlessM4TConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2405"}}),lo=new S({props:{name:"forward",anchor:"transformers.SeamlessM4THifiGan.forward",parameters:[{name:"input_embeds",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.SeamlessM4THifiGan.forward.spectrogram",description:`<strong>spectrogram</strong> (<code>torch.FloatTensor</code>) &#x2014;
Tensor containing the log-mel spectrograms. Can be batched and of shape <code>(batch_size, sequence_length, model_in_dim)</code>, or un-batched and of shape <code>(sequence_length, model_in_dim)</code>. Note that <code>model_in_dim</code>
is the sum of <code>config.unit_embed_dim</code>, <code>config.lang_embed_dim</code> and <code>config.spkr_embed_dim</code>.`,name:"spectrogram"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2440",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.FloatTensor</code></p>
`}}),co=new z({props:{title:"SeamlessM4TTextToUnitModel",local:"transformers.SeamlessM4TTextToUnitModel",headingTag:"h2"}}),mo=new S({props:{name:"class transformers.SeamlessM4TTextToUnitModel",anchor:"transformers.SeamlessM4TTextToUnitModel",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L2039"}}),po=new z({props:{title:"SeamlessM4TTextToUnitForConditionalGeneration",local:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",headingTag:"h2"}}),fo=new S({props:{name:"class transformers.SeamlessM4TTextToUnitForConditionalGeneration",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/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#L2128"}}),ho=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read <code>modeling_bart._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/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#L2181"}}),qe=new Pe({props:{$$slots:{default:[_i]},$$scope:{ctx:C}}}),{c(){l=i("meta"),k=n(),T=i("p"),b=n(),m(w.$$.fragment),_=n(),m(x.$$.fragment),L=n(),v=i("p"),v.innerHTML=F,dn=n(),je=i("p"),je.innerHTML=Ea,ln=n(),Ge=i("p"),Ge.textContent=Da,cn=n(),Je=i("p"),Je.textContent=Ra,mn=n(),He=i("ul"),He.innerHTML=Oa,pn=n(),We=i("p"),We.innerHTML=Ba,fn=n(),Ve=i("p"),Ve.textContent=Xa,hn=n(),Ze=i("p"),Ze.innerHTML=Ya,un=n(),m(Ee.$$.fragment),gn=n(),De=i("p"),De.textContent=Aa,_n=n(),m(Re.$$.fragment),Tn=n(),Oe=i("p"),Oe.textContent=Qa,bn=n(),Be=i("p"),Be.textContent=Ka,vn=n(),m(Xe.$$.fragment),xn=n(),m(Ye.$$.fragment),kn=n(),Ae=i("p"),Ae.innerHTML=er,Mn=n(),m(Qe.$$.fragment),yn=n(),Ke=i("p"),Ke.textContent=tr,wn=n(),m(et.$$.fragment),Sn=n(),tt=i("p"),tt.innerHTML=or,$n=n(),m(ot.$$.fragment),zn=n(),m(nt.$$.fragment),Cn=n(),m(st.$$.fragment),Fn=n(),at=i("p"),at.innerHTML=nr,qn=n(),m(rt.$$.fragment),In=n(),it=i("p"),it.innerHTML=sr,Un=n(),m(dt.$$.fragment),Ln=n(),lt=i("p"),lt.innerHTML=ar,Nn=n(),m(ct.$$.fragment),Pn=n(),mt=i("p"),mt.innerHTML=rr,jn=n(),m(pt.$$.fragment),Gn=n(),ft=i("p"),ft.innerHTML=ir,Jn=n(),m(ht.$$.fragment),Hn=n(),ut=i("p"),ut.innerHTML=dr,Wn=n(),m(gt.$$.fragment),Vn=n(),_t=i("p"),_t.textContent=lr,Zn=n(),Tt=i("p"),Tt.innerHTML=cr,En=n(),bt=i("p"),bt.textContent=mr,Dn=n(),vt=i("ul"),vt.innerHTML=pr,Rn=n(),xt=i("p"),xt.innerHTML=fr,On=n(),m(kt.$$.fragment),Bn=n(),V=i("div"),m(Mt.$$.fragment),Fs=n(),uo=i("p"),uo.innerHTML=hr,qs=n(),X=i("div"),m(yt.$$.fragment),Is=n(),go=i("p"),go.textContent=ur,Us=n(),m(ge.$$.fragment),Xn=n(),m(wt.$$.fragment),Yn=n(),Z=i("div"),m(St.$$.fragment),Ls=n(),_o=i("p"),_o.innerHTML=gr,Ns=n(),Y=i("div"),m($t.$$.fragment),Ps=n(),To=i("p"),To.textContent=_r,js=n(),m(_e.$$.fragment),An=n(),m(zt.$$.fragment),Qn=n(),E=i("div"),m(Ct.$$.fragment),Gs=n(),bo=i("p"),bo.innerHTML=Tr,Js=n(),A=i("div"),m(Ft.$$.fragment),Hs=n(),vo=i("p"),vo.textContent=br,Ws=n(),m(Te.$$.fragment),Kn=n(),m(qt.$$.fragment),es=n(),N=i("div"),m(It.$$.fragment),Vs=n(),xo=i("p"),xo.innerHTML=vr,Zs=n(),Q=i("div"),m(Ut.$$.fragment),Es=n(),ko=i("p"),ko.innerHTML=xr,Ds=n(),m(be.$$.fragment),Rs=n(),K=i("div"),m(Lt.$$.fragment),Os=n(),Mo=i("p"),Mo.textContent=kr,Bs=n(),m(ve.$$.fragment),ts=n(),m(Nt.$$.fragment),os=n(),P=i("div"),m(Pt.$$.fragment),Xs=n(),yo=i("p"),yo.innerHTML=Mr,Ys=n(),ee=i("div"),m(jt.$$.fragment),As=n(),wo=i("p"),wo.innerHTML=yr,Qs=n(),m(xe.$$.fragment),Ks=n(),te=i("div"),m(Gt.$$.fragment),ea=n(),So=i("p"),So.textContent=wr,ta=n(),m(ke.$$.fragment),ns=n(),m(Jt.$$.fragment),ss=n(),j=i("div"),m(Ht.$$.fragment),oa=n(),$o=i("p"),$o.innerHTML=Sr,na=n(),zo=i("p"),zo.innerHTML=$r,sa=n(),m(Me.$$.fragment),as=n(),m(Wt.$$.fragment),rs=n(),$=i("div"),m(Vt.$$.fragment),aa=n(),Co=i("p"),Co.textContent=zr,ra=n(),Fo=i("p"),Fo.innerHTML=Cr,ia=n(),qo=i("p"),qo.innerHTML=Fr,da=n(),m(ye.$$.fragment),la=n(),Io=i("div"),m(Zt.$$.fragment),ca=n(),H=i("div"),m(Et.$$.fragment),ma=n(),Uo=i("p"),Uo.innerHTML=qr,pa=n(),Lo=i("ul"),Lo.innerHTML=Ir,fa=n(),No=i("p"),No.textContent=Ur,ha=n(),we=i("div"),m(Dt.$$.fragment),ua=n(),Po=i("p"),Po.innerHTML=Lr,ga=n(),Se=i("div"),m(Rt.$$.fragment),_a=n(),jo=i("p"),jo.textContent=Nr,Ta=n(),Go=i("div"),m(Ot.$$.fragment),is=n(),m(Bt.$$.fragment),ds=n(),I=i("div"),m(Xt.$$.fragment),ba=n(),Jo=i("p"),Jo.innerHTML=Pr,va=n(),Ho=i("p"),Ho.innerHTML=jr,xa=n(),Wo=i("p"),Wo.innerHTML=Gr,ka=n(),m($e.$$.fragment),Ma=n(),Vo=i("div"),m(Yt.$$.fragment),ls=n(),m(At.$$.fragment),cs=n(),U=i("div"),m(Qt.$$.fragment),ya=n(),Zo=i("p"),Zo.textContent=Jr,wa=n(),Eo=i("p"),Eo.innerHTML=Hr,Sa=n(),Do=i("p"),Do.textContent=Wr,$a=n(),ze=i("div"),m(Kt.$$.fragment),za=n(),Ro=i("p"),Ro.textContent=Vr,ms=n(),m(eo.$$.fragment),ps=n(),G=i("div"),m(to.$$.fragment),Ca=n(),Oo=i("p"),Oo.textContent=Zr,Fa=n(),Bo=i("p"),Bo.innerHTML=Er,qa=n(),Ce=i("div"),m(oo.$$.fragment),Ia=n(),Xo=i("p"),Xo.innerHTML=Dr,fs=n(),m(no.$$.fragment),hs=n(),J=i("div"),m(so.$$.fragment),Ua=n(),Yo=i("p"),Yo.innerHTML=Rr,La=n(),Ao=i("p"),Ao.innerHTML=Or,Na=n(),Qo=i("div"),m(ao.$$.fragment),us=n(),m(ro.$$.fragment),gs=n(),se=i("div"),m(io.$$.fragment),Pa=n(),Fe=i("div"),m(lo.$$.fragment),ja=n(),Ko=i("p"),Ko.textContent=Br,_s=n(),m(co.$$.fragment),Ts=n(),ae=i("div"),m(mo.$$.fragment),Ga=n(),en=i("p"),en.innerHTML=Xr,bs=n(),m(po.$$.fragment),vs=n(),D=i("div"),m(fo.$$.fragment),Ja=n(),tn=i("p"),tn.innerHTML=Yr,Ha=n(),oe=i("div"),m(ho.$$.fragment),Wa=n(),on=i("p"),on.innerHTML=Ar,Va=n(),m(qe.$$.fragment),xs=n(),rn=i("p"),this.h()},l(e){const o=ri("svelte-u9bgzb",document.head);l=d(o,"META",{name:!0,content:!0}),o.forEach(t),k=s(e),T=d(e,"P",{}),M(T).forEach(t),b=s(e),p(w.$$.fragment,e),_=s(e),p(x.$$.fragment,e),L=s(e),v=d(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1wkib9v"&&(v.innerHTML=F),dn=s(e),je=d(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-a6a6ro"&&(je.innerHTML=Ea),ln=s(e),Ge=d(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-1ocrm51"&&(Ge.textContent=Da),cn=s(e),Je=d(e,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-17llv5s"&&(Je.textContent=Ra),mn=s(e),He=d(e,"UL",{"data-svelte-h":!0}),c(He)!=="svelte-7ymha8"&&(He.innerHTML=Oa),pn=s(e),We=d(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-2swekv"&&(We.innerHTML=Ba),fn=s(e),Ve=d(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-vfdo9a"&&(Ve.textContent=Xa),hn=s(e),Ze=d(e,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-oypae0"&&(Ze.innerHTML=Ya),un=s(e),p(Ee.$$.fragment,e),gn=s(e),De=d(e,"P",{"data-svelte-h":!0}),c(De)!=="svelte-msm04g"&&(De.textContent=Aa),_n=s(e),p(Re.$$.fragment,e),Tn=s(e),Oe=d(e,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-1x6apd2"&&(Oe.textContent=Qa),bn=s(e),Be=d(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-skz2b1"&&(Be.textContent=Ka),vn=s(e),p(Xe.$$.fragment,e),xn=s(e),p(Ye.$$.fragment,e),kn=s(e),Ae=d(e,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-1g0gag9"&&(Ae.innerHTML=er),Mn=s(e),p(Qe.$$.fragment,e),yn=s(e),Ke=d(e,"P",{"data-svelte-h":!0}),c(Ke)!=="svelte-vy622i"&&(Ke.textContent=tr),wn=s(e),p(et.$$.fragment,e),Sn=s(e),tt=d(e,"P",{"data-svelte-h":!0}),c(tt)!=="svelte-zczrfl"&&(tt.innerHTML=or),$n=s(e),p(ot.$$.fragment,e),zn=s(e),p(nt.$$.fragment,e),Cn=s(e),p(st.$$.fragment,e),Fn=s(e),at=d(e,"P",{"data-svelte-h":!0}),c(at)!=="svelte-o2081q"&&(at.innerHTML=nr),qn=s(e),p(rt.$$.fragment,e),In=s(e),it=d(e,"P",{"data-svelte-h":!0}),c(it)!=="svelte-65k8ai"&&(it.innerHTML=sr),Un=s(e),p(dt.$$.fragment,e),Ln=s(e),lt=d(e,"P",{"data-svelte-h":!0}),c(lt)!=="svelte-ynkzlj"&&(lt.innerHTML=ar),Nn=s(e),p(ct.$$.fragment,e),Pn=s(e),mt=d(e,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-1fv3rh2"&&(mt.innerHTML=rr),jn=s(e),p(pt.$$.fragment,e),Gn=s(e),ft=d(e,"P",{"data-svelte-h":!0}),c(ft)!=="svelte-9rou0u"&&(ft.innerHTML=ir),Jn=s(e),p(ht.$$.fragment,e),Hn=s(e),ut=d(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-1kknmy3"&&(ut.innerHTML=dr),Wn=s(e),p(gt.$$.fragment,e),Vn=s(e),_t=d(e,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-1btdeyd"&&(_t.textContent=lr),Zn=s(e),Tt=d(e,"P",{"data-svelte-h":!0}),c(Tt)!=="svelte-10jpqyx"&&(Tt.innerHTML=cr),En=s(e),bt=d(e,"P",{"data-svelte-h":!0}),c(bt)!=="svelte-8kbcuu"&&(bt.textContent=mr),Dn=s(e),vt=d(e,"UL",{"data-svelte-h":!0}),c(vt)!=="svelte-lmn79"&&(vt.innerHTML=pr),Rn=s(e),xt=d(e,"P",{"data-svelte-h":!0}),c(xt)!=="svelte-mez4is"&&(xt.innerHTML=fr),On=s(e),p(kt.$$.fragment,e),Bn=s(e),V=d(e,"DIV",{class:!0});var re=M(V);p(Mt.$$.fragment,re),Fs=s(re),uo=d(re,"P",{"data-svelte-h":!0}),c(uo)!=="svelte-1d7595s"&&(uo.innerHTML=hr),qs=s(re),X=d(re,"DIV",{class:!0});var ie=M(X);p(yt.$$.fragment,ie),Is=s(ie),go=d(ie,"P",{"data-svelte-h":!0}),c(go)!=="svelte-1v5cwae"&&(go.textContent=ur),Us=s(ie),p(ge.$$.fragment,ie),ie.forEach(t),re.forEach(t),Xn=s(e),p(wt.$$.fragment,e),Yn=s(e),Z=d(e,"DIV",{class:!0});var de=M(Z);p(St.$$.fragment,de),Ls=s(de),_o=d(de,"P",{"data-svelte-h":!0}),c(_o)!=="svelte-1tcnd3d"&&(_o.innerHTML=gr),Ns=s(de),Y=d(de,"DIV",{class:!0});var le=M(Y);p($t.$$.fragment,le),Ps=s(le),To=d(le,"P",{"data-svelte-h":!0}),c(To)!=="svelte-1lcmkdu"&&(To.textContent=_r),js=s(le),p(_e.$$.fragment,le),le.forEach(t),de.forEach(t),An=s(e),p(zt.$$.fragment,e),Qn=s(e),E=d(e,"DIV",{class:!0});var ce=M(E);p(Ct.$$.fragment,ce),Gs=s(ce),bo=d(ce,"P",{"data-svelte-h":!0}),c(bo)!=="svelte-1js90x5"&&(bo.innerHTML=Tr),Js=s(ce),A=d(ce,"DIV",{class:!0});var me=M(A);p(Ft.$$.fragment,me),Hs=s(me),vo=d(me,"P",{"data-svelte-h":!0}),c(vo)!=="svelte-1lcmkdu"&&(vo.textContent=br),Ws=s(me),p(Te.$$.fragment,me),me.forEach(t),ce.forEach(t),Kn=s(e),p(qt.$$.fragment,e),es=s(e),N=d(e,"DIV",{class:!0});var R=M(N);p(It.$$.fragment,R),Vs=s(R),xo=d(R,"P",{"data-svelte-h":!0}),c(xo)!=="svelte-eorsfx"&&(xo.innerHTML=vr),Zs=s(R),Q=d(R,"DIV",{class:!0});var pe=M(Q);p(Ut.$$.fragment,pe),Es=s(pe),ko=d(pe,"P",{"data-svelte-h":!0}),c(ko)!=="svelte-k3sjca"&&(ko.innerHTML=xr),Ds=s(pe),p(be.$$.fragment,pe),pe.forEach(t),Rs=s(R),K=d(R,"DIV",{class:!0});var fe=M(K);p(Lt.$$.fragment,fe),Os=s(fe),Mo=d(fe,"P",{"data-svelte-h":!0}),c(Mo)!=="svelte-1puovtq"&&(Mo.textContent=kr),Bs=s(fe),p(ve.$$.fragment,fe),fe.forEach(t),R.forEach(t),ts=s(e),p(Nt.$$.fragment,e),os=s(e),P=d(e,"DIV",{class:!0});var O=M(P);p(Pt.$$.fragment,O),Xs=s(O),yo=d(O,"P",{"data-svelte-h":!0}),c(yo)!=="svelte-1cndbjh"&&(yo.innerHTML=Mr),Ys=s(O),ee=d(O,"DIV",{class:!0});var he=M(ee);p(jt.$$.fragment,he),As=s(he),wo=d(he,"P",{"data-svelte-h":!0}),c(wo)!=="svelte-ge2d2g"&&(wo.innerHTML=yr),Qs=s(he),p(xe.$$.fragment,he),he.forEach(t),Ks=s(O),te=d(O,"DIV",{class:!0});var nn=M(te);p(Gt.$$.fragment,nn),ea=s(nn),So=d(nn,"P",{"data-svelte-h":!0}),c(So)!=="svelte-1puovtq"&&(So.textContent=wr),ta=s(nn),p(ke.$$.fragment,nn),nn.forEach(t),O.forEach(t),ns=s(e),p(Jt.$$.fragment,e),ss=s(e),j=d(e,"DIV",{class:!0});var Ie=M(j);p(Ht.$$.fragment,Ie),oa=s(Ie),$o=d(Ie,"P",{"data-svelte-h":!0}),c($o)!=="svelte-1u0clpv"&&($o.innerHTML=Sr),na=s(Ie),zo=d(Ie,"P",{"data-svelte-h":!0}),c(zo)!=="svelte-o55m63"&&(zo.innerHTML=$r),sa=s(Ie),p(Me.$$.fragment,Ie),Ie.forEach(t),as=s(e),p(Wt.$$.fragment,e),rs=s(e),$=d(e,"DIV",{class:!0});var q=M($);p(Vt.$$.fragment,q),aa=s(q),Co=d(q,"P",{"data-svelte-h":!0}),c(Co)!=="svelte-1yrb5nn"&&(Co.textContent=zr),ra=s(q),Fo=d(q,"P",{"data-svelte-h":!0}),c(Fo)!=="svelte-1serjol"&&(Fo.innerHTML=Cr),ia=s(q),qo=d(q,"P",{"data-svelte-h":!0}),c(qo)!=="svelte-18kdu26"&&(qo.innerHTML=Fr),da=s(q),p(ye.$$.fragment,q),la=s(q),Io=d(q,"DIV",{class:!0});var Qr=M(Io);p(Zt.$$.fragment,Qr),Qr.forEach(t),ca=s(q),H=d(q,"DIV",{class:!0});var Ue=M(H);p(Et.$$.fragment,Ue),ma=s(Ue),Uo=d(Ue,"P",{"data-svelte-h":!0}),c(Uo)!=="svelte-nkpot4"&&(Uo.innerHTML=qr),pa=s(Ue),Lo=d(Ue,"UL",{"data-svelte-h":!0}),c(Lo)!=="svelte-mlrsks"&&(Lo.innerHTML=Ir),fa=s(Ue),No=d(Ue,"P",{"data-svelte-h":!0}),c(No)!=="svelte-46aam0"&&(No.textContent=Ur),Ue.forEach(t),ha=s(q),we=d(q,"DIV",{class:!0});var Ms=M(we);p(Dt.$$.fragment,Ms),ua=s(Ms),Po=d(Ms,"P",{"data-svelte-h":!0}),c(Po)!=="svelte-1f4f5kp"&&(Po.innerHTML=Lr),Ms.forEach(t),ga=s(q),Se=d(q,"DIV",{class:!0});var ys=M(Se);p(Rt.$$.fragment,ys),_a=s(ys),jo=d(ys,"P",{"data-svelte-h":!0}),c(jo)!=="svelte-1bcwf97"&&(jo.textContent=Nr),ys.forEach(t),Ta=s(q),Go=d(q,"DIV",{class:!0});var Kr=M(Go);p(Ot.$$.fragment,Kr),Kr.forEach(t),q.forEach(t),is=s(e),p(Bt.$$.fragment,e),ds=s(e),I=d(e,"DIV",{class:!0});var W=M(I);p(Xt.$$.fragment,W),ba=s(W),Jo=d(W,"P",{"data-svelte-h":!0}),c(Jo)!=="svelte-162k0i1"&&(Jo.innerHTML=Pr),va=s(W),Ho=d(W,"P",{"data-svelte-h":!0}),c(Ho)!=="svelte-fh0aq"&&(Ho.innerHTML=jr),xa=s(W),Wo=d(W,"P",{"data-svelte-h":!0}),c(Wo)!=="svelte-18kdu26"&&(Wo.innerHTML=Gr),ka=s(W),p($e.$$.fragment,W),Ma=s(W),Vo=d(W,"DIV",{class:!0});var ei=M(Vo);p(Yt.$$.fragment,ei),ei.forEach(t),W.forEach(t),ls=s(e),p(At.$$.fragment,e),cs=s(e),U=d(e,"DIV",{class:!0});var ne=M(U);p(Qt.$$.fragment,ne),ya=s(ne),Zo=d(ne,"P",{"data-svelte-h":!0}),c(Zo)!=="svelte-h20f9h"&&(Zo.textContent=Jr),wa=s(ne),Eo=d(ne,"P",{"data-svelte-h":!0}),c(Eo)!=="svelte-xnfjot"&&(Eo.innerHTML=Hr),Sa=s(ne),Do=d(ne,"P",{"data-svelte-h":!0}),c(Do)!=="svelte-1icaz7y"&&(Do.textContent=Wr),$a=s(ne),ze=d(ne,"DIV",{class:!0});var ws=M(ze);p(Kt.$$.fragment,ws),za=s(ws),Ro=d(ws,"P",{"data-svelte-h":!0}),c(Ro)!=="svelte-1a6wgfx"&&(Ro.textContent=Vr),ws.forEach(t),ne.forEach(t),ms=s(e),p(eo.$$.fragment,e),ps=s(e),G=d(e,"DIV",{class:!0});var Le=M(G);p(to.$$.fragment,Le),Ca=s(Le),Oo=d(Le,"P",{"data-svelte-h":!0}),c(Oo)!=="svelte-137g986"&&(Oo.textContent=Zr),Fa=s(Le),Bo=d(Le,"P",{"data-svelte-h":!0}),c(Bo)!=="svelte-12ghvpz"&&(Bo.innerHTML=Er),qa=s(Le),Ce=d(Le,"DIV",{class:!0});var Ss=M(Ce);p(oo.$$.fragment,Ss),Ia=s(Ss),Xo=d(Ss,"P",{"data-svelte-h":!0}),c(Xo)!=="svelte-jj7pyv"&&(Xo.innerHTML=Dr),Ss.forEach(t),Le.forEach(t),fs=s(e),p(no.$$.fragment,e),hs=s(e),J=d(e,"DIV",{class:!0});var Ne=M(J);p(so.$$.fragment,Ne),Ua=s(Ne),Yo=d(Ne,"P",{"data-svelte-h":!0}),c(Yo)!=="svelte-1ylqa15"&&(Yo.innerHTML=Rr),La=s(Ne),Ao=d(Ne,"P",{"data-svelte-h":!0}),c(Ao)!=="svelte-hswkmf"&&(Ao.innerHTML=Or),Na=s(Ne),Qo=d(Ne,"DIV",{class:!0});var ti=M(Qo);p(ao.$$.fragment,ti),ti.forEach(t),Ne.forEach(t),us=s(e),p(ro.$$.fragment,e),gs=s(e),se=d(e,"DIV",{class:!0});var $s=M(se);p(io.$$.fragment,$s),Pa=s($s),Fe=d($s,"DIV",{class:!0});var zs=M(Fe);p(lo.$$.fragment,zs),ja=s(zs),Ko=d(zs,"P",{"data-svelte-h":!0}),c(Ko)!=="svelte-qef8w5"&&(Ko.textContent=Br),zs.forEach(t),$s.forEach(t),_s=s(e),p(co.$$.fragment,e),Ts=s(e),ae=d(e,"DIV",{class:!0});var Cs=M(ae);p(mo.$$.fragment,Cs),Ga=s(Cs),en=d(Cs,"P",{"data-svelte-h":!0}),c(en)!=="svelte-1dvnsz8"&&(en.innerHTML=Xr),Cs.forEach(t),bs=s(e),p(po.$$.fragment,e),vs=s(e),D=d(e,"DIV",{class:!0});var sn=M(D);p(fo.$$.fragment,sn),Ja=s(sn),tn=d(sn,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-82v1ej"&&(tn.innerHTML=Yr),Ha=s(sn),oe=d(sn,"DIV",{class:!0});var an=M(oe);p(ho.$$.fragment,an),Wa=s(an),on=d(an,"P",{"data-svelte-h":!0}),c(on)!=="svelte-1d5sxxm"&&(on.innerHTML=Ar),Va=s(an),p(qe.$$.fragment,an),an.forEach(t),sn.forEach(t),xs=s(e),rn=d(e,"P",{}),M(rn).forEach(t),this.h()},h(){y(l,"name","hf:doc:metadata"),y(l,"content",bi),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){r(document.head,l),a(e,k,o),a(e,T,o),a(e,b,o),f(w,e,o),a(e,_,o),f(x,e,o),a(e,L,o),a(e,v,o),a(e,dn,o),a(e,je,o),a(e,ln,o),a(e,Ge,o),a(e,cn,o),a(e,Je,o),a(e,mn,o),a(e,He,o),a(e,pn,o),a(e,We,o),a(e,fn,o),a(e,Ve,o),a(e,hn,o),a(e,Ze,o),a(e,un,o),f(Ee,e,o),a(e,gn,o),a(e,De,o),a(e,_n,o),f(Re,e,o),a(e,Tn,o),a(e,Oe,o),a(e,bn,o),a(e,Be,o),a(e,vn,o),f(Xe,e,o),a(e,xn,o),f(Ye,e,o),a(e,kn,o),a(e,Ae,o),a(e,Mn,o),f(Qe,e,o),a(e,yn,o),a(e,Ke,o),a(e,wn,o),f(et,e,o),a(e,Sn,o),a(e,tt,o),a(e,$n,o),f(ot,e,o),a(e,zn,o),f(nt,e,o),a(e,Cn,o),f(st,e,o),a(e,Fn,o),a(e,at,o),a(e,qn,o),f(rt,e,o),a(e,In,o),a(e,it,o),a(e,Un,o),f(dt,e,o),a(e,Ln,o),a(e,lt,o),a(e,Nn,o),f(ct,e,o),a(e,Pn,o),a(e,mt,o),a(e,jn,o),f(pt,e,o),a(e,Gn,o),a(e,ft,o),a(e,Jn,o),f(ht,e,o),a(e,Hn,o),a(e,ut,o),a(e,Wn,o),f(gt,e,o),a(e,Vn,o),a(e,_t,o),a(e,Zn,o),a(e,Tt,o),a(e,En,o),a(e,bt,o),a(e,Dn,o),a(e,vt,o),a(e,Rn,o),a(e,xt,o),a(e,On,o),f(kt,e,o),a(e,Bn,o),a(e,V,o),f(Mt,V,null),r(V,Fs),r(V,uo),r(V,qs),r(V,X),f(yt,X,null),r(X,Is),r(X,go),r(X,Us),f(ge,X,null),a(e,Xn,o),f(wt,e,o),a(e,Yn,o),a(e,Z,o),f(St,Z,null),r(Z,Ls),r(Z,_o),r(Z,Ns),r(Z,Y),f($t,Y,null),r(Y,Ps),r(Y,To),r(Y,js),f(_e,Y,null),a(e,An,o),f(zt,e,o),a(e,Qn,o),a(e,E,o),f(Ct,E,null),r(E,Gs),r(E,bo),r(E,Js),r(E,A),f(Ft,A,null),r(A,Hs),r(A,vo),r(A,Ws),f(Te,A,null),a(e,Kn,o),f(qt,e,o),a(e,es,o),a(e,N,o),f(It,N,null),r(N,Vs),r(N,xo),r(N,Zs),r(N,Q),f(Ut,Q,null),r(Q,Es),r(Q,ko),r(Q,Ds),f(be,Q,null),r(N,Rs),r(N,K),f(Lt,K,null),r(K,Os),r(K,Mo),r(K,Bs),f(ve,K,null),a(e,ts,o),f(Nt,e,o),a(e,os,o),a(e,P,o),f(Pt,P,null),r(P,Xs),r(P,yo),r(P,Ys),r(P,ee),f(jt,ee,null),r(ee,As),r(ee,wo),r(ee,Qs),f(xe,ee,null),r(P,Ks),r(P,te),f(Gt,te,null),r(te,ea),r(te,So),r(te,ta),f(ke,te,null),a(e,ns,o),f(Jt,e,o),a(e,ss,o),a(e,j,o),f(Ht,j,null),r(j,oa),r(j,$o),r(j,na),r(j,zo),r(j,sa),f(Me,j,null),a(e,as,o),f(Wt,e,o),a(e,rs,o),a(e,$,o),f(Vt,$,null),r($,aa),r($,Co),r($,ra),r($,Fo),r($,ia),r($,qo),r($,da),f(ye,$,null),r($,la),r($,Io),f(Zt,Io,null),r($,ca),r($,H),f(Et,H,null),r(H,ma),r(H,Uo),r(H,pa),r(H,Lo),r(H,fa),r(H,No),r($,ha),r($,we),f(Dt,we,null),r(we,ua),r(we,Po),r($,ga),r($,Se),f(Rt,Se,null),r(Se,_a),r(Se,jo),r($,Ta),r($,Go),f(Ot,Go,null),a(e,is,o),f(Bt,e,o),a(e,ds,o),a(e,I,o),f(Xt,I,null),r(I,ba),r(I,Jo),r(I,va),r(I,Ho),r(I,xa),r(I,Wo),r(I,ka),f($e,I,null),r(I,Ma),r(I,Vo),f(Yt,Vo,null),a(e,ls,o),f(At,e,o),a(e,cs,o),a(e,U,o),f(Qt,U,null),r(U,ya),r(U,Zo),r(U,wa),r(U,Eo),r(U,Sa),r(U,Do),r(U,$a),r(U,ze),f(Kt,ze,null),r(ze,za),r(ze,Ro),a(e,ms,o),f(eo,e,o),a(e,ps,o),a(e,G,o),f(to,G,null),r(G,Ca),r(G,Oo),r(G,Fa),r(G,Bo),r(G,qa),r(G,Ce),f(oo,Ce,null),r(Ce,Ia),r(Ce,Xo),a(e,fs,o),f(no,e,o),a(e,hs,o),a(e,J,o),f(so,J,null),r(J,Ua),r(J,Yo),r(J,La),r(J,Ao),r(J,Na),r(J,Qo),f(ao,Qo,null),a(e,us,o),f(ro,e,o),a(e,gs,o),a(e,se,o),f(io,se,null),r(se,Pa),r(se,Fe),f(lo,Fe,null),r(Fe,ja),r(Fe,Ko),a(e,_s,o),f(co,e,o),a(e,Ts,o),a(e,ae,o),f(mo,ae,null),r(ae,Ga),r(ae,en),a(e,bs,o),f(po,e,o),a(e,vs,o),a(e,D,o),f(fo,D,null),r(D,Ja),r(D,tn),r(D,Ha),r(D,oe),f(ho,oe,null),r(oe,Wa),r(oe,on),r(oe,Va),f(qe,oe,null),a(e,xs,o),a(e,rn,o),ks=!0},p(e,[o]){const re={};o&2&&(re.$$scope={dirty:o,ctx:e}),ge.$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}),ve.$set(ce);const me={};o&2&&(me.$$scope={dirty:o,ctx:e}),xe.$set(me);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),ke.$set(R);const pe={};o&2&&(pe.$$scope={dirty:o,ctx:e}),Me.$set(pe);const fe={};o&2&&(fe.$$scope={dirty:o,ctx:e}),ye.$set(fe);const O={};o&2&&(O.$$scope={dirty:o,ctx:e}),$e.$set(O);const he={};o&2&&(he.$$scope={dirty:o,ctx:e}),qe.$set(he)},i(e){ks||(h(w.$$.fragment,e),h(x.$$.fragment,e),h(Ee.$$.fragment,e),h(Re.$$.fragment,e),h(Xe.$$.fragment,e),h(Ye.$$.fragment,e),h(Qe.$$.fragment,e),h(et.$$.fragment,e),h(ot.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(rt.$$.fragment,e),h(dt.$$.fragment,e),h(ct.$$.fragment,e),h(pt.$$.fragment,e),h(ht.$$.fragment,e),h(gt.$$.fragment,e),h(kt.$$.fragment,e),h(Mt.$$.fragment,e),h(yt.$$.fragment,e),h(ge.$$.fragment,e),h(wt.$$.fragment,e),h(St.$$.fragment,e),h($t.$$.fragment,e),h(_e.$$.fragment,e),h(zt.$$.fragment,e),h(Ct.$$.fragment,e),h(Ft.$$.fragment,e),h(Te.$$.fragment,e),h(qt.$$.fragment,e),h(It.$$.fragment,e),h(Ut.$$.fragment,e),h(be.$$.fragment,e),h(Lt.$$.fragment,e),h(ve.$$.fragment,e),h(Nt.$$.fragment,e),h(Pt.$$.fragment,e),h(jt.$$.fragment,e),h(xe.$$.fragment,e),h(Gt.$$.fragment,e),h(ke.$$.fragment,e),h(Jt.$$.fragment,e),h(Ht.$$.fragment,e),h(Me.$$.fragment,e),h(Wt.$$.fragment,e),h(Vt.$$.fragment,e),h(ye.$$.fragment,e),h(Zt.$$.fragment,e),h(Et.$$.fragment,e),h(Dt.$$.fragment,e),h(Rt.$$.fragment,e),h(Ot.$$.fragment,e),h(Bt.$$.fragment,e),h(Xt.$$.fragment,e),h($e.$$.fragment,e),h(Yt.$$.fragment,e),h(At.$$.fragment,e),h(Qt.$$.fragment,e),h(Kt.$$.fragment,e),h(eo.$$.fragment,e),h(to.$$.fragment,e),h(oo.$$.fragment,e),h(no.$$.fragment,e),h(so.$$.fragment,e),h(ao.$$.fragment,e),h(ro.$$.fragment,e),h(io.$$.fragment,e),h(lo.$$.fragment,e),h(co.$$.fragment,e),h(mo.$$.fragment,e),h(po.$$.fragment,e),h(fo.$$.fragment,e),h(ho.$$.fragment,e),h(qe.$$.fragment,e),ks=!0)},o(e){u(w.$$.fragment,e),u(x.$$.fragment,e),u(Ee.$$.fragment,e),u(Re.$$.fragment,e),u(Xe.$$.fragment,e),u(Ye.$$.fragment,e),u(Qe.$$.fragment,e),u(et.$$.fragment,e),u(ot.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(rt.$$.fragment,e),u(dt.$$.fragment,e),u(ct.$$.fragment,e),u(pt.$$.fragment,e),u(ht.$$.fragment,e),u(gt.$$.fragment,e),u(kt.$$.fragment,e),u(Mt.$$.fragment,e),u(yt.$$.fragment,e),u(ge.$$.fragment,e),u(wt.$$.fragment,e),u(St.$$.fragment,e),u($t.$$.fragment,e),u(_e.$$.fragment,e),u(zt.$$.fragment,e),u(Ct.$$.fragment,e),u(Ft.$$.fragment,e),u(Te.$$.fragment,e),u(qt.$$.fragment,e),u(It.$$.fragment,e),u(Ut.$$.fragment,e),u(be.$$.fragment,e),u(Lt.$$.fragment,e),u(ve.$$.fragment,e),u(Nt.$$.fragment,e),u(Pt.$$.fragment,e),u(jt.$$.fragment,e),u(xe.$$.fragment,e),u(Gt.$$.fragment,e),u(ke.$$.fragment,e),u(Jt.$$.fragment,e),u(Ht.$$.fragment,e),u(Me.$$.fragment,e),u(Wt.$$.fragment,e),u(Vt.$$.fragment,e),u(ye.$$.fragment,e),u(Zt.$$.fragment,e),u(Et.$$.fragment,e),u(Dt.$$.fragment,e),u(Rt.$$.fragment,e),u(Ot.$$.fragment,e),u(Bt.$$.fragment,e),u(Xt.$$.fragment,e),u($e.$$.fragment,e),u(Yt.$$.fragment,e),u(At.$$.fragment,e),u(Qt.$$.fragment,e),u(Kt.$$.fragment,e),u(eo.$$.fragment,e),u(to.$$.fragment,e),u(oo.$$.fragment,e),u(no.$$.fragment,e),u(so.$$.fragment,e),u(ao.$$.fragment,e),u(ro.$$.fragment,e),u(io.$$.fragment,e),u(lo.$$.fragment,e),u(co.$$.fragment,e),u(mo.$$.fragment,e),u(po.$$.fragment,e),u(fo.$$.fragment,e),u(ho.$$.fragment,e),u(qe.$$.fragment,e),ks=!1},d(e){e&&(t(k),t(T),t(b),t(_),t(L),t(v),t(dn),t(je),t(ln),t(Ge),t(cn),t(Je),t(mn),t(He),t(pn),t(We),t(fn),t(Ve),t(hn),t(Ze),t(un),t(gn),t(De),t(_n),t(Tn),t(Oe),t(bn),t(Be),t(vn),t(xn),t(kn),t(Ae),t(Mn),t(yn),t(Ke),t(wn),t(Sn),t(tt),t($n),t(zn),t(Cn),t(Fn),t(at),t(qn),t(In),t(it),t(Un),t(Ln),t(lt),t(Nn),t(Pn),t(mt),t(jn),t(Gn),t(ft),t(Jn),t(Hn),t(ut),t(Wn),t(Vn),t(_t),t(Zn),t(Tt),t(En),t(bt),t(Dn),t(vt),t(Rn),t(xt),t(On),t(Bn),t(V),t(Xn),t(Yn),t(Z),t(An),t(Qn),t(E),t(Kn),t(es),t(N),t(ts),t(os),t(P),t(ns),t(ss),t(j),t(as),t(rs),t($),t(is),t(ds),t(I),t(ls),t(cs),t(U),t(ms),t(ps),t(G),t(fs),t(hs),t(J),t(us),t(gs),t(se),t(_s),t(Ts),t(ae),t(bs),t(vs),t(D),t(xs),t(rn)),t(l),g(w,e),g(x,e),g(Ee,e),g(Re,e),g(Xe,e),g(Ye,e),g(Qe,e),g(et,e),g(ot,e),g(nt,e),g(st,e),g(rt,e),g(dt,e),g(ct,e),g(pt,e),g(ht,e),g(gt,e),g(kt,e),g(Mt),g(yt),g(ge),g(wt,e),g(St),g($t),g(_e),g(zt,e),g(Ct),g(Ft),g(Te),g(qt,e),g(It),g(Ut),g(be),g(Lt),g(ve),g(Nt,e),g(Pt),g(jt),g(xe),g(Gt),g(ke),g(Jt,e),g(Ht),g(Me),g(Wt,e),g(Vt),g(ye),g(Zt),g(Et),g(Dt),g(Rt),g(Ot),g(Bt,e),g(Xt),g($e),g(Yt),g(At,e),g(Qt),g(Kt),g(eo,e),g(to),g(oo),g(no,e),g(so),g(ao),g(ro,e),g(io),g(lo),g(co,e),g(mo),g(po,e),g(fo),g(ho),g(qe)}}}const bi='{"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 vi(C){return ni(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zi extends si{constructor(l){super(),ai(this,l,vi,Ti,oi,{})}}export{zi as component};
