import{S as td,i as nd,s as ad,e as n,k as m,w as y,t as s,M as rd,c as a,d as t,m as p,a as r,x as w,h as l,b as c,G as e,g as v,y as M,q as C,o as T,B as W,v as sd,L as pt}from"../../chunks/vendor-hf-doc-builder.js";import{T as St}from"../../chunks/Tip-hf-doc-builder.js";import{D as x}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ft}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as P}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as mt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ld(V){let d,b,g,h,_;return h=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyQ29uZm9ybWVyQ29uZmlnJTJDJTIwV2F2MlZlYzJDb25mb3JtZXJNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBXYXYyVmVjMkNvbmZvcm1lciUyMGZhY2Vib29rJTJGd2F2MnZlYzItY29uZm9ybWVyLXJlbC1wb3MtbGFyZ2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwV2F2MlZlYzJDb25mb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZmFjZWJvb2slMkZ3YXYydmVjMi1jb25mb3JtZXItcmVsLXBvcy1sYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJDb25mb3JtZXJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ConformerConfig, Wav2Vec2ConformerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Wav2Vec2Conformer facebook/wav2vec2-conformer-rel-pos-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Wav2Vec2ConformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/wav2vec2-conformer-rel-pos-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerModel(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`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function id(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g,h),e(d,_)},d(i){i&&t(d)}}}function cd(V){let d,b,g,h,_;return h=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9yb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3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, Wav2Vec2ConformerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<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;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerModel.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">292</span>, <span class="hljs-number">1024</span>]`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function dd(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g,h),e(d,_)},d(i){i&&t(d)}}}function md(V){let d,b,g,h,_;return h=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBXYXYyVmVjMkNvbmZvcm1lckZvckNUQyUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF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lM0QtMSklMEElMEElMjMlMjB0cmFuc2NyaWJlJTIwc3BlZWNoJTBBdHJhbnNjcmlwdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUocHJlZGljdGVkX2lkcyklMEF0cmFuc2NyaXB0aW9uJTVCMCU1RCUwQSUwQWlucHV0cyU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEZGF0YXNldCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikuaW5wdXRfaWRzJTBBJTBBJTIzJTIwY29tcHV0ZSUyMGxvc3MlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, Wav2Vec2ConformerForCTC
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForCTC.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># transcribe speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;MISTER QUILTER IS THE APOSTLE OF THE MIDDLE CLASSES AND WE ARE GLAD TO WELCOME HIS GOSPEL&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = processor(text=dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">64.21</span>`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function pd(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g,h),e(d,_)},d(i){i&&t(d)}}}function fd(V){let d,b,g,h,_;return h=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwV2F2MlZlYzJDb25mb3JtZXJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwdG9yY2glMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LnNvcnQoJTIyaWQlMjIpJTBBc2FtcGxpbmdfcmF0ZSUyMCUzRCUyMGRhdGFzZXQuZmVhdHVyZXMlNUIlMjJhdWRpbyUyMiU1RC5zYW1wbGluZ19yYXR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CUzRCUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QjAlNUQlMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCbW9kZWwuY29uZmlnLmxhYmVsMmlkJTVCdGFyZ2V0X2xhYmVsJTVEJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForSequenceClassification
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss - target_label is e.g. &quot;down&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_label = model.config.id2label[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = torch.tensor([model.config.label2id[target_label]])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function hd(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g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9leHRyYWN0b3IoZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJvYmFiaWxpdGllcyUyMCUzRCUyMHRvcmNoLnNpZ21vaWQobG9naXRzJTVCMCU1RCklMEElMjMlMjBsYWJlbHMlMjBpcyUyMGElMjBvbmUtaG90JTIwYXJyYXklMjBvZiUyMHNoYXBlJTIwKG51bV9mcmFtZXMlMkMlMjBudW1fc3BlYWtlcnMpJTBBbGFiZWxzJTIwJTNEJTIwKHByb2JhYmlsaXRpZXMlMjAlM0UlMjAwLjUpLmxvbmcoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForAudioFrameClassification
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, sampling_rate=sampling_rate)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>probabilities = torch.sigmoid(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># labels is a one-hot array of shape (num_frames, num_speakers)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = (probabilities &gt; <span class="hljs-number">0.5</span>).long()`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function gd(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g,h),e(d,_)},d(i){i&&t(d)}}}function vd(V){let d,b,g,h,_;return h=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwV2F2MlZlYzJDb25mb3JtZXJGb3JYVmVjdG9yJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwdG9yY2glMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LnNvcnQoJTIyaWQlMjIpJTBBc2FtcGxpbmdfcmF0ZSUyMCUzRCUyMGRhdGFzZXQuZmVhdHVyZXMlNUIlMjJhdWRpbyUyMiU1RC5zYW1wbGluZ19yYXRlJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1jb25mb3JtZXItcm9wZS1sYXJnZS05NjBoLWZ0JTIyKSUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJDb25mb3JtZXJGb3JYVmVjdG9yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWNvbmZvcm1lci1yb3BlLWxhcmdlLTk2MGgtZnQlMjIpJTBBJTBBJTIzJTIwYX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ob2xkJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoJTIyU3BlYWtlcnMlMjBhcmUlMjBub3QlMjB0aGUlMjBzYW1lISUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForXVector
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForXVector.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    [d[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> dataset[:<span class="hljs-number">2</span>][<span class="hljs-string">&quot;audio&quot;</span>]], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    embeddings = model(**inputs).embeddings

<span class="hljs-meta">&gt;&gt;&gt; </span>embeddings = torch.nn.functional.normalize(embeddings, dim=-<span class="hljs-number">1</span>).cpu()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the resulting embeddings can be used for cosine similarity-based retrieval</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.nn.CosineSimilarity(dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>similarity = cosine_sim(embeddings[<span class="hljs-number">0</span>], embeddings[<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>threshold = <span class="hljs-number">0.7</span>  <span class="hljs-comment"># the optimal threshold is dataset-dependent</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> similarity &lt; threshold:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Speakers are not the same!&quot;</span>)`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function _d(V){let d,b,g,h,_;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(f,"CODE",{});var k=r(g);h=l(k,"Module"),k.forEach(t),_=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(i,f){v(i,d,f),e(d,b),e(d,g),e(g,h),e(d,_)},d(i){i&&t(d)}}}function bd(V){let d,b,g,h,_;return h=new ft({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBXYXYyVmVjMkNvbmZvcm1lckZvclByZVRyYWluaW5nJTBBZnJvbSUyMHRyYW5zZm9ybWVycy5tb2RlbHMud2F2MnZlYzJfY29uZm9ybWVyLm1vZGVsaW5nX3dhdjJ2ZWMyX2NvbmZvcm1lciUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBfY29tcHV0ZV9tYXNrX2luZGljZXMlMkMlMEElMjAlMjAlMjAlMjBfc2FtcGxlX25lZ2F0aXZlX2luZGljZXMlMkMlMEEpJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1jb25mb3JtZXItcmVsLXBvcy1sYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMFdhdjJWZWMyQ29uZm9ybWVyRm9yUHJlVHJhaW5pbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGd2F2MnZlYzItY29uZm9ybWVyLXJlbC1wb3MtbGFyZ2UlMjIpJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJ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IwZm9yJTIwY29udHJhc3RpdmUlMjBsb3NzJTIwdHJhaW5pbmclMjBtb2RlbCUyMHNob3VsZCUyMGJlJTIwcHV0JTIwaW50byUyMHRyYWluJTIwbW9kZSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwudHJhaW4oKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCglMEElMjAlMjAlMjAlMjBpbnB1dF92YWx1ZXMlMkMlMjBtYXNrX3RpbWVfaW5kaWNlcyUzRG1hc2tfdGltZV9pbmRpY2VzJTJDJTIwc2FtcGxlZF9uZWdhdGl2ZV9pbmRpY2VzJTNEc2FtcGxlZF9uZWdhdGl2ZV9pbmRpY2VzJTBBKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    _compute_mask_indices,
<span class="hljs-meta">... </span>    _sample_negative_indices,
<span class="hljs-meta">... </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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rel-pos-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForPreTraining.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rel-pos-large&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_values = feature_extractor(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_values  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute masked indices</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size, raw_sequence_length = input_values.shape
<span class="hljs-meta">&gt;&gt;&gt; </span>sequence_length = model._get_feat_extract_output_lengths(raw_sequence_length).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_time_indices = _compute_mask_indices(
<span class="hljs-meta">... </span>    shape=(batch_size, sequence_length), mask_prob=<span class="hljs-number">0.2</span>, mask_length=<span class="hljs-number">2</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampled_negative_indices = _sample_negative_indices(
<span class="hljs-meta">... </span>    features_shape=(batch_size, sequence_length),
<span class="hljs-meta">... </span>    num_negatives=model.config.num_negatives,
<span class="hljs-meta">... </span>    mask_time_indices=mask_time_indices,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_time_indices = torch.tensor(data=mask_time_indices, device=input_values.device, dtype=torch.long)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampled_negative_indices = torch.tensor(
<span class="hljs-meta">... </span>    data=sampled_negative_indices, device=input_values.device, dtype=torch.long
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(input_values, mask_time_indices=mask_time_indices)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute cosine similarity between predicted (=projected_states) and target (=projected_quantized_states)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.cosine_similarity(outputs.projected_states, outputs.projected_quantized_states, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># show that cosine similarity is much higher than random</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim[mask_time_indices.to(torch.<span class="hljs-built_in">bool</span>)].mean() &gt; <span class="hljs-number">0.5</span>
tensor(<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># for contrastive loss training model should be put into train mode</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.train()
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(
<span class="hljs-meta">... </span>    input_values, mask_time_indices=mask_time_indices, sampled_negative_indices=sampled_negative_indices
<span class="hljs-meta">... </span>).loss`}}),{c(){d=n("p"),b=s("Example:"),g=m(),y(h.$$.fragment)},l(i){d=a(i,"P",{});var f=r(d);b=l(f,"Example:"),f.forEach(t),g=p(i),w(h.$$.fragment,i)},m(i,f){v(i,d,f),e(d,b),v(i,g,f),M(h,i,f),_=!0},p:pt,i(i){_||(C(h.$$.fragment,i),_=!0)},o(i){T(h.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(g),W(h,i)}}}function yd(V){let d,b,g,h,_,i,f,k,Ra,In,O,be,Yt,eo,Na,Pt,qa,Rn,ye,Aa,oo,Sa,Ya,Nn,ht,Pa,qn,we,Qa,to,Ha,Da,An,ut,La,Sn,E,Y,Oa,Qt,Ka,er,Ht,or,tr,no,nr,ar,rr,Dt,sr,lr,Lt,ir,cr,ao,dr,Ot,mr,pr,Yn,Q,fr,ro,hr,ur,so,gr,vr,Pn,K,Me,Kt,lo,_r,en,br,Qn,Ce,on,gt,yr,wr,tn,vt,Mr,Hn,ee,Te,nn,io,Cr,an,Tr,Dn,X,co,Wr,oe,Vr,_t,kr,jr,mo,Jr,Fr,Zr,te,$r,bt,Ur,xr,yt,Xr,Er,zr,We,Ln,ne,Ve,rn,po,Gr,sn,Br,On,ae,fo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fig",parameters:[{name:"vocab_size",val:" = None"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"feat_proj_dropout",val:" = 0.0"},{name:"feat_quantizer_dropout",val:" = 0.0"},{name:"final_dropout",val:" = 0.1"},{name:"layerdrop",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"feat_extract_norm",val:" = 'group'"},{name:"feat_extract_activation",val:" = 'gelu'"},{name:"conv_dim",val:" = (512, 512, 512, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 2, 2, 2, 2, 2)"},{name:"conv_kernel",val:" = (10, 3, 3, 3, 3, 2, 2)"},{name:"conv_bias",val:" = False"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"apply_spec_augment",val:" = True"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"mask_feature_min_masks",val:" = 0"},{name:"num_codevectors_per_group",val:" = 320"},{name:"num_codevector_groups",val:" = 2"},{name:"contrastive_logits_temperature",val:" = 0.1"},{name:"num_negatives",val:" = 100"},{name:"codevector_dim",val:" = 256"},{name:"proj_codevector_dim",val:" = 256"},{name:"diversity_loss_weight",val:" = 0.1"},{name:"ctc_loss_reduction",val:" = 'sum'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"tdnn_dim",val:" = (512, 512, 512, 512, 1500)"},{name:"tdnn_kernel",val:" = (5, 3, 3, 1, 1)"},{name:"tdnn_dilation",val:" = (1, 2, 3, 1, 1)"},{name:"xvector_output_dim",val:" = 512"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"add_adapter",val:" = False"},{name:"adapter_kernel_size",val:" = 3"},{name:"adapter_stride",val:" = 2"},{name:"num_adapter_layers",val:" = 3"},{name:"output_hidden_size",val:" = None"},{name:"position_embeddings_type",val:" = 'relative'"},{name:"rotary_embedding_base",val:" = 10000"},{name:"max_source_positions",val:" = 5000"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"conformer_conv_dropout",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Vocabulary size of the Wav2Vec2Conformer 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/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel">Wav2Vec2ConformerModel</a>. Vocabulary size of the
model. Defines the different tokens that can be represented by the <em>inputs_ids</em> passed to the forward
method of <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel">Wav2Vec2ConformerModel</a>.`,name:"vocab_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.Wav2Vec2ConformerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.Wav2Vec2ConformerConfig.hidden_dropout",description:`<strong>hidden_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, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability. 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:"layerdrop"},{anchor:"transformers.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.Wav2Vec2ConformerConfig.feat_extract_norm",description:`<strong>feat_extract_norm</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;group&quot;</code>) &#x2014;
The norm to be applied to 1D convolutional layers in feature encoder. One of <code>&quot;group&quot;</code> for group
normalization of only the first 1D convolutional layer or <code>&quot;layer&quot;</code> for layer normalization of all 1D
convolutional layers.`,name:"feat_extract_norm"},{anchor:"transformers.Wav2Vec2ConformerConfig.feat_proj_dropout",description:`<strong>feat_proj_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for output of the feature encoder.`,name:"feat_proj_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.feat_extract_activation",description:"<strong>feat_extract_activation</strong> (<code>str, </code>optional<code>, defaults to </code>&#x201C;gelu&#x201D;<code>) -- The non-linear activation function (function or string) in the 1D convolutional layers of the feature extractor. If string, </code>&#x201C;gelu&#x201D;<code>, </code>&#x201C;relu&#x201D;<code>, </code>&#x201C;selu&#x201D;<code>and</code>&#x201C;gelu_new&#x201D;` are supported.",name:"feat_extract_activation"},{anchor:"transformers.Wav2Vec2ConformerConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for quantized feature encoder states.`,name:"feat_quantizer_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 512, 512, 512)</code>) &#x2014;
A tuple of integers defining the number of input and output channels of each 1D convolutional layer in the
feature encoder. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 2, 2, 2, 2, 2)</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the feature encoder. The length
of <em>conv_stride</em> defines the number of convolutional layers and has to match the length of <em>conv_dim</em>.`,name:"conv_stride"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 3, 3, 3, 3, 3)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the feature encoder. The
length of <em>conv_kernel</em> defines the number of convolutional layers and has to match the length of
<em>conv_dim</em>.`,name:"conv_kernel"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_bias",description:`<strong>conv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the 1D convolutional layers have a bias.`,name:"conv_bias"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_conv_pos_embeddings",description:`<strong>num_conv_pos_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of convolutional positional embeddings. Defines the kernel size of 1D convolutional positional
embeddings layer.`,name:"num_conv_pos_embeddings"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_conv_pos_embedding_groups",description:`<strong>num_conv_pos_embedding_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of groups of 1D convolutional positional embeddings layer.`,name:"num_conv_pos_embedding_groups"},{anchor:"transformers.Wav2Vec2ConformerConfig.apply_spec_augment",description:`<strong>apply_spec_augment</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply <em>SpecAugment</em> data augmentation to the outputs of the feature encoder. For reference see
<a href="https://arxiv.org/abs/1904.08779" rel="nofollow">SpecAugment: A Simple Data Augmentation Method for Automatic Speech
Recognition</a>.`,name:"apply_spec_augment"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_time_prob",description:`<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the time axis which will be masked. The masking
procecure generates &#x201D;mask_time_prob<em>len(time_axis)/mask_time_length&#x201D; independent masks over the axis. If
reasoning from the propability of each feature vector to be chosen as the start of the vector span to be
masked, </em>mask_time_prob<em> should be \`prob_vector_start</em>mask_time_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is True\`.`,name:"mask_time_prob"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_time_length",description:`<strong>mask_time_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the time axis.`,name:"mask_time_length"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_time_min_masks",description:`<strong>mask_time_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 2), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the time axis, each time step,
irrespectively of <code>mask_feature_prob</code>. Only relevant if &#x201D;mask_time_prob*len(time_axis)/mask_time_length &lt;
mask_time_min_masks&#x201D;`,name:"mask_time_min_masks"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_feature_prob",description:`<strong>mask_feature_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the feature axis which will be masked. The
masking procecure generates &#x201D;mask_feature_prob<em>len(feature_axis)/mask_time_length&#x201D; independent masks over
the axis. If reasoning from the propability of each feature vector to be chosen as the start of the vector
span to be masked, </em>mask_feature_prob<em> should be \`prob_vector_start</em>mask_feature_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is
True\`.`,name:"mask_feature_prob"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_feature_length",description:`<strong>mask_feature_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the feature axis.`,name:"mask_feature_length"},{anchor:"transformers.Wav2Vec2ConformerConfig.mask_feature_min_masks",description:`<strong>mask_feature_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 0), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the feature axis, each time
step, irrespectively of <code>mask_feature_prob</code>. Only relevant if
&#x201D;mask_feature_prob*len(feature_axis)/mask_feature_length &lt; mask_feature_min_masks&#x201D;`,name:"mask_feature_min_masks"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_codevectors_per_group",description:`<strong>num_codevectors_per_group</strong> (<code>int</code>, <em>optional</em>, defaults to 320) &#x2014;
Number of entries in each quantization codebook (group).`,name:"num_codevectors_per_group"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_codevector_groups",description:`<strong>num_codevector_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of codevector groups for product codevector quantization.`,name:"num_codevector_groups"},{anchor:"transformers.Wav2Vec2ConformerConfig.contrastive_logits_temperature",description:`<strong>contrastive_logits_temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The temperature <em>kappa</em> in the contrastive loss.`,name:"contrastive_logits_temperature"},{anchor:"transformers.Wav2Vec2ConformerConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for the output of the feature encoder that&#x2019;s used by the quantizer.`,name:"feat_quantizer_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_negatives",description:`<strong>num_negatives</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of negative samples for the contrastive loss.`,name:"num_negatives"},{anchor:"transformers.Wav2Vec2ConformerConfig.codevector_dim",description:`<strong>codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the quantized feature vectors.`,name:"codevector_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.proj_codevector_dim",description:`<strong>proj_codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the final projection of both the quantized and the transformer features.`,name:"proj_codevector_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.diversity_loss_weight",description:`<strong>diversity_loss_weight</strong> (<code>int</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The weight of the codebook diversity loss component.`,name:"diversity_loss_weight"},{anchor:"transformers.Wav2Vec2ConformerConfig.ctc_loss_reduction",description:`<strong>ctc_loss_reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;sum&quot;</code>) &#x2014;
Specifies the reduction to apply to the output of <code>torch.nn.CTCLoss</code>. Only relevant when training an
instance of <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.Wav2Vec2ConformerConfig.ctc_zero_infinity",description:`<strong>ctc_zero_infinity</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to zero infinite losses and the associated gradients of <code>torch.nn.CTCLoss</code>. Infinite losses mainly
occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
of <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.Wav2Vec2ConformerConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForSequenceClassification">Wav2Vec2ConformerForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.Wav2Vec2ConformerConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.tdnn_dim",description:`<strong>tdnn_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 1500)</code>) &#x2014;
A tuple of integers defining the number of output channels of each 1D convolutional layer in the <em>TDNN</em>
module of the <em>XVector</em> model. The length of <em>tdnn_dim</em> defines the number of <em>TDNN</em> layers.`,name:"tdnn_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.tdnn_kernel",description:`<strong>tdnn_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 3, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_kernel</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_kernel"},{anchor:"transformers.Wav2Vec2ConformerConfig.tdnn_dilation",description:`<strong>tdnn_dilation</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(1, 2, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the dilation factor of each 1D convolutional layer in <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_dilation</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_dilation"},{anchor:"transformers.Wav2Vec2ConformerConfig.xvector_output_dim",description:`<strong>xvector_output_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"xvector_output_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional network should be stacked on top of the Wav2Vec2Conformer Encoder. Can be very
useful for warm-starting Wav2Vec2Conformer for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.Wav2Vec2ConformerConfig.adapter_kernel_size",description:`<strong>adapter_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_kernel_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.adapter_stride",description:`<strong>adapter_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_stride"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#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.Wav2Vec2ConformerConfig.output_hidden_size",description:`<strong>output_hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the encoder output layer. If not defined, this defaults to <em>hidden-size</em>. Only relevant
if <code>add_adapter is True</code>.`,name:"output_hidden_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.position_embeddings_type",description:`<strong>position_embeddings_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative&quot;</code>) &#x2014;
Can be specified to <code>relative</code> or <code>rotary</code> for relative or rotary position embeddings respectively. If left
<code>None</code> no relative position embedding is applied.`,name:"position_embeddings_type"},{anchor:"transformers.Wav2Vec2ConformerConfig.rotary_embedding_base",description:`<strong>rotary_embedding_base</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) &#x2014;
If <code>&quot;rotary&quot;</code> position embeddings are used, defines the size of the embedding base.`,name:"rotary_embedding_base"},{anchor:"transformers.Wav2Vec2ConformerConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 5000) &#x2014;
if <code>&quot;relative&quot;</code> position embeddings are used, defines the maximum source input positions.`,name:"max_source_positions"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_depthwise_kernel_size",description:`<strong>conv_depthwise_kernel_size</strong> (<code>int</code>, defaults to 31) &#x2014;
Kernel size of convolutional depthwise 1D layer in Conformer blocks.`,name:"conv_depthwise_kernel_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.conformer_conv_dropout",description:`<strong>conformer_conv_dropout</strong> (<code>float</code>, defaults to 0.1) &#x2014;
The dropout probability for all convolutional layers in Conformer blocks.`,name:"conformer_conv_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/configuration_wav2vec2_conformer.py#L33"}}),We=new mt({props:{anchor:"transformers.Wav2Vec2ConformerConfig.example",$$slots:{default:[ld]},$$scope:{ctx:V}}}),po=new P({}),fo=new x({props:{name:"class transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"projected_states",val:": FloatTensor = None"},{name:"projected_quantized_states",val:": FloatTensor = None"},{name:"codevector_perplexity",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"contrastive_loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"diversity_loss",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official
paper</a> . (classification) loss.`,name:"loss"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.projected_states",description:`<strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.`,name:"projected_states"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.projected_quantized_states",description:`<strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.`,name:"projected_quantized_states"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.contrastive_loss",description:`<strong>contrastive_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
The contrastive loss (L_m) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official paper</a> .`,name:"contrastive_loss"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.diversity_loss",description:`<strong>diversity_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
The diversity loss (L_d) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official paper</a> .`,name:"diversity_loss"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L74"}}),uo=new P({}),go=new x({props:{name:"class transformers.Wav2Vec2ConformerModel",anchor:"transformers.Wav2Vec2ConformerModel",parameters:[{name:"config",val:": Wav2Vec2ConformerConfig"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1245"}}),Mo=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerModel.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mask_time_indices",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerModel.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerModel.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.Wav2Vec2ConformerModel.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.Wav2Vec2ConformerModel.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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1318",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>extract_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, conv_dim[-1])</code>) \u2014 Sequence of extracted feature vectors of the last convolutional layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new St({props:{$$slots:{default:[id]},$$scope:{ctx:V}}}),Je=new mt({props:{anchor:"transformers.Wav2Vec2ConformerModel.forward.example",$$slots:{default:[cd]},$$scope:{ctx:V}}}),Co=new P({}),To=new x({props:{name:"class transformers.Wav2Vec2ConformerForCTC",anchor:"transformers.Wav2Vec2ConformerForCTC",parameters:[{name:"config",val:""},{name:"target_lang",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1604"}}),Jo=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForCTC.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForCTC.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForCTC.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerForCTC.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.Wav2Vec2ConformerForCTC.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.Wav2Vec2ConformerForCTC.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"},{anchor:"transformers.Wav2Vec2ConformerForCTC.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_length)</code>, <em>optional</em>) &#x2014;
Labels for connectionist temporal classification. Note that <code>target_length</code> has to be smaller or equal to
the sequence length of the output logits. Indices are selected in <code>[-100, 0, ..., config.vocab_size - 1]</code>.
All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1637",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ze=new St({props:{$$slots:{default:[dd]},$$scope:{ctx:V}}}),$e=new mt({props:{anchor:"transformers.Wav2Vec2ConformerForCTC.forward.example",$$slots:{default:[md]},$$scope:{ctx:V}}}),Fo=new P({}),Zo=new x({props:{name:"class transformers.Wav2Vec2ConformerForSequenceClassification",anchor:"transformers.Wav2Vec2ConformerForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1725"}}),zo=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.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.Wav2Vec2ConformerForSequenceClassification.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.Wav2Vec2ConformerForSequenceClassification.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"},{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1760",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new St({props:{$$slots:{default:[pd]},$$scope:{ctx:V}}}),Xe=new mt({props:{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward.example",$$slots:{default:[fd]},$$scope:{ctx:V}}}),Go=new P({}),Bo=new x({props:{name:"class transformers.Wav2Vec2ConformerForAudioFrameClassification",anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1836"}}),So=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.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.Wav2Vec2ConformerForAudioFrameClassification.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.Wav2Vec2ConformerForAudioFrameClassification.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"},{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1871",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ze=new St({props:{$$slots:{default:[hd]},$$scope:{ctx:V}}}),Ge=new mt({props:{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward.example",$$slots:{default:[ud]},$$scope:{ctx:V}}}),Yo=new P({}),Po=new x({props:{name:"class transformers.Wav2Vec2ConformerForXVector",anchor:"transformers.Wav2Vec2ConformerForXVector",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForXVector.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1990"}}),Ko=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForXVector.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForXVector.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForXVector.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerForXVector.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.Wav2Vec2ConformerForXVector.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.Wav2Vec2ConformerForXVector.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"},{anchor:"transformers.Wav2Vec2ConformerForXVector.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L2043",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new St({props:{$$slots:{default:[gd]},$$scope:{ctx:V}}}),Re=new mt({props:{anchor:"transformers.Wav2Vec2ConformerForXVector.forward.example",$$slots:{default:[vd]},$$scope:{ctx:V}}}),et=new P({}),ot=new x({props:{name:"class transformers.Wav2Vec2ConformerForPreTraining",anchor:"transformers.Wav2Vec2ConformerForPreTraining",parameters:[{name:"config",val:": Wav2Vec2ConformerConfig"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1383"}}),st=new x({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mask_time_indices",val:": typing.Optional[torch.BoolTensor] = None"},{name:"sampled_negative_indices",val:": typing.Optional[torch.BoolTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and 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></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.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.Wav2Vec2ConformerForPreTraining.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.Wav2Vec2ConformerForPreTraining.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"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.mask_time_indices",description:`<strong>mask_time_indices</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices to mask extracted features for contrastive loss. When in training mode, model learns to predict
masked extracted features in <em>config.proj_codevector_dim</em> space.`,name:"mask_time_indices"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.sampled_negative_indices",description:`<strong>sampled_negative_indices</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length, num_negatives)</code>, <em>optional</em>) &#x2014;
Indices indicating which quantized target vectors are used as negative sampled vectors in contrastive loss.
Required input for pre-training.`,name:"sampled_negative_indices"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1435",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"
>transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official
paper</a> . (classification) loss.</p>
</li>
<li>
<p><strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.</p>
</li>
<li>
<p><strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>contrastive_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 The contrastive loss (L_m) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official paper</a> .</p>
</li>
<li>
<p><strong>diversity_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 The diversity loss (L_d) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official paper</a> .</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"
>transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qe=new St({props:{$$slots:{default:[_d]},$$scope:{ctx:V}}}),Ae=new mt({props:{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.example",$$slots:{default:[bd]},$$scope:{ctx:V}}}),{c(){d=n("meta"),b=m(),g=n("h1"),h=n("a"),_=n("span"),y(i.$$.fragment),f=m(),k=n("span"),Ra=s("Wav2Vec2-Conformer"),In=m(),O=n("h2"),be=n("a"),Yt=n("span"),y(eo.$$.fragment),Na=m(),Pt=n("span"),qa=s("Overview"),Rn=m(),ye=n("p"),Aa=s("The Wav2Vec2-Conformer was added to an updated version of "),oo=n("a"),Sa=s("fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),Ya=s(" by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino."),Nn=m(),ht=n("p"),Pa=s("The official results of the model can be found in Table 3 and Table 4 of the paper."),qn=m(),we=n("p"),Qa=s("The Wav2Vec2-Conformer weights were released by the Meta AI team within the "),to=n("a"),Ha=s("Fairseq library"),Da=s("."),An=m(),ut=n("p"),La=s("Tips:"),Sn=m(),E=n("ul"),Y=n("li"),Oa=s("Wav2Vec2-Conformer follows the same architecture as Wav2Vec2, but replaces the "),Qt=n("em"),Ka=s("Attention"),er=s("-block with a "),Ht=n("em"),or=s("Conformer"),tr=s(`-block
as introduced in `),no=n("a"),nr=s("Conformer: Convolution-augmented Transformer for Speech Recognition"),ar=s("."),rr=m(),Dt=n("li"),sr=s(`For the same number of layers, Wav2Vec2-Conformer requires more parameters than Wav2Vec2, but also yields
an improved word error rate.`),lr=m(),Lt=n("li"),ir=s("Wav2Vec2-Conformer uses the same tokenizer and feature extractor as Wav2Vec2."),cr=m(),ao=n("li"),dr=s(`Wav2Vec2-Conformer can use either no relative position embeddings, Transformer-XL-like position embeddings, or
rotary position embeddings by setting the correct `),Ot=n("code"),mr=s("config.position_embeddings_type"),pr=s("."),Yn=m(),Q=n("p"),fr=s("This model was contributed by "),ro=n("a"),hr=s("patrickvonplaten"),ur=s(`.
The original code can be found `),so=n("a"),gr=s("here"),vr=s("."),Pn=m(),K=n("h2"),Me=n("a"),Kt=n("span"),y(lo.$$.fragment),_r=m(),en=n("span"),br=s("Documentation resources"),Qn=m(),Ce=n("ul"),on=n("li"),gt=n("a"),yr=s("Audio classification task guide"),wr=m(),tn=n("li"),vt=n("a"),Mr=s("Automatic speech recognition task guide"),Hn=m(),ee=n("h2"),Te=n("a"),nn=n("span"),y(io.$$.fragment),Cr=m(),an=n("span"),Tr=s("Wav2Vec2ConformerConfig"),Dn=m(),X=n("div"),y(co.$$.fragment),Wr=m(),oe=n("p"),Vr=s("This is the configuration class to store the configuration of a "),_t=n("a"),kr=s("Wav2Vec2ConformerModel"),jr=s(`. It is used to
instantiate an Wav2Vec2Conformer 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 Wav2Vec2Conformer
`),mo=n("a"),Jr=s("facebook/wav2vec2-conformer-rel-pos-large"),Fr=s(`
architecture.`),Zr=m(),te=n("p"),$r=s("Configuration objects inherit from "),bt=n("a"),Ur=s("PretrainedConfig"),xr=s(` and can be used to control the model outputs. Read the
documentation from `),yt=n("a"),Xr=s("PretrainedConfig"),Er=s(" for more information."),zr=m(),y(We.$$.fragment),Ln=m(),ne=n("h2"),Ve=n("a"),rn=n("span"),y(po.$$.fragment),Gr=m(),sn=n("span"),Br=s("Wav2Vec2Conformer specific outputs"),On=m(),ae=n("div"),y(fo.$$.fragment),Ir=m(),ho=n("p"),Rr=s("Output type of "),wt=n("a"),Nr=s("Wav2Vec2ConformerForPreTraining"),qr=s(", with potential hidden states and attentions."),Kn=m(),re=n("h2"),ke=n("a"),ln=n("span"),y(uo.$$.fragment),Ar=m(),cn=n("span"),Sr=s("Wav2Vec2ConformerModel"),ea=m(),Z=n("div"),y(go.$$.fragment),Yr=m(),vo=n("p"),Pr=s(`The bare Wav2Vec2Conformer Model transformer outputting raw hidden-states without any specific head on top.
Wav2Vec2Conformer was proposed in `),_o=n("a"),Qr=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Hr=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Dr=m(),bo=n("p"),Lr=s("This model inherits from "),Mt=n("a"),Or=s("PreTrainedModel"),Kr=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),es=m(),yo=n("p"),os=s("This model is a PyTorch "),wo=n("a"),ts=s("nn.Module"),ns=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),as=m(),z=n("div"),y(Mo.$$.fragment),rs=m(),se=n("p"),ss=s("The "),Ct=n("a"),ls=s("Wav2Vec2ConformerModel"),is=s(" forward method, overrides the "),dn=n("code"),cs=s("__call__"),ds=s(" special method."),ms=m(),y(je.$$.fragment),ps=m(),y(Je.$$.fragment),oa=m(),le=n("h2"),Fe=n("a"),mn=n("span"),y(Co.$$.fragment),fs=m(),pn=n("span"),hs=s("Wav2Vec2ConformerForCTC"),ta=m(),$=n("div"),y(To.$$.fragment),us=m(),ie=n("p"),gs=s("Wav2Vec2Conformer Model with a "),fn=n("code"),vs=s("language modeling"),_s=s(` head on top for Connectionist Temporal Classification (CTC).
Wav2Vec2Conformer was proposed in `),Wo=n("a"),bs=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),ys=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ws=m(),Vo=n("p"),Ms=s("This model inherits from "),Tt=n("a"),Cs=s("PreTrainedModel"),Ts=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ws=m(),ko=n("p"),Vs=s("This model is a PyTorch "),jo=n("a"),ks=s("nn.Module"),js=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Js=m(),G=n("div"),y(Jo.$$.fragment),Fs=m(),ce=n("p"),Zs=s("The "),Wt=n("a"),$s=s("Wav2Vec2ConformerForCTC"),Us=s(" forward method, overrides the "),hn=n("code"),xs=s("__call__"),Xs=s(" special method."),Es=m(),y(Ze.$$.fragment),zs=m(),y($e.$$.fragment),na=m(),de=n("h2"),Ue=n("a"),un=n("span"),y(Fo.$$.fragment),Gs=m(),gn=n("span"),Bs=s("Wav2Vec2ConformerForSequenceClassification"),aa=m(),j=n("div"),y(Zo.$$.fragment),Is=m(),vn=n("p"),Rs=s(`Wav2Vec2Conformer Model with a sequence classification head on top (a linear layer over the pooled output) for
tasks like SUPERB Keyword Spotting.`),Ns=m(),$o=n("p"),qs=s("Wav2Vec2Conformer was proposed in "),Uo=n("a"),As=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Ss=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Ys=m(),xo=n("p"),Ps=s("This model inherits from "),Vt=n("a"),Qs=s("PreTrainedModel"),Hs=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ds=m(),Xo=n("p"),Ls=s("This model is a PyTorch "),Eo=n("a"),Os=s("nn.Module"),Ks=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),el=m(),B=n("div"),y(zo.$$.fragment),ol=m(),me=n("p"),tl=s("The "),kt=n("a"),nl=s("Wav2Vec2ConformerForSequenceClassification"),al=s(" forward method, overrides the "),_n=n("code"),rl=s("__call__"),sl=s(" special method."),ll=m(),y(xe.$$.fragment),il=m(),y(Xe.$$.fragment),ra=m(),pe=n("h2"),Ee=n("a"),bn=n("span"),y(Go.$$.fragment),cl=m(),yn=n("span"),dl=s("Wav2Vec2ConformerForAudioFrameClassification"),sa=m(),J=n("div"),y(Bo.$$.fragment),ml=m(),wn=n("p"),pl=s("Wav2Vec2Conformer Model with a frame classification head on top for tasks like Speaker Diarization."),fl=m(),Io=n("p"),hl=s("Wav2Vec2Conformer was proposed in "),Ro=n("a"),ul=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),gl=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),vl=m(),No=n("p"),_l=s("This model inherits from "),jt=n("a"),bl=s("PreTrainedModel"),yl=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),wl=m(),qo=n("p"),Ml=s("This model is a PyTorch "),Ao=n("a"),Cl=s("nn.Module"),Tl=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Wl=m(),I=n("div"),y(So.$$.fragment),Vl=m(),fe=n("p"),kl=s("The "),Jt=n("a"),jl=s("Wav2Vec2ConformerForAudioFrameClassification"),Jl=s(" forward method, overrides the "),Mn=n("code"),Fl=s("__call__"),Zl=s(" special method."),$l=m(),y(ze.$$.fragment),Ul=m(),y(Ge.$$.fragment),la=m(),he=n("h2"),Be=n("a"),Cn=n("span"),y(Yo.$$.fragment),xl=m(),Tn=n("span"),Xl=s("Wav2Vec2ConformerForXVector"),ia=m(),F=n("div"),y(Po.$$.fragment),El=m(),Wn=n("p"),zl=s("Wav2Vec2Conformer Model with an XVector feature extraction head on top for tasks like Speaker Verification."),Gl=m(),Qo=n("p"),Bl=s("Wav2Vec2Conformer was proposed in "),Ho=n("a"),Il=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Rl=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Nl=m(),Do=n("p"),ql=s("This model inherits from "),Ft=n("a"),Al=s("PreTrainedModel"),Sl=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Yl=m(),Lo=n("p"),Pl=s("This model is a PyTorch "),Oo=n("a"),Ql=s("nn.Module"),Hl=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Dl=m(),R=n("div"),y(Ko.$$.fragment),Ll=m(),ue=n("p"),Ol=s("The "),Zt=n("a"),Kl=s("Wav2Vec2ConformerForXVector"),ei=s(" forward method, overrides the "),Vn=n("code"),oi=s("__call__"),ti=s(" special method."),ni=m(),y(Ie.$$.fragment),ai=m(),y(Re.$$.fragment),ca=m(),ge=n("h2"),Ne=n("a"),kn=n("span"),y(et.$$.fragment),ri=m(),jn=n("span"),si=s("Wav2Vec2ConformerForPreTraining"),da=m(),U=n("div"),y(ot.$$.fragment),li=m(),ve=n("p"),ii=s("Wav2Vec2Conformer Model with a quantizer and "),Jn=n("code"),ci=s("VQ"),di=s(` head on top.
Wav2Vec2Conformer was proposed in `),tt=n("a"),mi=s(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),pi=s(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),fi=m(),nt=n("p"),hi=s("This model inherits from "),$t=n("a"),ui=s("PreTrainedModel"),gi=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),vi=m(),at=n("p"),_i=s("This model is a PyTorch "),rt=n("a"),bi=s("nn.Module"),yi=s(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),wi=m(),N=n("div"),y(st.$$.fragment),Mi=m(),_e=n("p"),Ci=s("The "),Ut=n("a"),Ti=s("Wav2Vec2ConformerForPreTraining"),Wi=s(" forward method, overrides the "),Fn=n("code"),Vi=s("__call__"),ki=s(" special method."),ji=m(),y(qe.$$.fragment),Ji=m(),y(Ae.$$.fragment),this.h()},l(o){const u=rd('[data-svelte="svelte-1phssyn"]',document.head);d=a(u,"META",{name:!0,content:!0}),u.forEach(t),b=p(o),g=a(o,"H1",{class:!0});var lt=r(g);h=a(lt,"A",{id:!0,class:!0,href:!0});var Zn=r(h);_=a(Zn,"SPAN",{});var $n=r(_);w(i.$$.fragment,$n),$n.forEach(t),Zn.forEach(t),f=p(lt),k=a(lt,"SPAN",{});var Un=r(k);Ra=l(Un,"Wav2Vec2-Conformer"),Un.forEach(t),lt.forEach(t),In=p(o),O=a(o,"H2",{class:!0});var it=r(O);be=a(it,"A",{id:!0,class:!0,href:!0});var xn=r(be);Yt=a(xn,"SPAN",{});var Xn=r(Yt);w(eo.$$.fragment,Xn),Xn.forEach(t),xn.forEach(t),Na=p(it),Pt=a(it,"SPAN",{});var En=r(Pt);qa=l(En,"Overview"),En.forEach(t),it.forEach(t),Rn=p(o),ye=a(o,"P",{});var ct=r(ye);Aa=l(ct,"The Wav2Vec2-Conformer was added to an updated version of "),oo=a(ct,"A",{href:!0,rel:!0});var zn=r(oo);Sa=l(zn,"fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),zn.forEach(t),Ya=l(ct," by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino."),ct.forEach(t),Nn=p(o),ht=a(o,"P",{});var Gn=r(ht);Pa=l(Gn,"The official results of the model can be found in Table 3 and Table 4 of the paper."),Gn.forEach(t),qn=p(o),we=a(o,"P",{});var dt=r(we);Qa=l(dt,"The Wav2Vec2-Conformer weights were released by the Meta AI team within the "),to=a(dt,"A",{href:!0,rel:!0});var Bn=r(to);Ha=l(Bn,"Fairseq library"),Bn.forEach(t),Da=l(dt,"."),dt.forEach(t),An=p(o),ut=a(o,"P",{});var Fi=r(ut);La=l(Fi,"Tips:"),Fi.forEach(t),Sn=p(o),E=a(o,"UL",{});var Se=r(E);Y=a(Se,"LI",{});var Ye=r(Y);Oa=l(Ye,"Wav2Vec2-Conformer follows the same architecture as Wav2Vec2, but replaces the "),Qt=a(Ye,"EM",{});var Zi=r(Qt);Ka=l(Zi,"Attention"),Zi.forEach(t),er=l(Ye,"-block with a "),Ht=a(Ye,"EM",{});var $i=r(Ht);or=l($i,"Conformer"),$i.forEach(t),tr=l(Ye,`-block
as introduced in `),no=a(Ye,"A",{href:!0,rel:!0});var Ui=r(no);nr=l(Ui,"Conformer: Convolution-augmented Transformer for Speech Recognition"),Ui.forEach(t),ar=l(Ye,"."),Ye.forEach(t),rr=p(Se),Dt=a(Se,"LI",{});var xi=r(Dt);sr=l(xi,`For the same number of layers, Wav2Vec2-Conformer requires more parameters than Wav2Vec2, but also yields
an improved word error rate.`),xi.forEach(t),lr=p(Se),Lt=a(Se,"LI",{});var Xi=r(Lt);ir=l(Xi,"Wav2Vec2-Conformer uses the same tokenizer and feature extractor as Wav2Vec2."),Xi.forEach(t),cr=p(Se),ao=a(Se,"LI",{});var pa=r(ao);dr=l(pa,`Wav2Vec2-Conformer can use either no relative position embeddings, Transformer-XL-like position embeddings, or
rotary position embeddings by setting the correct `),Ot=a(pa,"CODE",{});var Ei=r(Ot);mr=l(Ei,"config.position_embeddings_type"),Ei.forEach(t),pr=l(pa,"."),pa.forEach(t),Se.forEach(t),Yn=p(o),Q=a(o,"P",{});var xt=r(Q);fr=l(xt,"This model was contributed by "),ro=a(xt,"A",{href:!0,rel:!0});var zi=r(ro);hr=l(zi,"patrickvonplaten"),zi.forEach(t),ur=l(xt,`.
The original code can be found `),so=a(xt,"A",{href:!0,rel:!0});var Gi=r(so);gr=l(Gi,"here"),Gi.forEach(t),vr=l(xt,"."),xt.forEach(t),Pn=p(o),K=a(o,"H2",{class:!0});var fa=r(K);Me=a(fa,"A",{id:!0,class:!0,href:!0});var Bi=r(Me);Kt=a(Bi,"SPAN",{});var Ii=r(Kt);w(lo.$$.fragment,Ii),Ii.forEach(t),Bi.forEach(t),_r=p(fa),en=a(fa,"SPAN",{});var Ri=r(en);br=l(Ri,"Documentation resources"),Ri.forEach(t),fa.forEach(t),Qn=p(o),Ce=a(o,"UL",{});var ha=r(Ce);on=a(ha,"LI",{});var Ni=r(on);gt=a(Ni,"A",{href:!0});var qi=r(gt);yr=l(qi,"Audio classification task guide"),qi.forEach(t),Ni.forEach(t),wr=p(ha),tn=a(ha,"LI",{});var Ai=r(tn);vt=a(Ai,"A",{href:!0});var Si=r(vt);Mr=l(Si,"Automatic speech recognition task guide"),Si.forEach(t),Ai.forEach(t),ha.forEach(t),Hn=p(o),ee=a(o,"H2",{class:!0});var ua=r(ee);Te=a(ua,"A",{id:!0,class:!0,href:!0});var Yi=r(Te);nn=a(Yi,"SPAN",{});var Pi=r(nn);w(io.$$.fragment,Pi),Pi.forEach(t),Yi.forEach(t),Cr=p(ua),an=a(ua,"SPAN",{});var Qi=r(an);Tr=l(Qi,"Wav2Vec2ConformerConfig"),Qi.forEach(t),ua.forEach(t),Dn=p(o),X=a(o,"DIV",{class:!0});var Pe=r(X);w(co.$$.fragment,Pe),Wr=p(Pe),oe=a(Pe,"P",{});var Xt=r(oe);Vr=l(Xt,"This is the configuration class to store the configuration of a "),_t=a(Xt,"A",{href:!0});var Hi=r(_t);kr=l(Hi,"Wav2Vec2ConformerModel"),Hi.forEach(t),jr=l(Xt,`. It is used to
instantiate an Wav2Vec2Conformer 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 Wav2Vec2Conformer
`),mo=a(Xt,"A",{href:!0,rel:!0});var Di=r(mo);Jr=l(Di,"facebook/wav2vec2-conformer-rel-pos-large"),Di.forEach(t),Fr=l(Xt,`
architecture.`),Xt.forEach(t),Zr=p(Pe),te=a(Pe,"P",{});var Et=r(te);$r=l(Et,"Configuration objects inherit from "),bt=a(Et,"A",{href:!0});var Li=r(bt);Ur=l(Li,"PretrainedConfig"),Li.forEach(t),xr=l(Et,` and can be used to control the model outputs. Read the
documentation from `),yt=a(Et,"A",{href:!0});var Oi=r(yt);Xr=l(Oi,"PretrainedConfig"),Oi.forEach(t),Er=l(Et," for more information."),Et.forEach(t),zr=p(Pe),w(We.$$.fragment,Pe),Pe.forEach(t),Ln=p(o),ne=a(o,"H2",{class:!0});var ga=r(ne);Ve=a(ga,"A",{id:!0,class:!0,href:!0});var Ki=r(Ve);rn=a(Ki,"SPAN",{});var ec=r(rn);w(po.$$.fragment,ec),ec.forEach(t),Ki.forEach(t),Gr=p(ga),sn=a(ga,"SPAN",{});var oc=r(sn);Br=l(oc,"Wav2Vec2Conformer specific outputs"),oc.forEach(t),ga.forEach(t),On=p(o),ae=a(o,"DIV",{class:!0});var va=r(ae);w(fo.$$.fragment,va),Ir=p(va),ho=a(va,"P",{});var _a=r(ho);Rr=l(_a,"Output type of "),wt=a(_a,"A",{href:!0});var tc=r(wt);Nr=l(tc,"Wav2Vec2ConformerForPreTraining"),tc.forEach(t),qr=l(_a,", with potential hidden states and attentions."),_a.forEach(t),va.forEach(t),Kn=p(o),re=a(o,"H2",{class:!0});var ba=r(re);ke=a(ba,"A",{id:!0,class:!0,href:!0});var nc=r(ke);ln=a(nc,"SPAN",{});var ac=r(ln);w(uo.$$.fragment,ac),ac.forEach(t),nc.forEach(t),Ar=p(ba),cn=a(ba,"SPAN",{});var rc=r(cn);Sr=l(rc,"Wav2Vec2ConformerModel"),rc.forEach(t),ba.forEach(t),ea=p(o),Z=a(o,"DIV",{class:!0});var H=r(Z);w(go.$$.fragment,H),Yr=p(H),vo=a(H,"P",{});var ya=r(vo);Pr=l(ya,`The bare Wav2Vec2Conformer Model transformer outputting raw hidden-states without any specific head on top.
Wav2Vec2Conformer was proposed in `),_o=a(ya,"A",{href:!0,rel:!0});var sc=r(_o);Qr=l(sc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),sc.forEach(t),Hr=l(ya,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ya.forEach(t),Dr=p(H),bo=a(H,"P",{});var wa=r(bo);Lr=l(wa,"This model inherits from "),Mt=a(wa,"A",{href:!0});var lc=r(Mt);Or=l(lc,"PreTrainedModel"),lc.forEach(t),Kr=l(wa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),wa.forEach(t),es=p(H),yo=a(H,"P",{});var Ma=r(yo);os=l(Ma,"This model is a PyTorch "),wo=a(Ma,"A",{href:!0,rel:!0});var ic=r(wo);ts=l(ic,"nn.Module"),ic.forEach(t),ns=l(Ma,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Ma.forEach(t),as=p(H),z=a(H,"DIV",{class:!0});var Qe=r(z);w(Mo.$$.fragment,Qe),rs=p(Qe),se=a(Qe,"P",{});var zt=r(se);ss=l(zt,"The "),Ct=a(zt,"A",{href:!0});var cc=r(Ct);ls=l(cc,"Wav2Vec2ConformerModel"),cc.forEach(t),is=l(zt," forward method, overrides the "),dn=a(zt,"CODE",{});var dc=r(dn);cs=l(dc,"__call__"),dc.forEach(t),ds=l(zt," special method."),zt.forEach(t),ms=p(Qe),w(je.$$.fragment,Qe),ps=p(Qe),w(Je.$$.fragment,Qe),Qe.forEach(t),H.forEach(t),oa=p(o),le=a(o,"H2",{class:!0});var Ca=r(le);Fe=a(Ca,"A",{id:!0,class:!0,href:!0});var mc=r(Fe);mn=a(mc,"SPAN",{});var pc=r(mn);w(Co.$$.fragment,pc),pc.forEach(t),mc.forEach(t),fs=p(Ca),pn=a(Ca,"SPAN",{});var fc=r(pn);hs=l(fc,"Wav2Vec2ConformerForCTC"),fc.forEach(t),Ca.forEach(t),ta=p(o),$=a(o,"DIV",{class:!0});var D=r($);w(To.$$.fragment,D),us=p(D),ie=a(D,"P",{});var Gt=r(ie);gs=l(Gt,"Wav2Vec2Conformer Model with a "),fn=a(Gt,"CODE",{});var hc=r(fn);vs=l(hc,"language modeling"),hc.forEach(t),_s=l(Gt,` head on top for Connectionist Temporal Classification (CTC).
Wav2Vec2Conformer was proposed in `),Wo=a(Gt,"A",{href:!0,rel:!0});var uc=r(Wo);bs=l(uc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),uc.forEach(t),ys=l(Gt,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Gt.forEach(t),ws=p(D),Vo=a(D,"P",{});var Ta=r(Vo);Ms=l(Ta,"This model inherits from "),Tt=a(Ta,"A",{href:!0});var gc=r(Tt);Cs=l(gc,"PreTrainedModel"),gc.forEach(t),Ts=l(Ta,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ta.forEach(t),Ws=p(D),ko=a(D,"P",{});var Wa=r(ko);Vs=l(Wa,"This model is a PyTorch "),jo=a(Wa,"A",{href:!0,rel:!0});var vc=r(jo);ks=l(vc,"nn.Module"),vc.forEach(t),js=l(Wa,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Wa.forEach(t),Js=p(D),G=a(D,"DIV",{class:!0});var He=r(G);w(Jo.$$.fragment,He),Fs=p(He),ce=a(He,"P",{});var Bt=r(ce);Zs=l(Bt,"The "),Wt=a(Bt,"A",{href:!0});var _c=r(Wt);$s=l(_c,"Wav2Vec2ConformerForCTC"),_c.forEach(t),Us=l(Bt," forward method, overrides the "),hn=a(Bt,"CODE",{});var bc=r(hn);xs=l(bc,"__call__"),bc.forEach(t),Xs=l(Bt," special method."),Bt.forEach(t),Es=p(He),w(Ze.$$.fragment,He),zs=p(He),w($e.$$.fragment,He),He.forEach(t),D.forEach(t),na=p(o),de=a(o,"H2",{class:!0});var Va=r(de);Ue=a(Va,"A",{id:!0,class:!0,href:!0});var yc=r(Ue);un=a(yc,"SPAN",{});var wc=r(un);w(Fo.$$.fragment,wc),wc.forEach(t),yc.forEach(t),Gs=p(Va),gn=a(Va,"SPAN",{});var Mc=r(gn);Bs=l(Mc,"Wav2Vec2ConformerForSequenceClassification"),Mc.forEach(t),Va.forEach(t),aa=p(o),j=a(o,"DIV",{class:!0});var q=r(j);w(Zo.$$.fragment,q),Is=p(q),vn=a(q,"P",{});var Cc=r(vn);Rs=l(Cc,`Wav2Vec2Conformer Model with a sequence classification head on top (a linear layer over the pooled output) for
tasks like SUPERB Keyword Spotting.`),Cc.forEach(t),Ns=p(q),$o=a(q,"P",{});var ka=r($o);qs=l(ka,"Wav2Vec2Conformer was proposed in "),Uo=a(ka,"A",{href:!0,rel:!0});var Tc=r(Uo);As=l(Tc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Tc.forEach(t),Ss=l(ka,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ka.forEach(t),Ys=p(q),xo=a(q,"P",{});var ja=r(xo);Ps=l(ja,"This model inherits from "),Vt=a(ja,"A",{href:!0});var Wc=r(Vt);Qs=l(Wc,"PreTrainedModel"),Wc.forEach(t),Hs=l(ja,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ja.forEach(t),Ds=p(q),Xo=a(q,"P",{});var Ja=r(Xo);Ls=l(Ja,"This model is a PyTorch "),Eo=a(Ja,"A",{href:!0,rel:!0});var Vc=r(Eo);Os=l(Vc,"nn.Module"),Vc.forEach(t),Ks=l(Ja,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Ja.forEach(t),el=p(q),B=a(q,"DIV",{class:!0});var De=r(B);w(zo.$$.fragment,De),ol=p(De),me=a(De,"P",{});var It=r(me);tl=l(It,"The "),kt=a(It,"A",{href:!0});var kc=r(kt);nl=l(kc,"Wav2Vec2ConformerForSequenceClassification"),kc.forEach(t),al=l(It," forward method, overrides the "),_n=a(It,"CODE",{});var jc=r(_n);rl=l(jc,"__call__"),jc.forEach(t),sl=l(It," special method."),It.forEach(t),ll=p(De),w(xe.$$.fragment,De),il=p(De),w(Xe.$$.fragment,De),De.forEach(t),q.forEach(t),ra=p(o),pe=a(o,"H2",{class:!0});var Fa=r(pe);Ee=a(Fa,"A",{id:!0,class:!0,href:!0});var Jc=r(Ee);bn=a(Jc,"SPAN",{});var Fc=r(bn);w(Go.$$.fragment,Fc),Fc.forEach(t),Jc.forEach(t),cl=p(Fa),yn=a(Fa,"SPAN",{});var Zc=r(yn);dl=l(Zc,"Wav2Vec2ConformerForAudioFrameClassification"),Zc.forEach(t),Fa.forEach(t),sa=p(o),J=a(o,"DIV",{class:!0});var A=r(J);w(Bo.$$.fragment,A),ml=p(A),wn=a(A,"P",{});var $c=r(wn);pl=l($c,"Wav2Vec2Conformer Model with a frame classification head on top for tasks like Speaker Diarization."),$c.forEach(t),fl=p(A),Io=a(A,"P",{});var Za=r(Io);hl=l(Za,"Wav2Vec2Conformer was proposed in "),Ro=a(Za,"A",{href:!0,rel:!0});var Uc=r(Ro);ul=l(Uc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Uc.forEach(t),gl=l(Za,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Za.forEach(t),vl=p(A),No=a(A,"P",{});var $a=r(No);_l=l($a,"This model inherits from "),jt=a($a,"A",{href:!0});var xc=r(jt);bl=l(xc,"PreTrainedModel"),xc.forEach(t),yl=l($a,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),$a.forEach(t),wl=p(A),qo=a(A,"P",{});var Ua=r(qo);Ml=l(Ua,"This model is a PyTorch "),Ao=a(Ua,"A",{href:!0,rel:!0});var Xc=r(Ao);Cl=l(Xc,"nn.Module"),Xc.forEach(t),Tl=l(Ua,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Ua.forEach(t),Wl=p(A),I=a(A,"DIV",{class:!0});var Le=r(I);w(So.$$.fragment,Le),Vl=p(Le),fe=a(Le,"P",{});var Rt=r(fe);kl=l(Rt,"The "),Jt=a(Rt,"A",{href:!0});var Ec=r(Jt);jl=l(Ec,"Wav2Vec2ConformerForAudioFrameClassification"),Ec.forEach(t),Jl=l(Rt," forward method, overrides the "),Mn=a(Rt,"CODE",{});var zc=r(Mn);Fl=l(zc,"__call__"),zc.forEach(t),Zl=l(Rt," special method."),Rt.forEach(t),$l=p(Le),w(ze.$$.fragment,Le),Ul=p(Le),w(Ge.$$.fragment,Le),Le.forEach(t),A.forEach(t),la=p(o),he=a(o,"H2",{class:!0});var xa=r(he);Be=a(xa,"A",{id:!0,class:!0,href:!0});var Gc=r(Be);Cn=a(Gc,"SPAN",{});var Bc=r(Cn);w(Yo.$$.fragment,Bc),Bc.forEach(t),Gc.forEach(t),xl=p(xa),Tn=a(xa,"SPAN",{});var Ic=r(Tn);Xl=l(Ic,"Wav2Vec2ConformerForXVector"),Ic.forEach(t),xa.forEach(t),ia=p(o),F=a(o,"DIV",{class:!0});var S=r(F);w(Po.$$.fragment,S),El=p(S),Wn=a(S,"P",{});var Rc=r(Wn);zl=l(Rc,"Wav2Vec2Conformer Model with an XVector feature extraction head on top for tasks like Speaker Verification."),Rc.forEach(t),Gl=p(S),Qo=a(S,"P",{});var Xa=r(Qo);Bl=l(Xa,"Wav2Vec2Conformer was proposed in "),Ho=a(Xa,"A",{href:!0,rel:!0});var Nc=r(Ho);Il=l(Nc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Nc.forEach(t),Rl=l(Xa,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Xa.forEach(t),Nl=p(S),Do=a(S,"P",{});var Ea=r(Do);ql=l(Ea,"This model inherits from "),Ft=a(Ea,"A",{href:!0});var qc=r(Ft);Al=l(qc,"PreTrainedModel"),qc.forEach(t),Sl=l(Ea,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ea.forEach(t),Yl=p(S),Lo=a(S,"P",{});var za=r(Lo);Pl=l(za,"This model is a PyTorch "),Oo=a(za,"A",{href:!0,rel:!0});var Ac=r(Oo);Ql=l(Ac,"nn.Module"),Ac.forEach(t),Hl=l(za,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),za.forEach(t),Dl=p(S),R=a(S,"DIV",{class:!0});var Oe=r(R);w(Ko.$$.fragment,Oe),Ll=p(Oe),ue=a(Oe,"P",{});var Nt=r(ue);Ol=l(Nt,"The "),Zt=a(Nt,"A",{href:!0});var Sc=r(Zt);Kl=l(Sc,"Wav2Vec2ConformerForXVector"),Sc.forEach(t),ei=l(Nt," forward method, overrides the "),Vn=a(Nt,"CODE",{});var Yc=r(Vn);oi=l(Yc,"__call__"),Yc.forEach(t),ti=l(Nt," special method."),Nt.forEach(t),ni=p(Oe),w(Ie.$$.fragment,Oe),ai=p(Oe),w(Re.$$.fragment,Oe),Oe.forEach(t),S.forEach(t),ca=p(o),ge=a(o,"H2",{class:!0});var Ga=r(ge);Ne=a(Ga,"A",{id:!0,class:!0,href:!0});var Pc=r(Ne);kn=a(Pc,"SPAN",{});var Qc=r(kn);w(et.$$.fragment,Qc),Qc.forEach(t),Pc.forEach(t),ri=p(Ga),jn=a(Ga,"SPAN",{});var Hc=r(jn);si=l(Hc,"Wav2Vec2ConformerForPreTraining"),Hc.forEach(t),Ga.forEach(t),da=p(o),U=a(o,"DIV",{class:!0});var L=r(U);w(ot.$$.fragment,L),li=p(L),ve=a(L,"P",{});var qt=r(ve);ii=l(qt,"Wav2Vec2Conformer Model with a quantizer and "),Jn=a(qt,"CODE",{});var Dc=r(Jn);ci=l(Dc,"VQ"),Dc.forEach(t),di=l(qt,` head on top.
Wav2Vec2Conformer was proposed in `),tt=a(qt,"A",{href:!0,rel:!0});var Lc=r(tt);mi=l(Lc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Lc.forEach(t),pi=l(qt,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),qt.forEach(t),fi=p(L),nt=a(L,"P",{});var Ba=r(nt);hi=l(Ba,"This model inherits from "),$t=a(Ba,"A",{href:!0});var Oc=r($t);ui=l(Oc,"PreTrainedModel"),Oc.forEach(t),gi=l(Ba,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ba.forEach(t),vi=p(L),at=a(L,"P",{});var Ia=r(at);_i=l(Ia,"This model is a PyTorch "),rt=a(Ia,"A",{href:!0,rel:!0});var Kc=r(rt);bi=l(Kc,"nn.Module"),Kc.forEach(t),yi=l(Ia,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Ia.forEach(t),wi=p(L),N=a(L,"DIV",{class:!0});var Ke=r(N);w(st.$$.fragment,Ke),Mi=p(Ke),_e=a(Ke,"P",{});var At=r(_e);Ci=l(At,"The "),Ut=a(At,"A",{href:!0});var ed=r(Ut);Ti=l(ed,"Wav2Vec2ConformerForPreTraining"),ed.forEach(t),Wi=l(At," forward method, overrides the "),Fn=a(At,"CODE",{});var od=r(Fn);Vi=l(od,"__call__"),od.forEach(t),ki=l(At," special method."),At.forEach(t),ji=p(Ke),w(qe.$$.fragment,Ke),Ji=p(Ke),w(Ae.$$.fragment,Ke),Ke.forEach(t),L.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(wd)),c(h,"id","wav2vec2conformer"),c(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(h,"href","#wav2vec2conformer"),c(g,"class","relative group"),c(be,"id","overview"),c(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(be,"href","#overview"),c(O,"class","relative group"),c(oo,"href","https://arxiv.org/abs/2010.05171"),c(oo,"rel","nofollow"),c(to,"href","https://github.com/pytorch/fairseq/blob/main/examples/wav2vec/README.md#pre-trained-models"),c(to,"rel","nofollow"),c(no,"href","https://arxiv.org/abs/2005.08100"),c(no,"rel","nofollow"),c(ro,"href","https://huggingface.co/patrickvonplaten"),c(ro,"rel","nofollow"),c(so,"href","https://github.com/pytorch/fairseq/tree/main/examples/wav2vec"),c(so,"rel","nofollow"),c(Me,"id","documentation-resources"),c(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Me,"href","#documentation-resources"),c(K,"class","relative group"),c(gt,"href","../tasks/audio_classification"),c(vt,"href","../tasks/asr"),c(Te,"id","transformers.Wav2Vec2ConformerConfig"),c(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Te,"href","#transformers.Wav2Vec2ConformerConfig"),c(ee,"class","relative group"),c(_t,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel"),c(mo,"href","https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large"),c(mo,"rel","nofollow"),c(bt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(yt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ve,"id","transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"),c(Ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ve,"href","#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"),c(ne,"class","relative group"),c(wt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForPreTraining"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ke,"id","transformers.Wav2Vec2ConformerModel"),c(ke,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ke,"href","#transformers.Wav2Vec2ConformerModel"),c(re,"class","relative group"),c(_o,"href","https://arxiv.org/abs/2006.11477"),c(_o,"rel","nofollow"),c(Mt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(wo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(wo,"rel","nofollow"),c(Ct,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel"),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(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(Fe,"id","transformers.Wav2Vec2ConformerForCTC"),c(Fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Fe,"href","#transformers.Wav2Vec2ConformerForCTC"),c(le,"class","relative group"),c(Wo,"href","https://arxiv.org/abs/2006.11477"),c(Wo,"rel","nofollow"),c(Tt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(jo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(jo,"rel","nofollow"),c(Wt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC"),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($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ue,"id","transformers.Wav2Vec2ConformerForSequenceClassification"),c(Ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ue,"href","#transformers.Wav2Vec2ConformerForSequenceClassification"),c(de,"class","relative group"),c(Uo,"href","https://arxiv.org/abs/2006.11477"),c(Uo,"rel","nofollow"),c(Vt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Eo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(Eo,"rel","nofollow"),c(kt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForSequenceClassification"),c(B,"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(Ee,"id","transformers.Wav2Vec2ConformerForAudioFrameClassification"),c(Ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ee,"href","#transformers.Wav2Vec2ConformerForAudioFrameClassification"),c(pe,"class","relative group"),c(Ro,"href","https://arxiv.org/abs/2006.11477"),c(Ro,"rel","nofollow"),c(jt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Ao,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(Ao,"rel","nofollow"),c(Jt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForAudioFrameClassification"),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"),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(Be,"id","transformers.Wav2Vec2ConformerForXVector"),c(Be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Be,"href","#transformers.Wav2Vec2ConformerForXVector"),c(he,"class","relative group"),c(Ho,"href","https://arxiv.org/abs/2006.11477"),c(Ho,"rel","nofollow"),c(Ft,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Oo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(Oo,"rel","nofollow"),c(Zt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForXVector"),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(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(Ne,"id","transformers.Wav2Vec2ConformerForPreTraining"),c(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ne,"href","#transformers.Wav2Vec2ConformerForPreTraining"),c(ge,"class","relative group"),c(tt,"href","https://arxiv.org/abs/2006.11477"),c(tt,"rel","nofollow"),c($t,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(rt,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),c(rt,"rel","nofollow"),c(Ut,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForPreTraining"),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(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,u){e(document.head,d),v(o,b,u),v(o,g,u),e(g,h),e(h,_),M(i,_,null),e(g,f),e(g,k),e(k,Ra),v(o,In,u),v(o,O,u),e(O,be),e(be,Yt),M(eo,Yt,null),e(O,Na),e(O,Pt),e(Pt,qa),v(o,Rn,u),v(o,ye,u),e(ye,Aa),e(ye,oo),e(oo,Sa),e(ye,Ya),v(o,Nn,u),v(o,ht,u),e(ht,Pa),v(o,qn,u),v(o,we,u),e(we,Qa),e(we,to),e(to,Ha),e(we,Da),v(o,An,u),v(o,ut,u),e(ut,La),v(o,Sn,u),v(o,E,u),e(E,Y),e(Y,Oa),e(Y,Qt),e(Qt,Ka),e(Y,er),e(Y,Ht),e(Ht,or),e(Y,tr),e(Y,no),e(no,nr),e(Y,ar),e(E,rr),e(E,Dt),e(Dt,sr),e(E,lr),e(E,Lt),e(Lt,ir),e(E,cr),e(E,ao),e(ao,dr),e(ao,Ot),e(Ot,mr),e(ao,pr),v(o,Yn,u),v(o,Q,u),e(Q,fr),e(Q,ro),e(ro,hr),e(Q,ur),e(Q,so),e(so,gr),e(Q,vr),v(o,Pn,u),v(o,K,u),e(K,Me),e(Me,Kt),M(lo,Kt,null),e(K,_r),e(K,en),e(en,br),v(o,Qn,u),v(o,Ce,u),e(Ce,on),e(on,gt),e(gt,yr),e(Ce,wr),e(Ce,tn),e(tn,vt),e(vt,Mr),v(o,Hn,u),v(o,ee,u),e(ee,Te),e(Te,nn),M(io,nn,null),e(ee,Cr),e(ee,an),e(an,Tr),v(o,Dn,u),v(o,X,u),M(co,X,null),e(X,Wr),e(X,oe),e(oe,Vr),e(oe,_t),e(_t,kr),e(oe,jr),e(oe,mo),e(mo,Jr),e(oe,Fr),e(X,Zr),e(X,te),e(te,$r),e(te,bt),e(bt,Ur),e(te,xr),e(te,yt),e(yt,Xr),e(te,Er),e(X,zr),M(We,X,null),v(o,Ln,u),v(o,ne,u),e(ne,Ve),e(Ve,rn),M(po,rn,null),e(ne,Gr),e(ne,sn),e(sn,Br),v(o,On,u),v(o,ae,u),M(fo,ae,null),e(ae,Ir),e(ae,ho),e(ho,Rr),e(ho,wt),e(wt,Nr),e(ho,qr),v(o,Kn,u),v(o,re,u),e(re,ke),e(ke,ln),M(uo,ln,null),e(re,Ar),e(re,cn),e(cn,Sr),v(o,ea,u),v(o,Z,u),M(go,Z,null),e(Z,Yr),e(Z,vo),e(vo,Pr),e(vo,_o),e(_o,Qr),e(vo,Hr),e(Z,Dr),e(Z,bo),e(bo,Lr),e(bo,Mt),e(Mt,Or),e(bo,Kr),e(Z,es),e(Z,yo),e(yo,os),e(yo,wo),e(wo,ts),e(yo,ns),e(Z,as),e(Z,z),M(Mo,z,null),e(z,rs),e(z,se),e(se,ss),e(se,Ct),e(Ct,ls),e(se,is),e(se,dn),e(dn,cs),e(se,ds),e(z,ms),M(je,z,null),e(z,ps),M(Je,z,null),v(o,oa,u),v(o,le,u),e(le,Fe),e(Fe,mn),M(Co,mn,null),e(le,fs),e(le,pn),e(pn,hs),v(o,ta,u),v(o,$,u),M(To,$,null),e($,us),e($,ie),e(ie,gs),e(ie,fn),e(fn,vs),e(ie,_s),e(ie,Wo),e(Wo,bs),e(ie,ys),e($,ws),e($,Vo),e(Vo,Ms),e(Vo,Tt),e(Tt,Cs),e(Vo,Ts),e($,Ws),e($,ko),e(ko,Vs),e(ko,jo),e(jo,ks),e(ko,js),e($,Js),e($,G),M(Jo,G,null),e(G,Fs),e(G,ce),e(ce,Zs),e(ce,Wt),e(Wt,$s),e(ce,Us),e(ce,hn),e(hn,xs),e(ce,Xs),e(G,Es),M(Ze,G,null),e(G,zs),M($e,G,null),v(o,na,u),v(o,de,u),e(de,Ue),e(Ue,un),M(Fo,un,null),e(de,Gs),e(de,gn),e(gn,Bs),v(o,aa,u),v(o,j,u),M(Zo,j,null),e(j,Is),e(j,vn),e(vn,R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Vn),e(Vn,oi),e(ue,ti),e(R,ni),M(Ie,R,null),e(R,ai),M(Re,R,null),v(o,ca,u),v(o,ge,u),e(ge,Ne),e(Ne,kn),M(et,kn,null),e(ge,ri),e(ge,jn),e(jn,si),v(o,da,u),v(o,U,u),M(ot,U,null),e(U,li),e(U,ve),e(ve,ii),e(ve,Jn),e(Jn,ci),e(ve,di),e(ve,tt),e(tt,mi),e(ve,pi),e(U,fi),e(U,nt),e(nt,hi),e(nt,$t),e($t,ui),e(nt,gi),e(U,vi),e(U,at),e(at,_i),e(at,rt),e(rt,bi),e(at,yi),e(U,wi),e(U,N),M(st,N,null),e(N,Mi),e(N,_e),e(_e,Ci),e(_e,Ut),e(Ut,Ti),e(_e,Wi),e(_e,Fn),e(Fn,Vi),e(_e,ki),e(N,ji),M(qe,N,null),e(N,Ji),M(Ae,N,null),ma=!0},p(o,[u]){const lt={};u&2&&(lt.$$scope={dirty:u,ctx:o}),We.$set(lt);const Zn={};u&2&&(Zn.$$scope={dirty:u,ctx:o}),je.$set(Zn);const $n={};u&2&&($n.$$scope={dirty:u,ctx:o}),Je.$set($n);const Un={};u&2&&(Un.$$scope={dirty:u,ctx:o}),Ze.$set(Un);const it={};u&2&&(it.$$scope={dirty:u,ctx:o}),$e.$set(it);const xn={};u&2&&(xn.$$scope={dirty:u,ctx:o}),xe.$set(xn);const Xn={};u&2&&(Xn.$$scope={dirty:u,ctx:o}),Xe.$set(Xn);const En={};u&2&&(En.$$scope={dirty:u,ctx:o}),ze.$set(En);const ct={};u&2&&(ct.$$scope={dirty:u,ctx:o}),Ge.$set(ct);const zn={};u&2&&(zn.$$scope={dirty:u,ctx:o}),Ie.$set(zn);const Gn={};u&2&&(Gn.$$scope={dirty:u,ctx:o}),Re.$set(Gn);const dt={};u&2&&(dt.$$scope={dirty:u,ctx:o}),qe.$set(dt);const Bn={};u&2&&(Bn.$$scope={dirty:u,ctx:o}),Ae.$set(Bn)},i(o){ma||(C(i.$$.fragment,o),C(eo.$$.fragment,o),C(lo.$$.fragment,o),C(io.$$.fragment,o),C(co.$$.fragment,o),C(We.$$.fragment,o),C(po.$$.fragment,o),C(fo.$$.fragment,o),C(uo.$$.fragment,o),C(go.$$.fragment,o),C(Mo.$$.fragment,o),C(je.$$.fragment,o),C(Je.$$.fragment,o),C(Co.$$.fragment,o),C(To.$$.fragment,o),C(Jo.$$.fragment,o),C(Ze.$$.fragment,o),C($e.$$.fragment,o),C(Fo.$$.fragment,o),C(Zo.$$.fragment,o),C(zo.$$.fragment,o),C(xe.$$.fragment,o),C(Xe.$$.fragment,o),C(Go.$$.fragment,o),C(Bo.$$.fragment,o),C(So.$$.fragment,o),C(ze.$$.fragment,o),C(Ge.$$.fragment,o),C(Yo.$$.fragment,o),C(Po.$$.fragment,o),C(Ko.$$.fragment,o),C(Ie.$$.fragment,o),C(Re.$$.fragment,o),C(et.$$.fragment,o),C(ot.$$.fragment,o),C(st.$$.fragment,o),C(qe.$$.fragment,o),C(Ae.$$.fragment,o),ma=!0)},o(o){T(i.$$.fragment,o),T(eo.$$.fragment,o),T(lo.$$.fragment,o),T(io.$$.fragment,o),T(co.$$.fragment,o),T(We.$$.fragment,o),T(po.$$.fragment,o),T(fo.$$.fragment,o),T(uo.$$.fragment,o),T(go.$$.fragment,o),T(Mo.$$.fragment,o),T(je.$$.fragment,o),T(Je.$$.fragment,o),T(Co.$$.fragment,o),T(To.$$.fragment,o),T(Jo.$$.fragment,o),T(Ze.$$.fragment,o),T($e.$$.fragment,o),T(Fo.$$.fragment,o),T(Zo.$$.fragment,o),T(zo.$$.fragment,o),T(xe.$$.fragment,o),T(Xe.$$.fragment,o),T(Go.$$.fragment,o),T(Bo.$$.fragment,o),T(So.$$.fragment,o),T(ze.$$.fragment,o),T(Ge.$$.fragment,o),T(Yo.$$.fragment,o),T(Po.$$.fragment,o),T(Ko.$$.fragment,o),T(Ie.$$.fragment,o),T(Re.$$.fragment,o),T(et.$$.fragment,o),T(ot.$$.fragment,o),T(st.$$.fragment,o),T(qe.$$.fragment,o),T(Ae.$$.fragment,o),ma=!1},d(o){t(d),o&&t(b),o&&t(g),W(i),o&&t(In),o&&t(O),W(eo),o&&t(Rn),o&&t(ye),o&&t(Nn),o&&t(ht),o&&t(qn),o&&t(we),o&&t(An),o&&t(ut),o&&t(Sn),o&&t(E),o&&t(Yn),o&&t(Q),o&&t(Pn),o&&t(K),W(lo),o&&t(Qn),o&&t(Ce),o&&t(Hn),o&&t(ee),W(io),o&&t(Dn),o&&t(X),W(co),W(We),o&&t(Ln),o&&t(ne),W(po),o&&t(On),o&&t(ae),W(fo),o&&t(Kn),o&&t(re),W(uo),o&&t(ea),o&&t(Z),W(go),W(Mo),W(je),W(Je),o&&t(oa),o&&t(le),W(Co),o&&t(ta),o&&t($),W(To),W(Jo),W(Ze),W($e),o&&t(na),o&&t(de),W(Fo),o&&t(aa),o&&t(j),W(Zo),W(zo),W(xe),W(Xe),o&&t(ra),o&&t(pe),W(Go),o&&t(sa),o&&t(J),W(Bo),W(So),W(ze),W(Ge),o&&t(la),o&&t(he),W(Yo),o&&t(ia),o&&t(F),W(Po),W(Ko),W(Ie),W(Re),o&&t(ca),o&&t(ge),W(et),o&&t(da),o&&t(U),W(ot),W(st),W(qe),W(Ae)}}}const wd={local:"wav2vec2conformer",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.Wav2Vec2ConformerConfig",title:"Wav2Vec2ConformerConfig"},{local:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",title:"Wav2Vec2Conformer specific outputs"},{local:"transformers.Wav2Vec2ConformerModel",title:"Wav2Vec2ConformerModel"},{local:"transformers.Wav2Vec2ConformerForCTC",title:"Wav2Vec2ConformerForCTC"},{local:"transformers.Wav2Vec2ConformerForSequenceClassification",title:"Wav2Vec2ConformerForSequenceClassification"},{local:"transformers.Wav2Vec2ConformerForAudioFrameClassification",title:"Wav2Vec2ConformerForAudioFrameClassification"},{local:"transformers.Wav2Vec2ConformerForXVector",title:"Wav2Vec2ConformerForXVector"},{local:"transformers.Wav2Vec2ConformerForPreTraining",title:"Wav2Vec2ConformerForPreTraining"}],title:"Wav2Vec2-Conformer"};function Md(V){return sd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jd extends td{constructor(d){super();nd(this,d,Md,yd,ad,{})}}export{Jd as default,wd as metadata};
