import{S as $s,i as Js,s as Us,e as n,k as p,w as b,t as r,M as Fs,c as a,d as o,m,a as s,x as w,h as l,b as c,G as e,g as _,y as E,q as M,o as T,B as W,v as xs,L as jo}from"../../chunks/vendor-hf-doc-builder.js";import{T as xa}from"../../chunks/Tip-hf-doc-builder.js";import{D as He}from"../../chunks/Docstring-hf-doc-builder.js";import{C as $o}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Le}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ko}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Zs(S){let d,v,g,h,y;return h=new $o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNFV0NvbmZpZyUyQyUyMFNFV01vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNFVyUyMGFzYXBwJTJGc2V3LXRpbnktMTAwayUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTRVdDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwYXNhcHAlMkZzZXctdGlueS0xMDBrJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBTRVdNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SEWConfig, SEWModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SEW asapp/sew-tiny-100k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SEWConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the asapp/sew-tiny-100k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SEWModel(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"),v=r("Example:"),g=p(),b(h.$$.fragment)},l(i){d=a(i,"P",{});var u=s(d);v=l(u,"Example:"),u.forEach(o),g=m(i),w(h.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,g,u),E(h,i,u),y=!0},p:jo,i(i){y||(M(h.$$.fragment,i),y=!0)},o(i){T(h.$$.fragment,i),y=!1},d(i){i&&o(d),i&&o(g),W(h,i)}}}function zs(S){let d,v,g,h,y;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=r("Module"),y=r(`
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 u=s(d);v=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var $=s(g);h=l($,"Module"),$.forEach(o),y=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(i,u){_(i,d,u),e(d,v),e(d,g),e(g,h),e(d,y)},d(i){i&&o(d)}}}function Gs(S){let d,v,g,h,y;return h=new $o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTRVdNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmFzYXBwJTJGc2V3LXRpbnktMTAway1mdC1sczEwMGglMjIpJTBBbW9kZWwlMjAlM0QlMjBTRVdNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYXNhcHAlMkZzZXctdGlueS0xMDBrLWZ0LWxzMTAwaCUyMiklMEElMEElMjMlMjBhdWRpbyUyMGZpbGUlMjBpcyUyMGRlY29kZWQlMjBvbiUyMHRoZSUyMGZseSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEc2FtcGxpbmdfcmF0ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SEWModel
<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;asapp/sew-tiny-100k-ft-ls100h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SEWModel.from_pretrained(<span class="hljs-string">&quot;asapp/sew-tiny-100k-ft-ls100h&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">512</span>]`}}),{c(){d=n("p"),v=r("Example:"),g=p(),b(h.$$.fragment)},l(i){d=a(i,"P",{});var u=s(d);v=l(u,"Example:"),u.forEach(o),g=m(i),w(h.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,g,u),E(h,i,u),y=!0},p:jo,i(i){y||(M(h.$$.fragment,i),y=!0)},o(i){T(h.$$.fragment,i),y=!1},d(i){i&&o(d),i&&o(g),W(h,i)}}}function Rs(S){let d,v,g,h,y;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=r("Module"),y=r(`
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 u=s(d);v=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var $=s(g);h=l($,"Module"),$.forEach(o),y=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(i,u){_(i,d,u),e(d,v),e(d,g),e(g,h),e(d,y)},d(i){i&&o(d)}}}function qs(S){let d,v,g,h,y;return h=new $o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBTRVdGb3JDVEMlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kZW1vJTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuc29ydCglMjJpZCUyMiklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJhc2FwcCUyRnNldy10aW55LTEwMGstZnQtbHMxMDBoJTIyKSUwQW1vZGVsJTIwJTNEJTIwU0VXRm9yQ1RDLmZyb21fcHJldHJhaW5lZCglMjJhc2FwcCUyRnNldy10aW55LTEwMGstZnQtbHMxMDBoJTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQXByZWRpY3RlZF9pZHMlMjAlM0QlMjB0b3JjaC5hcmdtYXgobG9naXRzJTJDJTIwZGltJTNELTEpJTBBJTBBJTIzJTIwdHJhbnNjcmliZSUyMHNwZWVjaCUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKHByZWRpY3RlZF9pZHMpJTBBdHJhbnNjcmlwdGlvbiU1QjAlNUQlMEElMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRGRhdGFzZXQlNUIwJTVEJTVCJTIydGV4dCUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUwQSUyMyUyMGNvbXB1dGUlMjBsb3NzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SEWForCTC
<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;asapp/sew-tiny-100k-ft-ls100h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SEWForCTC.from_pretrained(<span class="hljs-string">&quot;asapp/sew-tiny-100k-ft-ls100h&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 APPOSTILE OF THE MIDDLE CLASSES AND WE ARE GLAD TO WELCOME HIS GOSPOLLE&#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">0.42</span>`}}),{c(){d=n("p"),v=r("Example:"),g=p(),b(h.$$.fragment)},l(i){d=a(i,"P",{});var u=s(d);v=l(u,"Example:"),u.forEach(o),g=m(i),w(h.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,g,u),E(h,i,u),y=!0},p:jo,i(i){y||(M(h.$$.fragment,i),y=!0)},o(i){T(h.$$.fragment,i),y=!1},d(i){i&&o(d),i&&o(g),W(h,i)}}}function Ns(S){let d,v,g,h,y;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),h=r("Module"),y=r(`
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 u=s(d);v=l(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var $=s(g);h=l($,"Module"),$.forEach(o),y=l(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(i,u){_(i,d,u),e(d,v),e(d,g),e(g,h),e(d,y)},d(i){i&&o(d)}}}function Xs(S){let d,v,g,h,y;return h=new $o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwU0VXRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMmFudG9uLWwlMkZzZXctbWlkLTEwMGstZnQta2V5d29yZC1zcG90dGluZyUyMiklMEFtb2RlbCUyMCUzRCUyMFNFV0ZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFudG9uLWwlMkZzZXctbWlkLTEwMGstZnQta2V5d29yZC1zcG90dGluZyUyMiklMEElMEElMjMlMjBhdWRpbyUyMGZpbGUlMjBpcyUyMGRlY29kZWQlMjBvbiUyMHRoZSUyMGZseSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmdtYXgobG9naXRzJTJDJTIwZGltJTNELTEpLml0ZW0oKSUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZHMlNUQlMEFwcmVkaWN0ZWRfbGFiZWwlMEElMEElMjMlMjBjb21wdXRlJTIwbG9zcyUyMC0lMjB0YXJnZXRfbGFiZWwlMjBpcyUyMGUuZy4lMjAlMjJkb3duJTIyJTBBdGFyZ2V0X2xhYmVsJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCMCU1RCUwQWlucHV0cyU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUJtb2RlbC5jb25maWcubGFiZWwyaWQlNUJ0YXJnZXRfbGFiZWwlNUQlNUQpJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, SEWForSequenceClassification
<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;anton-l/sew-mid-100k-ft-keyword-spotting&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SEWForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;anton-l/sew-mid-100k-ft-keyword-spotting&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>predicted_label
<span class="hljs-string">&#x27;_unknown_&#x27;</span>

<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
<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">9.52</span>`}}),{c(){d=n("p"),v=r("Example:"),g=p(),b(h.$$.fragment)},l(i){d=a(i,"P",{});var u=s(d);v=l(u,"Example:"),u.forEach(o),g=m(i),w(h.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,g,u),E(h,i,u),y=!0},p:jo,i(i){y||(M(h.$$.fragment,i),y=!0)},o(i){T(h.$$.fragment,i),y=!1},d(i){i&&o(d),i&&o(g),W(h,i)}}}function Is(S){let d,v,g,h,y,i,u,$,Jo,At,R,H,vt,_e,Uo,bt,Fo,Bt,L,xo,ye,Zo,zo,Qt,Ke,Go,Yt,Oe,wt,Ro,Dt,et,qo,Ht,K,Et,No,Xo,ve,Io,tt,Po,Vo,Lt,O,Ao,be,Bo,Qo,Kt,q,ee,Mt,we,Yo,Tt,Do,Ot,te,Wt,ot,Ho,Lo,Ct,nt,Ko,eo,N,oe,St,Ee,Oo,kt,en,to,J,Me,tn,X,on,at,nn,an,Te,sn,rn,ln,I,cn,st,dn,pn,rt,mn,fn,hn,ne,oo,P,ae,jt,We,un,$t,gn,no,k,Ce,_n,Se,yn,ke,vn,bn,wn,je,En,lt,Mn,Tn,Wn,$e,Cn,Je,Sn,kn,jn,U,Ue,$n,V,Jn,it,Un,Fn,Jt,xn,Zn,zn,se,Gn,re,ao,A,le,Ut,Fe,Rn,Ft,qn,so,j,xe,Nn,B,Xn,xt,In,Pn,Ze,Vn,An,Bn,ze,Qn,ct,Yn,Dn,Hn,Ge,Ln,Re,Kn,On,ea,F,qe,ta,Q,oa,dt,na,aa,Zt,sa,ra,la,ie,ia,ce,ro,Y,de,zt,Ne,ca,Gt,da,lo,C,Xe,pa,Rt,ma,fa,Ie,ha,Pe,ua,ga,_a,Ve,ya,pt,va,ba,wa,Ae,Ea,Be,Ma,Ta,Wa,x,Qe,Ca,D,Sa,mt,ka,ja,qt,$a,Ja,Ua,pe,Fa,me,io;return i=new Le({}),_e=new Le({}),we=new Le({}),Ee=new Le({}),Me=new He({props:{name:"class transformers.SEWConfig",anchor:"transformers.SEWConfig",parameters:[{name:"vocab_size",val:" = 32"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"squeeze_factor",val:" = 2"},{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:"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:" = (64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)"},{name:"conv_kernel",val:" = (10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)"},{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:"ctc_loss_reduction",val:" = 'mean'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SEWConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the SEW model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <code>SEW</code>.`,name:"vocab_size"},{anchor:"transformers.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.squeeze_factor",description:`<strong>squeeze_factor</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Sequence length downsampling factor after the encoder and upsampling factor after the transformer.`,name:"squeeze_factor"},{anchor:"transformers.SEWConfig.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.SEWConfig.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.SEWConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.SEWConfig.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.SEWConfig.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/sew#transformers.SEWForCTC">SEWForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(64, 128, 128, 128, 128, 256, 256, 256, 256, 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.SEWConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)</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.SEWConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)</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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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.SEWConfig.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/sew#transformers.SEWForCTC">SEWForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.SEWConfig.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/sew#transformers.SEWForCTC">SEWForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.SEWConfig.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#transformers.Wav2Vec2ForSequenceClassification">Wav2Vec2ForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.SEWConfig.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/sew/configuration_sew.py#L32"}}),ne=new ko({props:{anchor:"transformers.SEWConfig.example",$$slots:{default:[Zs]},$$scope:{ctx:S}}}),We=new Le({}),Ce=new He({props:{name:"class transformers.SEWModel",anchor:"transformers.SEWModel",parameters:[{name:"config",val:": SEWConfig"}],parametersDescription:[{anchor:"transformers.SEWModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/sew#transformers.SEWConfig">SEWConfig</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/sew/modeling_sew.py#L841"}}),Ue=new He({props:{name:"forward",anchor:"transformers.SEWModel.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.SEWModel.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.SEWModel.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>`,name:"attention_mask"},{anchor:"transformers.SEWModel.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.SEWModel.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.SEWModel.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/sew/modeling_sew.py#L908",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/sew#transformers.SEWConfig"
>SEWConfig</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>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.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),se=new xa({props:{$$slots:{default:[zs]},$$scope:{ctx:S}}}),re=new ko({props:{anchor:"transformers.SEWModel.forward.example",$$slots:{default:[Gs]},$$scope:{ctx:S}}}),Fe=new Le({}),xe=new He({props:{name:"class transformers.SEWForCTC",anchor:"transformers.SEWForCTC",parameters:[{name:"config",val:""},{name:"target_lang",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.SEWForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/sew#transformers.SEWConfig">SEWConfig</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/sew/modeling_sew.py#L970"}}),qe=new He({props:{name:"forward",anchor:"transformers.SEWForCTC.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.SEWForCTC.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.SEWForCTC.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>`,name:"attention_mask"},{anchor:"transformers.SEWForCTC.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.SEWForCTC.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.SEWForCTC.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.SEWForCTC.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/sew/modeling_sew.py#L1042",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/sew#transformers.SEWConfig"
>SEWConfig</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>
`}}),ie=new xa({props:{$$slots:{default:[Rs]},$$scope:{ctx:S}}}),ce=new ko({props:{anchor:"transformers.SEWForCTC.forward.example",$$slots:{default:[qs]},$$scope:{ctx:S}}}),Ne=new Le({}),Xe=new He({props:{name:"class transformers.SEWForSequenceClassification",anchor:"transformers.SEWForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SEWForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/sew#transformers.SEWConfig">SEWConfig</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/sew/modeling_sew.py#L1130"}}),Qe=new He({props:{name:"forward",anchor:"transformers.SEWForSequenceClassification.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.SEWForSequenceClassification.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.SEWForSequenceClassification.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>`,name:"attention_mask"},{anchor:"transformers.SEWForSequenceClassification.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.SEWForSequenceClassification.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.SEWForSequenceClassification.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.SEWForSequenceClassification.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/sew/modeling_sew.py#L1175",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/sew#transformers.SEWConfig"
>SEWConfig</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>
`}}),pe=new xa({props:{$$slots:{default:[Ns]},$$scope:{ctx:S}}}),me=new ko({props:{anchor:"transformers.SEWForSequenceClassification.forward.example",$$slots:{default:[Xs]},$$scope:{ctx:S}}}),{c(){d=n("meta"),v=p(),g=n("h1"),h=n("a"),y=n("span"),b(i.$$.fragment),u=p(),$=n("span"),Jo=r("SEW"),At=p(),R=n("h2"),H=n("a"),vt=n("span"),b(_e.$$.fragment),Uo=p(),bt=n("span"),Fo=r("Overview"),Bt=p(),L=n("p"),xo=r("SEW (Squeezed and Efficient Wav2Vec) was proposed in "),ye=n("a"),Zo=r(`Performance-Efficiency Trade-offs in Unsupervised Pre-training
for Speech Recognition`),zo=r(` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q.
Weinberger, Yoav Artzi.`),Qt=p(),Ke=n("p"),Go=r("The abstract from the paper is the following:"),Yt=p(),Oe=n("p"),wt=n("em"),Ro=r(`This paper is a study of performance-efficiency trade-offs in pre-trained models for automatic speech recognition
(ASR). We focus on wav2vec 2.0, and formalize several architecture designs that influence both the model performance
and its efficiency. Putting together all our observations, we introduce SEW (Squeezed and Efficient Wav2vec), a
pre-trained model architecture with significant improvements along both performance and efficiency dimensions across a
variety of training setups. For example, under the 100h-960h semi-supervised setup on LibriSpeech, SEW achieves a 1.9x
inference speedup compared to wav2vec 2.0, with a 13.5% relative reduction in word error rate. With a similar inference
time, SEW reduces word error rate by 25-50% across different model sizes.`),Dt=p(),et=n("p"),qo=r("Tips:"),Ht=p(),K=n("ul"),Et=n("li"),No=r("SEW is a speech model that accepts a float array corresponding to the raw waveform of the speech signal."),Xo=p(),ve=n("li"),Io=r(`SEWForCTC is fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded using
`),tt=n("a"),Po=r("Wav2Vec2CTCTokenizer"),Vo=r("."),Lt=p(),O=n("p"),Ao=r("This model was contributed by "),be=n("a"),Bo=r("anton-l"),Qo=r("."),Kt=p(),q=n("h2"),ee=n("a"),Mt=n("span"),b(we.$$.fragment),Yo=p(),Tt=n("span"),Do=r("Documentation resources"),Ot=p(),te=n("ul"),Wt=n("li"),ot=n("a"),Ho=r("Audio classification task guide"),Lo=p(),Ct=n("li"),nt=n("a"),Ko=r("Automatic speech recognition task guide"),eo=p(),N=n("h2"),oe=n("a"),St=n("span"),b(Ee.$$.fragment),Oo=p(),kt=n("span"),en=r("SEWConfig"),to=p(),J=n("div"),b(Me.$$.fragment),tn=p(),X=n("p"),on=r("This is the configuration class to store the configuration of a "),at=n("a"),nn=r("SEWModel"),an=r(`. It is used to instantiate a SEW 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 SEW
`),Te=n("a"),sn=r("asapp/sew-tiny-100k"),rn=r(" architecture."),ln=p(),I=n("p"),cn=r("Configuration objects inherit from "),st=n("a"),dn=r("PretrainedConfig"),pn=r(` and can be used to control the model outputs. Read the
documentation from `),rt=n("a"),mn=r("PretrainedConfig"),fn=r(" for more information."),hn=p(),b(ne.$$.fragment),oo=p(),P=n("h2"),ae=n("a"),jt=n("span"),b(We.$$.fragment),un=p(),$t=n("span"),gn=r("SEWModel"),no=p(),k=n("div"),b(Ce.$$.fragment),_n=p(),Se=n("p"),yn=r(`The bare SEW Model transformer outputting raw hidden-states without any specific head on top.
SEW was proposed in `),ke=n("a"),vn=r(`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),bn=r(` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),wn=p(),je=n("p"),En=r("This model inherits from "),lt=n("a"),Mn=r("PreTrainedModel"),Tn=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Wn=p(),$e=n("p"),Cn=r("This model is a PyTorch "),Je=n("a"),Sn=r("torch.nn.Module"),kn=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),jn=p(),U=n("div"),b(Ue.$$.fragment),$n=p(),V=n("p"),Jn=r("The "),it=n("a"),Un=r("SEWModel"),Fn=r(" forward method, overrides the "),Jt=n("code"),xn=r("__call__"),Zn=r(" special method."),zn=p(),b(se.$$.fragment),Gn=p(),b(re.$$.fragment),ao=p(),A=n("h2"),le=n("a"),Ut=n("span"),b(Fe.$$.fragment),Rn=p(),Ft=n("span"),qn=r("SEWForCTC"),so=p(),j=n("div"),b(xe.$$.fragment),Nn=p(),B=n("p"),Xn=r("SEW Model with a "),xt=n("code"),In=r("language modeling"),Pn=r(` head on top for Connectionist Temporal Classification (CTC).
SEW was proposed in `),Ze=n("a"),Vn=r(`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),An=r(` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),Bn=p(),ze=n("p"),Qn=r("This model inherits from "),ct=n("a"),Yn=r("PreTrainedModel"),Dn=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Hn=p(),Ge=n("p"),Ln=r("This model is a PyTorch "),Re=n("a"),Kn=r("torch.nn.Module"),On=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ea=p(),F=n("div"),b(qe.$$.fragment),ta=p(),Q=n("p"),oa=r("The "),dt=n("a"),na=r("SEWForCTC"),aa=r(" forward method, overrides the "),Zt=n("code"),sa=r("__call__"),ra=r(" special method."),la=p(),b(ie.$$.fragment),ia=p(),b(ce.$$.fragment),ro=p(),Y=n("h2"),de=n("a"),zt=n("span"),b(Ne.$$.fragment),ca=p(),Gt=n("span"),da=r("SEWForSequenceClassification"),lo=p(),C=n("div"),b(Xe.$$.fragment),pa=p(),Rt=n("p"),ma=r(`SEW Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like SUPERB
Keyword Spotting.`),fa=p(),Ie=n("p"),ha=r("SEW was proposed in "),Pe=n("a"),ua=r(`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),ga=r(` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),_a=p(),Ve=n("p"),ya=r("This model inherits from "),pt=n("a"),va=r("PreTrainedModel"),ba=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),wa=p(),Ae=n("p"),Ea=r("This model is a PyTorch "),Be=n("a"),Ma=r("torch.nn.Module"),Ta=r(` 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=p(),x=n("div"),b(Qe.$$.fragment),Ca=p(),D=n("p"),Sa=r("The "),mt=n("a"),ka=r("SEWForSequenceClassification"),ja=r(" forward method, overrides the "),qt=n("code"),$a=r("__call__"),Ja=r(" special method."),Ua=p(),b(pe.$$.fragment),Fa=p(),b(me.$$.fragment),this.h()},l(t){const f=Fs('[data-svelte="svelte-1phssyn"]',document.head);d=a(f,"META",{name:!0,content:!0}),f.forEach(o),v=m(t),g=a(t,"H1",{class:!0});var Ye=s(g);h=a(Ye,"A",{id:!0,class:!0,href:!0});var Nt=s(h);y=a(Nt,"SPAN",{});var Xt=s(y);w(i.$$.fragment,Xt),Xt.forEach(o),Nt.forEach(o),u=m(Ye),$=a(Ye,"SPAN",{});var It=s($);Jo=l(It,"SEW"),It.forEach(o),Ye.forEach(o),At=m(t),R=a(t,"H2",{class:!0});var De=s(R);H=a(De,"A",{id:!0,class:!0,href:!0});var Pt=s(H);vt=a(Pt,"SPAN",{});var Vt=s(vt);w(_e.$$.fragment,Vt),Vt.forEach(o),Pt.forEach(o),Uo=m(De),bt=a(De,"SPAN",{});var Za=s(bt);Fo=l(Za,"Overview"),Za.forEach(o),De.forEach(o),Bt=m(t),L=a(t,"P",{});var co=s(L);xo=l(co,"SEW (Squeezed and Efficient Wav2Vec) was proposed in "),ye=a(co,"A",{href:!0,rel:!0});var za=s(ye);Zo=l(za,`Performance-Efficiency Trade-offs in Unsupervised Pre-training
for Speech Recognition`),za.forEach(o),zo=l(co,` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q.
Weinberger, Yoav Artzi.`),co.forEach(o),Qt=m(t),Ke=a(t,"P",{});var Ga=s(Ke);Go=l(Ga,"The abstract from the paper is the following:"),Ga.forEach(o),Yt=m(t),Oe=a(t,"P",{});var Ra=s(Oe);wt=a(Ra,"EM",{});var qa=s(wt);Ro=l(qa,`This paper is a study of performance-efficiency trade-offs in pre-trained models for automatic speech recognition
(ASR). We focus on wav2vec 2.0, and formalize several architecture designs that influence both the model performance
and its efficiency. Putting together all our observations, we introduce SEW (Squeezed and Efficient Wav2vec), a
pre-trained model architecture with significant improvements along both performance and efficiency dimensions across a
variety of training setups. For example, under the 100h-960h semi-supervised setup on LibriSpeech, SEW achieves a 1.9x
inference speedup compared to wav2vec 2.0, with a 13.5% relative reduction in word error rate. With a similar inference
time, SEW reduces word error rate by 25-50% across different model sizes.`),qa.forEach(o),Ra.forEach(o),Dt=m(t),et=a(t,"P",{});var Na=s(et);qo=l(Na,"Tips:"),Na.forEach(o),Ht=m(t),K=a(t,"UL",{});var po=s(K);Et=a(po,"LI",{});var Xa=s(Et);No=l(Xa,"SEW is a speech model that accepts a float array corresponding to the raw waveform of the speech signal."),Xa.forEach(o),Xo=m(po),ve=a(po,"LI",{});var mo=s(ve);Io=l(mo,`SEWForCTC is fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded using
`),tt=a(mo,"A",{href:!0});var Ia=s(tt);Po=l(Ia,"Wav2Vec2CTCTokenizer"),Ia.forEach(o),Vo=l(mo,"."),mo.forEach(o),po.forEach(o),Lt=m(t),O=a(t,"P",{});var fo=s(O);Ao=l(fo,"This model was contributed by "),be=a(fo,"A",{href:!0,rel:!0});var Pa=s(be);Bo=l(Pa,"anton-l"),Pa.forEach(o),Qo=l(fo,"."),fo.forEach(o),Kt=m(t),q=a(t,"H2",{class:!0});var ho=s(q);ee=a(ho,"A",{id:!0,class:!0,href:!0});var Va=s(ee);Mt=a(Va,"SPAN",{});var Aa=s(Mt);w(we.$$.fragment,Aa),Aa.forEach(o),Va.forEach(o),Yo=m(ho),Tt=a(ho,"SPAN",{});var Ba=s(Tt);Do=l(Ba,"Documentation resources"),Ba.forEach(o),ho.forEach(o),Ot=m(t),te=a(t,"UL",{});var uo=s(te);Wt=a(uo,"LI",{});var Qa=s(Wt);ot=a(Qa,"A",{href:!0});var Ya=s(ot);Ho=l(Ya,"Audio classification task guide"),Ya.forEach(o),Qa.forEach(o),Lo=m(uo),Ct=a(uo,"LI",{});var Da=s(Ct);nt=a(Da,"A",{href:!0});var Ha=s(nt);Ko=l(Ha,"Automatic speech recognition task guide"),Ha.forEach(o),Da.forEach(o),uo.forEach(o),eo=m(t),N=a(t,"H2",{class:!0});var go=s(N);oe=a(go,"A",{id:!0,class:!0,href:!0});var La=s(oe);St=a(La,"SPAN",{});var Ka=s(St);w(Ee.$$.fragment,Ka),Ka.forEach(o),La.forEach(o),Oo=m(go),kt=a(go,"SPAN",{});var Oa=s(kt);en=l(Oa,"SEWConfig"),Oa.forEach(o),go.forEach(o),to=m(t),J=a(t,"DIV",{class:!0});var fe=s(J);w(Me.$$.fragment,fe),tn=m(fe),X=a(fe,"P",{});var ft=s(X);on=l(ft,"This is the configuration class to store the configuration of a "),at=a(ft,"A",{href:!0});var es=s(at);nn=l(es,"SEWModel"),es.forEach(o),an=l(ft,`. It is used to instantiate a SEW 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 SEW
`),Te=a(ft,"A",{href:!0,rel:!0});var ts=s(Te);sn=l(ts,"asapp/sew-tiny-100k"),ts.forEach(o),rn=l(ft," architecture."),ft.forEach(o),ln=m(fe),I=a(fe,"P",{});var ht=s(I);cn=l(ht,"Configuration objects inherit from "),st=a(ht,"A",{href:!0});var os=s(st);dn=l(os,"PretrainedConfig"),os.forEach(o),pn=l(ht,` and can be used to control the model outputs. Read the
documentation from `),rt=a(ht,"A",{href:!0});var ns=s(rt);mn=l(ns,"PretrainedConfig"),ns.forEach(o),fn=l(ht," for more information."),ht.forEach(o),hn=m(fe),w(ne.$$.fragment,fe),fe.forEach(o),oo=m(t),P=a(t,"H2",{class:!0});var _o=s(P);ae=a(_o,"A",{id:!0,class:!0,href:!0});var as=s(ae);jt=a(as,"SPAN",{});var ss=s(jt);w(We.$$.fragment,ss),ss.forEach(o),as.forEach(o),un=m(_o),$t=a(_o,"SPAN",{});var rs=s($t);gn=l(rs,"SEWModel"),rs.forEach(o),_o.forEach(o),no=m(t),k=a(t,"DIV",{class:!0});var z=s(k);w(Ce.$$.fragment,z),_n=m(z),Se=a(z,"P",{});var yo=s(Se);yn=l(yo,`The bare SEW Model transformer outputting raw hidden-states without any specific head on top.
SEW was proposed in `),ke=a(yo,"A",{href:!0,rel:!0});var ls=s(ke);vn=l(ls,`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),ls.forEach(o),bn=l(yo,` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),yo.forEach(o),wn=m(z),je=a(z,"P",{});var vo=s(je);En=l(vo,"This model inherits from "),lt=a(vo,"A",{href:!0});var is=s(lt);Mn=l(is,"PreTrainedModel"),is.forEach(o),Tn=l(vo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),vo.forEach(o),Wn=m(z),$e=a(z,"P",{});var bo=s($e);Cn=l(bo,"This model is a PyTorch "),Je=a(bo,"A",{href:!0,rel:!0});var cs=s(Je);Sn=l(cs,"torch.nn.Module"),cs.forEach(o),kn=l(bo,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bo.forEach(o),jn=m(z),U=a(z,"DIV",{class:!0});var he=s(U);w(Ue.$$.fragment,he),$n=m(he),V=a(he,"P",{});var ut=s(V);Jn=l(ut,"The "),it=a(ut,"A",{href:!0});var ds=s(it);Un=l(ds,"SEWModel"),ds.forEach(o),Fn=l(ut," forward method, overrides the "),Jt=a(ut,"CODE",{});var ps=s(Jt);xn=l(ps,"__call__"),ps.forEach(o),Zn=l(ut," special method."),ut.forEach(o),zn=m(he),w(se.$$.fragment,he),Gn=m(he),w(re.$$.fragment,he),he.forEach(o),z.forEach(o),ao=m(t),A=a(t,"H2",{class:!0});var wo=s(A);le=a(wo,"A",{id:!0,class:!0,href:!0});var ms=s(le);Ut=a(ms,"SPAN",{});var fs=s(Ut);w(Fe.$$.fragment,fs),fs.forEach(o),ms.forEach(o),Rn=m(wo),Ft=a(wo,"SPAN",{});var hs=s(Ft);qn=l(hs,"SEWForCTC"),hs.forEach(o),wo.forEach(o),so=m(t),j=a(t,"DIV",{class:!0});var G=s(j);w(xe.$$.fragment,G),Nn=m(G),B=a(G,"P",{});var gt=s(B);Xn=l(gt,"SEW Model with a "),xt=a(gt,"CODE",{});var us=s(xt);In=l(us,"language modeling"),us.forEach(o),Pn=l(gt,` head on top for Connectionist Temporal Classification (CTC).
SEW was proposed in `),Ze=a(gt,"A",{href:!0,rel:!0});var gs=s(Ze);Vn=l(gs,`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),gs.forEach(o),An=l(gt,` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),gt.forEach(o),Bn=m(G),ze=a(G,"P",{});var Eo=s(ze);Qn=l(Eo,"This model inherits from "),ct=a(Eo,"A",{href:!0});var _s=s(ct);Yn=l(_s,"PreTrainedModel"),_s.forEach(o),Dn=l(Eo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Eo.forEach(o),Hn=m(G),Ge=a(G,"P",{});var Mo=s(Ge);Ln=l(Mo,"This model is a PyTorch "),Re=a(Mo,"A",{href:!0,rel:!0});var ys=s(Re);Kn=l(ys,"torch.nn.Module"),ys.forEach(o),On=l(Mo,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Mo.forEach(o),ea=m(G),F=a(G,"DIV",{class:!0});var ue=s(F);w(qe.$$.fragment,ue),ta=m(ue),Q=a(ue,"P",{});var _t=s(Q);oa=l(_t,"The "),dt=a(_t,"A",{href:!0});var vs=s(dt);na=l(vs,"SEWForCTC"),vs.forEach(o),aa=l(_t," forward method, overrides the "),Zt=a(_t,"CODE",{});var bs=s(Zt);sa=l(bs,"__call__"),bs.forEach(o),ra=l(_t," special method."),_t.forEach(o),la=m(ue),w(ie.$$.fragment,ue),ia=m(ue),w(ce.$$.fragment,ue),ue.forEach(o),G.forEach(o),ro=m(t),Y=a(t,"H2",{class:!0});var To=s(Y);de=a(To,"A",{id:!0,class:!0,href:!0});var ws=s(de);zt=a(ws,"SPAN",{});var Es=s(zt);w(Ne.$$.fragment,Es),Es.forEach(o),ws.forEach(o),ca=m(To),Gt=a(To,"SPAN",{});var Ms=s(Gt);da=l(Ms,"SEWForSequenceClassification"),Ms.forEach(o),To.forEach(o),lo=m(t),C=a(t,"DIV",{class:!0});var Z=s(C);w(Xe.$$.fragment,Z),pa=m(Z),Rt=a(Z,"P",{});var Ts=s(Rt);ma=l(Ts,`SEW Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like SUPERB
Keyword Spotting.`),Ts.forEach(o),fa=m(Z),Ie=a(Z,"P",{});var Wo=s(Ie);ha=l(Wo,"SEW was proposed in "),Pe=a(Wo,"A",{href:!0,rel:!0});var Ws=s(Pe);ua=l(Ws,`Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech
Recognition`),Ws.forEach(o),ga=l(Wo,` by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger,
Yoav Artzi.`),Wo.forEach(o),_a=m(Z),Ve=a(Z,"P",{});var Co=s(Ve);ya=l(Co,"This model inherits from "),pt=a(Co,"A",{href:!0});var Cs=s(pt);va=l(Cs,"PreTrainedModel"),Cs.forEach(o),ba=l(Co,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Co.forEach(o),wa=m(Z),Ae=a(Z,"P",{});var So=s(Ae);Ea=l(So,"This model is a PyTorch "),Be=a(So,"A",{href:!0,rel:!0});var Ss=s(Be);Ma=l(Ss,"torch.nn.Module"),Ss.forEach(o),Ta=l(So,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),So.forEach(o),Wa=m(Z),x=a(Z,"DIV",{class:!0});var ge=s(x);w(Qe.$$.fragment,ge),Ca=m(ge),D=a(ge,"P",{});var yt=s(D);Sa=l(yt,"The "),mt=a(yt,"A",{href:!0});var ks=s(mt);ka=l(ks,"SEWForSequenceClassification"),ks.forEach(o),ja=l(yt," forward method, overrides the "),qt=a(yt,"CODE",{});var js=s(qt);$a=l(js,"__call__"),js.forEach(o),Ja=l(yt," special method."),yt.forEach(o),Ua=m(ge),w(pe.$$.fragment,ge),Fa=m(ge),w(me.$$.fragment,ge),ge.forEach(o),Z.forEach(o),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Ps)),c(h,"id","sew"),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","#sew"),c(g,"class","relative group"),c(H,"id","overview"),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","#overview"),c(R,"class","relative group"),c(ye,"href","https://arxiv.org/abs/2109.06870"),c(ye,"rel","nofollow"),c(tt,"href","/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),c(be,"href","https://huggingface.co/anton-l"),c(be,"rel","nofollow"),c(ee,"id","documentation-resources"),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","#documentation-resources"),c(q,"class","relative group"),c(ot,"href","../tasks/audio_classification"),c(nt,"href","../tasks/asr"),c(oe,"id","transformers.SEWConfig"),c(oe,"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(oe,"href","#transformers.SEWConfig"),c(N,"class","relative group"),c(at,"href","/docs/transformers/main/en/model_doc/sew#transformers.SEWModel"),c(Te,"href","https://huggingface.co/asapp/sew-tiny-100k"),c(Te,"rel","nofollow"),c(st,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(rt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),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(ae,"id","transformers.SEWModel"),c(ae,"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(ae,"href","#transformers.SEWModel"),c(P,"class","relative group"),c(ke,"href","https://arxiv.org/abs/2109.06870"),c(ke,"rel","nofollow"),c(lt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Je,"rel","nofollow"),c(it,"href","/docs/transformers/main/en/model_doc/sew#transformers.SEWModel"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"id","transformers.SEWForCTC"),c(le,"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(le,"href","#transformers.SEWForCTC"),c(A,"class","relative group"),c(Ze,"href","https://arxiv.org/abs/2109.06870"),c(Ze,"rel","nofollow"),c(ct,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Re,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Re,"rel","nofollow"),c(dt,"href","/docs/transformers/main/en/model_doc/sew#transformers.SEWForCTC"),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(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(de,"id","transformers.SEWForSequenceClassification"),c(de,"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(de,"href","#transformers.SEWForSequenceClassification"),c(Y,"class","relative group"),c(Pe,"href","https://arxiv.org/abs/2109.06870"),c(Pe,"rel","nofollow"),c(pt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),c(Be,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Be,"rel","nofollow"),c(mt,"href","/docs/transformers/main/en/model_doc/sew#transformers.SEWForSequenceClassification"),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(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,d),_(t,v,f),_(t,g,f),e(g,h),e(h,y),E(i,y,null),e(g,u),e(g,$),e($,Jo),_(t,At,f),_(t,R,f),e(R,H),e(H,vt),E(_e,vt,null),e(R,Uo),e(R,bt),e(bt,Fo),_(t,Bt,f),_(t,L,f),e(L,xo),e(L,ye),e(ye,Zo),e(L,zo),_(t,Qt,f),_(t,Ke,f),e(Ke,Go),_(t,Yt,f),_(t,Oe,f),e(Oe,wt),e(wt,Ro),_(t,Dt,f),_(t,et,f),e(et,qo),_(t,Ht,f),_(t,K,f),e(K,Et),e(Et,No),e(K,Xo),e(K,ve),e(ve,Io),e(ve,tt),e(tt,Po),e(ve,Vo),_(t,Lt,f),_(t,O,f),e(O,Ao),e(O,be),e(be,Bo),e(O,Qo),_(t,Kt,f),_(t,q,f),e(q,ee),e(ee,Mt),E(we,Mt,null),e(q,Yo),e(q,Tt),e(Tt,Do),_(t,Ot,f),_(t,te,f),e(te,Wt),e(Wt,ot),e(ot,Ho),e(te,Lo),e(te,Ct),e(Ct,nt),e(nt,Ko),_(t,eo,f),_(t,N,f),e(N,oe),e(oe,St),E(Ee,St,null),e(N,Oo),e(N,kt),e(kt,en),_(t,to,f),_(t,J,f),E(Me,J,null),e(J,tn),e(J,X),e(X,on),e(X,at),e(at,nn),e(X,an),e(X,Te),e(Te,sn),e(X,rn),e(J,ln),e(J,I),e(I,cn),e(I,st),e(st,dn),e(I,pn),e(I,rt),e(rt,mn),e(I,fn),e(J,hn),E(ne,J,null),_(t,oo,f),_(t,P,f),e(P,ae),e(ae,jt),E(We,jt,null),e(P,un),e(P,$t),e($t,gn),_(t,no,f),_(t,k,f),E(Ce,k,null),e(k,_n),e(k,Se),e(Se,yn),e(Se,ke),e(ke,vn),e(Se,bn),e(k,wn),e(k,je),e(je,En),e(je,lt),e(lt,Mn),e(je,Tn),e(k,Wn),e(k,$e),e($e,Cn),e($e,Je),e(Je,Sn),e($e,kn),e(k,jn),e(k,U),E(Ue,U,null),e(U,$n),e(U,V),e(V,Jn),e(V,it),e(it,Un),e(V,Fn),e(V,Jt),e(Jt,xn),e(V,Zn),e(U,zn),E(se,U,null),e(U,Gn),E(re,U,null),_(t,ao,f),_(t,A,f),e(A,le),e(le,Ut),E(Fe,Ut,null),e(A,Rn),e(A,Ft),e(Ft,qn),_(t,so,f),_(t,j,f),E(xe,j,null),e(j,Nn),e(j,B),e(B,Xn),e(B,xt),e(xt,In),e(B,Pn),e(B,Ze),e(Ze,Vn),e(B,An),e(j,Bn),e(j,ze),e(ze,Qn),e(ze,ct),e(ct,Yn),e(ze,Dn),e(j,Hn),e(j,Ge),e(Ge,Ln),e(Ge,Re),e(Re,Kn),e(Ge,On),e(j,ea),e(j,F),E(qe,F,null),e(F,ta),e(F,Q),e(Q,oa),e(Q,dt),e(dt,na),e(Q,aa),e(Q,Zt),e(Zt,sa),e(Q,ra),e(F,la),E(ie,F,null),e(F,ia),E(ce,F,null),_(t,ro,f),_(t,Y,f),e(Y,de),e(de,zt),E(Ne,zt,null),e(Y,ca),e(Y,Gt),e(Gt,da),_(t,lo,f),_(t,C,f),E(Xe,C,null),e(C,pa),e(C,Rt),e(Rt,ma),e(C,fa),e(C,Ie),e(Ie,ha),e(Ie,Pe),e(Pe,ua),e(Ie,ga),e(C,_a),e(C,Ve),e(Ve,ya),e(Ve,pt),e(pt,va),e(Ve,ba),e(C,wa),e(C,Ae),e(Ae,Ea),e(Ae,Be),e(Be,Ma),e(Ae,Ta),e(C,Wa),e(C,x),E(Qe,x,null),e(x,Ca),e(x,D),e(D,Sa),e(D,mt),e(mt,ka),e(D,ja),e(D,qt),e(qt,$a),e(D,Ja),e(x,Ua),E(pe,x,null),e(x,Fa),E(me,x,null),io=!0},p(t,[f]){const Ye={};f&2&&(Ye.$$scope={dirty:f,ctx:t}),ne.$set(Ye);const Nt={};f&2&&(Nt.$$scope={dirty:f,ctx:t}),se.$set(Nt);const Xt={};f&2&&(Xt.$$scope={dirty:f,ctx:t}),re.$set(Xt);const It={};f&2&&(It.$$scope={dirty:f,ctx:t}),ie.$set(It);const De={};f&2&&(De.$$scope={dirty:f,ctx:t}),ce.$set(De);const Pt={};f&2&&(Pt.$$scope={dirty:f,ctx:t}),pe.$set(Pt);const Vt={};f&2&&(Vt.$$scope={dirty:f,ctx:t}),me.$set(Vt)},i(t){io||(M(i.$$.fragment,t),M(_e.$$.fragment,t),M(we.$$.fragment,t),M(Ee.$$.fragment,t),M(Me.$$.fragment,t),M(ne.$$.fragment,t),M(We.$$.fragment,t),M(Ce.$$.fragment,t),M(Ue.$$.fragment,t),M(se.$$.fragment,t),M(re.$$.fragment,t),M(Fe.$$.fragment,t),M(xe.$$.fragment,t),M(qe.$$.fragment,t),M(ie.$$.fragment,t),M(ce.$$.fragment,t),M(Ne.$$.fragment,t),M(Xe.$$.fragment,t),M(Qe.$$.fragment,t),M(pe.$$.fragment,t),M(me.$$.fragment,t),io=!0)},o(t){T(i.$$.fragment,t),T(_e.$$.fragment,t),T(we.$$.fragment,t),T(Ee.$$.fragment,t),T(Me.$$.fragment,t),T(ne.$$.fragment,t),T(We.$$.fragment,t),T(Ce.$$.fragment,t),T(Ue.$$.fragment,t),T(se.$$.fragment,t),T(re.$$.fragment,t),T(Fe.$$.fragment,t),T(xe.$$.fragment,t),T(qe.$$.fragment,t),T(ie.$$.fragment,t),T(ce.$$.fragment,t),T(Ne.$$.fragment,t),T(Xe.$$.fragment,t),T(Qe.$$.fragment,t),T(pe.$$.fragment,t),T(me.$$.fragment,t),io=!1},d(t){o(d),t&&o(v),t&&o(g),W(i),t&&o(At),t&&o(R),W(_e),t&&o(Bt),t&&o(L),t&&o(Qt),t&&o(Ke),t&&o(Yt),t&&o(Oe),t&&o(Dt),t&&o(et),t&&o(Ht),t&&o(K),t&&o(Lt),t&&o(O),t&&o(Kt),t&&o(q),W(we),t&&o(Ot),t&&o(te),t&&o(eo),t&&o(N),W(Ee),t&&o(to),t&&o(J),W(Me),W(ne),t&&o(oo),t&&o(P),W(We),t&&o(no),t&&o(k),W(Ce),W(Ue),W(se),W(re),t&&o(ao),t&&o(A),W(Fe),t&&o(so),t&&o(j),W(xe),W(qe),W(ie),W(ce),t&&o(ro),t&&o(Y),W(Ne),t&&o(lo),t&&o(C),W(Xe),W(Qe),W(pe),W(me)}}}const Ps={local:"sew",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.SEWConfig",title:"SEWConfig"},{local:"transformers.SEWModel",title:"SEWModel"},{local:"transformers.SEWForCTC",title:"SEWForCTC"},{local:"transformers.SEWForSequenceClassification",title:"SEWForSequenceClassification"}],title:"SEW"};function Vs(S){return xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ls extends $s{constructor(d){super();Js(this,d,Vs,Is,Us,{})}}export{Ls as default,Ps as metadata};
