import{s as Ts,o as vs,n as de}from"../chunks/scheduler.25b97de1.js";import{S as bs,i as xs,g as r,s,r as h,A as Ms,h as i,f as o,c as a,j as $,u as f,x as l,k as C,y as m,a as n,v as u,d as _,t as g,w as T}from"../chunks/index.d9030fc9.js";import{T as yt}from"../chunks/Tip.baa67368.js";import{D as q}from"../chunks/Docstring.ffac8efa.js";import{C as wt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ys}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as w,E as ws}from"../chunks/EditOnGithub.91d95064.js";function ks(S){let d,M=`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.`,c,p,y=`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.`,b,x,z=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){d=r("p"),d.innerHTML=M,c=s(),p=r("p"),p.innerHTML=y,b=s(),x=r("p"),x.innerHTML=z},l(v){d=i(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-p3kc7q"&&(d.innerHTML=M),c=a(v),p=i(v,"P",{"data-svelte-h":!0}),l(p)!=="svelte-x1gqs1"&&(p.innerHTML=y),b=a(v),x=i(v,"P",{"data-svelte-h":!0}),l(x)!=="svelte-nzkxpe"&&(x.innerHTML=z)},m(v,k){n(v,d,k),n(v,c,k),n(v,p,k),n(v,b,k),n(v,x,k)},p:de,d(v){v&&(o(d),o(c),o(p),o(b),o(x))}}}function Ss(S){let d,M=`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.`,c,p,y=`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.`,b,x,z=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){d=r("p"),d.innerHTML=M,c=s(),p=r("p"),p.innerHTML=y,b=s(),x=r("p"),x.innerHTML=z},l(v){d=i(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-p3kc7q"&&(d.innerHTML=M),c=a(v),p=i(v,"P",{"data-svelte-h":!0}),l(p)!=="svelte-f4qe4d"&&(p.innerHTML=y),b=a(v),x=i(v,"P",{"data-svelte-h":!0}),l(x)!=="svelte-nzkxpe"&&(x.innerHTML=z)},m(v,k){n(v,d,k),n(v,c,k),n(v,p,k),n(v,b,k),n(v,x,k)},p:de,d(v){v&&(o(d),o(c),o(p),o(b),o(x))}}}function $s(S){let d,M=`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.`,c,p,y=`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.`,b,x,z=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){d=r("p"),d.innerHTML=M,c=s(),p=r("p"),p.innerHTML=y,b=s(),x=r("p"),x.innerHTML=z},l(v){d=i(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-p3kc7q"&&(d.innerHTML=M),c=a(v),p=i(v,"P",{"data-svelte-h":!0}),l(p)!=="svelte-v2xo2a"&&(p.innerHTML=y),b=a(v),x=i(v,"P",{"data-svelte-h":!0}),l(x)!=="svelte-nzkxpe"&&(x.innerHTML=z)},m(v,k){n(v,d,k),n(v,c,k),n(v,p,k),n(v,b,k),n(v,x,k)},p:de,d(v){v&&(o(d),o(c),o(p),o(b),o(x))}}}function Cs(S){let d,M=`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(){d=r("p"),d.innerHTML=M},l(c){d=i(c,"P",{"data-svelte-h":!0}),l(d)!=="svelte-fincs2"&&(d.innerHTML=M)},m(c,p){n(c,d,p)},p:de,d(c){c&&o(d)}}}function zs(S){let d,M=`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>.`,c,p,y=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){d=r("p"),d.innerHTML=M,c=s(),p=r("p"),p.innerHTML=y},l(b){d=i(b,"P",{"data-svelte-h":!0}),l(d)!=="svelte-1c5u34l"&&(d.innerHTML=M),c=a(b),p=i(b,"P",{"data-svelte-h":!0}),l(p)!=="svelte-nzkxpe"&&(p.innerHTML=y)},m(b,x){n(b,d,x),n(b,c,x),n(b,p,x)},p:de,d(b){b&&(o(d),o(c),o(p))}}}function Fs(S){let d,M=`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(){d=r("p"),d.innerHTML=M},l(c){d=i(c,"P",{"data-svelte-h":!0}),l(d)!=="svelte-fincs2"&&(d.innerHTML=M)},m(c,p){n(c,d,p)},p:de,d(c){c&&o(d)}}}function js(S){let d,M=`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>.`,c,p,y=`For an overview of generation strategies and code examples, check out the <a href="./generation_strategies">following
guide</a>.`;return{c(){d=r("p"),d.innerHTML=M,c=s(),p=r("p"),p.innerHTML=y},l(b){d=i(b,"P",{"data-svelte-h":!0}),l(d)!=="svelte-1c5u34l"&&(d.innerHTML=M),c=a(b),p=i(b,"P",{"data-svelte-h":!0}),l(p)!=="svelte-nzkxpe"&&(p.innerHTML=y)},m(b,x){n(b,d,x),n(b,c,x),n(b,p,x)},p:de,d(b){b&&(o(d),o(c),o(p))}}}function Is(S){let d,M;return d=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUdjJNb2RlbCUyQyUyMFNlYW1sZXNzTTRUdjJDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwU2VhbWxlc3NNNFR2MiUyMCUyMiUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTZWFtbGVzc000VHYyQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwJTIyJTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBTZWFtbGVzc000VHYyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4Tv2Model, SeamlessM4Tv2Config

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SeamlessM4Tv2 &quot;&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SeamlessM4Tv2Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the &quot;&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4Tv2Model(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(){h(d.$$.fragment)},l(c){f(d.$$.fragment,c)},m(c,p){u(d,c,p),M=!0},p:de,i(c){M||(_(d.$$.fragment,c),M=!0)},o(c){g(d.$$.fragment,c),M=!1},d(c){T(d,c)}}}function qs(S){let d,M,c,p,y,b,x,z,v,k='The SeamlessM4T-v2 model was proposed in <a href="https://ai.meta.com/research/publications/seamless-multilingual-expressive-and-streaming-speech-translation/" rel="nofollow">Seamless: Multilingual Expressive and Streaming Speech Translation</a> by the Seamless Communication team from Meta AI.',Rt,le,zn='SeamlessM4T-v2 is a collection of models designed to provide high quality translation, allowing people from different linguistic communities to communicate effortlessly through speech and text. It is an improvement on the <a href="https://huggingface.co/docs/transformers/main/model_doc/seamless_m4t" rel="nofollow">previous version</a>. For more details on the differences between v1 and v2, refer to section <a href="#difference-with-seamlessm4t-v1">Difference with SeamlessM4T-v1</a>.',Dt,ce,Fn="SeamlessM4T-v2 enables multiple tasks without relying on separate models:",Et,me,jn="<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>",Vt,pe,In='<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">SeamlessM4Tv2Model</a> can perform all the above tasks, but each task also has its own dedicated sub-model.',Ot,he,qn="The abstract from the paper is the following:",Bt,fe,Un="<em>Recent advancements in automatic speech translation have dramatically expanded language coverage, improved multimodal capabilities, and enabled a wide range of tasks and functionalities. That said, large-scale automatic speech translation systems today lack key features that help machine-mediated communication feel seamless when compared to human-to-human dialogue. In this work, we introduce a family of models that enable end-to-end expressive and multilingual translations in a streaming fashion. First, we contribute an improved version of the massively multilingual and multimodal SeamlessM4T model—SeamlessM4T v2. This newer model, incorporating an updated UnitY2 framework, was trained on more low-resource language data. The expanded version of SeamlessAlign adds 114,800 hours of automatically aligned data for a total of 76 languages. SeamlessM4T v2 provides the foundation on which our two newest models, SeamlessExpressive and SeamlessStreaming, are initiated. SeamlessExpressive enables translation that preserves vocal styles and prosody. Compared to previous efforts in expressive speech research, our work addresses certain underexplored aspects of prosody, such as speech rate and pauses, while also preserving the style of one’s voice. As for SeamlessStreaming, our model leverages the Efficient Monotonic Multihead Attention (EMMA) mechanism to generate low-latency target translations without waiting for complete source utterances. As the first of its kind, SeamlessStreaming enables simultaneous speech-to-speech/text translation for multiple source and target languages. To understand the performance of these models, we combined novel and modified versions of existing automatic metrics to evaluate prosody, latency, and robustness. For human evaluations, we adapted existing protocols tailored for measuring the most relevant attributes in the preservation of meaning, naturalness, and expressivity. To ensure that our models can be used safely and responsibly, we implemented the first known red-teaming effort for multimodal machine translation, a system for the detection and mitigation of added toxicity, a systematic evaluation of gender bias, and an inaudible localized watermarking mechanism designed to dampen the impact of deepfakes. Consequently, we bring major components from SeamlessExpressive and SeamlessStreaming together to form Seamless, the first publicly available system that unlocks expressive cross-lingual communication in real-time. In sum, Seamless gives us a pivotal look at the technical foundation needed to turn the Universal Speech Translator from a science fiction concept into a real-world technology. Finally, contributions in this work—including models, code, and a watermark detector—are publicly released and accessible at the link below.</em>",Xt,ue,Yt,_e,Ln="In the following example, we’ll load an Arabic audio sample and an English text sample and convert them into Russian speech and French text.",At,ge,Nn="First, load the processor and a checkpoint of the model:",Qt,Te,Kt,ve,Hn="You can seamlessly use this model on text or on audio, to generated either translated text or translated audio.",eo,be,Jn="Here is how to use the processor to process text and audio:",to,xe,oo,Me,no,ye,Pn='<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">SeamlessM4Tv2Model</a> can <em>seamlessly</em> generate text or speech with few or no changes. Let’s target Russian voice translation:',so,we,ao,ke,Wn="With basically the same code, I’ve translated English text and Arabic speech to Russian speech samples.",ro,Se,io,$e,Zn=`Similarly, you can generate translated text from audio files or from text with the same model. You only have to pass <code>generate_speech=False</code> to <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model.generate">SeamlessM4Tv2Model.generate()</a>.
This time, let’s translate to French.`,lo,Ce,co,ze,mo,Fe,po,je,Gn=`<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">SeamlessM4Tv2Model</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:`,ho,Ie,fo,qe,Rn="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>.",uo,Ue,_o,Le,Dn='Feel free to try out <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForSpeechToText">SeamlessM4Tv2ForSpeechToText</a> and <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToSpeech">SeamlessM4Tv2ForTextToSpeech</a> as well.',go,Ne,To,He,En="You have the possibility to change the speaker used for speech synthesis with the <code>speaker_id</code> argument. Some <code>speaker_id</code> works better than other for some languages!",vo,Je,bo,Pe,Vn='You can use different <a href="../generation_strategies">generation strategies</a> for text generation, e.g <code>.generate(input_ids=input_ids, text_num_beams=4, text_do_sample=True)</code> which will perform multinomial beam-search decoding on the text model. Note that speech generation only supports greedy - by default - or multinomial sampling, which can be used with e.g. <code>.generate(..., speech_do_sample=True, speech_temperature=0.6)</code>.',xo,We,Mo,Ze,On='Use <code>return_intermediate_token_ids=True</code> with <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">SeamlessM4Tv2Model</a> to return both speech and text !',yo,Ge,wo,Re,Bn="SeamlessM4T-v2 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.",ko,De,Xn='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.',So,Ee,$o,Ve,Yn="The architecture of this new version differs from the first in a few aspects:",Co,Oe,zo,Be,An="The second seq2seq model, named text-to-unit model, is now non-auto regressive, meaning that it computes units in a <strong>single forward pass</strong>. This achievement is made possible by:",Fo,Xe,Qn="<li>the use of <strong>character-level embeddings</strong>, meaning that each character of the predicted translated text has its own embeddings, which are then used to predict the unit tokens.</li> <li>the use of an intermediate duration predictor, that predicts speech duration at the <strong>character-level</strong> on the predicted translated text.</li> <li>the use of a new text-to-unit decoder mixing convolutions and self-attention to handle longer context.</li>",jo,Ye,Io,Ae,Kn="The speech encoder, which is used during the first-pass generation process to predict the translated text, differs mainly from the previous speech encoder through these mechanisms:",qo,Qe,es='<li>the use of chunked attention mask to prevent attention across chunks, ensuring that each position attends only to positions within its own chunk and a fixed number of previous chunks.</li> <li>the use of relative position embeddings which only considers distance between sequence elements rather than absolute positions. Please refer to <a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attentionwith Relative Position Representations (Shaw et al.)</a> for more details.</li> <li>the use of a causal depth-wise convolution instead of a non-causal one.</li>',Uo,Ke,Lo,et,ts="Here’s how the generation process works:",No,tt,os="<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, generates unit tokens in an non auto-regressive way.</li> <li>These unit tokens are then passed through the final vocoder to produce the actual speech.</li>",Ho,ot,ns='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>.',Jo,nt,Po,U,st,Ko,kt,ss=`The original SeamlessM4Tv2 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.`,en,J,at,tn,St,as="Generates translated token ids and/or translated audio waveforms.",on,Q,Wo,rt,Zo,L,it,nn,$t,rs=`The text-to-speech SeamlessM4Tv2 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.`,sn,P,dt,an,Ct,is="Generates translated audio waveforms.",rn,K,Go,lt,Ro,N,ct,dn,zt,ds=`The speech-to-speech SeamlessM4Tv2 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.`,ln,W,mt,cn,Ft,ls="Generates translated audio waveforms.",mn,ee,Do,pt,Eo,F,ht,pn,jt,cs=`The text-to-text SeamlessM4Tv2 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.`,hn,Z,ft,fn,It,ms='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToText">SeamlessM4Tv2ForTextToText</a> forward method, overrides the <code>__call__</code> special method.',un,te,_n,G,ut,gn,qt,ps="Generates sequences of token ids.",Tn,oe,Vo,_t,Oo,j,gt,vn,Ut,hs=`The speech-to-text SeamlessM4Tv2 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.`,bn,R,Tt,xn,Lt,fs='The <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForSpeechToText">SeamlessM4Tv2ForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',Mn,ne,yn,D,vt,wn,Nt,us="Generates sequences of token ids.",kn,se,Bo,bt,Xo,I,xt,Sn,Ht,_s=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">~SeamlessM4Tv2Model</a>. It is used to instantiate
an SeamlessM4Tv2 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 SeamlessM4Tv2
<a href="https://huggingface.co/%22%22" rel="nofollow">&quot;&quot;</a> architecture.`,$n,Jt,gs=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Cn,ae,Yo,Mt,Ao,Gt,Qo;return y=new w({props:{title:"SeamlessM4T-v2",local:"seamlessm4t-v2",headingTag:"h1"}}),x=new w({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ue=new w({props:{title:"Usage",local:"usage",headingTag:"h2"}}),Te=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTZWFtbGVzc000VHYyTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnNlYW1sZXNzLW00dC12Mi1sYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMFNlYW1sZXNzTTRUdjJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzZWFtbGVzcy1tNHQtdjItbGFyZ2UlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SeamlessM4Tv2Model

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/seamless-m4t-v2-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4Tv2Model.from_pretrained(<span class="hljs-string">&quot;facebook/seamless-m4t-v2-large&quot;</span>)`,wrap:!1}}),xe=new wt({props:{code:"JTIzJTIwbGV0J3MlMjBsb2FkJTIwYW4lMjBhdWRpbyUyMHNhbXBsZSUyMGZyb20lMjBhbiUyMEFyYWJpYyUyMHNwZWVjaCUyMGNvcnB1cyUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXJhYmljX3NwZWVjaF9jb3JwdXMlMjIlMkMlMjBzcGxpdCUzRCUyMnRlc3QlMjIlMkMlMjBzdHJlYW1pbmclM0RUcnVlKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMG5leHQoaXRlcihkYXRhc2V0KSklNUIlMjJhdWRpbyUyMiU1RCUwQSUwQSUyMyUyMG5vdyUyQyUyMHByb2Nlc3MlMjBpdCUwQWF1ZGlvX2lucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpb3MlM0RhdWRpb19zYW1wbGUlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwbm93JTJDJTIwcHJvY2VzcyUyMHNvbWUlMjBFbmdsaXNoJTIwdGV4dCUyMGFzJTIwd2VsbCUwQXRleHRfaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlMjAlM0QlMjAlMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwc3JjX2xhbmclM0QlMjJlbmclMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",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 text 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}}),Me=new w({props:{title:"Speech",local:"speech",headingTag:"h3"}}),we=new wt({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}}),Se=new w({props:{title:"Text",local:"text",headingTag:"h3"}}),Ce=new wt({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}}),ze=new w({props:{title:"Tips",local:"tips",headingTag:"h3"}}),Fe=new w({props:{title:"1. Use dedicated models",local:"1-use-dedicated-models",headingTag:"h4"}}),Ie=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUdjJGb3JTcGVlY2hUb1NwZWVjaCUwQW1vZGVsJTIwJTNEJTIwU2VhbWxlc3NNNFR2MkZvclNwZWVjaFRvU3BlZWNoLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnNlYW1sZXNzLW00dC12Mi1sYXJnZSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4Tv2ForSpeechToSpeech
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4Tv2ForSpeechToSpeech.from_pretrained(<span class="hljs-string">&quot;facebook/seamless-m4t-v2-large&quot;</span>)`,wrap:!1}}),Ue=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlYW1sZXNzTTRUdjJGb3JUZXh0VG9UZXh0JTBBbW9kZWwlMjAlM0QlMjBTZWFtbGVzc000VHYyRm9yVGV4dFRvVGV4dC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzZWFtbGVzcy1tNHQtdjItbGFyZ2UlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SeamlessM4Tv2ForTextToText
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SeamlessM4Tv2ForTextToText.from_pretrained(<span class="hljs-string">&quot;facebook/seamless-m4t-v2-large&quot;</span>)`,wrap:!1}}),Ne=new w({props:{title:"2. Change the speaker identity",local:"2-change-the-speaker-identity",headingTag:"h4"}}),Je=new w({props:{title:"3. Change the generation strategy",local:"3-change-the-generation-strategy",headingTag:"h4"}}),We=new w({props:{title:"4. Generate speech and text at the same time",local:"4-generate-speech-and-text-at-the-same-time",headingTag:"h4"}}),Ge=new w({props:{title:"Model architecture",local:"model-architecture",headingTag:"h2"}}),Ee=new w({props:{title:"Difference with SeamlessM4T-v1",local:"difference-with-seamlessm4t-v1",headingTag:"h3"}}),Oe=new w({props:{title:"Improvements on the second-pass model",local:"improvements-on-the-second-pass-model",headingTag:"h4"}}),Ye=new w({props:{title:"Difference in the speech encoder",local:"difference-in-the-speech-encoder",headingTag:"h4"}}),Ke=new w({props:{title:"Generation process",local:"generation-process",headingTag:"h3"}}),nt=new w({props:{title:"SeamlessM4Tv2Model",local:"transformers.SeamlessM4Tv2Model",headingTag:"h2"}}),st=new q({props:{name:"class transformers.SeamlessM4Tv2Model",anchor:"transformers.SeamlessM4Tv2Model",parameters:[{name:"config",val:""},{name:"current_modality",val:" = 'text'"}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Config">~SeamlessM4Tv2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.SeamlessM4Tv2Model.current_modality",description:`<strong>current_modality</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;text&quot;</code>) &#x2014;
Default modality. Used only to initialize the model. It can be set to <code>&quot;text&quot;</code> or <code>&quot;speech&quot;</code>.
This will be updated automatically according to the modality passed to the forward and generate passes (<code>input_ids</code> for text and <code>input_features</code> for audio).`,name:"current_modality"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L4297"}}),at=new q({props:{name:"generate",anchor:"transformers.SeamlessM4Tv2Model.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"speaker_id",val:": Optional = 0"},{name:"generate_speech",val:": Optional = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2Model.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4Tv2Model.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>, <em>optional</em>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4Tv2Model.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.SeamlessM4Tv2Model.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.SeamlessM4Tv2Model.generate.speaker_id",description:`<strong>speaker_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:"speaker_id"},{anchor:"transformers.SeamlessM4Tv2Model.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.SeamlessM4Tv2Model.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictioy of keyword arguments that will be passed to <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L4521",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>SeamlessM4Tv2GenerationOutput</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[SeamlessM4Tv2GenerationOutput, Tuple[Tensor], ModelOutput]</code></p>
`}}),Q=new yt({props:{$$slots:{default:[ks]},$$scope:{ctx:S}}}),rt=new w({props:{title:"SeamlessM4Tv2ForTextToSpeech",local:"transformers.SeamlessM4Tv2ForTextToSpeech",headingTag:"h2"}}),it=new q({props:{name:"class transformers.SeamlessM4Tv2ForTextToSpeech",anchor:"transformers.SeamlessM4Tv2ForTextToSpeech",parameters:[{name:"config",val:": SeamlessM4Tv2Config"}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForTextToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Config">~SeamlessM4Tv2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3500"}}),dt=new q({props:{name:"generate",anchor:"transformers.SeamlessM4Tv2ForTextToSpeech.generate",parameters:[{name:"input_ids",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"speaker_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForTextToSpeech.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4Tv2ForTextToSpeech.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.SeamlessM4Tv2ForTextToSpeech.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.SeamlessM4Tv2ForTextToSpeech.generate.speaker_id",description:`<strong>speaker_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:"speaker_id"},{anchor:"transformers.SeamlessM4Tv2ForTextToSpeech.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3661",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>return_intermediate_token_ids</code>, returns <code>SeamlessM4Tv2GenerationOutput</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[SeamlessM4Tv2GenerationOutput, Tuple[Tensor]]</code></p>
`}}),K=new yt({props:{$$slots:{default:[Ss]},$$scope:{ctx:S}}}),lt=new w({props:{title:"SeamlessM4Tv2ForSpeechToSpeech",local:"transformers.SeamlessM4Tv2ForSpeechToSpeech",headingTag:"h2"}}),ct=new q({props:{name:"class transformers.SeamlessM4Tv2ForSpeechToSpeech",anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Config">~SeamlessM4Tv2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3894"}}),mt=new q({props:{name:"generate",anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech.generate",parameters:[{name:"input_features",val:": Optional = None"},{name:"return_intermediate_token_ids",val:": Optional = None"},{name:"tgt_lang",val:": Optional = None"},{name:"speaker_id",val:": Optional = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech.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.SeamlessM4Tv2ForSpeechToSpeech.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.SeamlessM4Tv2ForSpeechToSpeech.generate.speaker_id",description:`<strong>speaker_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:"speaker_id"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToSpeech.generate.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate">GenerationMixin.generate()</a>. Keyword
arguments are of two types:</p>
<ul>
<li>Without a prefix, they will be entered as <code>**kwargs</code> for the <code>generate</code> method of each sub-model,
except for <code>decoder_input_ids</code> which will only be passed through the text components.</li>
<li>With a <em>text_</em> or <em>speech_</em> prefix, they will be input for the <code>generate</code> method of the
text model and speech model respectively. It has the priority over the keywords without a prefix.</li>
</ul>
<p>This means you can, for example, specify a generation strategy for one generation but not for the
other.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L4058",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>return_intermediate_token_ids</code>, returns <code>SeamlessM4Tv2GenerationOutput</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[SeamlessM4Tv2GenerationOutput, Tuple[Tensor]]</code></p>
`}}),ee=new yt({props:{$$slots:{default:[$s]},$$scope:{ctx:S}}}),pt=new w({props:{title:"SeamlessM4Tv2ForTextToText",local:"transformers.SeamlessM4Tv2ForTextToText",headingTag:"h2"}}),ht=new q({props:{name:"class transformers.SeamlessM4Tv2ForTextToText",anchor:"transformers.SeamlessM4Tv2ForTextToText",parameters:[{name:"config",val:": SeamlessM4Tv2Config"}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForTextToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Config">~SeamlessM4Tv2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L2910"}}),ft=new q({props:{name:"forward",anchor:"transformers.SeamlessM4Tv2ForTextToText.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForTextToText.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L2963"}}),te=new yt({props:{$$slots:{default:[Cs]},$$scope:{ctx:S}}}),ut=new q({props:{name:"generate",anchor:"transformers.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of varying shape depending on the modality, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TTokenizer">SeamlessM4TTokenizer</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a>. See
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>&#x2019;s
default values, whose documentation should be checked to parameterize generation.`,name:"generation_config"},{anchor:"transformers.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.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.SeamlessM4Tv2ForTextToText.generate.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Ad hoc parametrization of <code>generate_config</code> and/or additional model-specific kwargs that will be
forwarded to the <code>forward</code> function of the model.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3055",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),oe=new yt({props:{warning:!0,$$slots:{default:[zs]},$$scope:{ctx:S}}}),_t=new w({props:{title:"SeamlessM4Tv2ForSpeechToText",local:"transformers.SeamlessM4Tv2ForSpeechToText",headingTag:"h2"}}),gt=new q({props:{name:"class transformers.SeamlessM4Tv2ForSpeechToText",anchor:"transformers.SeamlessM4Tv2ForSpeechToText",parameters:[{name:"config",val:": SeamlessM4Tv2Config"}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Config">~SeamlessM4Tv2Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3198"}}),Tt=new q({props:{name:"forward",anchor:"transformers.SeamlessM4Tv2ForSpeechToText.forward",parameters:[{name:"input_features",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"decoder_inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Bart uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code>
is used, optionally only the last <code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3253"}}),ne=new yt({props:{$$slots:{default:[Fs]},$$scope:{ctx:S}}}),vt=new q({props:{name:"generate",anchor:"transformers.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_banks)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> class or the
<a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TProcessor">SeamlessM4TProcessor</a> class. See <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__">SeamlessM4TFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>&#x2019;s
default values, whose documentation should be checked to parameterize generation.`,name:"generation_config"},{anchor:"transformers.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.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.SeamlessM4Tv2ForSpeechToText.generate.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Ad hoc parametrization of <code>generate_config</code> and/or additional model-specific kwargs that will be
forwarded to the <code>forward</code> function of the model.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py#L3354",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),se=new yt({props:{warning:!0,$$slots:{default:[js]},$$scope:{ctx:S}}}),bt=new w({props:{title:"SeamlessM4Tv2Config",local:"transformers.SeamlessM4Tv2Config",headingTag:"h2"}}),xt=new q({props:{name:"class transformers.SeamlessM4Tv2Config",anchor:"transformers.SeamlessM4Tv2Config",parameters:[{name:"vocab_size",val:" = 256102"},{name:"t2u_vocab_size",val:" = 10082"},{name:"char_vocab_size",val:" = 10943"},{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:" = 4096"},{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:"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_key'"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"left_max_position_embeddings",val:" = 64"},{name:"right_max_position_embeddings",val:" = 8"},{name:"speech_encoder_chunk_size",val:" = 20000"},{name:"speech_encoder_left_chunk_num",val:" = 128"},{name:"t2u_bos_token_id",val:" = 0"},{name:"t2u_pad_token_id",val:" = 1"},{name:"t2u_eos_token_id",val:" = 2"},{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:" = 4096"},{name:"t2u_variance_predictor_embed_dim",val:" = 1024"},{name:"t2u_variance_predictor_hidden_dim",val:" = 256"},{name:"t2u_variance_predictor_kernel_size",val:" = 3"},{name:"t2u_variance_pred_dropout",val:" = 0.5"},{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.SeamlessM4Tv2Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256102) &#x2014;
Vocabulary size of the text modality of the SeamlessM4Tv2 model. Defines the number of different tokens
that can be represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">~SeamlessM4Tv2Model</a>,
<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToSpeech">~SeamlessM4Tv2ForTextToSpeech</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToText">~SeamlessM4Tv2ForTextToText</a>.`,name:"vocab_size"},{anchor:"transformers.SeamlessM4Tv2Config.t2u_vocab_size",description:`<strong>t2u_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10082) &#x2014;
Unit vocabulary size of the SeamlessM4Tv2 model. Defines the number of different &#x201C;unit tokens&#x201D; that can be
represented by the <code>inputs_ids</code> passed when calling the Text-To-Units sub-model of <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">~SeamlessM4Tv2Model</a>,
<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForSpeechToSpeech">~SeamlessM4Tv2ForSpeechToSpeech</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToSpeech">~SeamlessM4Tv2ForTextToSpeech</a>.`,name:"t2u_vocab_size"},{anchor:"transformers.SeamlessM4Tv2Config.char_vocab_size",description:`<strong>char_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10943) &#x2014;
Character vocabulary size of the SeamlessM4Tv2 model. Defines the number of different character tokens that
can be represented by the <code>char_inputs_ids</code> passed when calling the Text-To-Units sub-model of
<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">~SeamlessM4Tv2Model</a>, <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForSpeechToSpeech">~SeamlessM4Tv2ForSpeechToSpeech</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToSpeech">~SeamlessM4Tv2ForTextToSpeech</a>.`,name:"char_vocab_size"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seamless_m4t_v2/configuration_seamless_m4t_v2.py#L24",parameterGroups:[{title:"Parameters shared across sub-models",parametersDescription:[{anchor:"transformers.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.feature_projection_input_dim",description:`<strong>feature_projection_input_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 160) &#x2014;
Input dimension of the input feature projection of the speech encoder, i.e the dimension after processing
input audios with <a href="/docs/transformers/main/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a>.`,name:"feature_projection_input_dim"},{anchor:"transformers.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.position_embeddings_type",description:`<strong>position_embeddings_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative_key&quot;</code>) &#x2014;
Can be specified to <code>relative_key</code>. If left to <code>None</code>, no relative position embedding is applied. Only
applied to the speech encoder. For more information on <code>&quot;relative_key&quot;</code>, please refer to <a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention
with Relative Position Representations (Shaw et al.)</a>.`,name:"position_embeddings_type"},{anchor:"transformers.SeamlessM4Tv2Config.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"},{anchor:"transformers.SeamlessM4Tv2Config.left_max_position_embeddings",description:`<strong>left_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The left clipping value for relative positions.`,name:"left_max_position_embeddings"},{anchor:"transformers.SeamlessM4Tv2Config.right_max_position_embeddings",description:`<strong>right_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The right clipping value for relative positions.`,name:"right_max_position_embeddings"},{anchor:"transformers.SeamlessM4Tv2Config.speech_encoder_chunk_size",description:"<strong>speech_encoder_chunk_size</strong> (<code>int</code>, <em>optional</em>, defaults to 20000) &#x2014; The size of each attention chunk.",name:"speech_encoder_chunk_size"},{anchor:"transformers.SeamlessM4Tv2Config.speech_encoder_left_chunk_num",description:`<strong>speech_encoder_left_chunk_num</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of chunks on the left up to which lookahead is allowed.`,name:"speech_encoder_left_chunk_num"}]},{title:"Text-To-Unit (t2u) model specific parameters",parametersDescription:[{anchor:"transformers.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.t2u_max_position_embeddings",description:`<strong>t2u_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#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).`,name:"t2u_max_position_embeddings"},{anchor:"transformers.SeamlessM4Tv2Config.t2u_variance_predictor_embed_dim",description:`<strong>t2u_variance_predictor_embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The projection dimension of the text-to-unit&#x2019;s duration predictor.`,name:"t2u_variance_predictor_embed_dim"},{anchor:"transformers.SeamlessM4Tv2Config.t2u_variance_predictor_hidden_dim",description:`<strong>t2u_variance_predictor_hidden_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Internal dimension of the text-to-unit&#x2019;s duration predictor.`,name:"t2u_variance_predictor_hidden_dim"},{anchor:"transformers.SeamlessM4Tv2Config.t2u_variance_predictor_kernel_size",description:`<strong>t2u_variance_predictor_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers of the text-to-unit&#x2019;s duration predictor.`,name:"t2u_variance_predictor_kernel_size"},{anchor:"transformers.SeamlessM4Tv2Config.t2u_variance_pred_dropout",description:`<strong>t2u_variance_pred_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout probability of the text-to-unit&#x2019;s duration predictor.</p>
<blockquote>
<p>Hifi-Gan Vocoder specific parameters</p>
</blockquote>`,name:"t2u_variance_pred_dropout"},{anchor:"transformers.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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 SeamlessM4Tv2 vocoder. Defines the number of different unit tokens that can be
represented by the <code>inputs_ids</code> passed when calling the vocoder of <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2Model">~SeamlessM4Tv2Model</a>,
<a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForSpeechToSpeech">~SeamlessM4Tv2ForSpeechToSpeech</a> or <a href="/docs/transformers/main/en/model_doc/seamless_m4t_v2#transformers.SeamlessM4Tv2ForTextToSpeech">~SeamlessM4Tv2ForTextToSpeech</a>.`,name:"unit_hifi_gan_vocab_size"},{anchor:"transformers.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.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.SeamlessM4Tv2Config.var_pred_dropout",description:`<strong>var_pred_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout probability of the duration predictor. Applies to the vocoder only.`,name:"var_pred_dropout"},{anchor:"transformers.SeamlessM4Tv2Config.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"}]}]}}),ae=new ys({props:{anchor:"transformers.SeamlessM4Tv2Config.example",$$slots:{default:[Is]},$$scope:{ctx:S}}}),Mt=new ws({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/seamless_m4t_v2.md"}}),{c(){d=r("meta"),M=s(),c=r("p"),p=s(),h(y.$$.fragment),b=s(),h(x.$$.fragment),z=s(),v=r("p"),v.innerHTML=k,Rt=s(),le=r("p"),le.innerHTML=zn,Dt=s(),ce=r("p"),ce.textContent=Fn,Et=s(),me=r("ul"),me.innerHTML=jn,Vt=s(),pe=r("p"),pe.innerHTML=In,Ot=s(),he=r("p"),he.textContent=qn,Bt=s(),fe=r("p"),fe.innerHTML=Un,Xt=s(),h(ue.$$.fragment),Yt=s(),_e=r("p"),_e.textContent=Ln,At=s(),ge=r("p"),ge.textContent=Nn,Qt=s(),h(Te.$$.fragment),Kt=s(),ve=r("p"),ve.textContent=Hn,eo=s(),be=r("p"),be.textContent=Jn,to=s(),h(xe.$$.fragment),oo=s(),h(Me.$$.fragment),no=s(),ye=r("p"),ye.innerHTML=Pn,so=s(),h(we.$$.fragment),ao=s(),ke=r("p"),ke.textContent=Wn,ro=s(),h(Se.$$.fragment),io=s(),$e=r("p"),$e.innerHTML=Zn,lo=s(),h(Ce.$$.fragment),co=s(),h(ze.$$.fragment),mo=s(),h(Fe.$$.fragment),po=s(),je=r("p"),je.innerHTML=Gn,ho=s(),h(Ie.$$.fragment),fo=s(),qe=r("p"),qe.innerHTML=Rn,uo=s(),h(Ue.$$.fragment),_o=s(),Le=r("p"),Le.innerHTML=Dn,go=s(),h(Ne.$$.fragment),To=s(),He=r("p"),He.innerHTML=En,vo=s(),h(Je.$$.fragment),bo=s(),Pe=r("p"),Pe.innerHTML=Vn,xo=s(),h(We.$$.fragment),Mo=s(),Ze=r("p"),Ze.innerHTML=On,yo=s(),h(Ge.$$.fragment),wo=s(),Re=r("p"),Re.textContent=Bn,ko=s(),De=r("p"),De.innerHTML=Xn,So=s(),h(Ee.$$.fragment),$o=s(),Ve=r("p"),Ve.textContent=Yn,Co=s(),h(Oe.$$.fragment),zo=s(),Be=r("p"),Be.innerHTML=An,Fo=s(),Xe=r("ul"),Xe.innerHTML=Qn,jo=s(),h(Ye.$$.fragment),Io=s(),Ae=r("p"),Ae.textContent=Kn,qo=s(),Qe=r("ul"),Qe.innerHTML=es,Uo=s(),h(Ke.$$.fragment),Lo=s(),et=r("p"),et.textContent=ts,No=s(),tt=r("ul"),tt.innerHTML=os,Ho=s(),ot=r("p"),ot.innerHTML=ns,Jo=s(),h(nt.$$.fragment),Po=s(),U=r("div"),h(st.$$.fragment),Ko=s(),kt=r("p"),kt.innerHTML=ss,en=s(),J=r("div"),h(at.$$.fragment),tn=s(),St=r("p"),St.textContent=as,on=s(),h(Q.$$.fragment),Wo=s(),h(rt.$$.fragment),Zo=s(),L=r("div"),h(it.$$.fragment),nn=s(),$t=r("p"),$t.innerHTML=rs,sn=s(),P=r("div"),h(dt.$$.fragment),an=s(),Ct=r("p"),Ct.textContent=is,rn=s(),h(K.$$.fragment),Go=s(),h(lt.$$.fragment),Ro=s(),N=r("div"),h(ct.$$.fragment),dn=s(),zt=r("p"),zt.innerHTML=ds,ln=s(),W=r("div"),h(mt.$$.fragment),cn=s(),Ft=r("p"),Ft.textContent=ls,mn=s(),h(ee.$$.fragment),Do=s(),h(pt.$$.fragment),Eo=s(),F=r("div"),h(ht.$$.fragment),pn=s(),jt=r("p"),jt.innerHTML=cs,hn=s(),Z=r("div"),h(ft.$$.fragment),fn=s(),It=r("p"),It.innerHTML=ms,un=s(),h(te.$$.fragment),_n=s(),G=r("div"),h(ut.$$.fragment),gn=s(),qt=r("p"),qt.textContent=ps,Tn=s(),h(oe.$$.fragment),Vo=s(),h(_t.$$.fragment),Oo=s(),j=r("div"),h(gt.$$.fragment),vn=s(),Ut=r("p"),Ut.innerHTML=hs,bn=s(),R=r("div"),h(Tt.$$.fragment),xn=s(),Lt=r("p"),Lt.innerHTML=fs,Mn=s(),h(ne.$$.fragment),yn=s(),D=r("div"),h(vt.$$.fragment),wn=s(),Nt=r("p"),Nt.textContent=us,kn=s(),h(se.$$.fragment),Bo=s(),h(bt.$$.fragment),Xo=s(),I=r("div"),h(xt.$$.fragment),Sn=s(),Ht=r("p"),Ht.innerHTML=_s,$n=s(),Jt=r("p"),Jt.innerHTML=gs,Cn=s(),h(ae.$$.fragment),Yo=s(),h(Mt.$$.fragment),Ao=s(),Gt=r("p"),this.h()},l(e){const t=Ms("svelte-u9bgzb",document.head);d=i(t,"META",{name:!0,content:!0}),t.forEach(o),M=a(e),c=i(e,"P",{}),$(c).forEach(o),p=a(e),f(y.$$.fragment,e),b=a(e),f(x.$$.fragment,e),z=a(e),v=i(e,"P",{"data-svelte-h":!0}),l(v)!=="svelte-r9t9m0"&&(v.innerHTML=k),Rt=a(e),le=i(e,"P",{"data-svelte-h":!0}),l(le)!=="svelte-l8delz"&&(le.innerHTML=zn),Dt=a(e),ce=i(e,"P",{"data-svelte-h":!0}),l(ce)!=="svelte-ddgfbh"&&(ce.textContent=Fn),Et=a(e),me=i(e,"UL",{"data-svelte-h":!0}),l(me)!=="svelte-7ymha8"&&(me.innerHTML=jn),Vt=a(e),pe=i(e,"P",{"data-svelte-h":!0}),l(pe)!=="svelte-1dauaqy"&&(pe.innerHTML=In),Ot=a(e),he=i(e,"P",{"data-svelte-h":!0}),l(he)!=="svelte-vfdo9a"&&(he.textContent=qn),Bt=a(e),fe=i(e,"P",{"data-svelte-h":!0}),l(fe)!=="svelte-1vw0n52"&&(fe.innerHTML=Un),Xt=a(e),f(ue.$$.fragment,e),Yt=a(e),_e=i(e,"P",{"data-svelte-h":!0}),l(_e)!=="svelte-1d1a1h9"&&(_e.textContent=Ln),At=a(e),ge=i(e,"P",{"data-svelte-h":!0}),l(ge)!=="svelte-msm04g"&&(ge.textContent=Nn),Qt=a(e),f(Te.$$.fragment,e),Kt=a(e),ve=i(e,"P",{"data-svelte-h":!0}),l(ve)!=="svelte-1x6apd2"&&(ve.textContent=Hn),eo=a(e),be=i(e,"P",{"data-svelte-h":!0}),l(be)!=="svelte-skz2b1"&&(be.textContent=Jn),to=a(e),f(xe.$$.fragment,e),oo=a(e),f(Me.$$.fragment,e),no=a(e),ye=i(e,"P",{"data-svelte-h":!0}),l(ye)!=="svelte-1j5ps84"&&(ye.innerHTML=Pn),so=a(e),f(we.$$.fragment,e),ao=a(e),ke=i(e,"P",{"data-svelte-h":!0}),l(ke)!=="svelte-vy622i"&&(ke.textContent=Wn),ro=a(e),f(Se.$$.fragment,e),io=a(e),$e=i(e,"P",{"data-svelte-h":!0}),l($e)!=="svelte-bxedlc"&&($e.innerHTML=Zn),lo=a(e),f(Ce.$$.fragment,e),co=a(e),f(ze.$$.fragment,e),mo=a(e),f(Fe.$$.fragment,e),po=a(e),je=i(e,"P",{"data-svelte-h":!0}),l(je)!=="svelte-1bapxt"&&(je.innerHTML=Gn),ho=a(e),f(Ie.$$.fragment,e),fo=a(e),qe=i(e,"P",{"data-svelte-h":!0}),l(qe)!=="svelte-65k8ai"&&(qe.innerHTML=Rn),uo=a(e),f(Ue.$$.fragment,e),_o=a(e),Le=i(e,"P",{"data-svelte-h":!0}),l(Le)!=="svelte-oipcsb"&&(Le.innerHTML=Dn),go=a(e),f(Ne.$$.fragment,e),To=a(e),He=i(e,"P",{"data-svelte-h":!0}),l(He)!=="svelte-19qvptk"&&(He.innerHTML=En),vo=a(e),f(Je.$$.fragment,e),bo=a(e),Pe=i(e,"P",{"data-svelte-h":!0}),l(Pe)!=="svelte-vk1805"&&(Pe.innerHTML=Vn),xo=a(e),f(We.$$.fragment,e),Mo=a(e),Ze=i(e,"P",{"data-svelte-h":!0}),l(Ze)!=="svelte-1nhttb0"&&(Ze.innerHTML=On),yo=a(e),f(Ge.$$.fragment,e),wo=a(e),Re=i(e,"P",{"data-svelte-h":!0}),l(Re)!=="svelte-19pkkkq"&&(Re.textContent=Bn),ko=a(e),De=i(e,"P",{"data-svelte-h":!0}),l(De)!=="svelte-10jpqyx"&&(De.innerHTML=Xn),So=a(e),f(Ee.$$.fragment,e),$o=a(e),Ve=i(e,"P",{"data-svelte-h":!0}),l(Ve)!=="svelte-1blkwbg"&&(Ve.textContent=Yn),Co=a(e),f(Oe.$$.fragment,e),zo=a(e),Be=i(e,"P",{"data-svelte-h":!0}),l(Be)!=="svelte-th6qhh"&&(Be.innerHTML=An),Fo=a(e),Xe=i(e,"UL",{"data-svelte-h":!0}),l(Xe)!=="svelte-k9llxy"&&(Xe.innerHTML=Qn),jo=a(e),f(Ye.$$.fragment,e),Io=a(e),Ae=i(e,"P",{"data-svelte-h":!0}),l(Ae)!=="svelte-18k5wrt"&&(Ae.textContent=Kn),qo=a(e),Qe=i(e,"UL",{"data-svelte-h":!0}),l(Qe)!=="svelte-1x9yzdf"&&(Qe.innerHTML=es),Uo=a(e),f(Ke.$$.fragment,e),Lo=a(e),et=i(e,"P",{"data-svelte-h":!0}),l(et)!=="svelte-8kbcuu"&&(et.textContent=ts),No=a(e),tt=i(e,"UL",{"data-svelte-h":!0}),l(tt)!=="svelte-faxz1n"&&(tt.innerHTML=os),Ho=a(e),ot=i(e,"P",{"data-svelte-h":!0}),l(ot)!=="svelte-mez4is"&&(ot.innerHTML=ns),Jo=a(e),f(nt.$$.fragment,e),Po=a(e),U=i(e,"DIV",{class:!0});var E=$(U);f(st.$$.fragment,E),Ko=a(E),kt=i(E,"P",{"data-svelte-h":!0}),l(kt)!=="svelte-1ftms14"&&(kt.innerHTML=ss),en=a(E),J=i(E,"DIV",{class:!0});var V=$(J);f(at.$$.fragment,V),tn=a(V),St=i(V,"P",{"data-svelte-h":!0}),l(St)!=="svelte-1v5cwae"&&(St.textContent=as),on=a(V),f(Q.$$.fragment,V),V.forEach(o),E.forEach(o),Wo=a(e),f(rt.$$.fragment,e),Zo=a(e),L=i(e,"DIV",{class:!0});var O=$(L);f(it.$$.fragment,O),nn=a(O),$t=i(O,"P",{"data-svelte-h":!0}),l($t)!=="svelte-66mln5"&&($t.innerHTML=rs),sn=a(O),P=i(O,"DIV",{class:!0});var B=$(P);f(dt.$$.fragment,B),an=a(B),Ct=i(B,"P",{"data-svelte-h":!0}),l(Ct)!=="svelte-1lcmkdu"&&(Ct.textContent=is),rn=a(B),f(K.$$.fragment,B),B.forEach(o),O.forEach(o),Go=a(e),f(lt.$$.fragment,e),Ro=a(e),N=i(e,"DIV",{class:!0});var X=$(N);f(ct.$$.fragment,X),dn=a(X),zt=i(X,"P",{"data-svelte-h":!0}),l(zt)!=="svelte-vvllv9"&&(zt.innerHTML=ds),ln=a(X),W=i(X,"DIV",{class:!0});var Y=$(W);f(mt.$$.fragment,Y),cn=a(Y),Ft=i(Y,"P",{"data-svelte-h":!0}),l(Ft)!=="svelte-1lcmkdu"&&(Ft.textContent=ls),mn=a(Y),f(ee.$$.fragment,Y),Y.forEach(o),X.forEach(o),Do=a(e),f(pt.$$.fragment,e),Eo=a(e),F=i(e,"DIV",{class:!0});var H=$(F);f(ht.$$.fragment,H),pn=a(H),jt=i(H,"P",{"data-svelte-h":!0}),l(jt)!=="svelte-wodq2p"&&(jt.innerHTML=cs),hn=a(H),Z=i(H,"DIV",{class:!0});var A=$(Z);f(ft.$$.fragment,A),fn=a(A),It=i(A,"P",{"data-svelte-h":!0}),l(It)!=="svelte-1g2xmmf"&&(It.innerHTML=ms),un=a(A),f(te.$$.fragment,A),A.forEach(o),_n=a(H),G=i(H,"DIV",{class:!0});var Pt=$(G);f(ut.$$.fragment,Pt),gn=a(Pt),qt=i(Pt,"P",{"data-svelte-h":!0}),l(qt)!=="svelte-1puovtq"&&(qt.textContent=ps),Tn=a(Pt),f(oe.$$.fragment,Pt),Pt.forEach(o),H.forEach(o),Vo=a(e),f(_t.$$.fragment,e),Oo=a(e),j=i(e,"DIV",{class:!0});var re=$(j);f(gt.$$.fragment,re),vn=a(re),Ut=i(re,"P",{"data-svelte-h":!0}),l(Ut)!=="svelte-qwwq0d"&&(Ut.innerHTML=hs),bn=a(re),R=i(re,"DIV",{class:!0});var Wt=$(R);f(Tt.$$.fragment,Wt),xn=a(Wt),Lt=i(Wt,"P",{"data-svelte-h":!0}),l(Lt)!=="svelte-1daezjd"&&(Lt.innerHTML=fs),Mn=a(Wt),f(ne.$$.fragment,Wt),Wt.forEach(o),yn=a(re),D=i(re,"DIV",{class:!0});var Zt=$(D);f(vt.$$.fragment,Zt),wn=a(Zt),Nt=i(Zt,"P",{"data-svelte-h":!0}),l(Nt)!=="svelte-1puovtq"&&(Nt.textContent=us),kn=a(Zt),f(se.$$.fragment,Zt),Zt.forEach(o),re.forEach(o),Bo=a(e),f(bt.$$.fragment,e),Xo=a(e),I=i(e,"DIV",{class:!0});var ie=$(I);f(xt.$$.fragment,ie),Sn=a(ie),Ht=i(ie,"P",{"data-svelte-h":!0}),l(Ht)!=="svelte-dx2r91"&&(Ht.innerHTML=_s),$n=a(ie),Jt=i(ie,"P",{"data-svelte-h":!0}),l(Jt)!=="svelte-o55m63"&&(Jt.innerHTML=gs),Cn=a(ie),f(ae.$$.fragment,ie),ie.forEach(o),Yo=a(e),f(Mt.$$.fragment,e),Ao=a(e),Gt=i(e,"P",{}),$(Gt).forEach(o),this.h()},h(){C(d,"name","hf:doc:metadata"),C(d,"content",Us),C(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(I,"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,t){m(document.head,d),n(e,M,t),n(e,c,t),n(e,p,t),u(y,e,t),n(e,b,t),u(x,e,t),n(e,z,t),n(e,v,t),n(e,Rt,t),n(e,le,t),n(e,Dt,t),n(e,ce,t),n(e,Et,t),n(e,me,t),n(e,Vt,t),n(e,pe,t),n(e,Ot,t),n(e,he,t),n(e,Bt,t),n(e,fe,t),n(e,Xt,t),u(ue,e,t),n(e,Yt,t),n(e,_e,t),n(e,At,t),n(e,ge,t),n(e,Qt,t),u(Te,e,t),n(e,Kt,t),n(e,ve,t),n(e,eo,t),n(e,be,t),n(e,to,t),u(xe,e,t),n(e,oo,t),u(Me,e,t),n(e,no,t),n(e,ye,t),n(e,so,t),u(we,e,t),n(e,ao,t),n(e,ke,t),n(e,ro,t),u(Se,e,t),n(e,io,t),n(e,$e,t),n(e,lo,t),u(Ce,e,t),n(e,co,t),u(ze,e,t),n(e,mo,t),u(Fe,e,t),n(e,po,t),n(e,je,t),n(e,ho,t),u(Ie,e,t),n(e,fo,t),n(e,qe,t),n(e,uo,t),u(Ue,e,t),n(e,_o,t),n(e,Le,t),n(e,go,t),u(Ne,e,t),n(e,To,t),n(e,He,t),n(e,vo,t),u(Je,e,t),n(e,bo,t),n(e,Pe,t),n(e,xo,t),u(We,e,t),n(e,Mo,t),n(e,Ze,t),n(e,yo,t),u(Ge,e,t),n(e,wo,t),n(e,Re,t),n(e,ko,t),n(e,De,t),n(e,So,t),u(Ee,e,t),n(e,$o,t),n(e,Ve,t),n(e,Co,t),u(Oe,e,t),n(e,zo,t),n(e,Be,t),n(e,Fo,t),n(e,Xe,t),n(e,jo,t),u(Ye,e,t),n(e,Io,t),n(e,Ae,t),n(e,qo,t),n(e,Qe,t),n(e,Uo,t),u(Ke,e,t),n(e,Lo,t),n(e,et,t),n(e,No,t),n(e,tt,t),n(e,Ho,t),n(e,ot,t),n(e,Jo,t),u(nt,e,t),n(e,Po,t),n(e,U,t),u(st,U,null),m(U,Ko),m(U,kt),m(U,en),m(U,J),u(at,J,null),m(J,tn),m(J,St),m(J,on),u(Q,J,null),n(e,Wo,t),u(rt,e,t),n(e,Zo,t),n(e,L,t),u(it,L,null),m(L,nn),m(L,$t),m(L,sn),m(L,P),u(dt,P,null),m(P,an),m(P,Ct),m(P,rn),u(K,P,null),n(e,Go,t),u(lt,e,t),n(e,Ro,t),n(e,N,t),u(ct,N,null),m(N,dn),m(N,zt),m(N,ln),m(N,W),u(mt,W,null),m(W,cn),m(W,Ft),m(W,mn),u(ee,W,null),n(e,Do,t),u(pt,e,t),n(e,Eo,t),n(e,F,t),u(ht,F,null),m(F,pn),m(F,jt),m(F,hn),m(F,Z),u(ft,Z,null),m(Z,fn),m(Z,It),m(Z,un),u(te,Z,null),m(F,_n),m(F,G),u(ut,G,null),m(G,gn),m(G,qt),m(G,Tn),u(oe,G,null),n(e,Vo,t),u(_t,e,t),n(e,Oo,t),n(e,j,t),u(gt,j,null),m(j,vn),m(j,Ut),m(j,bn),m(j,R),u(Tt,R,null),m(R,xn),m(R,Lt),m(R,Mn),u(ne,R,null),m(j,yn),m(j,D),u(vt,D,null),m(D,wn),m(D,Nt),m(D,kn),u(se,D,null),n(e,Bo,t),u(bt,e,t),n(e,Xo,t),n(e,I,t),u(xt,I,null),m(I,Sn),m(I,Ht),m(I,$n),m(I,Jt),m(I,Cn),u(ae,I,null),n(e,Yo,t),u(Mt,e,t),n(e,Ao,t),n(e,Gt,t),Qo=!0},p(e,[t]){const E={};t&2&&(E.$$scope={dirty:t,ctx:e}),Q.$set(E);const V={};t&2&&(V.$$scope={dirty:t,ctx:e}),K.$set(V);const O={};t&2&&(O.$$scope={dirty:t,ctx:e}),ee.$set(O);const B={};t&2&&(B.$$scope={dirty:t,ctx:e}),te.$set(B);const X={};t&2&&(X.$$scope={dirty:t,ctx:e}),oe.$set(X);const Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),ne.$set(Y);const H={};t&2&&(H.$$scope={dirty:t,ctx:e}),se.$set(H);const A={};t&2&&(A.$$scope={dirty:t,ctx:e}),ae.$set(A)},i(e){Qo||(_(y.$$.fragment,e),_(x.$$.fragment,e),_(ue.$$.fragment,e),_(Te.$$.fragment,e),_(xe.$$.fragment,e),_(Me.$$.fragment,e),_(we.$$.fragment,e),_(Se.$$.fragment,e),_(Ce.$$.fragment,e),_(ze.$$.fragment,e),_(Fe.$$.fragment,e),_(Ie.$$.fragment,e),_(Ue.$$.fragment,e),_(Ne.$$.fragment,e),_(Je.$$.fragment,e),_(We.$$.fragment,e),_(Ge.$$.fragment,e),_(Ee.$$.fragment,e),_(Oe.$$.fragment,e),_(Ye.$$.fragment,e),_(Ke.$$.fragment,e),_(nt.$$.fragment,e),_(st.$$.fragment,e),_(at.$$.fragment,e),_(Q.$$.fragment,e),_(rt.$$.fragment,e),_(it.$$.fragment,e),_(dt.$$.fragment,e),_(K.$$.fragment,e),_(lt.$$.fragment,e),_(ct.$$.fragment,e),_(mt.$$.fragment,e),_(ee.$$.fragment,e),_(pt.$$.fragment,e),_(ht.$$.fragment,e),_(ft.$$.fragment,e),_(te.$$.fragment,e),_(ut.$$.fragment,e),_(oe.$$.fragment,e),_(_t.$$.fragment,e),_(gt.$$.fragment,e),_(Tt.$$.fragment,e),_(ne.$$.fragment,e),_(vt.$$.fragment,e),_(se.$$.fragment,e),_(bt.$$.fragment,e),_(xt.$$.fragment,e),_(ae.$$.fragment,e),_(Mt.$$.fragment,e),Qo=!0)},o(e){g(y.$$.fragment,e),g(x.$$.fragment,e),g(ue.$$.fragment,e),g(Te.$$.fragment,e),g(xe.$$.fragment,e),g(Me.$$.fragment,e),g(we.$$.fragment,e),g(Se.$$.fragment,e),g(Ce.$$.fragment,e),g(ze.$$.fragment,e),g(Fe.$$.fragment,e),g(Ie.$$.fragment,e),g(Ue.$$.fragment,e),g(Ne.$$.fragment,e),g(Je.$$.fragment,e),g(We.$$.fragment,e),g(Ge.$$.fragment,e),g(Ee.$$.fragment,e),g(Oe.$$.fragment,e),g(Ye.$$.fragment,e),g(Ke.$$.fragment,e),g(nt.$$.fragment,e),g(st.$$.fragment,e),g(at.$$.fragment,e),g(Q.$$.fragment,e),g(rt.$$.fragment,e),g(it.$$.fragment,e),g(dt.$$.fragment,e),g(K.$$.fragment,e),g(lt.$$.fragment,e),g(ct.$$.fragment,e),g(mt.$$.fragment,e),g(ee.$$.fragment,e),g(pt.$$.fragment,e),g(ht.$$.fragment,e),g(ft.$$.fragment,e),g(te.$$.fragment,e),g(ut.$$.fragment,e),g(oe.$$.fragment,e),g(_t.$$.fragment,e),g(gt.$$.fragment,e),g(Tt.$$.fragment,e),g(ne.$$.fragment,e),g(vt.$$.fragment,e),g(se.$$.fragment,e),g(bt.$$.fragment,e),g(xt.$$.fragment,e),g(ae.$$.fragment,e),g(Mt.$$.fragment,e),Qo=!1},d(e){e&&(o(M),o(c),o(p),o(b),o(z),o(v),o(Rt),o(le),o(Dt),o(ce),o(Et),o(me),o(Vt),o(pe),o(Ot),o(he),o(Bt),o(fe),o(Xt),o(Yt),o(_e),o(At),o(ge),o(Qt),o(Kt),o(ve),o(eo),o(be),o(to),o(oo),o(no),o(ye),o(so),o(ao),o(ke),o(ro),o(io),o($e),o(lo),o(co),o(mo),o(po),o(je),o(ho),o(fo),o(qe),o(uo),o(_o),o(Le),o(go),o(To),o(He),o(vo),o(bo),o(Pe),o(xo),o(Mo),o(Ze),o(yo),o(wo),o(Re),o(ko),o(De),o(So),o($o),o(Ve),o(Co),o(zo),o(Be),o(Fo),o(Xe),o(jo),o(Io),o(Ae),o(qo),o(Qe),o(Uo),o(Lo),o(et),o(No),o(tt),o(Ho),o(ot),o(Jo),o(Po),o(U),o(Wo),o(Zo),o(L),o(Go),o(Ro),o(N),o(Do),o(Eo),o(F),o(Vo),o(Oo),o(j),o(Bo),o(Xo),o(I),o(Yo),o(Ao),o(Gt)),o(d),T(y,e),T(x,e),T(ue,e),T(Te,e),T(xe,e),T(Me,e),T(we,e),T(Se,e),T(Ce,e),T(ze,e),T(Fe,e),T(Ie,e),T(Ue,e),T(Ne,e),T(Je,e),T(We,e),T(Ge,e),T(Ee,e),T(Oe,e),T(Ye,e),T(Ke,e),T(nt,e),T(st),T(at),T(Q),T(rt,e),T(it),T(dt),T(K),T(lt,e),T(ct),T(mt),T(ee),T(pt,e),T(ht),T(ft),T(te),T(ut),T(oe),T(_t,e),T(gt),T(Tt),T(ne),T(vt),T(se),T(bt,e),T(xt),T(ae),T(Mt,e)}}}const Us='{"title":"SeamlessM4T-v2","local":"seamlessm4t-v2","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":[{"title":"Difference with SeamlessM4T-v1","local":"difference-with-seamlessm4t-v1","sections":[{"title":"Improvements on the second-pass model","local":"improvements-on-the-second-pass-model","sections":[],"depth":4},{"title":"Difference in the speech encoder","local":"difference-in-the-speech-encoder","sections":[],"depth":4}],"depth":3},{"title":"Generation process","local":"generation-process","sections":[],"depth":3}],"depth":2},{"title":"SeamlessM4Tv2Model","local":"transformers.SeamlessM4Tv2Model","sections":[],"depth":2},{"title":"SeamlessM4Tv2ForTextToSpeech","local":"transformers.SeamlessM4Tv2ForTextToSpeech","sections":[],"depth":2},{"title":"SeamlessM4Tv2ForSpeechToSpeech","local":"transformers.SeamlessM4Tv2ForSpeechToSpeech","sections":[],"depth":2},{"title":"SeamlessM4Tv2ForTextToText","local":"transformers.SeamlessM4Tv2ForTextToText","sections":[],"depth":2},{"title":"SeamlessM4Tv2ForSpeechToText","local":"transformers.SeamlessM4Tv2ForSpeechToText","sections":[],"depth":2},{"title":"SeamlessM4Tv2Config","local":"transformers.SeamlessM4Tv2Config","sections":[],"depth":2}],"depth":1}';function Ls(S){return vs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rs extends bs{constructor(d){super(),xs(this,d,Ls,qs,Ts,{})}}export{Rs as component};
