import{S as gi,i as _i,s as bi,e as a,k as p,w as T,t as s,M as vi,c as r,d as t,m as u,a as i,x as k,h as n,b as h,G as e,g,y as $,q as C,o as H,B as E,v as yi,L as Xo}from"../../chunks/vendor-hf-doc-builder.js";import{T as xo}from"../../chunks/Tip-hf-doc-builder.js";import{D as Xe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Jo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Rt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Go}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function wi(M){let d,y,f,m,v;return m=new Jo({props:{code:`from transformers import HubertModel, HubertConfig

# Initializing a Hubert facebook/hubert-base-ls960 style configuration
configuration = HubertConfig()

# Initializing a model from the facebook/hubert-base-ls960 style configuration
model = HubertModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HubertModel, HubertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Hubert facebook/hubert-base-ls960 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = HubertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the facebook/hubert-base-ls960 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = HubertModel(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=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function Ti(M){let d,y,f,m,v;return{c(){d=a("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=s("Module"),v=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(l){d=r(l,"P",{});var c=i(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,y),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function ki(M){let d,y,f,m,v;return m=new Jo({props:{code:`from transformers import AutoProcessor, HubertModel
from datasets import load_dataset
import soundfile as sf

processor = AutoProcessor.from_pretrained("facebook/hubert-large-ls960-ft")
model = HubertModel.from_pretrained("facebook/hubert-large-ls960-ft")


def map_to_array(batch):
    speech, _ = sf.read(batch["file"])
    batch["speech"] = speech
    return batch


ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
ds = ds.map(map_to_array)

input_values = processor(ds["speech"][0], return_tensors="pt").input_values  # Batch size 1
hidden_states = model(input_values).last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, HubertModel
<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> soundfile <span class="hljs-keyword">as</span> sf

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = HubertModel.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">map_to_array</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    speech, _ = sf.read(batch[<span class="hljs-string">&quot;file&quot;</span>])
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;speech&quot;</span>] = speech
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch


<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>ds = ds.<span class="hljs-built_in">map</span>(map_to_array)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_values = processor(ds[<span class="hljs-string">&quot;speech&quot;</span>][<span class="hljs-number">0</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>hidden_states = model(input_values).last_hidden_state`}}),{c(){d=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function $i(M){let d,y,f,m,v;return{c(){d=a("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=s("Module"),v=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(l){d=r(l,"P",{});var c=i(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,y),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function Ci(M){let d,y,f,m,v;return m=new Jo({props:{code:`from transformers import AutoProcessor, HubertForCTC
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = AutoProcessor.from_pretrained("facebook/hubert-large-ls960-ft")
model = HubertForCTC.from_pretrained("facebook/hubert-large-ls960-ft")

# audio file is decoded on the fly
inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)

# transcribe speech
transcription = processor.batch_decode(predicted_ids)
transcription[0]

inputs["labels"] = processor(text=dataset[0]["text"], return_tensors="pt").input_ids

# compute loss
loss = model(**inputs).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, HubertForCTC
<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/hubert-large-ls960-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = HubertForCTC.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-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">22.68</span>`}}),{c(){d=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function Hi(M){let d,y,f,m,v;return{c(){d=a("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=s("Module"),v=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(l){d=r(l,"P",{});var c=i(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,y),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function Ei(M){let d,y,f,m,v;return m=new Jo({props:{code:`from transformers import AutoFeatureExtractor, HubertForSequenceClassification
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

feature_extractor = AutoFeatureExtractor.from_pretrained("superb/hubert-base-superb-ks")
model = HubertForSequenceClassification.from_pretrained("superb/hubert-base-superb-ks")

# audio file is decoded on the fly
inputs = feature_extractor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.argmax(logits, dim=-1).item()
predicted_label = model.config.id2label[predicted_class_ids]
predicted_label

# compute loss - target_label is e.g. "down"
target_label = model.config.id2label[0]
inputs["labels"] = torch.tensor([model.config.label2id[target_label]])
loss = model(**inputs).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, HubertForSequenceClassification
<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;superb/hubert-base-superb-ks&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = HubertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;superb/hubert-base-superb-ks&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">8.53</span>`}}),{c(){d=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function ji(M){let d,y,f,m,v,l,c,F,Oe,_e,O,J,ee,w,De,V,ze,be,L,Ie,te,oe,Le,ve,R,Ne,ye,W,me,Be,he,q,D,we,N,fe,Re,se,ne,We,A,Ue,ae,Te,Q,re,ie,Ve,K,ke,z,Z,le,P,Ke,I,Ye,$e;return{c(){d=a("p"),y=s("TensorFlow models and layers in "),f=a("code"),m=s("transformers"),v=s(" accept two formats as input:"),l=p(),c=a("ul"),F=a("li"),Oe=s("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),O=a("li"),J=s("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),w=a("p"),De=s(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),ze=s("model.fit()"),be=s(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),Ie=s("model.fit()"),te=s(` supports! If, however, you want to use the second
format outside of Keras methods like `),oe=a("code"),Le=s("fit()"),ve=s(" and "),R=a("code"),Ne=s("predict()"),ye=s(`, such as when creating your own layers or models with
the Keras `),W=a("code"),me=s("Functional"),Be=s(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),he=p(),q=a("ul"),D=a("li"),we=s("a single Tensor with "),N=a("code"),fe=s("input_values"),Re=s(" only and nothing else: "),se=a("code"),ne=s("model(input_values)"),We=p(),A=a("li"),Ue=s(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=a("code"),Te=s("model([input_values, attention_mask])"),Q=s(" or "),re=a("code"),ie=s("model([input_values, attention_mask, token_type_ids])"),Ve=p(),K=a("li"),ke=s(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),z=a("code"),Z=s('model({"input_values": input_values, "token_type_ids": token_type_ids})'),le=p(),P=a("p"),Ke=s(`Note that when creating models and layers with
`),I=a("a"),Ye=s("subclassing"),$e=s(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(_){d=r(_,"P",{});var j=i(d);y=n(j,"TensorFlow models and layers in "),f=r(j,"CODE",{});var et=i(f);m=n(et,"transformers"),et.forEach(t),v=n(j," accept two formats as input:"),j.forEach(t),l=u(_),c=r(_,"UL",{});var B=i(c);F=r(B,"LI",{});var tt=i(F);Oe=n(tt,"having all inputs as keyword arguments (like PyTorch models), or"),tt.forEach(t),_e=u(B),O=r(B,"LI",{});var Ce=i(O);J=n(Ce,"having all inputs as a list, tuple or dict in the first positional argument."),Ce.forEach(t),B.forEach(t),ee=u(_),w=r(_,"P",{});var x=i(w);De=n(x,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(x,"CODE",{});var ot=i(V);ze=n(ot,"model.fit()"),ot.forEach(t),be=n(x,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(x,"CODE",{});var ge=i(L);Ie=n(ge,"model.fit()"),ge.forEach(t),te=n(x,` supports! If, however, you want to use the second
format outside of Keras methods like `),oe=r(x,"CODE",{});var st=i(oe);Le=n(st,"fit()"),st.forEach(t),ve=n(x," and "),R=r(x,"CODE",{});var nt=i(R);Ne=n(nt,"predict()"),nt.forEach(t),ye=n(x,`, such as when creating your own layers or models with
the Keras `),W=r(x,"CODE",{});var at=i(W);me=n(at,"Functional"),at.forEach(t),Be=n(x,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),x.forEach(t),he=u(_),q=r(_,"UL",{});var S=i(q);D=r(S,"LI",{});var de=i(D);we=n(de,"a single Tensor with "),N=r(de,"CODE",{});var He=i(N);fe=n(He,"input_values"),He.forEach(t),Re=n(de," only and nothing else: "),se=r(de,"CODE",{});var rt=i(se);ne=n(rt,"model(input_values)"),rt.forEach(t),de.forEach(t),We=u(S),A=r(S,"LI",{});var ce=i(A);Ue=n(ce,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=r(ce,"CODE",{});var Ee=i(ae);Te=n(Ee,"model([input_values, attention_mask])"),Ee.forEach(t),Q=n(ce," or "),re=r(ce,"CODE",{});var it=i(re);ie=n(it,"model([input_values, attention_mask, token_type_ids])"),it.forEach(t),ce.forEach(t),Ve=u(S),K=r(S,"LI",{});var Ge=i(K);ke=n(Ge,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),z=r(Ge,"CODE",{});var lt=i(z);Z=n(lt,'model({"input_values": input_values, "token_type_ids": token_type_ids})'),lt.forEach(t),Ge.forEach(t),S.forEach(t),le=u(_),P=r(_,"P",{});var U=i(P);Ke=n(U,`Note that when creating models and layers with
`),I=r(U,"A",{href:!0,rel:!0});var Je=i(I);Ye=n(Je,"subclassing"),Je.forEach(t),$e=n(U,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),U.forEach(t),this.h()},h(){h(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(I,"rel","nofollow")},m(_,j){g(_,d,j),e(d,y),e(d,f),e(f,m),e(d,v),g(_,l,j),g(_,c,j),e(c,F),e(F,Oe),e(c,_e),e(c,O),e(O,J),g(_,ee,j),g(_,w,j),e(w,De),e(w,V),e(V,ze),e(w,be),e(w,L),e(L,Ie),e(w,te),e(w,oe),e(oe,Le),e(w,ve),e(w,R),e(R,Ne),e(w,ye),e(w,W),e(W,me),e(w,Be),g(_,he,j),g(_,q,j),e(q,D),e(D,we),e(D,N),e(N,fe),e(D,Re),e(D,se),e(se,ne),e(q,We),e(q,A),e(A,Ue),e(A,ae),e(ae,Te),e(A,Q),e(A,re),e(re,ie),e(q,Ve),e(q,K),e(K,ke),e(K,z),e(z,Z),g(_,le,j),g(_,P,j),e(P,Ke),e(P,I),e(I,Ye),e(P,$e)},d(_){_&&t(d),_&&t(l),_&&t(c),_&&t(ee),_&&t(w),_&&t(he),_&&t(q),_&&t(le),_&&t(P)}}}function Fi(M){let d,y,f,m,v;return{c(){d=a("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=s("Module"),v=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(l){d=r(l,"P",{});var c=i(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,y),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function xi(M){let d,y,f,m,v;return m=new Jo({props:{code:`from transformers import AutoProcessor, TFHubertModel
from datasets import load_dataset
import soundfile as sf

processor = AutoProcessor.from_pretrained("facebook/hubert-large-ls960-ft")
model = TFHubertModel.from_pretrained("facebook/hubert-large-ls960-ft")


def map_to_array(batch):
    speech, _ = sf.read(batch["file"])
    batch["speech"] = speech
    return batch


ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
ds = ds.map(map_to_array)

input_values = processor(ds["speech"][0], return_tensors="tf").input_values  # Batch size 1
hidden_states = model(input_values).last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFHubertModel
<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> soundfile <span class="hljs-keyword">as</span> sf

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFHubertModel.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">map_to_array</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    speech, _ = sf.read(batch[<span class="hljs-string">&quot;file&quot;</span>])
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;speech&quot;</span>] = speech
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch


<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>ds = ds.<span class="hljs-built_in">map</span>(map_to_array)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_values = processor(ds[<span class="hljs-string">&quot;speech&quot;</span>][<span class="hljs-number">0</span>], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_values  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>hidden_states = model(input_values).last_hidden_state`}}),{c(){d=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function Mi(M){let d,y,f,m,v,l,c,F,Oe,_e,O,J,ee,w,De,V,ze,be,L,Ie,te,oe,Le,ve,R,Ne,ye,W,me,Be,he,q,D,we,N,fe,Re,se,ne,We,A,Ue,ae,Te,Q,re,ie,Ve,K,ke,z,Z,le,P,Ke,I,Ye,$e;return{c(){d=a("p"),y=s("TensorFlow models and layers in "),f=a("code"),m=s("transformers"),v=s(" accept two formats as input:"),l=p(),c=a("ul"),F=a("li"),Oe=s("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),O=a("li"),J=s("having all inputs as a list, tuple or dict in the first positional argument."),ee=p(),w=a("p"),De=s(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),ze=s("model.fit()"),be=s(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),Ie=s("model.fit()"),te=s(` supports! If, however, you want to use the second
format outside of Keras methods like `),oe=a("code"),Le=s("fit()"),ve=s(" and "),R=a("code"),Ne=s("predict()"),ye=s(`, such as when creating your own layers or models with
the Keras `),W=a("code"),me=s("Functional"),Be=s(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),he=p(),q=a("ul"),D=a("li"),we=s("a single Tensor with "),N=a("code"),fe=s("input_values"),Re=s(" only and nothing else: "),se=a("code"),ne=s("model(input_values)"),We=p(),A=a("li"),Ue=s(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=a("code"),Te=s("model([input_values, attention_mask])"),Q=s(" or "),re=a("code"),ie=s("model([input_values, attention_mask, token_type_ids])"),Ve=p(),K=a("li"),ke=s(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),z=a("code"),Z=s('model({"input_values": input_values, "token_type_ids": token_type_ids})'),le=p(),P=a("p"),Ke=s(`Note that when creating models and layers with
`),I=a("a"),Ye=s("subclassing"),$e=s(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(_){d=r(_,"P",{});var j=i(d);y=n(j,"TensorFlow models and layers in "),f=r(j,"CODE",{});var et=i(f);m=n(et,"transformers"),et.forEach(t),v=n(j," accept two formats as input:"),j.forEach(t),l=u(_),c=r(_,"UL",{});var B=i(c);F=r(B,"LI",{});var tt=i(F);Oe=n(tt,"having all inputs as keyword arguments (like PyTorch models), or"),tt.forEach(t),_e=u(B),O=r(B,"LI",{});var Ce=i(O);J=n(Ce,"having all inputs as a list, tuple or dict in the first positional argument."),Ce.forEach(t),B.forEach(t),ee=u(_),w=r(_,"P",{});var x=i(w);De=n(x,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(x,"CODE",{});var ot=i(V);ze=n(ot,"model.fit()"),ot.forEach(t),be=n(x,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(x,"CODE",{});var ge=i(L);Ie=n(ge,"model.fit()"),ge.forEach(t),te=n(x,` supports! If, however, you want to use the second
format outside of Keras methods like `),oe=r(x,"CODE",{});var st=i(oe);Le=n(st,"fit()"),st.forEach(t),ve=n(x," and "),R=r(x,"CODE",{});var nt=i(R);Ne=n(nt,"predict()"),nt.forEach(t),ye=n(x,`, such as when creating your own layers or models with
the Keras `),W=r(x,"CODE",{});var at=i(W);me=n(at,"Functional"),at.forEach(t),Be=n(x,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),x.forEach(t),he=u(_),q=r(_,"UL",{});var S=i(q);D=r(S,"LI",{});var de=i(D);we=n(de,"a single Tensor with "),N=r(de,"CODE",{});var He=i(N);fe=n(He,"input_values"),He.forEach(t),Re=n(de," only and nothing else: "),se=r(de,"CODE",{});var rt=i(se);ne=n(rt,"model(input_values)"),rt.forEach(t),de.forEach(t),We=u(S),A=r(S,"LI",{});var ce=i(A);Ue=n(ce,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),ae=r(ce,"CODE",{});var Ee=i(ae);Te=n(Ee,"model([input_values, attention_mask])"),Ee.forEach(t),Q=n(ce," or "),re=r(ce,"CODE",{});var it=i(re);ie=n(it,"model([input_values, attention_mask, token_type_ids])"),it.forEach(t),ce.forEach(t),Ve=u(S),K=r(S,"LI",{});var Ge=i(K);ke=n(Ge,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),z=r(Ge,"CODE",{});var lt=i(z);Z=n(lt,'model({"input_values": input_values, "token_type_ids": token_type_ids})'),lt.forEach(t),Ge.forEach(t),S.forEach(t),le=u(_),P=r(_,"P",{});var U=i(P);Ke=n(U,`Note that when creating models and layers with
`),I=r(U,"A",{href:!0,rel:!0});var Je=i(I);Ye=n(Je,"subclassing"),Je.forEach(t),$e=n(U,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),U.forEach(t),this.h()},h(){h(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(I,"rel","nofollow")},m(_,j){g(_,d,j),e(d,y),e(d,f),e(f,m),e(d,v),g(_,l,j),g(_,c,j),e(c,F),e(F,Oe),e(c,_e),e(c,O),e(O,J),g(_,ee,j),g(_,w,j),e(w,De),e(w,V),e(V,ze),e(w,be),e(w,L),e(L,Ie),e(w,te),e(w,oe),e(oe,Le),e(w,ve),e(w,R),e(R,Ne),e(w,ye),e(w,W),e(W,me),e(w,Be),g(_,he,j),g(_,q,j),e(q,D),e(D,we),e(D,N),e(N,fe),e(D,Re),e(D,se),e(se,ne),e(q,We),e(q,A),e(A,Ue),e(A,ae),e(ae,Te),e(A,Q),e(A,re),e(re,ie),e(q,Ve),e(q,K),e(K,ke),e(K,z),e(z,Z),g(_,le,j),g(_,P,j),e(P,Ke),e(P,I),e(I,Ye),e(P,$e)},d(_){_&&t(d),_&&t(l),_&&t(c),_&&t(ee),_&&t(w),_&&t(he),_&&t(q),_&&t(le),_&&t(P)}}}function qi(M){let d,y,f,m,v;return{c(){d=a("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),m=s("Module"),v=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(l){d=r(l,"P",{});var c=i(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,y),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function Pi(M){let d,y,f,m,v;return m=new Jo({props:{code:`import tensorflow as tf
from transformers import AutoProcessor, TFHubertForCTC
from datasets import load_dataset
import soundfile as sf

processor = AutoProcessor.from_pretrained("facebook/hubert-large-ls960-ft")
model = TFHubertForCTC.from_pretrained("facebook/hubert-large-ls960-ft")


def map_to_array(batch):
    speech, _ = sf.read(batch["file"])
    batch["speech"] = speech
    return batch


ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
ds = ds.map(map_to_array)

input_values = processor(ds["speech"][0], return_tensors="tf").input_values  # Batch size 1
logits = model(input_values).logits
predicted_ids = tf.argmax(logits, axis=-1)

transcription = processor.decode(predicted_ids[0])

# compute loss
target_transcription = "A MAN SAID TO THE UNIVERSE SIR I EXIST"

# Pass the transcription as text to encode labels
labels = processor(text=transcription, return_tensors="tf").input_values

loss = model(input_values, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFHubertForCTC
<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> soundfile <span class="hljs-keyword">as</span> sf

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFHubertForCTC.from_pretrained(<span class="hljs-string">&quot;facebook/hubert-large-ls960-ft&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">map_to_array</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    speech, _ = sf.read(batch[<span class="hljs-string">&quot;file&quot;</span>])
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;speech&quot;</span>] = speech
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch


<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>ds = ds.<span class="hljs-built_in">map</span>(map_to_array)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_values = processor(ds[<span class="hljs-string">&quot;speech&quot;</span>][<span class="hljs-number">0</span>], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_values  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_values).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = tf.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.decode(predicted_ids[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_transcription = <span class="hljs-string">&quot;A MAN SAID TO THE UNIVERSE SIR I EXIST&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Pass the transcription as text to encode labels</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = processor(text=transcription, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_values

<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(input_values, labels=labels).loss`}}),{c(){d=a("p"),y=s("Example:"),f=p(),T(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=u(l),k(m.$$.fragment,l)},m(l,c){g(l,d,c),e(d,y),g(l,f,c),$(m,l,c),v=!0},p:Xo,i(l){v||(C(m.$$.fragment,l),v=!0)},o(l){H(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),E(m,l)}}}function Ai(M){let d,y,f,m,v,l,c,F,Oe,_e,O,J,ee,w,De,V,ze,be,L,Ie,te,oe,Le,ve,R,Ne,ye,W,me,Be,he,q,D,we,N,fe,Re,se,ne,We,A,Ue,ae,Te,Q,re,ie,Ve,K,ke,z,Z,le,P,Ke,I,Ye,$e,_,j,et,B,tt,Ce,x,ot,ge,st,nt,at,S,de,He,rt,ce,Ee,it,Ge,lt,U,Je,dt,yt,Qo,Wt,an,Zo,rn,Es,pe,Ut,ln,Vt,dn,Kt,cn,pn,un,Yt,hn,Mo,mn,fn,gn,Gt,_n,Xt,bn,vn,yn,je,Jt,wn,ct,Tn,qo,kn,$n,es,Cn,Hn,En,wt,jn,Tt,js,pt,kt,ts,Qt,Fn,os,xn,Fs,ue,Zt,Mn,ut,qn,ss,Pn,An,eo,Sn,On,Dn,to,zn,Po,In,Ln,Nn,oo,Bn,so,Rn,Wn,Un,Fe,no,Vn,ht,Kn,Ao,Yn,Gn,ns,Xn,Jn,Qn,$t,Zn,Ct,xs,mt,Ht,as,ao,ea,rs,ta,Ms,Y,ro,oa,is,sa,na,io,aa,lo,ra,ia,la,co,da,So,ca,pa,ua,po,ha,uo,ma,fa,ga,xe,ho,_a,ft,ba,Oo,va,ya,ls,wa,Ta,ka,Et,$a,jt,qs,gt,Ft,ds,mo,Ca,cs,Ha,Ps,G,fo,Ea,ps,ja,Fa,go,xa,Do,Ma,qa,Pa,_o,Aa,bo,Sa,Oa,Da,xt,za,Me,vo,Ia,_t,La,zo,Na,Ba,us,Ra,Wa,Ua,Mt,Va,qt,As,bt,Pt,hs,yo,Ka,ms,Ya,Ss,X,wo,Ga,To,Xa,fs,Ja,Qa,Za,ko,er,Io,tr,or,sr,$o,nr,Co,ar,rr,ir,At,lr,qe,Ho,dr,vt,cr,Lo,pr,ur,gs,hr,mr,fr,St,gr,Ot,Os;return l=new Rt({}),w=new Rt({}),P=new Rt({}),j=new Xe({props:{name:"class transformers.HubertConfig",anchor:"transformers.HubertConfig",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:"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_layer_norm",val:" = True"},{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:" = (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:"do_stable_layer_norm",val:" = False"},{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:" = 'sum'"},{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.HubertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the Hubert 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/hubert#transformers.HubertModel">HubertModel</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/hubert#transformers.HubertModel">HubertModel</a>.`,name:"vocab_size"},{anchor:"transformers.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.hidden_dropout(float,",description:`<strong>hidden_dropout(<code>float</code>,</strong> <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(float,"},{anchor:"transformers.HubertConfig.attention_dropout(float,",description:`<strong>attention_dropout(<code>float</code>,</strong> <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout(float,"},{anchor:"transformers.HubertConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for the final projection layer of <a href="/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC">Wav2Vec2ForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.feat_proj_layer_norm",description:`<strong>feat_proj_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply LayerNorm to the output of the feature encoder.`,name:"feat_proj_layer_norm"},{anchor:"transformers.HubertConfig.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.HubertConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[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.HubertConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[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.HubertConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.do_stable_layer_norm",description:`<strong>do_stable_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether do apply <em>stable</em> layer norm architecture of the Transformer encoder. <code>do_stable_layer_norm is True</code> corresponds to applying layer norm before the attention layer, whereas <code>do_stable_layer_norm is False</code> corresponds to applying layer norm after the attention layer.`,name:"do_stable_layer_norm"},{anchor:"transformers.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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.HubertConfig.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/hubert#transformers.HubertForCTC">HubertForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.HubertConfig.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/hubert#transformers.HubertForCTC">HubertForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.HubertConfig.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/hubert#transformers.HubertForSequenceClassification">HubertForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.HubertConfig.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/hubert/configuration_hubert.py#L32"}}),U=new Go({props:{anchor:"transformers.HubertConfig.example",$$slots:{default:[wi]},$$scope:{ctx:M}}}),Wt=new Rt({}),Ut=new Xe({props:{name:"class transformers.HubertModel",anchor:"transformers.HubertModel",parameters:[{name:"config",val:": HubertConfig"}],parametersDescription:[{anchor:"transformers.HubertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/hubert#transformers.HubertConfig">HubertConfig</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/hubert/modeling_hubert.py#L956"}}),Jt=new Xe({props:{name:"forward",anchor:"transformers.HubertModel.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.HubertModel.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.HubertModel.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/hubert-base-ls960" rel="nofollow">hubert-base</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.HubertModel.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.HubertModel.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.HubertModel.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/hubert/modeling_hubert.py#L1021",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/hubert#transformers.HubertConfig"
>HubertConfig</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>
`}}),wt=new xo({props:{$$slots:{default:[Ti]},$$scope:{ctx:M}}}),Tt=new Go({props:{anchor:"transformers.HubertModel.forward.example",$$slots:{default:[ki]},$$scope:{ctx:M}}}),Qt=new Rt({}),Zt=new Xe({props:{name:"class transformers.HubertForCTC",anchor:"transformers.HubertForCTC",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.HubertForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/hubert#transformers.HubertConfig">HubertConfig</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/hubert/modeling_hubert.py#L1100"}}),no=new Xe({props:{name:"forward",anchor:"transformers.HubertForCTC.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.HubertForCTC.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.HubertForCTC.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/hubert-base-ls960" rel="nofollow">hubert-base</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.HubertForCTC.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.HubertForCTC.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.HubertForCTC.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.HubertForCTC.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/hubert/modeling_hubert.py#L1141",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/hubert#transformers.HubertConfig"
>HubertConfig</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>
`}}),$t=new xo({props:{$$slots:{default:[$i]},$$scope:{ctx:M}}}),Ct=new Go({props:{anchor:"transformers.HubertForCTC.forward.example",$$slots:{default:[Ci]},$$scope:{ctx:M}}}),ao=new Rt({}),ro=new Xe({props:{name:"class transformers.HubertForSequenceClassification",anchor:"transformers.HubertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.HubertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/hubert#transformers.HubertConfig">HubertConfig</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/hubert/modeling_hubert.py#L1230"}}),ho=new Xe({props:{name:"forward",anchor:"transformers.HubertForSequenceClassification.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.HubertForSequenceClassification.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.HubertForSequenceClassification.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/hubert-base-ls960" rel="nofollow">hubert-base</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.HubertForSequenceClassification.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.HubertForSequenceClassification.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.HubertForSequenceClassification.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.HubertForSequenceClassification.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/hubert/modeling_hubert.py#L1275",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/hubert#transformers.HubertConfig"
>HubertConfig</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>
`}}),Et=new xo({props:{$$slots:{default:[Hi]},$$scope:{ctx:M}}}),jt=new Go({props:{anchor:"transformers.HubertForSequenceClassification.forward.example",$$slots:{default:[Ei]},$$scope:{ctx:M}}}),mo=new Rt({}),fo=new Xe({props:{name:"class transformers.TFHubertModel",anchor:"transformers.TFHubertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFHubertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/hubert#transformers.HubertConfig">HubertConfig</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/hubert/modeling_tf_hubert.py#L1432"}}),xt=new xo({props:{$$slots:{default:[ji]},$$scope:{ctx:M}}}),vo=new Xe({props:{name:"call",anchor:"transformers.TFHubertModel.call",parameters:[{name:"input_values",val:": Tensor"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFHubertModel.call.input_values",description:`<strong>input_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> <code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_values"},{anchor:"transformers.TFHubertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFHubertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFHubertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFHubertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFHubertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_values</code> you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFHubertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFHubertModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFHubertModel.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFHubertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/hubert/modeling_tf_hubert.py#L1438",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</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/hubert#transformers.HubertConfig"
>HubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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(tf.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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Mt=new xo({props:{$$slots:{default:[Fi]},$$scope:{ctx:M}}}),qt=new Go({props:{anchor:"transformers.TFHubertModel.call.example",$$slots:{default:[xi]},$$scope:{ctx:M}}}),yo=new Rt({}),wo=new Xe({props:{name:"class transformers.TFHubertForCTC",anchor:"transformers.TFHubertForCTC",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFHubertForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/hubert#transformers.HubertConfig">HubertConfig</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/hubert/modeling_tf_hubert.py#L1531"}}),At=new xo({props:{$$slots:{default:[Mi]},$$scope:{ctx:M}}}),Ho=new Xe({props:{name:"call",anchor:"transformers.TFHubertForCTC.call",parameters:[{name:"input_values",val:": Tensor"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFHubertForCTC.call.input_values",description:`<strong>input_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> <code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_values"},{anchor:"transformers.TFHubertForCTC.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFHubertForCTC.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFHubertForCTC.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFHubertForCTC.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFHubertForCTC.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_values</code> you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert <code>input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFHubertForCTC.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFHubertForCTC.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFHubertForCTC.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFHubertForCTC.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFHubertForCTC.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_values</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked),
the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/hubert/modeling_tf_hubert.py#L1558",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or a tuple of <code>tf.Tensor</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/hubert#transformers.HubertConfig"
>HubertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFCausalLMOutput"
>transformers.modeling_tf_outputs.TFCausalLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),St=new xo({props:{$$slots:{default:[qi]},$$scope:{ctx:M}}}),Ot=new Go({props:{anchor:"transformers.TFHubertForCTC.call.example",$$slots:{default:[Pi]},$$scope:{ctx:M}}}),{c(){d=a("meta"),y=p(),f=a("h1"),m=a("a"),v=a("span"),T(l.$$.fragment),c=p(),F=a("span"),Oe=s("Hubert"),_e=p(),O=a("h2"),J=a("a"),ee=a("span"),T(w.$$.fragment),De=p(),V=a("span"),ze=s("Overview"),be=p(),L=a("p"),Ie=s("Hubert was proposed in "),te=a("a"),oe=s("HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units"),Le=s(` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan
Salakhutdinov, Abdelrahman Mohamed.`),ve=p(),R=a("p"),Ne=s("The abstract from the paper is the following:"),ye=p(),W=a("p"),me=a("em"),Be=s(`Self-supervised approaches for speech representation learning are challenged by three unique problems: (1) there are
multiple sound units in each input utterance, (2) there is no lexicon of input sound units during the pre-training
phase, and (3) sound units have variable lengths with no explicit segmentation. To deal with these three problems, we
propose the Hidden-Unit BERT (HuBERT) approach for self-supervised speech representation learning, which utilizes an
offline clustering step to provide aligned target labels for a BERT-like prediction loss. A key ingredient of our
approach is applying the prediction loss over the masked regions only, which forces the model to learn a combined
acoustic and language model over the continuous inputs. HuBERT relies primarily on the consistency of the unsupervised
clustering step rather than the intrinsic quality of the assigned cluster labels. Starting with a simple k-means
teacher of 100 clusters, and using two iterations of clustering, the HuBERT model either matches or improves upon the
state-of-the-art wav2vec 2.0 performance on the Librispeech (960h) and Libri-light (60,000h) benchmarks with 10min, 1h,
10h, 100h, and 960h fine-tuning subsets. Using a 1B parameter model, HuBERT shows up to 19% and 13% relative WER
reduction on the more challenging dev-other and test-other evaluation subsets.`),he=p(),q=a("p"),D=s("Tips:"),we=p(),N=a("ul"),fe=a("li"),Re=s("Hubert is a speech model that accepts a float array corresponding to the raw waveform of the speech signal."),se=p(),ne=a("li"),We=s(`Hubert model was fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded
using `),A=a("a"),Ue=s("Wav2Vec2CTCTokenizer"),ae=s("."),Te=p(),Q=a("p"),re=s("This model was contributed by "),ie=a("a"),Ve=s("patrickvonplaten"),K=s("."),ke=p(),z=a("h2"),Z=a("a"),le=a("span"),T(P.$$.fragment),Ke=p(),I=a("span"),Ye=s("HubertConfig"),$e=p(),_=a("div"),T(j.$$.fragment),et=p(),B=a("p"),tt=s("This is the configuration class to store the configuration of a "),Ce=a("a"),x=s("HubertModel"),ot=s(`. It is used to instantiate an
Hubert 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 Hubert
`),ge=a("a"),st=s("facebook/hubert-base-ls960"),nt=s(" architecture."),at=p(),S=a("p"),de=s("Configuration objects inherit from "),He=a("a"),rt=s("PretrainedConfig"),ce=s(` and can be used to control the model outputs. Read the
documentation from `),Ee=a("a"),it=s("PretrainedConfig"),Ge=s(" for more information."),lt=p(),T(U.$$.fragment),Je=p(),dt=a("h2"),yt=a("a"),Qo=a("span"),T(Wt.$$.fragment),an=p(),Zo=a("span"),rn=s("HubertModel"),Es=p(),pe=a("div"),T(Ut.$$.fragment),ln=p(),Vt=a("p"),dn=s(`The bare Hubert Model transformer outputting raw hidden-states without any specific head on top.
Hubert was proposed in `),Kt=a("a"),cn=s(`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),pn=s(` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),un=p(),Yt=a("p"),hn=s("This model inherits from "),Mo=a("a"),mn=s("PreTrainedModel"),fn=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),gn=p(),Gt=a("p"),_n=s("This model is a PyTorch "),Xt=a("a"),bn=s("torch.nn.Module"),vn=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.`),yn=p(),je=a("div"),T(Jt.$$.fragment),wn=p(),ct=a("p"),Tn=s("The "),qo=a("a"),kn=s("HubertModel"),$n=s(" forward method, overrides the "),es=a("code"),Cn=s("__call__"),Hn=s(" special method."),En=p(),T(wt.$$.fragment),jn=p(),T(Tt.$$.fragment),js=p(),pt=a("h2"),kt=a("a"),ts=a("span"),T(Qt.$$.fragment),Fn=p(),os=a("span"),xn=s("HubertForCTC"),Fs=p(),ue=a("div"),T(Zt.$$.fragment),Mn=p(),ut=a("p"),qn=s("Hubert Model with a "),ss=a("code"),Pn=s("language modeling"),An=s(` head on top for Connectionist Temporal Classification (CTC).
Hubert was proposed in `),eo=a("a"),Sn=s(`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),On=s(` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),Dn=p(),to=a("p"),zn=s("This model inherits from "),Po=a("a"),In=s("PreTrainedModel"),Ln=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Nn=p(),oo=a("p"),Bn=s("This model is a PyTorch "),so=a("a"),Rn=s("torch.nn.Module"),Wn=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.`),Un=p(),Fe=a("div"),T(no.$$.fragment),Vn=p(),ht=a("p"),Kn=s("The "),Ao=a("a"),Yn=s("HubertForCTC"),Gn=s(" forward method, overrides the "),ns=a("code"),Xn=s("__call__"),Jn=s(" special method."),Qn=p(),T($t.$$.fragment),Zn=p(),T(Ct.$$.fragment),xs=p(),mt=a("h2"),Ht=a("a"),as=a("span"),T(ao.$$.fragment),ea=p(),rs=a("span"),ta=s("HubertForSequenceClassification"),Ms=p(),Y=a("div"),T(ro.$$.fragment),oa=p(),is=a("p"),sa=s(`Hubert Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),na=p(),io=a("p"),aa=s("Hubert was proposed in "),lo=a("a"),ra=s(`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),ia=s(` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),la=p(),co=a("p"),da=s("This model inherits from "),So=a("a"),ca=s("PreTrainedModel"),pa=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ua=p(),po=a("p"),ha=s("This model is a PyTorch "),uo=a("a"),ma=s("torch.nn.Module"),fa=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.`),ga=p(),xe=a("div"),T(ho.$$.fragment),_a=p(),ft=a("p"),ba=s("The "),Oo=a("a"),va=s("HubertForSequenceClassification"),ya=s(" forward method, overrides the "),ls=a("code"),wa=s("__call__"),Ta=s(" special method."),ka=p(),T(Et.$$.fragment),$a=p(),T(jt.$$.fragment),qs=p(),gt=a("h2"),Ft=a("a"),ds=a("span"),T(mo.$$.fragment),Ca=p(),cs=a("span"),Ha=s("TFHubertModel"),Ps=p(),G=a("div"),T(fo.$$.fragment),Ea=p(),ps=a("p"),ja=s("The bare TFHubert Model transformer outputing raw hidden-states without any specific head on top."),Fa=p(),go=a("p"),xa=s("This model inherits from "),Do=a("a"),Ma=s("TFPreTrainedModel"),qa=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pa=p(),_o=a("p"),Aa=s("This model is also a "),bo=a("a"),Sa=s("tf.keras.Model"),Oa=s(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Da=p(),T(xt.$$.fragment),za=p(),Me=a("div"),T(vo.$$.fragment),Ia=p(),_t=a("p"),La=s("The "),zo=a("a"),Na=s("TFHubertModel"),Ba=s(" forward method, overrides the "),us=a("code"),Ra=s("__call__"),Wa=s(" special method."),Ua=p(),T(Mt.$$.fragment),Va=p(),T(qt.$$.fragment),As=p(),bt=a("h2"),Pt=a("a"),hs=a("span"),T(yo.$$.fragment),Ka=p(),ms=a("span"),Ya=s("TFHubertForCTC"),Ss=p(),X=a("div"),T(wo.$$.fragment),Ga=p(),To=a("p"),Xa=s("TFHubert Model with a "),fs=a("code"),Ja=s("language modeling"),Qa=s(" head on top for Connectionist Temporal Classification (CTC)."),Za=p(),ko=a("p"),er=s("This model inherits from "),Io=a("a"),tr=s("TFPreTrainedModel"),or=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sr=p(),$o=a("p"),nr=s("This model is also a "),Co=a("a"),ar=s("tf.keras.Model"),rr=s(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ir=p(),T(At.$$.fragment),lr=p(),qe=a("div"),T(Ho.$$.fragment),dr=p(),vt=a("p"),cr=s("The "),Lo=a("a"),pr=s("TFHubertForCTC"),ur=s(" forward method, overrides the "),gs=a("code"),hr=s("__call__"),mr=s(" special method."),fr=p(),T(St.$$.fragment),gr=p(),T(Ot.$$.fragment),this.h()},l(o){const b=vi('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(t),y=u(o),f=r(o,"H1",{class:!0});var Eo=i(f);m=r(Eo,"A",{id:!0,class:!0,href:!0});var _s=i(m);v=r(_s,"SPAN",{});var bs=i(v);k(l.$$.fragment,bs),bs.forEach(t),_s.forEach(t),c=u(Eo),F=r(Eo,"SPAN",{});var vs=i(F);Oe=n(vs,"Hubert"),vs.forEach(t),Eo.forEach(t),_e=u(o),O=r(o,"H2",{class:!0});var jo=i(O);J=r(jo,"A",{id:!0,class:!0,href:!0});var ys=i(J);ee=r(ys,"SPAN",{});var ws=i(ee);k(w.$$.fragment,ws),ws.forEach(t),ys.forEach(t),De=u(jo),V=r(jo,"SPAN",{});var Ts=i(V);ze=n(Ts,"Overview"),Ts.forEach(t),jo.forEach(t),be=u(o),L=r(o,"P",{});var Fo=i(L);Ie=n(Fo,"Hubert was proposed in "),te=r(Fo,"A",{href:!0,rel:!0});var ks=i(te);oe=n(ks,"HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units"),ks.forEach(t),Le=n(Fo,` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan
Salakhutdinov, Abdelrahman Mohamed.`),Fo.forEach(t),ve=u(o),R=r(o,"P",{});var $s=i(R);Ne=n($s,"The abstract from the paper is the following:"),$s.forEach(t),ye=u(o),W=r(o,"P",{});var Cs=i(W);me=r(Cs,"EM",{});var Hs=i(me);Be=n(Hs,`Self-supervised approaches for speech representation learning are challenged by three unique problems: (1) there are
multiple sound units in each input utterance, (2) there is no lexicon of input sound units during the pre-training
phase, and (3) sound units have variable lengths with no explicit segmentation. To deal with these three problems, we
propose the Hidden-Unit BERT (HuBERT) approach for self-supervised speech representation learning, which utilizes an
offline clustering step to provide aligned target labels for a BERT-like prediction loss. A key ingredient of our
approach is applying the prediction loss over the masked regions only, which forces the model to learn a combined
acoustic and language model over the continuous inputs. HuBERT relies primarily on the consistency of the unsupervised
clustering step rather than the intrinsic quality of the assigned cluster labels. Starting with a simple k-means
teacher of 100 clusters, and using two iterations of clustering, the HuBERT model either matches or improves upon the
state-of-the-art wav2vec 2.0 performance on the Librispeech (960h) and Libri-light (60,000h) benchmarks with 10min, 1h,
10h, 100h, and 960h fine-tuning subsets. Using a 1B parameter model, HuBERT shows up to 19% and 13% relative WER
reduction on the more challenging dev-other and test-other evaluation subsets.`),Hs.forEach(t),Cs.forEach(t),he=u(o),q=r(o,"P",{});var _r=i(q);D=n(_r,"Tips:"),_r.forEach(t),we=u(o),N=r(o,"UL",{});var Ds=i(N);fe=r(Ds,"LI",{});var br=i(fe);Re=n(br,"Hubert is a speech model that accepts a float array corresponding to the raw waveform of the speech signal."),br.forEach(t),se=u(Ds),ne=r(Ds,"LI",{});var zs=i(ne);We=n(zs,`Hubert model was fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded
using `),A=r(zs,"A",{href:!0});var vr=i(A);Ue=n(vr,"Wav2Vec2CTCTokenizer"),vr.forEach(t),ae=n(zs,"."),zs.forEach(t),Ds.forEach(t),Te=u(o),Q=r(o,"P",{});var Is=i(Q);re=n(Is,"This model was contributed by "),ie=r(Is,"A",{href:!0,rel:!0});var yr=i(ie);Ve=n(yr,"patrickvonplaten"),yr.forEach(t),K=n(Is,"."),Is.forEach(t),ke=u(o),z=r(o,"H2",{class:!0});var Ls=i(z);Z=r(Ls,"A",{id:!0,class:!0,href:!0});var wr=i(Z);le=r(wr,"SPAN",{});var Tr=i(le);k(P.$$.fragment,Tr),Tr.forEach(t),wr.forEach(t),Ke=u(Ls),I=r(Ls,"SPAN",{});var kr=i(I);Ye=n(kr,"HubertConfig"),kr.forEach(t),Ls.forEach(t),$e=u(o),_=r(o,"DIV",{class:!0});var Dt=i(_);k(j.$$.fragment,Dt),et=u(Dt),B=r(Dt,"P",{});var No=i(B);tt=n(No,"This is the configuration class to store the configuration of a "),Ce=r(No,"A",{href:!0});var $r=i(Ce);x=n($r,"HubertModel"),$r.forEach(t),ot=n(No,`. It is used to instantiate an
Hubert 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 Hubert
`),ge=r(No,"A",{href:!0,rel:!0});var Cr=i(ge);st=n(Cr,"facebook/hubert-base-ls960"),Cr.forEach(t),nt=n(No," architecture."),No.forEach(t),at=u(Dt),S=r(Dt,"P",{});var Bo=i(S);de=n(Bo,"Configuration objects inherit from "),He=r(Bo,"A",{href:!0});var Hr=i(He);rt=n(Hr,"PretrainedConfig"),Hr.forEach(t),ce=n(Bo,` and can be used to control the model outputs. Read the
documentation from `),Ee=r(Bo,"A",{href:!0});var Er=i(Ee);it=n(Er,"PretrainedConfig"),Er.forEach(t),Ge=n(Bo," for more information."),Bo.forEach(t),lt=u(Dt),k(U.$$.fragment,Dt),Dt.forEach(t),Je=u(o),dt=r(o,"H2",{class:!0});var Ns=i(dt);yt=r(Ns,"A",{id:!0,class:!0,href:!0});var jr=i(yt);Qo=r(jr,"SPAN",{});var Fr=i(Qo);k(Wt.$$.fragment,Fr),Fr.forEach(t),jr.forEach(t),an=u(Ns),Zo=r(Ns,"SPAN",{});var xr=i(Zo);rn=n(xr,"HubertModel"),xr.forEach(t),Ns.forEach(t),Es=u(o),pe=r(o,"DIV",{class:!0});var Qe=i(pe);k(Ut.$$.fragment,Qe),ln=u(Qe),Vt=r(Qe,"P",{});var Bs=i(Vt);dn=n(Bs,`The bare Hubert Model transformer outputting raw hidden-states without any specific head on top.
Hubert was proposed in `),Kt=r(Bs,"A",{href:!0,rel:!0});var Mr=i(Kt);cn=n(Mr,`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),Mr.forEach(t),pn=n(Bs,` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),Bs.forEach(t),un=u(Qe),Yt=r(Qe,"P",{});var Rs=i(Yt);hn=n(Rs,"This model inherits from "),Mo=r(Rs,"A",{href:!0});var qr=i(Mo);mn=n(qr,"PreTrainedModel"),qr.forEach(t),fn=n(Rs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Rs.forEach(t),gn=u(Qe),Gt=r(Qe,"P",{});var Ws=i(Gt);_n=n(Ws,"This model is a PyTorch "),Xt=r(Ws,"A",{href:!0,rel:!0});var Pr=i(Xt);bn=n(Pr,"torch.nn.Module"),Pr.forEach(t),vn=n(Ws,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ws.forEach(t),yn=u(Qe),je=r(Qe,"DIV",{class:!0});var zt=i(je);k(Jt.$$.fragment,zt),wn=u(zt),ct=r(zt,"P",{});var Ro=i(ct);Tn=n(Ro,"The "),qo=r(Ro,"A",{href:!0});var Ar=i(qo);kn=n(Ar,"HubertModel"),Ar.forEach(t),$n=n(Ro," forward method, overrides the "),es=r(Ro,"CODE",{});var Sr=i(es);Cn=n(Sr,"__call__"),Sr.forEach(t),Hn=n(Ro," special method."),Ro.forEach(t),En=u(zt),k(wt.$$.fragment,zt),jn=u(zt),k(Tt.$$.fragment,zt),zt.forEach(t),Qe.forEach(t),js=u(o),pt=r(o,"H2",{class:!0});var Us=i(pt);kt=r(Us,"A",{id:!0,class:!0,href:!0});var Or=i(kt);ts=r(Or,"SPAN",{});var Dr=i(ts);k(Qt.$$.fragment,Dr),Dr.forEach(t),Or.forEach(t),Fn=u(Us),os=r(Us,"SPAN",{});var zr=i(os);xn=n(zr,"HubertForCTC"),zr.forEach(t),Us.forEach(t),Fs=u(o),ue=r(o,"DIV",{class:!0});var Ze=i(ue);k(Zt.$$.fragment,Ze),Mn=u(Ze),ut=r(Ze,"P",{});var Wo=i(ut);qn=n(Wo,"Hubert Model with a "),ss=r(Wo,"CODE",{});var Ir=i(ss);Pn=n(Ir,"language modeling"),Ir.forEach(t),An=n(Wo,` head on top for Connectionist Temporal Classification (CTC).
Hubert was proposed in `),eo=r(Wo,"A",{href:!0,rel:!0});var Lr=i(eo);Sn=n(Lr,`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),Lr.forEach(t),On=n(Wo,` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),Wo.forEach(t),Dn=u(Ze),to=r(Ze,"P",{});var Vs=i(to);zn=n(Vs,"This model inherits from "),Po=r(Vs,"A",{href:!0});var Nr=i(Po);In=n(Nr,"PreTrainedModel"),Nr.forEach(t),Ln=n(Vs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Vs.forEach(t),Nn=u(Ze),oo=r(Ze,"P",{});var Ks=i(oo);Bn=n(Ks,"This model is a PyTorch "),so=r(Ks,"A",{href:!0,rel:!0});var Br=i(so);Rn=n(Br,"torch.nn.Module"),Br.forEach(t),Wn=n(Ks,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ks.forEach(t),Un=u(Ze),Fe=r(Ze,"DIV",{class:!0});var It=i(Fe);k(no.$$.fragment,It),Vn=u(It),ht=r(It,"P",{});var Uo=i(ht);Kn=n(Uo,"The "),Ao=r(Uo,"A",{href:!0});var Rr=i(Ao);Yn=n(Rr,"HubertForCTC"),Rr.forEach(t),Gn=n(Uo," forward method, overrides the "),ns=r(Uo,"CODE",{});var Wr=i(ns);Xn=n(Wr,"__call__"),Wr.forEach(t),Jn=n(Uo," special method."),Uo.forEach(t),Qn=u(It),k($t.$$.fragment,It),Zn=u(It),k(Ct.$$.fragment,It),It.forEach(t),Ze.forEach(t),xs=u(o),mt=r(o,"H2",{class:!0});var Ys=i(mt);Ht=r(Ys,"A",{id:!0,class:!0,href:!0});var Ur=i(Ht);as=r(Ur,"SPAN",{});var Vr=i(as);k(ao.$$.fragment,Vr),Vr.forEach(t),Ur.forEach(t),ea=u(Ys),rs=r(Ys,"SPAN",{});var Kr=i(rs);ta=n(Kr,"HubertForSequenceClassification"),Kr.forEach(t),Ys.forEach(t),Ms=u(o),Y=r(o,"DIV",{class:!0});var Pe=i(Y);k(ro.$$.fragment,Pe),oa=u(Pe),is=r(Pe,"P",{});var Yr=i(is);sa=n(Yr,`Hubert Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),Yr.forEach(t),na=u(Pe),io=r(Pe,"P",{});var Gs=i(io);aa=n(Gs,"Hubert was proposed in "),lo=r(Gs,"A",{href:!0,rel:!0});var Gr=i(lo);ra=n(Gr,`HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden
Units`),Gr.forEach(t),ia=n(Gs,` by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, Abdelrahman Mohamed.`),Gs.forEach(t),la=u(Pe),co=r(Pe,"P",{});var Xs=i(co);da=n(Xs,"This model inherits from "),So=r(Xs,"A",{href:!0});var Xr=i(So);ca=n(Xr,"PreTrainedModel"),Xr.forEach(t),pa=n(Xs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Xs.forEach(t),ua=u(Pe),po=r(Pe,"P",{});var Js=i(po);ha=n(Js,"This model is a PyTorch "),uo=r(Js,"A",{href:!0,rel:!0});var Jr=i(uo);ma=n(Jr,"torch.nn.Module"),Jr.forEach(t),fa=n(Js,` 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.forEach(t),ga=u(Pe),xe=r(Pe,"DIV",{class:!0});var Lt=i(xe);k(ho.$$.fragment,Lt),_a=u(Lt),ft=r(Lt,"P",{});var Vo=i(ft);ba=n(Vo,"The "),Oo=r(Vo,"A",{href:!0});var Qr=i(Oo);va=n(Qr,"HubertForSequenceClassification"),Qr.forEach(t),ya=n(Vo," forward method, overrides the "),ls=r(Vo,"CODE",{});var Zr=i(ls);wa=n(Zr,"__call__"),Zr.forEach(t),Ta=n(Vo," special method."),Vo.forEach(t),ka=u(Lt),k(Et.$$.fragment,Lt),$a=u(Lt),k(jt.$$.fragment,Lt),Lt.forEach(t),Pe.forEach(t),qs=u(o),gt=r(o,"H2",{class:!0});var Qs=i(gt);Ft=r(Qs,"A",{id:!0,class:!0,href:!0});var ei=i(Ft);ds=r(ei,"SPAN",{});var ti=i(ds);k(mo.$$.fragment,ti),ti.forEach(t),ei.forEach(t),Ca=u(Qs),cs=r(Qs,"SPAN",{});var oi=i(cs);Ha=n(oi,"TFHubertModel"),oi.forEach(t),Qs.forEach(t),Ps=u(o),G=r(o,"DIV",{class:!0});var Ae=i(G);k(fo.$$.fragment,Ae),Ea=u(Ae),ps=r(Ae,"P",{});var si=i(ps);ja=n(si,"The bare TFHubert Model transformer outputing raw hidden-states without any specific head on top."),si.forEach(t),Fa=u(Ae),go=r(Ae,"P",{});var Zs=i(go);xa=n(Zs,"This model inherits from "),Do=r(Zs,"A",{href:!0});var ni=i(Do);Ma=n(ni,"TFPreTrainedModel"),ni.forEach(t),qa=n(Zs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zs.forEach(t),Pa=u(Ae),_o=r(Ae,"P",{});var en=i(_o);Aa=n(en,"This model is also a "),bo=r(en,"A",{href:!0,rel:!0});var ai=i(bo);Sa=n(ai,"tf.keras.Model"),ai.forEach(t),Oa=n(en,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),en.forEach(t),Da=u(Ae),k(xt.$$.fragment,Ae),za=u(Ae),Me=r(Ae,"DIV",{class:!0});var Nt=i(Me);k(vo.$$.fragment,Nt),Ia=u(Nt),_t=r(Nt,"P",{});var Ko=i(_t);La=n(Ko,"The "),zo=r(Ko,"A",{href:!0});var ri=i(zo);Na=n(ri,"TFHubertModel"),ri.forEach(t),Ba=n(Ko," forward method, overrides the "),us=r(Ko,"CODE",{});var ii=i(us);Ra=n(ii,"__call__"),ii.forEach(t),Wa=n(Ko," special method."),Ko.forEach(t),Ua=u(Nt),k(Mt.$$.fragment,Nt),Va=u(Nt),k(qt.$$.fragment,Nt),Nt.forEach(t),Ae.forEach(t),As=u(o),bt=r(o,"H2",{class:!0});var tn=i(bt);Pt=r(tn,"A",{id:!0,class:!0,href:!0});var li=i(Pt);hs=r(li,"SPAN",{});var di=i(hs);k(yo.$$.fragment,di),di.forEach(t),li.forEach(t),Ka=u(tn),ms=r(tn,"SPAN",{});var ci=i(ms);Ya=n(ci,"TFHubertForCTC"),ci.forEach(t),tn.forEach(t),Ss=u(o),X=r(o,"DIV",{class:!0});var Se=i(X);k(wo.$$.fragment,Se),Ga=u(Se),To=r(Se,"P",{});var on=i(To);Xa=n(on,"TFHubert Model with a "),fs=r(on,"CODE",{});var pi=i(fs);Ja=n(pi,"language modeling"),pi.forEach(t),Qa=n(on," head on top for Connectionist Temporal Classification (CTC)."),on.forEach(t),Za=u(Se),ko=r(Se,"P",{});var sn=i(ko);er=n(sn,"This model inherits from "),Io=r(sn,"A",{href:!0});var ui=i(Io);tr=n(ui,"TFPreTrainedModel"),ui.forEach(t),or=n(sn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sn.forEach(t),sr=u(Se),$o=r(Se,"P",{});var nn=i($o);nr=n(nn,"This model is also a "),Co=r(nn,"A",{href:!0,rel:!0});var hi=i(Co);ar=n(hi,"tf.keras.Model"),hi.forEach(t),rr=n(nn,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nn.forEach(t),ir=u(Se),k(At.$$.fragment,Se),lr=u(Se),qe=r(Se,"DIV",{class:!0});var Bt=i(qe);k(Ho.$$.fragment,Bt),dr=u(Bt),vt=r(Bt,"P",{});var Yo=i(vt);cr=n(Yo,"The "),Lo=r(Yo,"A",{href:!0});var mi=i(Lo);pr=n(mi,"TFHubertForCTC"),mi.forEach(t),ur=n(Yo," forward method, overrides the "),gs=r(Yo,"CODE",{});var fi=i(gs);hr=n(fi,"__call__"),fi.forEach(t),mr=n(Yo," special method."),Yo.forEach(t),fr=u(Bt),k(St.$$.fragment,Bt),gr=u(Bt),k(Ot.$$.fragment,Bt),Bt.forEach(t),Se.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(Si)),h(m,"id","hubert"),h(m,"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"),h(m,"href","#hubert"),h(f,"class","relative group"),h(J,"id","overview"),h(J,"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"),h(J,"href","#overview"),h(O,"class","relative group"),h(te,"href","https://arxiv.org/abs/2106.07447"),h(te,"rel","nofollow"),h(A,"href","/docs/transformers/main/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),h(ie,"href","https://huggingface.co/patrickvonplaten"),h(ie,"rel","nofollow"),h(Z,"id","transformers.HubertConfig"),h(Z,"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"),h(Z,"href","#transformers.HubertConfig"),h(z,"class","relative group"),h(Ce,"href","/docs/transformers/main/en/model_doc/hubert#transformers.HubertModel"),h(ge,"href","https://huggingface.co/facebook/hubert-base-ls960"),h(ge,"rel","nofollow"),h(He,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(Ee,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yt,"id","transformers.HubertModel"),h(yt,"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"),h(yt,"href","#transformers.HubertModel"),h(dt,"class","relative group"),h(Kt,"href","https://arxiv.org/abs/2106.07447"),h(Kt,"rel","nofollow"),h(Mo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Xt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Xt,"rel","nofollow"),h(qo,"href","/docs/transformers/main/en/model_doc/hubert#transformers.HubertModel"),h(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(kt,"id","transformers.HubertForCTC"),h(kt,"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"),h(kt,"href","#transformers.HubertForCTC"),h(pt,"class","relative group"),h(eo,"href","https://arxiv.org/abs/2106.07447"),h(eo,"rel","nofollow"),h(Po,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(so,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(so,"rel","nofollow"),h(Ao,"href","/docs/transformers/main/en/model_doc/hubert#transformers.HubertForCTC"),h(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ht,"id","transformers.HubertForSequenceClassification"),h(Ht,"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"),h(Ht,"href","#transformers.HubertForSequenceClassification"),h(mt,"class","relative group"),h(lo,"href","https://arxiv.org/abs/2106.07447"),h(lo,"rel","nofollow"),h(So,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(uo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(uo,"rel","nofollow"),h(Oo,"href","/docs/transformers/main/en/model_doc/hubert#transformers.HubertForSequenceClassification"),h(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ft,"id","transformers.TFHubertModel"),h(Ft,"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"),h(Ft,"href","#transformers.TFHubertModel"),h(gt,"class","relative group"),h(Do,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(bo,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(bo,"rel","nofollow"),h(zo,"href","/docs/transformers/main/en/model_doc/hubert#transformers.TFHubertModel"),h(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Pt,"id","transformers.TFHubertForCTC"),h(Pt,"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"),h(Pt,"href","#transformers.TFHubertForCTC"),h(bt,"class","relative group"),h(Io,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(Co,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Co,"rel","nofollow"),h(Lo,"href","/docs/transformers/main/en/model_doc/hubert#transformers.TFHubertForCTC"),h(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,b){e(document.head,d),g(o,y,b),g(o,f,b),e(f,m),e(m,v),$(l,v,null),e(f,c),e(f,F),e(F,Oe),g(o,_e,b),g(o,O,b),e(O,J),e(J,ee),$(w,ee,null),e(O,De),e(O,V),e(V,ze),g(o,be,b),g(o,L,b),e(L,Ie),e(L,te),e(te,oe),e(L,Le),g(o,ve,b),g(o,R,b),e(R,Ne),g(o,ye,b),g(o,W,b),e(W,me),e(me,Be),g(o,he,b),g(o,q,b),e(q,D),g(o,we,b),g(o,N,b),e(N,fe),e(fe,Re),e(N,se),e(N,ne),e(ne,We),e(ne,A),e(A,Ue),e(ne,ae),g(o,Te,b),g(o,Q,b),e(Q,re),e(Q,ie),e(ie,Ve),e(Q,K),g(o,ke,b),g(o,z,b),e(z,Z),e(Z,le),$(P,le,null),e(z,Ke),e(z,I),e(I,Ye),g(o,$e,b),g(o,_,b),$(j,_,null),e(_,et),e(_,B),e(B,tt),e(B,Ce),e(Ce,x),e(B,ot),e(B,ge),e(ge,st),e(B,nt),e(_,at),e(_,S),e(S,de),e(S,He),e(He,rt),e(S,ce),e(S,Ee),e(Ee,it),e(S,Ge),e(_,lt),$(U,_,null),g(o,Je,b),g(o,dt,b),e(dt,yt),e(yt,Qo),$(Wt,Qo,null),e(dt,an),e(dt,Zo),e(Zo,rn),g(o,Es,b),g(o,pe,b),$(Ut,pe,null),e(pe,ln),e(pe,Vt),e(Vt,dn),e(Vt,Kt),e(Kt,cn),e(Vt,pn),e(pe,un),e(pe,Yt),e(Yt,hn),e(Yt,Mo),e(Mo,mn),e(Yt,fn),e(pe,gn),e(pe,Gt),e(Gt,_n),e(Gt,Xt),e(Xt,bn),e(Gt,vn),e(pe,yn),e(pe,je),$(Jt,je,null),e(je,wn),e(je,ct),e(ct,Tn),e(ct,qo),e(qo,kn),e(ct,$n),e(ct,es),e(es,Cn),e(ct,Hn),e(je,En),$(wt,je,null),e(je,jn),$(Tt,je,null),g(o,js,b),g(o,pt,b),e(pt,kt),e(kt,ts),$(Qt,ts,null),e(pt,Fn),e(pt,os),e(os,xn),g(o,Fs,b),g(o,ue,b),$(Zt,ue,null),e(ue,Mn),e(ue,ut),e(ut,qn),e(ut,ss),e(ss,Pn),e(ut,An),e(ut,eo),e(eo,Sn),e(ut,On),e(ue,Dn),e(ue,to),e(to,zn),e(to,Po),e(Po,In),e(to,Ln),e(ue,Nn),e(ue,oo),e(oo,Bn),e(oo,so),e(so,Rn),e(oo,Wn),e(ue,Un),e(ue,Fe),$(no,Fe,null),e(Fe,Vn),e(Fe,ht),e(ht,Kn),e(ht,Ao),e(Ao,Yn),e(ht,Gn),e(ht,ns),e(ns,Xn),e(ht,Jn),e(Fe,Qn),$($t,Fe,null),e(Fe,Zn),$(Ct,Fe,null),g(o,xs,b),g(o,mt,b),e(mt,Ht),e(Ht,as),$(ao,as,null),e(mt,ea),e(mt,rs),e(rs,ta),g(o,Ms,b),g(o,Y,b),$(ro,Y,null),e(Y,oa),e(Y,is),e(is,sa),e(Y,na),e(Y,io),e(io,aa),e(io,lo),e(lo,ra),e(io,ia),e(Y,la),e(Y,co),e(co,da),e(co,So),e(So,ca),e(co,pa),e(Y,ua),e(Y,po),e(po,ha),e(po,uo),e(uo,ma),e(po,fa),e(Y,ga),e(Y,xe),$(ho,xe,null),e(xe,_a),e(xe,ft),e(ft,ba),e(ft,Oo),e(Oo,va),e(ft,ya),e(ft,ls),e(ls,wa),e(ft,Ta),e(xe,ka),$(Et,xe,null),e(xe,$a),$(jt,xe,null),g(o,qs,b),g(o,gt,b),e(gt,Ft),e(Ft,ds),$(mo,ds,null),e(gt,Ca),e(gt,cs),e(cs,Ha),g(o,Ps,b),g(o,G,b),$(fo,G,null),e(G,Ea),e(G,ps),e(ps,ja),e(G,Fa),e(G,go),e(go,xa),e(go,Do),e(Do,Ma),e(go,qa),e(G,Pa),e(G,_o),e(_o,Aa),e(_o,bo),e(bo,Sa),e(_o,Oa),e(G,Da),$(xt,G,null),e(G,za),e(G,Me),$(vo,Me,null),e(Me,Ia),e(Me,_t),e(_t,La),e(_t,zo),e(zo,Na),e(_t,Ba),e(_t,us),e(us,Ra),e(_t,Wa),e(Me,Ua),$(Mt,Me,null),e(Me,Va),$(qt,Me,null),g(o,As,b),g(o,bt,b),e(bt,Pt),e(Pt,hs),$(yo,hs,null),e(bt,Ka),e(bt,ms),e(ms,Ya),g(o,Ss,b),g(o,X,b),$(wo,X,null),e(X,Ga),e(X,To),e(To,Xa),e(To,fs),e(fs,Ja),e(To,Qa),e(X,Za),e(X,ko),e(ko,er),e(ko,Io),e(Io,tr),e(ko,or),e(X,sr),e(X,$o),e($o,nr),e($o,Co),e(Co,ar),e($o,rr),e(X,ir),$(At,X,null),e(X,lr),e(X,qe),$(Ho,qe,null),e(qe,dr),e(qe,vt),e(vt,cr),e(vt,Lo),e(Lo,pr),e(vt,ur),e(vt,gs),e(gs,hr),e(vt,mr),e(qe,fr),$(St,qe,null),e(qe,gr),$(Ot,qe,null),Os=!0},p(o,[b]){const Eo={};b&2&&(Eo.$$scope={dirty:b,ctx:o}),U.$set(Eo);const _s={};b&2&&(_s.$$scope={dirty:b,ctx:o}),wt.$set(_s);const bs={};b&2&&(bs.$$scope={dirty:b,ctx:o}),Tt.$set(bs);const vs={};b&2&&(vs.$$scope={dirty:b,ctx:o}),$t.$set(vs);const jo={};b&2&&(jo.$$scope={dirty:b,ctx:o}),Ct.$set(jo);const ys={};b&2&&(ys.$$scope={dirty:b,ctx:o}),Et.$set(ys);const ws={};b&2&&(ws.$$scope={dirty:b,ctx:o}),jt.$set(ws);const Ts={};b&2&&(Ts.$$scope={dirty:b,ctx:o}),xt.$set(Ts);const Fo={};b&2&&(Fo.$$scope={dirty:b,ctx:o}),Mt.$set(Fo);const ks={};b&2&&(ks.$$scope={dirty:b,ctx:o}),qt.$set(ks);const $s={};b&2&&($s.$$scope={dirty:b,ctx:o}),At.$set($s);const Cs={};b&2&&(Cs.$$scope={dirty:b,ctx:o}),St.$set(Cs);const Hs={};b&2&&(Hs.$$scope={dirty:b,ctx:o}),Ot.$set(Hs)},i(o){Os||(C(l.$$.fragment,o),C(w.$$.fragment,o),C(P.$$.fragment,o),C(j.$$.fragment,o),C(U.$$.fragment,o),C(Wt.$$.fragment,o),C(Ut.$$.fragment,o),C(Jt.$$.fragment,o),C(wt.$$.fragment,o),C(Tt.$$.fragment,o),C(Qt.$$.fragment,o),C(Zt.$$.fragment,o),C(no.$$.fragment,o),C($t.$$.fragment,o),C(Ct.$$.fragment,o),C(ao.$$.fragment,o),C(ro.$$.fragment,o),C(ho.$$.fragment,o),C(Et.$$.fragment,o),C(jt.$$.fragment,o),C(mo.$$.fragment,o),C(fo.$$.fragment,o),C(xt.$$.fragment,o),C(vo.$$.fragment,o),C(Mt.$$.fragment,o),C(qt.$$.fragment,o),C(yo.$$.fragment,o),C(wo.$$.fragment,o),C(At.$$.fragment,o),C(Ho.$$.fragment,o),C(St.$$.fragment,o),C(Ot.$$.fragment,o),Os=!0)},o(o){H(l.$$.fragment,o),H(w.$$.fragment,o),H(P.$$.fragment,o),H(j.$$.fragment,o),H(U.$$.fragment,o),H(Wt.$$.fragment,o),H(Ut.$$.fragment,o),H(Jt.$$.fragment,o),H(wt.$$.fragment,o),H(Tt.$$.fragment,o),H(Qt.$$.fragment,o),H(Zt.$$.fragment,o),H(no.$$.fragment,o),H($t.$$.fragment,o),H(Ct.$$.fragment,o),H(ao.$$.fragment,o),H(ro.$$.fragment,o),H(ho.$$.fragment,o),H(Et.$$.fragment,o),H(jt.$$.fragment,o),H(mo.$$.fragment,o),H(fo.$$.fragment,o),H(xt.$$.fragment,o),H(vo.$$.fragment,o),H(Mt.$$.fragment,o),H(qt.$$.fragment,o),H(yo.$$.fragment,o),H(wo.$$.fragment,o),H(At.$$.fragment,o),H(Ho.$$.fragment,o),H(St.$$.fragment,o),H(Ot.$$.fragment,o),Os=!1},d(o){t(d),o&&t(y),o&&t(f),E(l),o&&t(_e),o&&t(O),E(w),o&&t(be),o&&t(L),o&&t(ve),o&&t(R),o&&t(ye),o&&t(W),o&&t(he),o&&t(q),o&&t(we),o&&t(N),o&&t(Te),o&&t(Q),o&&t(ke),o&&t(z),E(P),o&&t($e),o&&t(_),E(j),E(U),o&&t(Je),o&&t(dt),E(Wt),o&&t(Es),o&&t(pe),E(Ut),E(Jt),E(wt),E(Tt),o&&t(js),o&&t(pt),E(Qt),o&&t(Fs),o&&t(ue),E(Zt),E(no),E($t),E(Ct),o&&t(xs),o&&t(mt),E(ao),o&&t(Ms),o&&t(Y),E(ro),E(ho),E(Et),E(jt),o&&t(qs),o&&t(gt),E(mo),o&&t(Ps),o&&t(G),E(fo),E(xt),E(vo),E(Mt),E(qt),o&&t(As),o&&t(bt),E(yo),o&&t(Ss),o&&t(X),E(wo),E(At),E(Ho),E(St),E(Ot)}}}const Si={local:"hubert",sections:[{local:"overview",title:"Overview"},{local:"transformers.HubertConfig",title:"HubertConfig"},{local:"transformers.HubertModel",title:"HubertModel"},{local:"transformers.HubertForCTC",title:"HubertForCTC"},{local:"transformers.HubertForSequenceClassification",title:"HubertForSequenceClassification"},{local:"transformers.TFHubertModel",title:"TFHubertModel"},{local:"transformers.TFHubertForCTC",title:"TFHubertForCTC"}],title:"Hubert"};function Oi(M){return yi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ri extends gi{constructor(d){super();_i(this,d,Oi,Ai,bi,{})}}export{Ri as default,Si as metadata};
