import{s as Ka,o as ei,n as B}from"../chunks/scheduler.9bc65507.js";import{S as ti,i as oi,g as i,s as n,r as m,A as ni,h as d,f as t,c as s,j as k,u as p,x as c,k as M,y as a,a as r,v as f,d as h,t as g,w as u}from"../chunks/index.707bf1b6.js";import{T as Pe}from"../chunks/Tip.c2ecdbf4.js";import{D as S}from"../chunks/Docstring.17db21ae.js";import{C as ge}from"../chunks/CodeBlock.54a9f38d.js";import{E as Wr}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as z}from"../chunks/Heading.342b1fa6.js";function si(C){let l,x=`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.`,_,y,I=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=x,T=n(),b=i("p"),b.innerHTML=w,_=n(),y=i("p"),y.innerHTML=I},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=x),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-x1gqs1"&&(b.innerHTML=w),_=s(v),y=d(v,"P",{"data-svelte-h":!0}),c(y)!=="svelte-nzkxpe"&&(y.innerHTML=I)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,y,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(y))}}}function ri(C){let l,x=`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.`,_,y,I=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=x,T=n(),b=i("p"),b.innerHTML=w,_=n(),y=i("p"),y.innerHTML=I},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=x),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-f4qe4d"&&(b.innerHTML=w),_=s(v),y=d(v,"P",{"data-svelte-h":!0}),c(y)!=="svelte-nzkxpe"&&(y.innerHTML=I)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,y,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(y))}}}function ai(C){let l,x=`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.`,_,y,I=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){l=i("p"),l.innerHTML=x,T=n(),b=i("p"),b.innerHTML=w,_=n(),y=i("p"),y.innerHTML=I},l(v){l=d(v,"P",{"data-svelte-h":!0}),c(l)!=="svelte-p3kc7q"&&(l.innerHTML=x),T=s(v),b=d(v,"P",{"data-svelte-h":!0}),c(b)!=="svelte-v2xo2a"&&(b.innerHTML=w),_=s(v),y=d(v,"P",{"data-svelte-h":!0}),c(y)!=="svelte-nzkxpe"&&(y.innerHTML=I)},m(v,F){r(v,l,F),r(v,T,F),r(v,b,F),r(v,_,F),r(v,y,F)},p:B,d(v){v&&(t(l),t(T),t(b),t(_),t(y))}}}function ii(C){let l,x=`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=x},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=x)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function di(C){let l,x=`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=x,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=x),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,y){r(_,l,y),r(_,T,y),r(_,b,y)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function li(C){let l,x=`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=x},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=x)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function ci(C){let l,x=`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=x,T=n(),b=i("p"),b.innerHTML=w},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-1c5u34l"&&(l.innerHTML=x),T=s(_),b=d(_,"P",{"data-svelte-h":!0}),c(b)!=="svelte-nzkxpe"&&(b.innerHTML=w)},m(_,y){r(_,l,y),r(_,T,y),r(_,b,y)},p:B,d(_){_&&(t(l),t(T),t(b))}}}function mi(C){let l,x;return l=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUTW9kZWwlMkMlMjBTZWFtbGVzc000VENvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTZWFtbGVzc000VCUyMCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTZWFtbGVzc000VENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TModel, SeamlessM4TConfig

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = SeamlessM4TTokenizerFast.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>, src_lang=<span class="hljs-string">&quot;eng&quot;</span>, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_english_phrase = <span class="hljs-string">&quot; UN Chief Says There Is No Military Solution in Syria&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_translation_french = <span class="hljs-string">&quot;Le chef de l&#x27;ONU affirme qu&#x27;il n&#x27;y a pas de solution militaire en Syrie.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(example_english_phrase, text_target=expected_translation_french, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),{c(){l=i("p"),l.textContent=x,T=n(),m(b.$$.fragment)},l(_){l=d(_,"P",{"data-svelte-h":!0}),c(l)!=="svelte-kvfsh7"&&(l.textContent=x),T=s(_),p(b.$$.fragment,_)},m(_,y){r(_,l,y),r(_,T,y),f(b,_,y),w=!0},p:B,i(_){w||(h(b.$$.fragment,_),w=!0)},o(_){g(b.$$.fragment,_),w=!1},d(_){_&&(t(l),t(T)),u(b,_)}}}function hi(C){let l,x=`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=x},l(T){l=d(T,"P",{"data-svelte-h":!0}),c(l)!=="svelte-fincs2"&&(l.innerHTML=x)},m(T,b){r(T,l,b)},p:B,d(T){T&&t(l)}}}function gi(C){let l,x,T,b,w,_,y,I,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.
This is the version 1 release of the model. For the updated version 2 release, refer to the <a href="./seamless_m4t_v2.md">Seamless M4T v2 docs</a>.`,an,je,Vr="SeamlessM4T is a collection of models designed to provide high quality translation, allowing people from different linguistic communities to communicate effortlessly through speech and text.",dn,Ge,Zr="SeamlessM4T enables multiple tasks without relying on separate models:",ln,Je,Er="<li>Speech-to-speech translation (S2ST)</li> <li>Speech-to-text translation (S2TT)</li> <li>Text-to-speech translation (T2ST)</li> <li>Text-to-text translation (T2TT)</li> <li>Automatic speech recognition (ASR)</li>",cn,He,Dr='<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> can perform all the above tasks, but each task also has its own dedicated sub-model.',mn,We,Rr="The abstract from the paper is the following:",pn,Ve,Or='<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>',fn,Ze,hn,Ee,Br="First, load the processor and a checkpoint of the model:",gn,De,un,Re,Xr="You can seamlessly use this model on text or on audio, to generated either translated text or translated audio.",_n,Oe,Yr="Here is how to use the processor to process text and audio:",Tn,Be,bn,Xe,vn,Ye,Ar='<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> can <em>seamlessly</em> generate text or speech with few or no changes. Let’s target Russian voice translation:',yn,Ae,xn,Qe,Qr="With basically the same code, I’ve translated English text and Arabic speech to Russian speech samples.",kn,Ke,Mn,et,Kr=`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/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel.generate">SeamlessM4TModel.generate()</a>.
This time, let’s translate to French.`,wn,tt,Sn,ot,$n,nt,zn,st,ea=`<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> is transformers top level model to generate speech and text, but you can also use dedicated models that perform the task without additional components, thus reducing the memory footprint.
For example, you can replace the audio-to-audio generation snippet with the model dedicated to the S2ST task, the rest is exactly the same code:`,Cn,rt,Fn,at,ta="Or you can replace the text-to-text generation snippet with the model dedicated to the T2TT task, you only have to remove <code>generate_speech=False</code>.",qn,it,Ln,dt,oa='Feel free to try out <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToSpeech">SeamlessM4TForTextToSpeech</a> as well.',Un,lt,In,ct,na="You have the possibility to change the speaker used for speech synthesis with the <code>spkr_id</code> argument. Some <code>spkr_id</code> works better than other for some languages!",Nn,mt,Pn,pt,sa='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,ft,Gn,ht,ra='Use <code>return_intermediate_token_ids=True</code> with <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TModel">SeamlessM4TModel</a> to return both speech and text !',Jn,gt,Hn,ut,aa="SeamlessM4T features a versatile architecture that smoothly handles the sequential generation of text and speech. This setup comprises two sequence-to-sequence (seq2seq) models. The first model translates the input modality into translated text, while the second model generates speech tokens, known as “unit tokens,” from the translated text.",Wn,_t,ia='Each modality has its own dedicated encoder with a unique architecture. Additionally, for speech output, a vocoder inspired by the <a href="https://arxiv.org/abs/2010.05646" rel="nofollow">HiFi-GAN</a> architecture is placed on top of the second seq2seq model.',Vn,Tt,da="Here’s how the generation process works:",Zn,bt,la="<li>Input text or speech is processed through its specific encoder.</li> <li>A decoder creates text tokens in the desired language.</li> <li>If speech generation is required, the second seq2seq model, following a standard encoder-decoder structure, generates unit tokens.</li> <li>These unit tokens are then passed through the final vocoder to produce the actual speech.</li>",En,vt,ca='This model was contributed by <a href="https://huggingface.co/ylacombe" rel="nofollow">ylacombe</a>. The original code can be found <a href="https://github.com/facebookresearch/seamless_communication" rel="nofollow">here</a>.',Dn,yt,Rn,V,xt,zs,ho,ma=`The original SeamlessM4T Model transformer which can be used for every tasks available (S2ST, S2TT, T2TT, T2ST).
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Cs,X,kt,Fs,go,pa="Generates translated token ids and/or translated audio waveforms.",qs,ue,On,Mt,Bn,Z,wt,Ls,uo,fa=`The text-to-speech SeamlessM4T Model transformer which can be used for T2ST.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Us,Y,St,Is,_o,ha="Generates translated audio waveforms.",Ns,_e,Xn,$t,Yn,E,zt,Ps,To,ga=`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,Ct,Gs,bo,ua="Generates translated audio waveforms.",Js,Te,An,Ft,Qn,N,qt,Hs,vo,_a=`The text-to-text SeamlessM4T Model transformer which can be used for T2TT.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Ws,Q,Lt,Vs,yo,Ta='The <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TForTextToText">SeamlessM4TForTextToText</a> forward method, overrides the <code>__call__</code> special method.',Zs,be,Es,K,Ut,Ds,xo,ba="Generates sequences of token ids.",Rs,ve,Kn,It,es,P,Nt,Os,ko,va=`The speech-to-text SeamlessM4T Model transformer which can be used for S2TT.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Bs,ee,Pt,Xs,Mo,ya='The <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TForSpeechToText">SeamlessM4TForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',Ys,ye,As,te,jt,Qs,wo,xa="Generates sequences of token ids.",Ks,xe,ts,Gt,os,j,Jt,er,So,ka=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.36.0/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.`,tr,$o,Ma=`Configuration objects inherit from <a href="/docs/transformers/v4.36.0/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/v4.36.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,or,ke,ns,Ht,ss,$,Wt,nr,zo,wa="Construct a SeamlessM4T tokenizer.",sr,Co,Sa=`Adapted from <a href="/docs/transformers/v4.36.0/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/xlnet#transformers.XLNetTokenizer">XLNetTokenizer</a>. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,rr,Fo,$a="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.",ar,Me,ir,qo,Vt,dr,H,Zt,lr,Lo,za=`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:`,cr,Uo,Ca="<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>",mr,Io,Fa=`BOS is never used. Pairs of sequences are not the expected use case, but they will be handled without a
separator.`,pr,we,Et,fr,No,qa=`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.`,hr,Se,Dt,gr,Po,La=`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.`,ur,jo,Rt,rs,Ot,as,L,Bt,_r,Go,Ua=`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>.`,Tr,Jo,Ia=`This tokenizer inherits from <a href="/docs/transformers/v4.36.0/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.`,br,Ho,Na="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.",vr,$e,yr,Wo,Xt,is,Yt,ds,U,At,xr,Vo,Pa="Constructs a SeamlessM4T feature extractor.",kr,Zo,ja=`This feature extractor inherits from <a href="/docs/transformers/v4.36.0/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.`,Mr,Eo,Ga="This class extracts mel-filter bank features from raw speech.",wr,ze,Qt,Sr,Do,Ja="Main method to featurize and prepare for the model one or several sequence(s).",ls,Kt,cs,G,eo,$r,Ro,Ha=`Constructs a SeamlessM4T processor which wraps a SeamlessM4T feature extractor and a SeamlessM4T tokenizer into a
single processor.`,zr,Oo,Wa=`<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> and
<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizerFast">SeamlessM4TTokenizerFast</a>. See the <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor.__call__"><strong>call</strong>()</a> and <code>decode()</code> for
more information.`,Cr,Ce,to,Fr,Bo,Va=`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/v4.36.0/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/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__"><strong>call</strong>()</a> if <code>audios</code> is not <code>None</code>. Please refer
to the doctsring of the above two methods for more information.`,ms,oo,ps,J,no,qr,Xo,Za=`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/v4.36.0/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.)`,Lr,Yo,Ea=`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.`,Ur,Ao,so,fs,ro,hs,se,ao,Ir,Fe,io,Nr,Qo,Da=`Converts a log-mel spectrogram into a speech waveform. Passing a batch of log-mel spectrograms returns a batch
of speech waveforms. Passing a single, un-batched log-mel spectrogram returns a single, un-batched speech
waveform.`,gs,lo,us,re,co,Pr,Ko,Ra=`Transformer bare text-to-unit encoder-decoder. The encoder is a <code>SeamlessM4TEncoder</code> without embeddings and the decoder is a <code>SeamlessM4TDecoder</code>.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,_s,mo,Ts,D,po,jr,en,Oa=`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.`,Gr,oe,fo,Jr,tn,Ba='The <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTextToUnitForConditionalGeneration">SeamlessM4TTextToUnitForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Hr,qe,bs,rn,vs;return w=new z({props:{title:"SeamlessM4T",local:"seamlessm4t",headingTag:"h1"}}),y=new z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ze=new z({props:{title:"Usage",local:"usage",headingTag:"h2"}}),De=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTZWFtbGVzc000VE1vZGVsJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKSUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZoZi1zZWFtbGVzcy1tNHQtbWVkaXVtJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SeamlessM4TModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># from text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output_tokens = model.generate(**text_inputs, tgt_lang=<span class="hljs-string">&quot;fra&quot;</span>, generate_speech=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translated_text_from_text = processor.decode(output_tokens[<span class="hljs-number">0</span>].tolist()[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)`,wrap:!1}}),ot=new z({props:{title:"Tips",local:"tips",headingTag:"h3"}}),nt=new z({props:{title:"1. Use dedicated models",local:"1-use-dedicated-models",headingTag:"h4"}}),rt=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2glMEFtb2RlbCUyMCUzRCUyMFNlYW1sZXNzTTRURm9yU3BlZWNoVG9TcGVlY2guZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGaGYtc2VhbWxlc3MtbTR0LW1lZGl1bSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForSpeechToSpeech
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForSpeechToSpeech.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),it=new ge({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRURm9yVGV4dFRvVGV4dCUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFRGb3JUZXh0VG9UZXh0LmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmhmLXNlYW1sZXNzLW00dC1tZWRpdW0lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4TForTextToText
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4TForTextToText.from_pretrained(<span class="hljs-string">&quot;facebook/hf-seamless-m4t-medium&quot;</span>)`,wrap:!1}}),lt=new z({props:{title:"2. Change the speaker identity",local:"2-change-the-speaker-identity",headingTag:"h4"}}),mt=new z({props:{title:"3. Change the generation strategy",local:"3-change-the-generation-strategy",headingTag:"h4"}}),ft=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"}}),yt=new z({props:{title:"SeamlessM4TModel",local:"transformers.SeamlessM4TModel",headingTag:"h2"}}),xt=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/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3941"}}),kt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TModel.generate",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 0"},{name:"generate_speech",val:": typing.Optional[bool] = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TModel.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L4147",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>Union[SeamlessM4TGenerationOutput, Tuple[Tensor], ModelOutput]</code></p>
`}}),ue=new Pe({props:{$$slots:{default:[si]},$$scope:{ctx:C}}}),Mt=new z({props:{title:"SeamlessM4TForTextToSpeech",local:"transformers.SeamlessM4TForTextToSpeech",headingTag:"h2"}}),wt=new S({props:{name:"class transformers.SeamlessM4TForTextToSpeech",anchor:"transformers.SeamlessM4TForTextToSpeech",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3224"}}),St=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToSpeech.generate",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToSpeech.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3372",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:[ri]},$$scope:{ctx:C}}}),$t=new z({props:{title:"SeamlessM4TForSpeechToSpeech",local:"transformers.SeamlessM4TForSpeechToSpeech",headingTag:"h2"}}),zt=new S({props:{name:"class transformers.SeamlessM4TForSpeechToSpeech",anchor:"transformers.SeamlessM4TForSpeechToSpeech",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3576"}}),Ct=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate",parameters:[{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"return_intermediate_token_ids",val:": typing.Optional[bool] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"spkr_id",val:": typing.Optional[int] = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToSpeech.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3727",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:[ai]},$$scope:{ctx:C}}}),Ft=new z({props:{title:"SeamlessM4TForTextToText",local:"transformers.SeamlessM4TForTextToText",headingTag:"h2"}}),qt=new S({props:{name:"class transformers.SeamlessM4TForTextToText",anchor:"transformers.SeamlessM4TForTextToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2641"}}),Lt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForTextToText.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2689"}}),be=new Pe({props:{$$slots:{default:[ii]},$$scope:{ctx:C}}}),Ut=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForTextToText.generate",parameters:[{name:"input_ids",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"generation_config",val:" = None"},{name:"logits_processor",val:" = None"},{name:"stopping_criteria",val:" = None"},{name:"prefix_allowed_tokens_fn",val:" = None"},{name:"synced_gpus",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForTextToText.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of varying shape depending on the modality, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/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/v4.36.0/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/v4.36.0/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/v4.36.0/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/v4.36.0/en/internal/generation_utils#transformers.generation.GreedySearchEncoderDecoderOutput"
>GreedySearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/v4.36.0/en/internal/generation_utils#transformers.generation.SampleEncoderDecoderOutput"
>SampleEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/v4.36.0/en/internal/generation_utils#transformers.generation.BeamSearchEncoderDecoderOutput"
>BeamSearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/v4.36.0/en/internal/generation_utils#transformers.generation.BeamSampleEncoderDecoderOutput"
>BeamSampleEncoderDecoderOutput</a></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.36.0/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),ve=new Pe({props:{warning:!0,$$slots:{default:[di]},$$scope:{ctx:C}}}),It=new z({props:{title:"SeamlessM4TForSpeechToText",local:"transformers.SeamlessM4TForSpeechToText",headingTag:"h2"}}),Nt=new S({props:{name:"class transformers.SeamlessM4TForSpeechToText",anchor:"transformers.SeamlessM4TForSpeechToText",parameters:[{name:"config",val:": SeamlessM4TConfig"}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2931"}}),Pt=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TForSpeechToText.forward",parameters:[{name:"input_features",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/v4.36.0/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/v4.36.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2974"}}),ye=new Pe({props:{$$slots:{default:[li]},$$scope:{ctx:C}}}),jt=new S({props:{name:"generate",anchor:"transformers.SeamlessM4TForSpeechToText.generate",parameters:[{name:"input_features",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"generation_config",val:" = None"},{name:"logits_processor",val:" = None"},{name:"stopping_criteria",val:" = None"},{name:"prefix_allowed_tokens_fn",val:" = None"},{name:"synced_gpus",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TForSpeechToText.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L3073",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


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

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

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


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


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


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


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


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


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

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

					</div>`,name:"eos_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SeamlessM4TTokenizerFast.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;eng&quot;</code>) &#x2014;
The language to use as source language for translation.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fra&quot;</code>) &#x2014;
The language to use as target language for translation.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L52"}}),$e=new Wr({props:{anchor:"transformers.SeamlessM4TTokenizerFast.example",$$slots:{default:[fi]},$$scope:{ctx:C}}}),Xt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TTokenizerFast.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = 2"},{name:"src_lang",val:": typing.Optional[str] = None"},{name:"tgt_lang",val:": typing.Optional[str] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SeamlessM4TTokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.36.0/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/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizerFast.<strong>call</strong>()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/tokenization_seamless_m4t_fast.py#L388"}}),Yt=new z({props:{title:"SeamlessM4TFeatureExtractor",local:"transformers.SeamlessM4TFeatureExtractor",headingTag:"h2"}}),At=new S({props:{name:"class transformers.SeamlessM4TFeatureExtractor",anchor:"transformers.SeamlessM4TFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"num_mel_bins",val:" = 80"},{name:"padding_value",val:" = 0.0"},{name:"stride",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.SeamlessM4TFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SeamlessM4TFeatureExtractor.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of Mel-frequency bins.`,name:"num_mel_bins"},{anchor:"transformers.SeamlessM4TFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The value that is used to fill the padding vectors.`,name:"padding_value"},{anchor:"transformers.SeamlessM4TFeatureExtractor.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride used to reshape audios from shape (batch_size,num_frames,num_mel_bins) to
(batch_size,num_frames//stride,num_mel_bins*stride).`,name:"stride"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L32"}}),Qt=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = 2"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"do_normalize_per_mel_bins",val:": typing.Optional[bool] = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.raw_speech",description:`<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>, <code>List[List[List[float]]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays, a list of list of float values or a list of a list of list of float
values. If <code>raw_speech</code> is a one-dimensional <code>np.ndarray</code> or a <code>List[float]</code>, <code>raw_speech</code> is
considered a single-channel, single-sample sound. In all other cases, the first dimension of
<code>raw_speech</code>, whether from an <code>np.ndarray</code> or a <code>List[...]</code>, corresponds to the number of samples in
the batch, and the number of channels (i.e. mono or stereo character) is derived from the other
dimensions (1D -&gt; single-channel waveform batches; 2D-&gt; stereo-channel waveform batches).`,name:"raw_speech"},{anchor:"transformers.SeamlessM4TFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/feature_extraction_seamless_m4t.py#L138"}}),Kt=new z({props:{title:"SeamlessM4TProcessor",local:"transformers.SeamlessM4TProcessor",headingTag:"h2"}}),eo=new S({props:{name:"class transformers.SeamlessM4TProcessor",anchor:"transformers.SeamlessM4TProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/processing_seamless_m4t.py#L22"}}),to=new S({props:{name:"__call__",anchor:"transformers.SeamlessM4TProcessor.__call__",parameters:[{name:"text",val:" = None"},{name:"audios",val:" = None"},{name:"src_lang",val:" = None"},{name:"tgt_lang",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TProcessor.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SeamlessM4TProcessor.__call__.audios",description:`<strong>audios</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The audio or batch of audios to be prepared. Each audio can be NumPy array or PyTorch tensor. In case
of a NumPy array/PyTorch tensor, each audio should be of shape (C, T), where C is a number of channels,
and T the sample length of the audio.`,name:"audios"},{anchor:"transformers.SeamlessM4TProcessor.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language code of the input texts/audios. If not specified, the last <code>src_lang</code> specified will be
used.`,name:"src_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The code of the target language. If not specified, the last <code>tgt_lang</code> specified will be used.`,name:"tgt_lang"},{anchor:"transformers.SeamlessM4TProcessor.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to the feature extractor and/or the
tokenizer.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/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/v4.36.0/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/v4.36.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),oo=new z({props:{title:"SeamlessM4TCodeHifiGan",local:"transformers.SeamlessM4TCodeHifiGan",headingTag:"h2"}}),no=new S({props:{name:"class transformers.SeamlessM4TCodeHifiGan",anchor:"transformers.SeamlessM4TCodeHifiGan",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4TCodeHifiGan.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2481"}}),so=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TCodeHifiGan.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"spkr_id",val:": Tensor"},{name:"lang_id",val:": Tensor"}],parametersDescription:[{anchor:"transformers.SeamlessM4TCodeHifiGan.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2557"}}),ro=new z({props:{title:"SeamlessM4THifiGan",local:"transformers.SeamlessM4THifiGan",headingTag:"h2"}}),ao=new S({props:{name:"class transformers.SeamlessM4THifiGan",anchor:"transformers.SeamlessM4THifiGan",parameters:[{name:"config",val:": SeamlessM4TConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2405"}}),io=new S({props:{name:"forward",anchor:"transformers.SeamlessM4THifiGan.forward",parameters:[{name:"input_embeds",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.SeamlessM4THifiGan.forward.spectrogram",description:`<strong>spectrogram</strong> (<code>torch.FloatTensor</code>) &#x2014;
Tensor containing the log-mel spectrograms. Can be batched and of shape <code>(batch_size, sequence_length, model_in_dim)</code>, or un-batched and of shape <code>(sequence_length, model_in_dim)</code>. Note that <code>model_in_dim</code>
is the sum of <code>config.unit_embed_dim</code>, <code>config.lang_embed_dim</code> and <code>config.spkr_embed_dim</code>.`,name:"spectrogram"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/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>
`}}),lo=new z({props:{title:"SeamlessM4TTextToUnitModel",local:"transformers.SeamlessM4TTextToUnitModel",headingTag:"h2"}}),co=new S({props:{name:"class transformers.SeamlessM4TTextToUnitModel",anchor:"transformers.SeamlessM4TTextToUnitModel",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": typing.Optional[torch.nn.modules.sparse.Embedding] = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2046"}}),mo=new z({props:{title:"SeamlessM4TTextToUnitForConditionalGeneration",local:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",headingTag:"h2"}}),po=new S({props:{name:"class transformers.SeamlessM4TTextToUnitForConditionalGeneration",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration",parameters:[{name:"config",val:": SeamlessM4TConfig"},{name:"embed_tokens_decoder",val:": typing.Optional[torch.nn.modules.sparse.Embedding] = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.36.0/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/v4.36.0/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/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2135"}}),fo=new S({props:{name:"forward",anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SeamlessM4TTextToUnitForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/v4.36.0/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.36.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.36.0/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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/v4.36.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.36.0/src/transformers/models/seamless_m4t/modeling_seamless_m4t.py#L2181"}}),qe=new Pe({props:{$$slots:{default:[hi]},$$scope:{ctx:C}}}),{c(){l=i("meta"),x=n(),T=i("p"),b=n(),m(w.$$.fragment),_=n(),m(y.$$.fragment),I=n(),v=i("p"),v.innerHTML=F,an=n(),je=i("p"),je.textContent=Vr,dn=n(),Ge=i("p"),Ge.textContent=Zr,ln=n(),Je=i("ul"),Je.innerHTML=Er,cn=n(),He=i("p"),He.innerHTML=Dr,mn=n(),We=i("p"),We.textContent=Rr,pn=n(),Ve=i("p"),Ve.innerHTML=Or,fn=n(),m(Ze.$$.fragment),hn=n(),Ee=i("p"),Ee.textContent=Br,gn=n(),m(De.$$.fragment),un=n(),Re=i("p"),Re.textContent=Xr,_n=n(),Oe=i("p"),Oe.textContent=Yr,Tn=n(),m(Be.$$.fragment),bn=n(),m(Xe.$$.fragment),vn=n(),Ye=i("p"),Ye.innerHTML=Ar,yn=n(),m(Ae.$$.fragment),xn=n(),Qe=i("p"),Qe.textContent=Qr,kn=n(),m(Ke.$$.fragment),Mn=n(),et=i("p"),et.innerHTML=Kr,wn=n(),m(tt.$$.fragment),Sn=n(),m(ot.$$.fragment),$n=n(),m(nt.$$.fragment),zn=n(),st=i("p"),st.innerHTML=ea,Cn=n(),m(rt.$$.fragment),Fn=n(),at=i("p"),at.innerHTML=ta,qn=n(),m(it.$$.fragment),Ln=n(),dt=i("p"),dt.innerHTML=oa,Un=n(),m(lt.$$.fragment),In=n(),ct=i("p"),ct.innerHTML=na,Nn=n(),m(mt.$$.fragment),Pn=n(),pt=i("p"),pt.innerHTML=sa,jn=n(),m(ft.$$.fragment),Gn=n(),ht=i("p"),ht.innerHTML=ra,Jn=n(),m(gt.$$.fragment),Hn=n(),ut=i("p"),ut.textContent=aa,Wn=n(),_t=i("p"),_t.innerHTML=ia,Vn=n(),Tt=i("p"),Tt.textContent=da,Zn=n(),bt=i("ul"),bt.innerHTML=la,En=n(),vt=i("p"),vt.innerHTML=ca,Dn=n(),m(yt.$$.fragment),Rn=n(),V=i("div"),m(xt.$$.fragment),zs=n(),ho=i("p"),ho.innerHTML=ma,Cs=n(),X=i("div"),m(kt.$$.fragment),Fs=n(),go=i("p"),go.textContent=pa,qs=n(),m(ue.$$.fragment),On=n(),m(Mt.$$.fragment),Bn=n(),Z=i("div"),m(wt.$$.fragment),Ls=n(),uo=i("p"),uo.innerHTML=fa,Us=n(),Y=i("div"),m(St.$$.fragment),Is=n(),_o=i("p"),_o.textContent=ha,Ns=n(),m(_e.$$.fragment),Xn=n(),m($t.$$.fragment),Yn=n(),E=i("div"),m(zt.$$.fragment),Ps=n(),To=i("p"),To.innerHTML=ga,js=n(),A=i("div"),m(Ct.$$.fragment),Gs=n(),bo=i("p"),bo.textContent=ua,Js=n(),m(Te.$$.fragment),An=n(),m(Ft.$$.fragment),Qn=n(),N=i("div"),m(qt.$$.fragment),Hs=n(),vo=i("p"),vo.innerHTML=_a,Ws=n(),Q=i("div"),m(Lt.$$.fragment),Vs=n(),yo=i("p"),yo.innerHTML=Ta,Zs=n(),m(be.$$.fragment),Es=n(),K=i("div"),m(Ut.$$.fragment),Ds=n(),xo=i("p"),xo.textContent=ba,Rs=n(),m(ve.$$.fragment),Kn=n(),m(It.$$.fragment),es=n(),P=i("div"),m(Nt.$$.fragment),Os=n(),ko=i("p"),ko.innerHTML=va,Bs=n(),ee=i("div"),m(Pt.$$.fragment),Xs=n(),Mo=i("p"),Mo.innerHTML=ya,Ys=n(),m(ye.$$.fragment),As=n(),te=i("div"),m(jt.$$.fragment),Qs=n(),wo=i("p"),wo.textContent=xa,Ks=n(),m(xe.$$.fragment),ts=n(),m(Gt.$$.fragment),os=n(),j=i("div"),m(Jt.$$.fragment),er=n(),So=i("p"),So.innerHTML=ka,tr=n(),$o=i("p"),$o.innerHTML=Ma,or=n(),m(ke.$$.fragment),ns=n(),m(Ht.$$.fragment),ss=n(),$=i("div"),m(Wt.$$.fragment),nr=n(),zo=i("p"),zo.textContent=wa,sr=n(),Co=i("p"),Co.innerHTML=Sa,rr=n(),Fo=i("p"),Fo.innerHTML=$a,ar=n(),m(Me.$$.fragment),ir=n(),qo=i("div"),m(Vt.$$.fragment),dr=n(),H=i("div"),m(Zt.$$.fragment),lr=n(),Lo=i("p"),Lo.innerHTML=za,cr=n(),Uo=i("ul"),Uo.innerHTML=Ca,mr=n(),Io=i("p"),Io.textContent=Fa,pr=n(),we=i("div"),m(Et.$$.fragment),fr=n(),No=i("p"),No.innerHTML=qa,hr=n(),Se=i("div"),m(Dt.$$.fragment),gr=n(),Po=i("p"),Po.textContent=La,ur=n(),jo=i("div"),m(Rt.$$.fragment),rs=n(),m(Ot.$$.fragment),as=n(),L=i("div"),m(Bt.$$.fragment),_r=n(),Go=i("p"),Go.innerHTML=Ua,Tr=n(),Jo=i("p"),Jo.innerHTML=Ia,br=n(),Ho=i("p"),Ho.innerHTML=Na,vr=n(),m($e.$$.fragment),yr=n(),Wo=i("div"),m(Xt.$$.fragment),is=n(),m(Yt.$$.fragment),ds=n(),U=i("div"),m(At.$$.fragment),xr=n(),Vo=i("p"),Vo.textContent=Pa,kr=n(),Zo=i("p"),Zo.innerHTML=ja,Mr=n(),Eo=i("p"),Eo.textContent=Ga,wr=n(),ze=i("div"),m(Qt.$$.fragment),Sr=n(),Do=i("p"),Do.textContent=Ja,ls=n(),m(Kt.$$.fragment),cs=n(),G=i("div"),m(eo.$$.fragment),$r=n(),Ro=i("p"),Ro.textContent=Ha,zr=n(),Oo=i("p"),Oo.innerHTML=Wa,Cr=n(),Ce=i("div"),m(to.$$.fragment),Fr=n(),Bo=i("p"),Bo.innerHTML=Va,ms=n(),m(oo.$$.fragment),ps=n(),J=i("div"),m(no.$$.fragment),qr=n(),Xo=i("p"),Xo.innerHTML=Za,Lr=n(),Yo=i("p"),Yo.innerHTML=Ea,Ur=n(),Ao=i("div"),m(so.$$.fragment),fs=n(),m(ro.$$.fragment),hs=n(),se=i("div"),m(ao.$$.fragment),Ir=n(),Fe=i("div"),m(io.$$.fragment),Nr=n(),Qo=i("p"),Qo.textContent=Da,gs=n(),m(lo.$$.fragment),us=n(),re=i("div"),m(co.$$.fragment),Pr=n(),Ko=i("p"),Ko.innerHTML=Ra,_s=n(),m(mo.$$.fragment),Ts=n(),D=i("div"),m(po.$$.fragment),jr=n(),en=i("p"),en.innerHTML=Oa,Gr=n(),oe=i("div"),m(fo.$$.fragment),Jr=n(),tn=i("p"),tn.innerHTML=Ba,Hr=n(),m(qe.$$.fragment),bs=n(),rn=i("p"),this.h()},l(e){const o=ni("svelte-u9bgzb",document.head);l=d(o,"META",{name:!0,content:!0}),o.forEach(t),x=s(e),T=d(e,"P",{}),k(T).forEach(t),b=s(e),p(w.$$.fragment,e),_=s(e),p(y.$$.fragment,e),I=s(e),v=d(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-5gn6x"&&(v.innerHTML=F),an=s(e),je=d(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-1ocrm51"&&(je.textContent=Vr),dn=s(e),Ge=d(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-17llv5s"&&(Ge.textContent=Zr),ln=s(e),Je=d(e,"UL",{"data-svelte-h":!0}),c(Je)!=="svelte-7ymha8"&&(Je.innerHTML=Er),cn=s(e),He=d(e,"P",{"data-svelte-h":!0}),c(He)!=="svelte-1myzy8x"&&(He.innerHTML=Dr),mn=s(e),We=d(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-vfdo9a"&&(We.textContent=Rr),pn=s(e),Ve=d(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-oypae0"&&(Ve.innerHTML=Or),fn=s(e),p(Ze.$$.fragment,e),hn=s(e),Ee=d(e,"P",{"data-svelte-h":!0}),c(Ee)!=="svelte-msm04g"&&(Ee.textContent=Br),gn=s(e),p(De.$$.fragment,e),un=s(e),Re=d(e,"P",{"data-svelte-h":!0}),c(Re)!=="svelte-1x6apd2"&&(Re.textContent=Xr),_n=s(e),Oe=d(e,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-skz2b1"&&(Oe.textContent=Yr),Tn=s(e),p(Be.$$.fragment,e),bn=s(e),p(Xe.$$.fragment,e),vn=s(e),Ye=d(e,"P",{"data-svelte-h":!0}),c(Ye)!=="svelte-9fuqs7"&&(Ye.innerHTML=Ar),yn=s(e),p(Ae.$$.fragment,e),xn=s(e),Qe=d(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-vy622i"&&(Qe.textContent=Qr),kn=s(e),p(Ke.$$.fragment,e),Mn=s(e),et=d(e,"P",{"data-svelte-h":!0}),c(et)!=="svelte-15y11zh"&&(et.innerHTML=Kr),wn=s(e),p(tt.$$.fragment,e),Sn=s(e),p(ot.$$.fragment,e),$n=s(e),p(nt.$$.fragment,e),zn=s(e),st=d(e,"P",{"data-svelte-h":!0}),c(st)!=="svelte-1eejhee"&&(st.innerHTML=ea),Cn=s(e),p(rt.$$.fragment,e),Fn=s(e),at=d(e,"P",{"data-svelte-h":!0}),c(at)!=="svelte-65k8ai"&&(at.innerHTML=ta),qn=s(e),p(it.$$.fragment,e),Ln=s(e),dt=d(e,"P",{"data-svelte-h":!0}),c(dt)!=="svelte-krzi3x"&&(dt.innerHTML=oa),Un=s(e),p(lt.$$.fragment,e),In=s(e),ct=d(e,"P",{"data-svelte-h":!0}),c(ct)!=="svelte-1fv3rh2"&&(ct.innerHTML=na),Nn=s(e),p(mt.$$.fragment,e),Pn=s(e),pt=d(e,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-9rou0u"&&(pt.innerHTML=sa),jn=s(e),p(ft.$$.fragment,e),Gn=s(e),ht=d(e,"P",{"data-svelte-h":!0}),c(ht)!=="svelte-1cxqnex"&&(ht.innerHTML=ra),Jn=s(e),p(gt.$$.fragment,e),Hn=s(e),ut=d(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-1btdeyd"&&(ut.textContent=aa),Wn=s(e),_t=d(e,"P",{"data-svelte-h":!0}),c(_t)!=="svelte-10jpqyx"&&(_t.innerHTML=ia),Vn=s(e),Tt=d(e,"P",{"data-svelte-h":!0}),c(Tt)!=="svelte-8kbcuu"&&(Tt.textContent=da),Zn=s(e),bt=d(e,"UL",{"data-svelte-h":!0}),c(bt)!=="svelte-lmn79"&&(bt.innerHTML=la),En=s(e),vt=d(e,"P",{"data-svelte-h":!0}),c(vt)!=="svelte-mez4is"&&(vt.innerHTML=ca),Dn=s(e),p(yt.$$.fragment,e),Rn=s(e),V=d(e,"DIV",{class:!0});var ae=k(V);p(xt.$$.fragment,ae),zs=s(ae),ho=d(ae,"P",{"data-svelte-h":!0}),c(ho)!=="svelte-1d7595s"&&(ho.innerHTML=ma),Cs=s(ae),X=d(ae,"DIV",{class:!0});var ie=k(X);p(kt.$$.fragment,ie),Fs=s(ie),go=d(ie,"P",{"data-svelte-h":!0}),c(go)!=="svelte-1v5cwae"&&(go.textContent=pa),qs=s(ie),p(ue.$$.fragment,ie),ie.forEach(t),ae.forEach(t),On=s(e),p(Mt.$$.fragment,e),Bn=s(e),Z=d(e,"DIV",{class:!0});var de=k(Z);p(wt.$$.fragment,de),Ls=s(de),uo=d(de,"P",{"data-svelte-h":!0}),c(uo)!=="svelte-1tcnd3d"&&(uo.innerHTML=fa),Us=s(de),Y=d(de,"DIV",{class:!0});var le=k(Y);p(St.$$.fragment,le),Is=s(le),_o=d(le,"P",{"data-svelte-h":!0}),c(_o)!=="svelte-1lcmkdu"&&(_o.textContent=ha),Ns=s(le),p(_e.$$.fragment,le),le.forEach(t),de.forEach(t),Xn=s(e),p($t.$$.fragment,e),Yn=s(e),E=d(e,"DIV",{class:!0});var ce=k(E);p(zt.$$.fragment,ce),Ps=s(ce),To=d(ce,"P",{"data-svelte-h":!0}),c(To)!=="svelte-1js90x5"&&(To.innerHTML=ga),js=s(ce),A=d(ce,"DIV",{class:!0});var me=k(A);p(Ct.$$.fragment,me),Gs=s(me),bo=d(me,"P",{"data-svelte-h":!0}),c(bo)!=="svelte-1lcmkdu"&&(bo.textContent=ua),Js=s(me),p(Te.$$.fragment,me),me.forEach(t),ce.forEach(t),An=s(e),p(Ft.$$.fragment,e),Qn=s(e),N=d(e,"DIV",{class:!0});var R=k(N);p(qt.$$.fragment,R),Hs=s(R),vo=d(R,"P",{"data-svelte-h":!0}),c(vo)!=="svelte-eorsfx"&&(vo.innerHTML=_a),Ws=s(R),Q=d(R,"DIV",{class:!0});var pe=k(Q);p(Lt.$$.fragment,pe),Vs=s(pe),yo=d(pe,"P",{"data-svelte-h":!0}),c(yo)!=="svelte-vgcwu8"&&(yo.innerHTML=Ta),Zs=s(pe),p(be.$$.fragment,pe),pe.forEach(t),Es=s(R),K=d(R,"DIV",{class:!0});var fe=k(K);p(Ut.$$.fragment,fe),Ds=s(fe),xo=d(fe,"P",{"data-svelte-h":!0}),c(xo)!=="svelte-1puovtq"&&(xo.textContent=ba),Rs=s(fe),p(ve.$$.fragment,fe),fe.forEach(t),R.forEach(t),Kn=s(e),p(It.$$.fragment,e),es=s(e),P=d(e,"DIV",{class:!0});var O=k(P);p(Nt.$$.fragment,O),Os=s(O),ko=d(O,"P",{"data-svelte-h":!0}),c(ko)!=="svelte-1cndbjh"&&(ko.innerHTML=va),Bs=s(O),ee=d(O,"DIV",{class:!0});var he=k(ee);p(Pt.$$.fragment,he),Xs=s(he),Mo=d(he,"P",{"data-svelte-h":!0}),c(Mo)!=="svelte-vvcx1e"&&(Mo.innerHTML=ya),Ys=s(he),p(ye.$$.fragment,he),he.forEach(t),As=s(O),te=d(O,"DIV",{class:!0});var on=k(te);p(jt.$$.fragment,on),Qs=s(on),wo=d(on,"P",{"data-svelte-h":!0}),c(wo)!=="svelte-1puovtq"&&(wo.textContent=xa),Ks=s(on),p(xe.$$.fragment,on),on.forEach(t),O.forEach(t),ts=s(e),p(Gt.$$.fragment,e),os=s(e),j=d(e,"DIV",{class:!0});var Le=k(j);p(Jt.$$.fragment,Le),er=s(Le),So=d(Le,"P",{"data-svelte-h":!0}),c(So)!=="svelte-18grjvd"&&(So.innerHTML=ka),tr=s(Le),$o=d(Le,"P",{"data-svelte-h":!0}),c($o)!=="svelte-1qljms5"&&($o.innerHTML=Ma),or=s(Le),p(ke.$$.fragment,Le),Le.forEach(t),ns=s(e),p(Ht.$$.fragment,e),ss=s(e),$=d(e,"DIV",{class:!0});var q=k($);p(Wt.$$.fragment,q),nr=s(q),zo=d(q,"P",{"data-svelte-h":!0}),c(zo)!=="svelte-1yrb5nn"&&(zo.textContent=wa),sr=s(q),Co=d(q,"P",{"data-svelte-h":!0}),c(Co)!=="svelte-1wkdjvb"&&(Co.innerHTML=Sa),rr=s(q),Fo=d(q,"P",{"data-svelte-h":!0}),c(Fo)!=="svelte-18kdu26"&&(Fo.innerHTML=$a),ar=s(q),p(Me.$$.fragment,q),ir=s(q),qo=d(q,"DIV",{class:!0});var Xa=k(qo);p(Vt.$$.fragment,Xa),Xa.forEach(t),dr=s(q),H=d(q,"DIV",{class:!0});var Ue=k(H);p(Zt.$$.fragment,Ue),lr=s(Ue),Lo=d(Ue,"P",{"data-svelte-h":!0}),c(Lo)!=="svelte-nkpot4"&&(Lo.innerHTML=za),cr=s(Ue),Uo=d(Ue,"UL",{"data-svelte-h":!0}),c(Uo)!=="svelte-mlrsks"&&(Uo.innerHTML=Ca),mr=s(Ue),Io=d(Ue,"P",{"data-svelte-h":!0}),c(Io)!=="svelte-46aam0"&&(Io.textContent=Fa),Ue.forEach(t),pr=s(q),we=d(q,"DIV",{class:!0});var ys=k(we);p(Et.$$.fragment,ys),fr=s(ys),No=d(ys,"P",{"data-svelte-h":!0}),c(No)!=="svelte-1f4f5kp"&&(No.innerHTML=qa),ys.forEach(t),hr=s(q),Se=d(q,"DIV",{class:!0});var xs=k(Se);p(Dt.$$.fragment,xs),gr=s(xs),Po=d(xs,"P",{"data-svelte-h":!0}),c(Po)!=="svelte-1bcwf97"&&(Po.textContent=La),xs.forEach(t),ur=s(q),jo=d(q,"DIV",{class:!0});var Ya=k(jo);p(Rt.$$.fragment,Ya),Ya.forEach(t),q.forEach(t),rs=s(e),p(Ot.$$.fragment,e),as=s(e),L=d(e,"DIV",{class:!0});var W=k(L);p(Bt.$$.fragment,W),_r=s(W),Go=d(W,"P",{"data-svelte-h":!0}),c(Go)!=="svelte-162k0i1"&&(Go.innerHTML=Ua),Tr=s(W),Jo=d(W,"P",{"data-svelte-h":!0}),c(Jo)!=="svelte-1tmst88"&&(Jo.innerHTML=Ia),br=s(W),Ho=d(W,"P",{"data-svelte-h":!0}),c(Ho)!=="svelte-18kdu26"&&(Ho.innerHTML=Na),vr=s(W),p($e.$$.fragment,W),yr=s(W),Wo=d(W,"DIV",{class:!0});var Aa=k(Wo);p(Xt.$$.fragment,Aa),Aa.forEach(t),W.forEach(t),is=s(e),p(Yt.$$.fragment,e),ds=s(e),U=d(e,"DIV",{class:!0});var ne=k(U);p(At.$$.fragment,ne),xr=s(ne),Vo=d(ne,"P",{"data-svelte-h":!0}),c(Vo)!=="svelte-h20f9h"&&(Vo.textContent=Pa),kr=s(ne),Zo=d(ne,"P",{"data-svelte-h":!0}),c(Zo)!=="svelte-1eppw0r"&&(Zo.innerHTML=ja),Mr=s(ne),Eo=d(ne,"P",{"data-svelte-h":!0}),c(Eo)!=="svelte-1icaz7y"&&(Eo.textContent=Ga),wr=s(ne),ze=d(ne,"DIV",{class:!0});var ks=k(ze);p(Qt.$$.fragment,ks),Sr=s(ks),Do=d(ks,"P",{"data-svelte-h":!0}),c(Do)!=="svelte-1a6wgfx"&&(Do.textContent=Ja),ks.forEach(t),ne.forEach(t),ls=s(e),p(Kt.$$.fragment,e),cs=s(e),G=d(e,"DIV",{class:!0});var Ie=k(G);p(eo.$$.fragment,Ie),$r=s(Ie),Ro=d(Ie,"P",{"data-svelte-h":!0}),c(Ro)!=="svelte-137g986"&&(Ro.textContent=Ha),zr=s(Ie),Oo=d(Ie,"P",{"data-svelte-h":!0}),c(Oo)!=="svelte-1kw0slt"&&(Oo.innerHTML=Wa),Cr=s(Ie),Ce=d(Ie,"DIV",{class:!0});var Ms=k(Ce);p(to.$$.fragment,Ms),Fr=s(Ms),Bo=d(Ms,"P",{"data-svelte-h":!0}),c(Bo)!=="svelte-phu79r"&&(Bo.innerHTML=Va),Ms.forEach(t),Ie.forEach(t),ms=s(e),p(oo.$$.fragment,e),ps=s(e),J=d(e,"DIV",{class:!0});var Ne=k(J);p(no.$$.fragment,Ne),qr=s(Ne),Xo=d(Ne,"P",{"data-svelte-h":!0}),c(Xo)!=="svelte-17y5cun"&&(Xo.innerHTML=Za),Lr=s(Ne),Yo=d(Ne,"P",{"data-svelte-h":!0}),c(Yo)!=="svelte-hswkmf"&&(Yo.innerHTML=Ea),Ur=s(Ne),Ao=d(Ne,"DIV",{class:!0});var Qa=k(Ao);p(so.$$.fragment,Qa),Qa.forEach(t),Ne.forEach(t),fs=s(e),p(ro.$$.fragment,e),hs=s(e),se=d(e,"DIV",{class:!0});var ws=k(se);p(ao.$$.fragment,ws),Ir=s(ws),Fe=d(ws,"DIV",{class:!0});var Ss=k(Fe);p(io.$$.fragment,Ss),Nr=s(Ss),Qo=d(Ss,"P",{"data-svelte-h":!0}),c(Qo)!=="svelte-qef8w5"&&(Qo.textContent=Da),Ss.forEach(t),ws.forEach(t),gs=s(e),p(lo.$$.fragment,e),us=s(e),re=d(e,"DIV",{class:!0});var $s=k(re);p(co.$$.fragment,$s),Pr=s($s),Ko=d($s,"P",{"data-svelte-h":!0}),c(Ko)!=="svelte-1dvnsz8"&&(Ko.innerHTML=Ra),$s.forEach(t),_s=s(e),p(mo.$$.fragment,e),Ts=s(e),D=d(e,"DIV",{class:!0});var nn=k(D);p(po.$$.fragment,nn),jr=s(nn),en=d(nn,"P",{"data-svelte-h":!0}),c(en)!=="svelte-82v1ej"&&(en.innerHTML=Oa),Gr=s(nn),oe=d(nn,"DIV",{class:!0});var sn=k(oe);p(fo.$$.fragment,sn),Jr=s(sn),tn=d(sn,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-njdqn4"&&(tn.innerHTML=Ba),Hr=s(sn),p(qe.$$.fragment,sn),sn.forEach(t),nn.forEach(t),bs=s(e),rn=d(e,"P",{}),k(rn).forEach(t),this.h()},h(){M(l,"name","hf:doc:metadata"),M(l,"content",ui),M(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){a(document.head,l),r(e,x,o),r(e,T,o),r(e,b,o),f(w,e,o),r(e,_,o),f(y,e,o),r(e,I,o),r(e,v,o),r(e,an,o),r(e,je,o),r(e,dn,o),r(e,Ge,o),r(e,ln,o),r(e,Je,o),r(e,cn,o),r(e,He,o),r(e,mn,o),r(e,We,o),r(e,pn,o),r(e,Ve,o),r(e,fn,o),f(Ze,e,o),r(e,hn,o),r(e,Ee,o),r(e,gn,o),f(De,e,o),r(e,un,o),r(e,Re,o),r(e,_n,o),r(e,Oe,o),r(e,Tn,o),f(Be,e,o),r(e,bn,o),f(Xe,e,o),r(e,vn,o),r(e,Ye,o),r(e,yn,o),f(Ae,e,o),r(e,xn,o),r(e,Qe,o),r(e,kn,o),f(Ke,e,o),r(e,Mn,o),r(e,et,o),r(e,wn,o),f(tt,e,o),r(e,Sn,o),f(ot,e,o),r(e,$n,o),f(nt,e,o),r(e,zn,o),r(e,st,o),r(e,Cn,o),f(rt,e,o),r(e,Fn,o),r(e,at,o),r(e,qn,o),f(it,e,o),r(e,Ln,o),r(e,dt,o),r(e,Un,o),f(lt,e,o),r(e,In,o),r(e,ct,o),r(e,Nn,o),f(mt,e,o),r(e,Pn,o),r(e,pt,o),r(e,jn,o),f(ft,e,o),r(e,Gn,o),r(e,ht,o),r(e,Jn,o),f(gt,e,o),r(e,Hn,o),r(e,ut,o),r(e,Wn,o),r(e,_t,o),r(e,Vn,o),r(e,Tt,o),r(e,Zn,o),r(e,bt,o),r(e,En,o),r(e,vt,o),r(e,Dn,o),f(yt,e,o),r(e,Rn,o),r(e,V,o),f(xt,V,null),a(V,zs),a(V,ho),a(V,Cs),a(V,X),f(kt,X,null),a(X,Fs),a(X,go),a(X,qs),f(ue,X,null),r(e,On,o),f(Mt,e,o),r(e,Bn,o),r(e,Z,o),f(wt,Z,null),a(Z,Ls),a(Z,uo),a(Z,Us),a(Z,Y),f(St,Y,null),a(Y,Is),a(Y,_o),a(Y,Ns),f(_e,Y,null),r(e,Xn,o),f($t,e,o),r(e,Yn,o),r(e,E,o),f(zt,E,null),a(E,Ps),a(E,To),a(E,js),a(E,A),f(Ct,A,null),a(A,Gs),a(A,bo),a(A,Js),f(Te,A,null),r(e,An,o),f(Ft,e,o),r(e,Qn,o),r(e,N,o),f(qt,N,null),a(N,Hs),a(N,vo),a(N,Ws),a(N,Q),f(Lt,Q,null),a(Q,Vs),a(Q,yo),a(Q,Zs),f(be,Q,null),a(N,Es),a(N,K),f(Ut,K,null),a(K,Ds),a(K,xo),a(K,Rs),f(ve,K,null),r(e,Kn,o),f(It,e,o),r(e,es,o),r(e,P,o),f(Nt,P,null),a(P,Os),a(P,ko),a(P,Bs),a(P,ee),f(Pt,ee,null),a(ee,Xs),a(ee,Mo),a(ee,Ys),f(ye,ee,null),a(P,As),a(P,te),f(jt,te,null),a(te,Qs),a(te,wo),a(te,Ks),f(xe,te,null),r(e,ts,o),f(Gt,e,o),r(e,os,o),r(e,j,o),f(Jt,j,null),a(j,er),a(j,So),a(j,tr),a(j,$o),a(j,or),f(ke,j,null),r(e,ns,o),f(Ht,e,o),r(e,ss,o),r(e,$,o),f(Wt,$,null),a($,nr),a($,zo),a($,sr),a($,Co),a($,rr),a($,Fo),a($,ar),f(Me,$,null),a($,ir),a($,qo),f(Vt,qo,null),a($,dr),a($,H),f(Zt,H,null),a(H,lr),a(H,Lo),a(H,cr),a(H,Uo),a(H,mr),a(H,Io),a($,pr),a($,we),f(Et,we,null),a(we,fr),a(we,No),a($,hr),a($,Se),f(Dt,Se,null),a(Se,gr),a(Se,Po),a($,ur),a($,jo),f(Rt,jo,null),r(e,rs,o),f(Ot,e,o),r(e,as,o),r(e,L,o),f(Bt,L,null),a(L,_r),a(L,Go),a(L,Tr),a(L,Jo),a(L,br),a(L,Ho),a(L,vr),f($e,L,null),a(L,yr),a(L,Wo),f(Xt,Wo,null),r(e,is,o),f(Yt,e,o),r(e,ds,o),r(e,U,o),f(At,U,null),a(U,xr),a(U,Vo),a(U,kr),a(U,Zo),a(U,Mr),a(U,Eo),a(U,wr),a(U,ze),f(Qt,ze,null),a(ze,Sr),a(ze,Do),r(e,ls,o),f(Kt,e,o),r(e,cs,o),r(e,G,o),f(eo,G,null),a(G,$r),a(G,Ro),a(G,zr),a(G,Oo),a(G,Cr),a(G,Ce),f(to,Ce,null),a(Ce,Fr),a(Ce,Bo),r(e,ms,o),f(oo,e,o),r(e,ps,o),r(e,J,o),f(no,J,null),a(J,qr),a(J,Xo),a(J,Lr),a(J,Yo),a(J,Ur),a(J,Ao),f(so,Ao,null),r(e,fs,o),f(ro,e,o),r(e,hs,o),r(e,se,o),f(ao,se,null),a(se,Ir),a(se,Fe),f(io,Fe,null),a(Fe,Nr),a(Fe,Qo),r(e,gs,o),f(lo,e,o),r(e,us,o),r(e,re,o),f(co,re,null),a(re,Pr),a(re,Ko),r(e,_s,o),f(mo,e,o),r(e,Ts,o),r(e,D,o),f(po,D,null),a(D,jr),a(D,en),a(D,Gr),a(D,oe),f(fo,oe,null),a(oe,Jr),a(oe,tn),a(oe,Hr),f(qe,oe,null),r(e,bs,o),r(e,rn,o),vs=!0},p(e,[o]){const ae={};o&2&&(ae.$$scope={dirty:o,ctx:e}),ue.$set(ae);const ie={};o&2&&(ie.$$scope={dirty:o,ctx:e}),_e.$set(ie);const de={};o&2&&(de.$$scope={dirty:o,ctx:e}),Te.$set(de);const le={};o&2&&(le.$$scope={dirty:o,ctx:e}),be.$set(le);const ce={};o&2&&(ce.$$scope={dirty:o,ctx:e}),ve.$set(ce);const me={};o&2&&(me.$$scope={dirty:o,ctx:e}),ye.$set(me);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),xe.$set(R);const pe={};o&2&&(pe.$$scope={dirty:o,ctx:e}),ke.$set(pe);const fe={};o&2&&(fe.$$scope={dirty:o,ctx:e}),Me.$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){vs||(h(w.$$.fragment,e),h(y.$$.fragment,e),h(Ze.$$.fragment,e),h(De.$$.fragment,e),h(Be.$$.fragment,e),h(Xe.$$.fragment,e),h(Ae.$$.fragment,e),h(Ke.$$.fragment,e),h(tt.$$.fragment,e),h(ot.$$.fragment,e),h(nt.$$.fragment,e),h(rt.$$.fragment,e),h(it.$$.fragment,e),h(lt.$$.fragment,e),h(mt.$$.fragment,e),h(ft.$$.fragment,e),h(gt.$$.fragment,e),h(yt.$$.fragment,e),h(xt.$$.fragment,e),h(kt.$$.fragment,e),h(ue.$$.fragment,e),h(Mt.$$.fragment,e),h(wt.$$.fragment,e),h(St.$$.fragment,e),h(_e.$$.fragment,e),h($t.$$.fragment,e),h(zt.$$.fragment,e),h(Ct.$$.fragment,e),h(Te.$$.fragment,e),h(Ft.$$.fragment,e),h(qt.$$.fragment,e),h(Lt.$$.fragment,e),h(be.$$.fragment,e),h(Ut.$$.fragment,e),h(ve.$$.fragment,e),h(It.$$.fragment,e),h(Nt.$$.fragment,e),h(Pt.$$.fragment,e),h(ye.$$.fragment,e),h(jt.$$.fragment,e),h(xe.$$.fragment,e),h(Gt.$$.fragment,e),h(Jt.$$.fragment,e),h(ke.$$.fragment,e),h(Ht.$$.fragment,e),h(Wt.$$.fragment,e),h(Me.$$.fragment,e),h(Vt.$$.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($e.$$.fragment,e),h(Xt.$$.fragment,e),h(Yt.$$.fragment,e),h(At.$$.fragment,e),h(Qt.$$.fragment,e),h(Kt.$$.fragment,e),h(eo.$$.fragment,e),h(to.$$.fragment,e),h(oo.$$.fragment,e),h(no.$$.fragment,e),h(so.$$.fragment,e),h(ro.$$.fragment,e),h(ao.$$.fragment,e),h(io.$$.fragment,e),h(lo.$$.fragment,e),h(co.$$.fragment,e),h(mo.$$.fragment,e),h(po.$$.fragment,e),h(fo.$$.fragment,e),h(qe.$$.fragment,e),vs=!0)},o(e){g(w.$$.fragment,e),g(y.$$.fragment,e),g(Ze.$$.fragment,e),g(De.$$.fragment,e),g(Be.$$.fragment,e),g(Xe.$$.fragment,e),g(Ae.$$.fragment,e),g(Ke.$$.fragment,e),g(tt.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(rt.$$.fragment,e),g(it.$$.fragment,e),g(lt.$$.fragment,e),g(mt.$$.fragment,e),g(ft.$$.fragment,e),g(gt.$$.fragment,e),g(yt.$$.fragment,e),g(xt.$$.fragment,e),g(kt.$$.fragment,e),g(ue.$$.fragment,e),g(Mt.$$.fragment,e),g(wt.$$.fragment,e),g(St.$$.fragment,e),g(_e.$$.fragment,e),g($t.$$.fragment,e),g(zt.$$.fragment,e),g(Ct.$$.fragment,e),g(Te.$$.fragment,e),g(Ft.$$.fragment,e),g(qt.$$.fragment,e),g(Lt.$$.fragment,e),g(be.$$.fragment,e),g(Ut.$$.fragment,e),g(ve.$$.fragment,e),g(It.$$.fragment,e),g(Nt.$$.fragment,e),g(Pt.$$.fragment,e),g(ye.$$.fragment,e),g(jt.$$.fragment,e),g(xe.$$.fragment,e),g(Gt.$$.fragment,e),g(Jt.$$.fragment,e),g(ke.$$.fragment,e),g(Ht.$$.fragment,e),g(Wt.$$.fragment,e),g(Me.$$.fragment,e),g(Vt.$$.fragment,e),g(Zt.$$.fragment,e),g(Et.$$.fragment,e),g(Dt.$$.fragment,e),g(Rt.$$.fragment,e),g(Ot.$$.fragment,e),g(Bt.$$.fragment,e),g($e.$$.fragment,e),g(Xt.$$.fragment,e),g(Yt.$$.fragment,e),g(At.$$.fragment,e),g(Qt.$$.fragment,e),g(Kt.$$.fragment,e),g(eo.$$.fragment,e),g(to.$$.fragment,e),g(oo.$$.fragment,e),g(no.$$.fragment,e),g(so.$$.fragment,e),g(ro.$$.fragment,e),g(ao.$$.fragment,e),g(io.$$.fragment,e),g(lo.$$.fragment,e),g(co.$$.fragment,e),g(mo.$$.fragment,e),g(po.$$.fragment,e),g(fo.$$.fragment,e),g(qe.$$.fragment,e),vs=!1},d(e){e&&(t(x),t(T),t(b),t(_),t(I),t(v),t(an),t(je),t(dn),t(Ge),t(ln),t(Je),t(cn),t(He),t(mn),t(We),t(pn),t(Ve),t(fn),t(hn),t(Ee),t(gn),t(un),t(Re),t(_n),t(Oe),t(Tn),t(bn),t(vn),t(Ye),t(yn),t(xn),t(Qe),t(kn),t(Mn),t(et),t(wn),t(Sn),t($n),t(zn),t(st),t(Cn),t(Fn),t(at),t(qn),t(Ln),t(dt),t(Un),t(In),t(ct),t(Nn),t(Pn),t(pt),t(jn),t(Gn),t(ht),t(Jn),t(Hn),t(ut),t(Wn),t(_t),t(Vn),t(Tt),t(Zn),t(bt),t(En),t(vt),t(Dn),t(Rn),t(V),t(On),t(Bn),t(Z),t(Xn),t(Yn),t(E),t(An),t(Qn),t(N),t(Kn),t(es),t(P),t(ts),t(os),t(j),t(ns),t(ss),t($),t(rs),t(as),t(L),t(is),t(ds),t(U),t(ls),t(cs),t(G),t(ms),t(ps),t(J),t(fs),t(hs),t(se),t(gs),t(us),t(re),t(_s),t(Ts),t(D),t(bs),t(rn)),t(l),u(w,e),u(y,e),u(Ze,e),u(De,e),u(Be,e),u(Xe,e),u(Ae,e),u(Ke,e),u(tt,e),u(ot,e),u(nt,e),u(rt,e),u(it,e),u(lt,e),u(mt,e),u(ft,e),u(gt,e),u(yt,e),u(xt),u(kt),u(ue),u(Mt,e),u(wt),u(St),u(_e),u($t,e),u(zt),u(Ct),u(Te),u(Ft,e),u(qt),u(Lt),u(be),u(Ut),u(ve),u(It,e),u(Nt),u(Pt),u(ye),u(jt),u(xe),u(Gt,e),u(Jt),u(ke),u(Ht,e),u(Wt),u(Me),u(Vt),u(Zt),u(Et),u(Dt),u(Rt),u(Ot,e),u(Bt),u($e),u(Xt),u(Yt,e),u(At),u(Qt),u(Kt,e),u(eo),u(to),u(oo,e),u(no),u(so),u(ro,e),u(ao),u(io),u(lo,e),u(co),u(mo,e),u(po),u(fo),u(qe)}}}const ui='{"title":"SeamlessM4T","local":"seamlessm4t","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage","local":"usage","sections":[{"title":"Speech","local":"speech","sections":[],"depth":3},{"title":"Text","local":"text","sections":[],"depth":3},{"title":"Tips","local":"tips","sections":[{"title":"1. Use dedicated models","local":"1-use-dedicated-models","sections":[],"depth":4},{"title":"2. Change the speaker identity","local":"2-change-the-speaker-identity","sections":[],"depth":4},{"title":"3. Change the generation strategy","local":"3-change-the-generation-strategy","sections":[],"depth":4},{"title":"4. Generate speech and text at the same time","local":"4-generate-speech-and-text-at-the-same-time","sections":[],"depth":4}],"depth":3}],"depth":2},{"title":"Model architecture","local":"model-architecture","sections":[],"depth":2},{"title":"SeamlessM4TModel","local":"transformers.SeamlessM4TModel","sections":[],"depth":2},{"title":"SeamlessM4TForTextToSpeech","local":"transformers.SeamlessM4TForTextToSpeech","sections":[],"depth":2},{"title":"SeamlessM4TForSpeechToSpeech","local":"transformers.SeamlessM4TForSpeechToSpeech","sections":[],"depth":2},{"title":"SeamlessM4TForTextToText","local":"transformers.SeamlessM4TForTextToText","sections":[],"depth":2},{"title":"SeamlessM4TForSpeechToText","local":"transformers.SeamlessM4TForSpeechToText","sections":[],"depth":2},{"title":"SeamlessM4TConfig","local":"transformers.SeamlessM4TConfig","sections":[],"depth":2},{"title":"SeamlessM4TTokenizer","local":"transformers.SeamlessM4TTokenizer","sections":[],"depth":2},{"title":"SeamlessM4TTokenizerFast","local":"transformers.SeamlessM4TTokenizerFast","sections":[],"depth":2},{"title":"SeamlessM4TFeatureExtractor","local":"transformers.SeamlessM4TFeatureExtractor","sections":[],"depth":2},{"title":"SeamlessM4TProcessor","local":"transformers.SeamlessM4TProcessor","sections":[],"depth":2},{"title":"SeamlessM4TCodeHifiGan","local":"transformers.SeamlessM4TCodeHifiGan","sections":[],"depth":2},{"title":"SeamlessM4THifiGan","local":"transformers.SeamlessM4THifiGan","sections":[],"depth":2},{"title":"SeamlessM4TTextToUnitModel","local":"transformers.SeamlessM4TTextToUnitModel","sections":[],"depth":2},{"title":"SeamlessM4TTextToUnitForConditionalGeneration","local":"transformers.SeamlessM4TTextToUnitForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function _i(C){return ei(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wi extends ti{constructor(l){super(),oi(this,l,_i,gi,Ka,{})}}export{wi as component};
