import{S as Yw,i as Zw,s as ek,e as r,k as u,w as T,t as n,M as tk,c as i,d as t,m as f,a as l,x as w,h as s,b as m,G as e,g as b,y as k,q as $,o as y,B as V,v as ok,L as j}from"../../chunks/vendor-hf-doc-builder.js";import{T as S}from"../../chunks/Tip-hf-doc-builder.js";import{D as C}from"../../chunks/Docstring-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as q}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as M}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ak(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Data2VecTextModel, Data2VecTextConfig

# Initializing a Data2VecText facebook/data2vec-text-base style configuration
configuration = Data2VecTextConfig()

# Initializing a model from the facebook/data2vec-text-base style configuration
model = Data2VecTextModel(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> Data2VecTextModel, Data2VecTextConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Data2VecText facebook/data2vec-text-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Data2VecTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the facebook/data2vec-text-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextModel(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=r("p"),g=n("Examples:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Examples:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function nk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Data2VecAudioModel, Data2VecAudioConfig

# Initializing a Data2VecAudio facebook/data2vec-audio-base-960h style configuration
configuration = Data2VecAudioConfig()

# Initializing a model from the facebook/data2vec-audio-base-960h style configuration
model = Data2VecAudioModel(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> Data2VecAudioModel, Data2VecAudioConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Data2VecAudio facebook/data2vec-audio-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Data2VecAudioConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the facebook/data2vec-audio-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioModel(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=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function sk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Data2VecVisionModel, Data2VecVisionConfig

# Initializing a Data2VecVision data2vec_vision-base-patch16-224-in22k style configuration
configuration = Data2VecVisionConfig()

# Initializing a model from the data2vec_vision-base-patch16-224-in22k style configuration
model = Data2VecVisionModel(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> Data2VecVisionModel, Data2VecVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Data2VecVision data2vec_vision-base-patch16-224-in22k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Data2VecVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the data2vec_vision-base-patch16-224-in22k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecVisionModel(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=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function rk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function ik(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Wav2Vec2Processor, Data2VecAudioModel
import torch
from datasets import load_dataset

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

processor = Wav2Vec2Processor.from_pretrained("facebook/data2vec-audio-base-960h")
model = Data2VecAudioModel.from_pretrained("facebook/data2vec-audio-base-960h")

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

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2Processor, Data2VecAudioModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Wav2Vec2Processor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioModel.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">292</span>, <span class="hljs-number">768</span>]`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function lk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function dk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Wav2Vec2FeatureExtractor, Data2VecAudioForAudioFrameClassification
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 = Wav2Vec2FeatureExtractor.from_pretrained("hf-internal-testing/tiny-random-data2vec-audio-frame")
model = Data2VecAudioForAudioFrameClassification.from_pretrained("hf-internal-testing/tiny-random-data2vec-audio-frame")

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

probabilities = torch.sigmoid(logits[0])
# labels is a one-hot array of shape (num_frames, num_speakers)
labels = (probabilities > 0.5).long()
labels[0].tolist()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor, Data2VecAudioForAudioFrameClassification
<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 = Wav2Vec2FeatureExtractor.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-audio-frame&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-audio-frame&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>probabilities = torch.sigmoid(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># labels is a one-hot array of shape (num_frames, num_speakers)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = (probabilities &gt; <span class="hljs-number">0.5</span>).long()
<span class="hljs-meta">&gt;&gt;&gt; </span>labels[<span class="hljs-number">0</span>].tolist()
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>]`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function ck(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function pk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Wav2Vec2Processor, Data2VecAudioForCTC
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 = Wav2Vec2Processor.from_pretrained("facebook/data2vec-audio-base-960h")
model = Data2VecAudioForCTC.from_pretrained("facebook/data2vec-audio-base-960h")

# 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]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2Processor, Data2VecAudioForCTC
<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 = Wav2Vec2Processor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForCTC.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&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>`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function hk(x){let d,g;return d=new E({props:{code:`with processor.as_target_processor():
    inputs["labels"] = processor(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">with</span> processor.as_target_processor():
<span class="hljs-meta">... </span>    inputs[<span class="hljs-string">&quot;labels&quot;</span>] = processor(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">66.95</span>`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function mk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function uk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Wav2Vec2FeatureExtractor, Data2VecAudioForSequenceClassification
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 = Wav2Vec2FeatureExtractor.from_pretrained("hf-internal-testing/tiny-random-data2vec-seq-class")
model = Data2VecAudioForSequenceClassification.from_pretrained("hf-internal-testing/tiny-random-data2vec-seq-class")

# 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`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor, Data2VecAudioForSequenceClassification
<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 = Wav2Vec2FeatureExtractor.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-seq-class&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-seq-class&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;LABEL_1&#x27;</span>`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function fk(x){let d,g;return d=new E({props:{code:`# 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-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">0.69</span>`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function gk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function _k(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Wav2Vec2FeatureExtractor, Data2VecAudioForXVector
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 = Wav2Vec2FeatureExtractor.from_pretrained("hf-internal-testing/tiny-random-data2vec-xvector")
model = Data2VecAudioForXVector.from_pretrained("hf-internal-testing/tiny-random-data2vec-xvector")

# audio file is decoded on the fly
inputs = feature_extractor(
    [d["array"] for d in dataset[:2]["audio"]], sampling_rate=sampling_rate, return_tensors="pt", padding=True
)
with torch.no_grad():
    embeddings = model(**inputs).embeddings

embeddings = torch.nn.functional.normalize(embeddings, dim=-1).cpu()

# the resulting embeddings can be used for cosine similarity-based retrieval
cosine_sim = torch.nn.CosineSimilarity(dim=-1)
similarity = cosine_sim(embeddings[0], embeddings[1])
threshold = 0.7  # the optimal threshold is dataset-dependent
if similarity < threshold:
    print("Speakers are not the same!")
round(similarity.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2FeatureExtractor, Data2VecAudioForXVector
<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 = Wav2Vec2FeatureExtractor.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-xvector&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForXVector.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-data2vec-xvector&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the resulting embeddings can be used for cosine similarity-based retrieval</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.nn.CosineSimilarity(dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>similarity = cosine_sim(embeddings[<span class="hljs-number">0</span>], embeddings[<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>threshold = <span class="hljs-number">0.7</span>  <span class="hljs-comment"># the optimal threshold is dataset-dependent</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> similarity &lt; threshold:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Speakers are not the same!&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(similarity.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">1.0</span>`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function vk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function bk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import RobertaTokenizer, Data2VecTextModel
import torch

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextModel.from_pretrained("facebook/data2vec-text-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.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> RobertaTokenizer, Data2VecTextModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextModel.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Tk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function wk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import Data2VecTextTokenizer, Data2VecTextForCausalLM, Data2VecTextConfig
import torch

tokenizer = Data2VecTextTokenizer.from_pretrained("facebook/data2vec-text-base")
config = Data2VecTextConfig.from_pretrained("data2vec-base")
config.is_decoder = True
model = Data2VecTextForCausalLM.from_pretrained("data2vec-base", config=config)

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

prediction_logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Data2VecTextTokenizer, Data2VecTextForCausalLM, Data2VecTextConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = Data2VecTextTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = Data2VecTextConfig.from_pretrained(<span class="hljs-string">&quot;data2vec-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForCausalLM.from_pretrained(<span class="hljs-string">&quot;data2vec-base&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function kk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function $k(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import RobertaTokenizer, Data2VecTextForMaskedLM
import torch

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForMaskedLM.from_pretrained("facebook/data2vec-text-base")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="pt")

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

# retrieve index of <mask>
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)
tokenizer.decode(predicted_token_id)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForMaskedLM.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, 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><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function yk(x){let d,g;return d=new E({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-<mask> tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)
round(outputs.loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function Vk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function xk(x){let d,g,c,h,v;return h=new E({props:{code:`import torch
from transformers import RobertaTokenizer, Data2VecTextForSequenceClassification

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForSequenceClassification.from_pretrained("facebook/data2vec-text-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

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

predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, 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_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
`}}),{c(){d=r("p"),g=n("Example of single-label classification:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example of single-label classification:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Dk(x){let d,g;return d=new E({props:{code:`# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = Data2VecTextForSequenceClassification.from_pretrained("facebook/data2vec-text-base", num_labels=num_labels)

labels = torch.tensor(1)
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function Fk(x){let d,g,c,h,v;return h=new E({props:{code:`import torch
from transformers import RobertaTokenizer, Data2VecTextForSequenceClassification

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForSequenceClassification.from_pretrained("facebook/data2vec-text-base", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

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

predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, 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_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
`}}),{c(){d=r("p"),g=n("Example of multi-label classification:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example of multi-label classification:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Ck(x){let d,g;return d=new E({props:{code:`# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = Data2VecTextForSequenceClassification.from_pretrained(
    "facebook/data2vec-text-base", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
    torch.float
)
loss = model(**inputs, labels=labels).loss
loss.backward()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.nn.functional.one_hot(torch.tensor([predicted_class_id]), num_classes=num_labels).to(
<span class="hljs-meta">... </span>    torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function Ak(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Mk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import RobertaTokenizer, Data2VecTextForMultipleChoice
import torch

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForMultipleChoice.from_pretrained("facebook/data2vec-text-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function jk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Ek(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import RobertaTokenizer, Data2VecTextForTokenClassification
import torch

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForTokenClassification.from_pretrained("facebook/data2vec-text-base")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

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

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]
predicted_tokens_classes
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForTokenClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function qk(x){let d,g;return d=new E({props:{code:`labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function zk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Pk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import RobertaTokenizer, Data2VecTextForQuestionAnswering
import torch

tokenizer = RobertaTokenizer.from_pretrained("facebook/data2vec-text-base")
model = Data2VecTextForQuestionAnswering.from_pretrained("facebook/data2vec-text-base")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
tokenizer.decode(predict_answer_tokens)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaTokenizer, Data2VecTextForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = RobertaTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Sk(x){let d,g;return d=new E({props:{code:`# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss
round(loss.item(), 2)
`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
`}}),{c(){T(d.$$.fragment)},l(c){w(d.$$.fragment,c)},m(c,h){k(d,c,h),g=!0},p:j,i(c){g||($(d.$$.fragment,c),g=!0)},o(c){y(d.$$.fragment,c),g=!1},d(c){V(d,c)}}}function Lk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Ok(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import BeitFeatureExtractor, Data2VecVisionModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitFeatureExtractor.from_pretrained("facebook/data2vec-vision-base")
model = Data2VecVisionModel.from_pretrained("facebook/data2vec-vision-base")

inputs = feature_extractor(image, return_tensors="pt")

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

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitFeatureExtractor, Data2VecVisionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecVisionModel.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">197</span>, <span class="hljs-number">768</span>]`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Ik(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Nk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import BeitFeatureExtractor, Data2VecVisionForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitFeatureExtractor.from_pretrained("facebook/data2vec-vision-base-ft1k")
model = Data2VecVisionForImageClassification.from_pretrained("facebook/data2vec-vision-base-ft1k")

inputs = feature_extractor(image, return_tensors="pt")

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

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitFeatureExtractor, Data2VecVisionForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base-ft1k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecVisionForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base-ft1k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, 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><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
remote control, remote`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Wk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Bk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import AutoFeatureExtractor, Data2VecVisionForSemanticSegmentation
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/data2vec-vision-base")
model = Data2VecVisionForSemanticSegmentation.from_pretrained("facebook/data2vec-vision-base")

inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
# logits are of shape (batch_size, num_labels, height, width)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Data2VecVisionForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecVisionForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),g=n("Examples:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Examples:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Hk(x){let d,g,c,h,v,a,p,D,We,re,A,Y,I,ee,Be,N,He,Te;return{c(){d=r("p"),g=n("TF 2.0 models accepts two formats as inputs:"),c=u(),h=r("ul"),v=r("li"),a=n("having all inputs as keyword arguments (like PyTorch models), or"),p=u(),D=r("li"),We=n("having all inputs as a list, tuple or dict in the first positional arguments."),re=u(),A=r("p"),Y=n("This second option is useful when using "),I=r("code"),ee=n("tf.keras.Model.fit"),Be=n(` method which currently requires having all the
tensors in the first argument of the model call function: `),N=r("code"),He=n("model(inputs)"),Te=n(".")},l(F){d=i(F,"P",{});var z=l(d);g=s(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),c=f(F),h=i(F,"UL",{});var W=l(h);v=i(W,"LI",{});var lt=l(v);a=s(lt,"having all inputs as keyword arguments (like PyTorch models), or"),lt.forEach(t),p=f(W),D=i(W,"LI",{});var dt=l(D);We=s(dt,"having all inputs as a list, tuple or dict in the first positional arguments."),dt.forEach(t),W.forEach(t),re=f(F),A=i(F,"P",{});var L=l(A);Y=s(L,"This second option is useful when using "),I=i(L,"CODE",{});var we=l(I);ee=s(we,"tf.keras.Model.fit"),we.forEach(t),Be=s(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),N=i(L,"CODE",{});var ct=l(N);He=s(ct,"model(inputs)"),ct.forEach(t),Te=s(L,"."),L.forEach(t)},m(F,z){b(F,d,z),e(d,g),b(F,c,z),b(F,h,z),e(h,v),e(v,a),e(h,p),e(h,D),e(D,We),b(F,re,z),b(F,A,z),e(A,Y),e(A,I),e(I,ee),e(A,Be),e(A,N),e(N,He),e(A,Te)},d(F){F&&t(d),F&&t(c),F&&t(h),F&&t(re),F&&t(A)}}}function Rk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Qk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import BeitFeatureExtractor, TFData2VecVisionModel
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitFeatureExtractor.from_pretrained("facebook/data2vec-vision-base")
model = TFData2VecVisionModel.from_pretrained("facebook/data2vec-vision-base")

inputs = feature_extractor(image, return_tensors="tf")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitFeatureExtractor, TFData2VecVisionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFData2VecVisionModel.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">197</span>, <span class="hljs-number">768</span>]`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Gk(x){let d,g,c,h,v,a,p,D,We,re,A,Y,I,ee,Be,N,He,Te;return{c(){d=r("p"),g=n("TF 2.0 models accepts two formats as inputs:"),c=u(),h=r("ul"),v=r("li"),a=n("having all inputs as keyword arguments (like PyTorch models), or"),p=u(),D=r("li"),We=n("having all inputs as a list, tuple or dict in the first positional arguments."),re=u(),A=r("p"),Y=n("This second option is useful when using "),I=r("code"),ee=n("tf.keras.Model.fit"),Be=n(` method which currently requires having all the
tensors in the first argument of the model call function: `),N=r("code"),He=n("model(inputs)"),Te=n(".")},l(F){d=i(F,"P",{});var z=l(d);g=s(z,"TF 2.0 models accepts two formats as inputs:"),z.forEach(t),c=f(F),h=i(F,"UL",{});var W=l(h);v=i(W,"LI",{});var lt=l(v);a=s(lt,"having all inputs as keyword arguments (like PyTorch models), or"),lt.forEach(t),p=f(W),D=i(W,"LI",{});var dt=l(D);We=s(dt,"having all inputs as a list, tuple or dict in the first positional arguments."),dt.forEach(t),W.forEach(t),re=f(F),A=i(F,"P",{});var L=l(A);Y=s(L,"This second option is useful when using "),I=i(L,"CODE",{});var we=l(I);ee=s(we,"tf.keras.Model.fit"),we.forEach(t),Be=s(L,` method which currently requires having all the
tensors in the first argument of the model call function: `),N=i(L,"CODE",{});var ct=l(N);He=s(ct,"model(inputs)"),ct.forEach(t),Te=s(L,"."),L.forEach(t)},m(F,z){b(F,d,z),e(d,g),b(F,c,z),b(F,h,z),e(h,v),e(v,a),e(h,p),e(h,D),e(D,We),b(F,re,z),b(F,A,z),e(A,Y),e(A,I),e(I,ee),e(A,Be),e(A,N),e(N,He),e(A,Te)},d(F){F&&t(d),F&&t(c),F&&t(h),F&&t(re),F&&t(A)}}}function Xk(x){let d,g,c,h,v;return{c(){d=r("p"),g=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r("code"),h=n("Module"),v=n(`
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(a){d=i(a,"P",{});var p=l(d);g=s(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=i(p,"CODE",{});var D=l(c);h=s(D,"Module"),D.forEach(t),v=s(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(a,p){b(a,d,p),e(d,g),e(d,c),e(c,h),e(d,v)},d(a){a&&t(d)}}}function Uk(x){let d,g,c,h,v;return h=new E({props:{code:`from transformers import BeitFeatureExtractor, TFData2VecVisionForImageClassification
import tensorflow as tf
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = BeitFeatureExtractor.from_pretrained("facebook/data2vec-vision-base-ft1k")
model = TFData2VecVisionForImageClassification.from_pretrained("facebook/data2vec-vision-base-ft1k")

inputs = feature_extractor(image, return_tensors="tf")
logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = int(tf.math.argmax(logits, axis=-1))
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BeitFeatureExtractor, TFData2VecVisionForImageClassification
<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> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = BeitFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base-ft1k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFData2VecVisionForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base-ft1k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
remote control, remote`}}),{c(){d=r("p"),g=n("Example:"),c=u(),T(h.$$.fragment)},l(a){d=i(a,"P",{});var p=l(d);g=s(p,"Example:"),p.forEach(t),c=f(a),w(h.$$.fragment,a)},m(a,p){b(a,d,p),e(d,g),b(a,c,p),k(h,a,p),v=!0},p:j,i(a){v||($(h.$$.fragment,a),v=!0)},o(a){y(h.$$.fragment,a),v=!1},d(a){a&&t(d),a&&t(c),V(h,a)}}}function Jk(x){let d,g,c,h,v,a,p,D,We,re,A,Y,I,ee,Be,N,He,Te,F,z,W,lt,dt,L,we,ct,Rd,Vr,Ea,Wp,qa,Bp,Hp,Qd,xr,Rp,Gd,ie,Ni,Qp,Gp,za,Xp,Dr,Up,Jp,Kp,Pa,Yp,Fr,Zp,eh,th,Sa,oh,Cr,ah,nh,sh,La,rh,Oa,ih,lh,Xd,ke,dh,Ia,ch,ph,Na,hh,mh,Wa,uh,fh,Ud,Ke,gh,Ba,_h,vh,Ha,bh,Th,Jd,pt,no,Wi,Ra,wh,Bi,kh,Kd,fe,Qa,$h,Re,yh,Ar,Vh,xh,Mr,Dh,Fh,Ga,Ch,Ah,Mh,ht,jh,jr,Eh,qh,Er,zh,Ph,Sh,so,Yd,mt,ro,Hi,Xa,Lh,Ri,Oh,Zd,ge,Ua,Ih,ut,Nh,qr,Wh,Bh,Ja,Hh,Rh,Qh,ft,Gh,zr,Xh,Uh,Pr,Jh,Kh,Yh,io,ec,gt,lo,Qi,Ka,Zh,Gi,em,tc,Qe,Ya,tm,_t,om,Sr,am,nm,Za,sm,rm,im,co,oc,vt,po,Xi,en,lm,Ui,dm,ac,te,tn,cm,on,pm,an,hm,mm,um,nn,fm,Lr,gm,_m,vm,sn,bm,rn,Tm,wm,km,$e,ln,$m,bt,ym,Or,Vm,xm,Ji,Dm,Fm,Cm,ho,Am,mo,nc,Tt,uo,Ki,dn,Mm,Yi,jm,sc,B,cn,Em,Zi,qm,zm,pn,Pm,hn,Sm,Lm,Om,mn,Im,Ir,Nm,Wm,Bm,un,Hm,fn,Rm,Qm,Gm,ye,gn,Xm,wt,Um,Nr,Jm,Km,el,Ym,Zm,eu,fo,tu,go,rc,kt,_o,tl,_n,ou,ol,au,ic,oe,vn,nu,$t,su,al,ru,iu,bn,lu,du,cu,Tn,pu,Wr,hu,mu,uu,wn,fu,kn,gu,_u,vu,le,$n,bu,yt,Tu,Br,wu,ku,nl,$u,yu,Vu,vo,xu,bo,Du,To,lc,Vt,wo,sl,yn,Fu,rl,Cu,dc,H,Vn,Au,il,Mu,ju,xn,Eu,Dn,qu,zu,Pu,Fn,Su,Hr,Lu,Ou,Iu,Cn,Nu,An,Wu,Bu,Hu,de,Mn,Ru,xt,Qu,Rr,Gu,Xu,ll,Uu,Ju,Ku,ko,Yu,$o,Zu,yo,cc,Dt,Vo,dl,jn,ef,cl,tf,pc,R,En,of,pl,af,nf,qn,sf,zn,rf,lf,df,Pn,cf,Qr,pf,hf,mf,Sn,uf,Ln,ff,gf,_f,Ve,On,vf,Ft,bf,Gr,Tf,wf,hl,kf,$f,yf,xo,Vf,Do,hc,Ct,Fo,ml,In,xf,ul,Df,mc,P,Nn,Ff,Wn,Cf,Bn,Af,Mf,jf,Hn,Ef,Xr,qf,zf,Pf,Rn,Sf,Qn,Lf,Of,If,Gn,Nf,fl,Wf,Bf,Hf,Q,Rf,gl,Qf,Gf,_l,Xf,Uf,vl,Jf,Kf,bl,Yf,Zf,Tl,eg,tg,wl,og,ag,ng,Co,sg,kl,rg,ig,Xn,lg,dg,xe,Un,cg,At,pg,Ur,hg,mg,$l,ug,fg,gg,Ao,_g,Mo,uc,Mt,jo,yl,Jn,vg,Vl,bg,fc,ae,Kn,Tg,jt,wg,xl,kg,$g,Yn,yg,Vg,xg,Zn,Dg,Jr,Fg,Cg,Ag,es,Mg,ts,jg,Eg,qg,De,os,zg,Et,Pg,Kr,Sg,Lg,Dl,Og,Ig,Ng,Eo,Wg,qo,gc,qt,zo,Fl,as,Bg,Cl,Hg,_c,ne,ns,Rg,zt,Qg,Al,Gg,Xg,ss,Ug,Jg,Kg,rs,Yg,Yr,Zg,e_,t_,is,o_,ls,a_,n_,s_,ce,ds,r_,Pt,i_,Zr,l_,d_,Ml,c_,p_,h_,Po,m_,So,u_,Lo,vc,St,Oo,jl,cs,f_,El,g_,bc,G,ps,__,ql,v_,b_,hs,T_,ms,w_,k_,$_,us,y_,ei,V_,x_,D_,fs,F_,gs,C_,A_,M_,O,_s,j_,Lt,E_,ti,q_,z_,zl,P_,S_,L_,Io,O_,No,I_,Wo,N_,Bo,W_,Ho,Tc,Ot,Ro,Pl,vs,B_,Sl,H_,wc,X,bs,R_,Ll,Q_,G_,Ts,X_,ws,U_,J_,K_,ks,Y_,oi,Z_,e2,t2,$s,o2,ys,a2,n2,s2,Fe,Vs,r2,It,i2,ai,l2,d2,Ol,c2,p2,h2,Qo,m2,Go,kc,Nt,Xo,Il,xs,u2,Nl,f2,$c,U,Ds,g2,Wl,_2,v2,Fs,b2,Cs,T2,w2,k2,As,$2,ni,y2,V2,x2,Ms,D2,js,F2,C2,A2,pe,Es,M2,Wt,j2,si,E2,q2,Bl,z2,P2,S2,Uo,L2,Jo,O2,Ko,yc,Bt,Yo,Hl,qs,I2,Rl,N2,Vc,J,zs,W2,Ht,B2,Ql,H2,R2,Gl,Q2,G2,X2,Ps,U2,Ss,J2,K2,Y2,Ls,Z2,ri,ev,tv,ov,Os,av,Is,nv,sv,rv,he,Ns,iv,Rt,lv,ii,dv,cv,Xl,pv,hv,mv,Zo,uv,ea,fv,ta,xc,Qt,oa,Ul,Ws,gv,Jl,_v,Dc,Ge,Bs,vv,Hs,bv,Rs,Tv,wv,kv,Ce,Qs,$v,Gt,yv,li,Vv,xv,Kl,Dv,Fv,Cv,aa,Av,na,Fc,Xt,sa,Yl,Gs,Mv,Zl,jv,Cc,_e,Xs,Ev,ed,qv,zv,Us,Pv,Js,Sv,Lv,Ov,Ae,Ks,Iv,Ut,Nv,di,Wv,Bv,td,Hv,Rv,Qv,ra,Gv,ia,Ac,Jt,la,od,Ys,Xv,ad,Uv,Mc,ve,Zs,Jv,nd,Kv,Yv,er,Zv,tr,eb,tb,ob,Me,or,ab,Kt,nb,ci,sb,rb,sd,ib,lb,db,da,cb,ca,jc,Yt,pa,rd,ar,pb,id,hb,Ec,se,nr,mb,sr,ub,pi,fb,gb,_b,rr,vb,ir,bb,Tb,wb,ha,kb,je,lr,$b,Zt,yb,hi,Vb,xb,ld,Db,Fb,Cb,ma,Ab,ua,qc,eo,fa,dd,dr,Mb,cd,jb,zc,K,cr,Eb,pd,qb,zb,pr,Pb,mi,Sb,Lb,Ob,hr,Ib,mr,Nb,Wb,Bb,ga,Hb,Ee,ur,Rb,to,Qb,ui,Gb,Xb,hd,Ub,Jb,Kb,_a,Yb,va,Pc;return a=new q({}),ee=new q({}),Ra=new q({}),Qa=new C({props:{name:"class transformers.Data2VecTextConfig",anchor:"transformers.Data2VecTextConfig",parameters:[{name:"vocab_size",val:" = 30522"},{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_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the DATA2VEC model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <code>Data2VecModel</code>.`,name:"vocab_size"},{anchor:"transformers.Data2VecTextConfig.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.Data2VecTextConfig.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.Data2VecTextConfig.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.Data2VecTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.Data2VecTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.Data2VecTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.Data2VecTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.Data2VecTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.Data2VecTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <code>Data2VecModel</code>.`,name:"type_vocab_size"},{anchor:"transformers.Data2VecTextConfig.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.Data2VecTextConfig.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.Data2VecTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.Data2VecTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.Data2VecTextConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/configuration_data2vec_text.py#L31"}}),so=new M({props:{anchor:"transformers.Data2VecTextConfig.example",$$slots:{default:[ak]},$$scope:{ctx:x}}}),Xa=new q({}),Ua=new C({props:{name:"class transformers.Data2VecAudioConfig",anchor:"transformers.Data2VecAudioConfig",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_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_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_embedding_groups",val:" = 16"},{name:"conv_pos_kernel_size",val:" = 19"},{name:"num_conv_pos_embeddings",val:" = 5"},{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:"tdnn_dim",val:" = (512, 512, 512, 512, 1500)"},{name:"tdnn_kernel",val:" = (5, 3, 3, 1, 1)"},{name:"tdnn_dilation",val:" = (1, 2, 3, 1, 1)"},{name:"xvector_output_dim",val:" = 512"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"add_adapter",val:" = False"},{name:"adapter_kernel_size",val:" = 3"},{name:"adapter_stride",val:" = 2"},{name:"num_adapter_layers",val:" = 3"},{name:"output_hidden_size",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Data2VecAudioConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the Data2VecAudio model. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioModel">Data2VecAudioModel</a> or <code>TFData2VecAudioModel</code>. 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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioModel">Data2VecAudioModel</a>.`,name:"vocab_size"},{anchor:"transformers.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.Data2VecAudioConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.Data2VecAudioConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForCTC">Data2VecAudioForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 512, 512, 512)</code>) &#x2014;
A tuple of integers defining the number of input and output channels of each 1D convolutional layer in the
feature encoder. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.Data2VecAudioConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 2, 2, 2, 2, 2)</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the feature encoder. The length
of <em>conv_stride</em> defines the number of convolutional layers and has to match the length of <em>conv_dim</em>.`,name:"conv_stride"},{anchor:"transformers.Data2VecAudioConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 3, 3, 3, 3, 3)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the feature encoder. The
length of <em>conv_kernel</em> defines the number of convolutional layers and has to match the length of
<em>conv_dim</em>.`,name:"conv_kernel"},{anchor:"transformers.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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\`. Note that overlap may decrease the`,name:"mask_time_prob"},{anchor:"transformers.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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.Data2VecAudioConfig.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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForCTC">Data2VecAudioForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.Data2VecAudioConfig.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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForCTC">Data2VecAudioForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.Data2VecAudioConfig.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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForSequenceClassification">Data2VecAudioForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.Data2VecAudioConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.Data2VecAudioConfig.tdnn_dim",description:`<strong>tdnn_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 1500)</code>) &#x2014;
A tuple of integers defining the number of output channels of each 1D convolutional layer in the <em>TDNN</em>
module of the <em>XVector</em> model. The length of <em>tdnn_dim</em> defines the number of <em>TDNN</em> layers.`,name:"tdnn_dim"},{anchor:"transformers.Data2VecAudioConfig.tdnn_kernel",description:`<strong>tdnn_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 3, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_kernel</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_kernel"},{anchor:"transformers.Data2VecAudioConfig.tdnn_dilation",description:`<strong>tdnn_dilation</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(1, 2, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the dilation factor of each 1D convolutional layer in <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_dilation</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_dilation"},{anchor:"transformers.Data2VecAudioConfig.xvector_output_dim",description:`<strong>xvector_output_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"xvector_output_dim"},{anchor:"transformers.Data2VecAudioConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional network should be stacked on top of the Data2VecAudio Encoder. Can be very useful
for warm-starting Data2VecAudio for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.Data2VecAudioConfig.adapter_kernel_size",description:`<strong>adapter_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_kernel_size"},{anchor:"transformers.Data2VecAudioConfig.adapter_stride",description:`<strong>adapter_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_stride"},{anchor:"transformers.Data2VecAudioConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of convolutional layers that should be used in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"num_adapter_layers"},{anchor:"transformers.Data2VecAudioConfig.output_hidden_size",description:`<strong>output_hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the encoder output layer. If not defined, this defaults to <em>hidden-size</em>. Only relevant
if <code>add_adapter is True</code>.`,name:"output_hidden_size"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/configuration_data2vec_audio.py#L31"}}),io=new M({props:{anchor:"transformers.Data2VecAudioConfig.example",$$slots:{default:[nk]},$$scope:{ctx:x}}}),Ka=new q({}),Ya=new C({props:{name:"class transformers.Data2VecVisionConfig",anchor:"transformers.Data2VecVisionConfig",parameters:[{name:"vocab_size",val:" = 8192"},{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_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"is_encoder_decoder",val:" = False"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"use_mask_token",val:" = False"},{name:"use_absolute_position_embeddings",val:" = False"},{name:"use_relative_position_bias",val:" = False"},{name:"use_shared_relative_position_bias",val:" = False"},{name:"layer_scale_init_value",val:" = 0.1"},{name:"drop_path_rate",val:" = 0.1"},{name:"use_mean_pooling",val:" = True"},{name:"out_indices",val:" = [3, 5, 7, 11]"},{name:"pool_scales",val:" = [1, 2, 3, 6]"},{name:"use_auxiliary_head",val:" = True"},{name:"auxiliary_loss_weight",val:" = 0.4"},{name:"auxiliary_channels",val:" = 256"},{name:"auxiliary_num_convs",val:" = 1"},{name:"auxiliary_concat_input",val:" = False"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Data2VecVisionConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8092) &#x2014;
Vocabulary size of the Data2VecVision model. Defines the number of different image tokens that can be used
during pre-training.`,name:"vocab_size"},{anchor:"transformers.Data2VecVisionConfig.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.Data2VecVisionConfig.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.Data2VecVisionConfig.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.Data2VecVisionConfig.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.Data2VecVisionConfig.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.Data2VecVisionConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.Data2VecVisionConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.Data2VecVisionConfig.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.Data2VecVisionConfig.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.Data2VecVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.Data2VecVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.Data2VecVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.Data2VecVisionConfig.use_mask_token",description:`<strong>use_mask_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a mask token for masked image modeling.`,name:"use_mask_token"},{anchor:"transformers.Data2VecVisionConfig.use_absolute_position_embeddings",description:`<strong>use_absolute_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use BERT-style absolute position embeddings.`,name:"use_absolute_position_embeddings"},{anchor:"transformers.Data2VecVisionConfig.use_relative_position_bias",description:`<strong>use_relative_position_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use T5-style relative position embeddings in the self-attention layers.`,name:"use_relative_position_bias"},{anchor:"transformers.Data2VecVisionConfig.use_shared_relative_position_bias",description:`<strong>use_shared_relative_position_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use the same relative position embeddings across all self-attention layers of the Transformer.`,name:"use_shared_relative_position_bias"},{anchor:"transformers.Data2VecVisionConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Scale to use in the self-attention layers. 0.1 for base, 1e-5 for large. Set 0 to disable layer scale.`,name:"layer_scale_init_value"},{anchor:"transformers.Data2VecVisionConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Stochastic depth rate per sample (when applied in the main path of residual layers).`,name:"drop_path_rate"},{anchor:"transformers.Data2VecVisionConfig.use_mean_pooling",description:`<strong>use_mean_pooling</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to mean pool the final hidden states of the patches instead of using the final hidden state of the
CLS token, before applying the classification head.`,name:"use_mean_pooling"},{anchor:"transformers.Data2VecVisionConfig.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 5, 7, 11]</code>) &#x2014;
Indices of the feature maps to use for semantic segmentation.`,name:"out_indices"},{anchor:"transformers.Data2VecVisionConfig.pool_scales",description:`<strong>pool_scales</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 3, 6]</code>) &#x2014;
Pooling scales used in Pooling Pyramid Module applied on the last feature map.`,name:"pool_scales"},{anchor:"transformers.Data2VecVisionConfig.use_auxiliary_head",description:`<strong>use_auxiliary_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use an auxiliary head during training.`,name:"use_auxiliary_head"},{anchor:"transformers.Data2VecVisionConfig.auxiliary_loss_weight",description:`<strong>auxiliary_loss_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Weight of the cross-entropy loss of the auxiliary head.`,name:"auxiliary_loss_weight"},{anchor:"transformers.Data2VecVisionConfig.auxiliary_channels",description:`<strong>auxiliary_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Number of channels to use in the auxiliary head.`,name:"auxiliary_channels"},{anchor:"transformers.Data2VecVisionConfig.auxiliary_num_convs",description:`<strong>auxiliary_num_convs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of convolutional layers to use in the auxiliary head.`,name:"auxiliary_num_convs"},{anchor:"transformers.Data2VecVisionConfig.auxiliary_concat_input",description:`<strong>auxiliary_concat_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to concatenate the output of the auxiliary head with the input before the classification layer.`,name:"auxiliary_concat_input"},{anchor:"transformers.Data2VecVisionConfig.semantic_loss_ignore_index",description:`<strong>semantic_loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function of the semantic segmentation model.`,name:"semantic_loss_ignore_index"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/configuration_data2vec_vision.py#L35"}}),co=new M({props:{anchor:"transformers.Data2VecVisionConfig.example",$$slots:{default:[sk]},$$scope:{ctx:x}}}),en=new q({}),tn=new C({props:{name:"class transformers.Data2VecAudioModel",anchor:"transformers.Data2VecAudioModel",parameters:[{name:"config",val:": Data2VecAudioConfig"}],parametersDescription:[{anchor:"transformers.Data2VecAudioModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L839"}}),ln=new C({props:{name:"forward",anchor:"transformers.Data2VecAudioModel.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.Data2VecAudioModel.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 <em>.flac</em> or <em>.wav</em> audio file
into an array of type <em>List[float]</em> or a <em>numpy.ndarray</em>, <em>e.g.</em> via the soundfile library (<em>pip install
soundfile</em>). To prepare the array into <em>input_values</em>, the <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> should be used for padding
and conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioModel.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/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-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.Data2VecAudioModel.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.Data2VecAudioModel.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.Data2VecAudioModel.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L910",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>extract_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, conv_dim[-1])</code>) \u2014 Sequence of extracted feature vectors of the last convolutional layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new S({props:{$$slots:{default:[rk]},$$scope:{ctx:x}}}),mo=new M({props:{anchor:"transformers.Data2VecAudioModel.forward.example",$$slots:{default:[ik]},$$scope:{ctx:x}}}),dn=new q({}),cn=new C({props:{name:"class transformers.Data2VecAudioForAudioFrameClassification",anchor:"transformers.Data2VecAudioForAudioFrameClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecAudioForAudioFrameClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1232"}}),gn=new C({props:{name:"forward",anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Data2VecAudioForAudioFrameClassification.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 <em>.flac</em> or <em>.wav</em> audio file
into an array of type <em>List[float]</em> or a <em>numpy.ndarray</em>, <em>e.g.</em> via the soundfile library (<em>pip install
soundfile</em>). To prepare the array into <em>input_values</em>, the <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> should be used for padding
and conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.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/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-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.Data2VecAudioForAudioFrameClassification.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.Data2VecAudioForAudioFrameClassification.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.Data2VecAudioForAudioFrameClassification.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1277",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fo=new S({props:{$$slots:{default:[lk]},$$scope:{ctx:x}}}),go=new M({props:{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.example",$$slots:{default:[dk]},$$scope:{ctx:x}}}),_n=new q({}),vn=new C({props:{name:"class transformers.Data2VecAudioForCTC",anchor:"transformers.Data2VecAudioForCTC",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecAudioForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L977"}}),$n=new C({props:{name:"forward",anchor:"transformers.Data2VecAudioForCTC.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.Data2VecAudioForCTC.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 <em>.flac</em> or <em>.wav</em> audio file
into an array of type <em>List[float]</em> or a <em>numpy.ndarray</em>, <em>e.g.</em> via the soundfile library (<em>pip install
soundfile</em>). To prepare the array into <em>input_values</em>, the <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> should be used for padding
and conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForCTC.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/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-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.Data2VecAudioForCTC.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.Data2VecAudioForCTC.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.Data2VecAudioForCTC.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForCTC.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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1018",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</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/pr_17548/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vo=new S({props:{$$slots:{default:[ck]},$$scope:{ctx:x}}}),bo=new M({props:{anchor:"transformers.Data2VecAudioForCTC.forward.example",$$slots:{default:[pk]},$$scope:{ctx:x}}}),To=new M({props:{anchor:"transformers.Data2VecAudioForCTC.forward.example-2",$$slots:{default:[hk]},$$scope:{ctx:x}}}),yn=new q({}),Vn=new C({props:{name:"class transformers.Data2VecAudioForSequenceClassification",anchor:"transformers.Data2VecAudioForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecAudioForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1108"}}),Mn=new C({props:{name:"forward",anchor:"transformers.Data2VecAudioForSequenceClassification.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.Data2VecAudioForSequenceClassification.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 <em>.flac</em> or <em>.wav</em> audio file
into an array of type <em>List[float]</em> or a <em>numpy.ndarray</em>, <em>e.g.</em> via the soundfile library (<em>pip install
soundfile</em>). To prepare the array into <em>input_values</em>, the <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> should be used for padding
and conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForSequenceClassification.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/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-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.Data2VecAudioForSequenceClassification.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.Data2VecAudioForSequenceClassification.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.Data2VecAudioForSequenceClassification.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForSequenceClassification.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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</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/pr_17548/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ko=new S({props:{$$slots:{default:[mk]},$$scope:{ctx:x}}}),$o=new M({props:{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.example",$$slots:{default:[uk]},$$scope:{ctx:x}}}),yo=new M({props:{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.example-2",$$slots:{default:[fk]},$$scope:{ctx:x}}}),jn=new q({}),En=new C({props:{name:"class transformers.Data2VecAudioForXVector",anchor:"transformers.Data2VecAudioForXVector",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecAudioForXVector.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1398"}}),On=new C({props:{name:"forward",anchor:"transformers.Data2VecAudioForXVector.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.Data2VecAudioForXVector.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 <em>.flac</em> or <em>.wav</em> audio file
into an array of type <em>List[float]</em> or a <em>numpy.ndarray</em>, <em>e.g.</em> via the soundfile library (<em>pip install
soundfile</em>). To prepare the array into <em>input_values</em>, the <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> should be used for padding
and conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForXVector.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/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-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.Data2VecAudioForXVector.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.Data2VecAudioForXVector.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.Data2VecAudioForXVector.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForXVector.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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1460",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xo=new S({props:{$$slots:{default:[gk]},$$scope:{ctx:x}}}),Do=new M({props:{anchor:"transformers.Data2VecAudioForXVector.forward.example",$$slots:{default:[_k]},$$scope:{ctx:x}}}),In=new q({}),Nn=new C({props:{name:"class transformers.Data2VecTextModel",anchor:"transformers.Data2VecTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.Data2VecTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L697"}}),Un=new C({props:{name:"forward",anchor:"transformers.Data2VecTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Data2VecTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextModel.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.Data2VecTextModel.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.Data2VecTextModel.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.Data2VecTextModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.Data2VecTextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Data2VecTextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L741",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ao=new S({props:{$$slots:{default:[vk]},$$scope:{ctx:x}}}),Mo=new M({props:{anchor:"transformers.Data2VecTextModel.forward.example",$$slots:{default:[bk]},$$scope:{ctx:x}}}),Jn=new q({}),Kn=new C({props:{name:"class transformers.Data2VecTextForCausalLM",anchor:"transformers.Data2VecTextForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L882"}}),os=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Data2VecTextForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForCausalLM.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.Data2VecTextForCausalLM.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.Data2VecTextForCausalLM.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.Data2VecTextForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.Data2VecTextForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.Data2VecTextForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Data2VecTextForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L908",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</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>
<li>
<p><strong>cross_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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Eo=new S({props:{$$slots:{default:[Tk]},$$scope:{ctx:x}}}),qo=new M({props:{anchor:"transformers.Data2VecTextForCausalLM.forward.example",$$slots:{default:[wk]},$$scope:{ctx:x}}}),as=new q({}),ns=new C({props:{name:"class transformers.Data2VecTextForMaskedLM",anchor:"transformers.Data2VecTextForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1034"}}),ds=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.Data2VecTextForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForMaskedLM.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.Data2VecTextForMaskedLM.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.Data2VecTextForMaskedLM.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1063",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</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 Masked language modeling (MLM) loss.</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/pr_17548/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Po=new S({props:{$$slots:{default:[kk]},$$scope:{ctx:x}}}),So=new M({props:{anchor:"transformers.Data2VecTextForMaskedLM.forward.example",$$slots:{default:[$k]},$$scope:{ctx:x}}}),Lo=new M({props:{anchor:"transformers.Data2VecTextForMaskedLM.forward.example-2",$$slots:{default:[yk]},$$scope:{ctx:x}}}),cs=new q({}),ps=new C({props:{name:"class transformers.Data2VecTextForSequenceClassification",anchor:"transformers.Data2VecTextForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1164"}}),_s=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.Data2VecTextForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForSequenceClassification.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.Data2VecTextForSequenceClassification.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.Data2VecTextForSequenceClassification.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForSequenceClassification.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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1178",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</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/pr_17548/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Io=new S({props:{$$slots:{default:[Vk]},$$scope:{ctx:x}}}),No=new M({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example",$$slots:{default:[xk]},$$scope:{ctx:x}}}),Wo=new M({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example-2",$$slots:{default:[Dk]},$$scope:{ctx:x}}}),Bo=new M({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example-3",$$slots:{default:[Fk]},$$scope:{ctx:x}}}),Ho=new M({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example-4",$$slots:{default:[Ck]},$$scope:{ctx:x}}}),vs=new q({}),bs=new C({props:{name:"class transformers.Data2VecTextForMultipleChoice",anchor:"transformers.Data2VecTextForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1262"}}),Vs=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",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.Data2VecTextForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</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.Data2VecTextForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</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.Data2VecTextForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForMultipleChoice.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.Data2VecTextForMultipleChoice.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.Data2VecTextForMultipleChoice.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1275",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qo=new S({props:{$$slots:{default:[Ak]},$$scope:{ctx:x}}}),Go=new M({props:{anchor:"transformers.Data2VecTextForMultipleChoice.forward.example",$$slots:{default:[Mk]},$$scope:{ctx:x}}}),xs=new q({}),Ds=new C({props:{name:"class transformers.Data2VecTextForTokenClassification",anchor:"transformers.Data2VecTextForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1357"}}),Es=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.Data2VecTextForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForTokenClassification.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.Data2VecTextForTokenClassification.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.Data2VecTextForTokenClassification.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1375",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Uo=new S({props:{$$slots:{default:[jk]},$$scope:{ctx:x}}}),Jo=new M({props:{anchor:"transformers.Data2VecTextForTokenClassification.forward.example",$$slots:{default:[Ek]},$$scope:{ctx:x}}}),Ko=new M({props:{anchor:"transformers.Data2VecTextForTokenClassification.forward.example-2",$$slots:{default:[qk]},$$scope:{ctx:x}}}),qs=new q({}),zs=new C({props:{name:"class transformers.Data2VecTextForQuestionAnswering",anchor:"transformers.Data2VecTextForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Data2VecTextForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1465"}}),Ns=new C({props:{name:"forward",anchor:"transformers.Data2VecTextForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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.Data2VecTextForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaTokenizer">RobertaTokenizer</a>. See <a href="/docs/transformers/pr_17548/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</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.Data2VecTextForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecTextForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForQuestionAnswering.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.Data2VecTextForQuestionAnswering.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.Data2VecTextForQuestionAnswering.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_text.py#L1479",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</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 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end 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/pr_17548/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zo=new S({props:{$$slots:{default:[zk]},$$scope:{ctx:x}}}),ea=new M({props:{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.example",$$slots:{default:[Pk]},$$scope:{ctx:x}}}),ta=new M({props:{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.example-2",$$slots:{default:[Sk]},$$scope:{ctx:x}}}),Ws=new q({}),Bs=new C({props:{name:"class transformers.Data2VecVisionModel",anchor:"transformers.Data2VecVisionModel",parameters:[{name:"config",val:": Data2VecVisionConfig"},{name:"add_pooling_layer",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Data2VecVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L646"}}),Qs=new C({props:{name:"forward",anchor:"transformers.Data2VecVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_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"}],parametersDescription:[{anchor:"transformers.Data2VecVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor">BeitFeatureExtractor</a>. See
<a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecVisionModel.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.Data2VecVisionModel.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.Data2VecVisionModel.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L673",returnDescription:`
<p>A <code>transformers.models.data2vec.modeling_data2vec_vision.Data2VecVisionModelOutputWithPooling</code> 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/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.data2vec.modeling_data2vec_vision.Data2VecVisionModelOutputWithPooling</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),aa=new S({props:{$$slots:{default:[Lk]},$$scope:{ctx:x}}}),na=new M({props:{anchor:"transformers.Data2VecVisionModel.forward.example",$$slots:{default:[Ok]},$$scope:{ctx:x}}}),Gs=new q({}),Xs=new C({props:{name:"class transformers.Data2VecVisionForImageClassification",anchor:"transformers.Data2VecVisionForImageClassification",parameters:[{name:"config",val:": Data2VecVisionConfig"}],parametersDescription:[{anchor:"transformers.Data2VecVisionForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L760"}}),Ks=new C({props:{name:"forward",anchor:"transformers.Data2VecVisionForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Data2VecVisionForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor">BeitFeatureExtractor</a>. See
<a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecVisionForImageClassification.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.Data2VecVisionForImageClassification.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.Data2VecVisionForImageClassification.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image 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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L773",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</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 stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</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, patch_size, 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/pr_17548/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ra=new S({props:{$$slots:{default:[Ik]},$$scope:{ctx:x}}}),ia=new M({props:{anchor:"transformers.Data2VecVisionForImageClassification.forward.example",$$slots:{default:[Nk]},$$scope:{ctx:x}}}),Ys=new q({}),Zs=new C({props:{name:"class transformers.Data2VecVisionForSemanticSegmentation",anchor:"transformers.Data2VecVisionForSemanticSegmentation",parameters:[{name:"config",val:": Data2VecVisionConfig"}],parametersDescription:[{anchor:"transformers.Data2VecVisionForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</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/pr_17548/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/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L1078"}}),or=new C({props:{name:"forward",anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor">BeitFeatureExtractor</a>. See
<a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.Data2VecVisionForSemanticSegmentation.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.Data2VecVisionForSemanticSegmentation.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.Data2VecVisionForSemanticSegmentation.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/pr_17548/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_data2vec_vision.py#L1122",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</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, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</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, patch_size, 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, patch_size, 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/pr_17548/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),da=new S({props:{$$slots:{default:[Wk]},$$scope:{ctx:x}}}),ca=new M({props:{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.example",$$slots:{default:[Bk]},$$scope:{ctx:x}}}),ar=new q({}),nr=new C({props:{name:"class transformers.TFData2VecVisionModel",anchor:"transformers.TFData2VecVisionModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFData2VecVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</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/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L864"}}),ha=new S({props:{$$slots:{default:[Hk]},$$scope:{ctx:x}}}),lr=new C({props:{name:"call",anchor:"transformers.TFData2VecVisionModel.call",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"bool_masked_pos",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.TFData2VecVisionModel.call.pixel_values",description:`<strong>pixel_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>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor">BeitFeatureExtractor</a>. See
<a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionModel.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.TFData2VecVisionModel.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.`,name:"output_attentions"},{anchor:"transformers.TFData2VecVisionModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFData2VecVisionModel.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/pr_17548/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.TFData2VecVisionModel.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/vr_17548/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L876",returnDescription:`
<p>A <code>transformers.models.data2vec.modeling_tf_data2vec_vision.TFData2VecVisionModelOutputWithPooling</code> 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/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</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>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Average of the last layer hidden states of the patch tokens (excluding the <em>[CLS]</em> token) if
<em>config.use_mean_pooling</em> is set to True. If set to False, then the final hidden state of the <em>[CLS]</em> token
will be returned.</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><code>transformers.models.data2vec.modeling_tf_data2vec_vision.TFData2VecVisionModelOutputWithPooling</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ma=new S({props:{$$slots:{default:[Rk]},$$scope:{ctx:x}}}),ua=new M({props:{anchor:"transformers.TFData2VecVisionModel.call.example",$$slots:{default:[Qk]},$$scope:{ctx:x}}}),dr=new q({}),cr=new C({props:{name:"class transformers.TFData2VecVisionForImageClassification",anchor:"transformers.TFData2VecVisionForImageClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFData2VecVisionForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</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/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L917"}}),ga=new S({props:{$$slots:{default:[Gk]},$$scope:{ctx:x}}}),ur=new C({props:{name:"call",anchor:"transformers.TFData2VecVisionForImageClassification.call",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFData2VecVisionForImageClassification.call.pixel_values",description:`<strong>pixel_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>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor">BeitFeatureExtractor</a>. See
<a href="/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionForImageClassification.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.TFData2VecVisionForImageClassification.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.`,name:"output_attentions"},{anchor:"transformers.TFData2VecVisionForImageClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFData2VecVisionForImageClassification.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/pr_17548/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.TFData2VecVisionForImageClassification.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.TFData2VecVisionForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image 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/vr_17548/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L931",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</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/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</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>tf.Tensor</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(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/pr_17548/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_a=new S({props:{$$slots:{default:[Xk]},$$scope:{ctx:x}}}),va=new M({props:{anchor:"transformers.TFData2VecVisionForImageClassification.call.example",$$slots:{default:[Uk]},$$scope:{ctx:x}}}),{c(){d=r("meta"),g=u(),c=r("h1"),h=r("a"),v=r("span"),T(a.$$.fragment),p=u(),D=r("span"),We=n("Data2Vec"),re=u(),A=r("h2"),Y=r("a"),I=r("span"),T(ee.$$.fragment),Be=u(),N=r("span"),He=n("Overview"),Te=u(),F=r("p"),z=n("The Data2Vec model was proposed in "),W=r("a"),lt=n("data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language"),dt=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and Michael Auli.
Data2Vec proposes a unified framework for self-supervised learning across different data modalities - text, audio and images.
Importantly, predicted targets for pre-training are contextualized latent representations of the inputs, rather than modality-specific, context-independent targets.`),L=u(),we=r("p"),ct=n("The abstract from the paper is the following:"),Rd=u(),Vr=r("p"),Ea=r("em"),Wp=n(`While the general idea of self-supervised learning is identical across modalities, the actual algorithms and
objectives differ widely because they were developed with a single modality in mind. To get us closer to general
self-supervised learning, we present data2vec, a framework that uses the same learning method for either speech,
NLP or computer vision. The core idea is to predict latent representations of the full input data based on a
masked view of the input in a selfdistillation setup using a standard Transformer architecture.
Instead of predicting modality-specific targets such as words, visual tokens or units of human speech which
are local in nature, data2vec predicts contextualized latent representations that contain information from
the entire input. Experiments on the major benchmarks of speech recognition, image classification, and
natural language understanding demonstrate a new state of the art or competitive performance to predominant approaches.
Models and code are available at `),qa=r("a"),Bp=n("www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),Hp=n("."),Qd=u(),xr=r("p"),Rp=n("Tips:"),Gd=u(),ie=r("ul"),Ni=r("li"),Qp=n("Data2VecAudio, Data2VecText, and Data2VecVision have all been trained using the same self-supervised learning method."),Gp=u(),za=r("li"),Xp=n("For Data2VecAudio, preprocessing is identical to "),Dr=r("a"),Up=n("Wav2Vec2Model"),Jp=n(", including feature extraction"),Kp=u(),Pa=r("li"),Yp=n("For Data2VecText, preprocessing is identical to "),Fr=r("a"),Zp=n("RobertaModel"),eh=n(", including tokenization."),th=u(),Sa=r("li"),oh=n("For Data2VecVision, preprocessing is identical to "),Cr=r("a"),ah=n("BeitModel"),nh=n(", including feature extraction."),sh=u(),La=r("li"),rh=n(`To know how a pre-trained Data2Vec vision model can be fine-tuned on the task of image classification, you can check out
`),Oa=r("a"),ih=n("this notebook"),lh=n("."),Xd=u(),ke=r("p"),dh=n("This model was contributed by "),Ia=r("a"),ch=n("edugp"),ph=n(" and "),Na=r("a"),hh=n("patrickvonplaten"),mh=n(`.
`),Wa=r("a"),uh=n("sayakpaul"),fh=n(" contributed Data2Vec for vision in TensorFlow."),Ud=u(),Ke=r("p"),gh=n("The original code (for NLP and Speech) can be found "),Ba=r("a"),_h=n("here"),vh=n(`.
The original code for vision can be found `),Ha=r("a"),bh=n("here"),Th=n("."),Jd=u(),pt=r("h2"),no=r("a"),Wi=r("span"),T(Ra.$$.fragment),wh=u(),Bi=r("span"),kh=n("Data2VecTextConfig"),Kd=u(),fe=r("div"),T(Qa.$$.fragment),$h=u(),Re=r("p"),yh=n("This is the configuration class to store the configuration of a "),Ar=r("a"),Vh=n("Data2VecTextModel"),xh=n(" and "),Mr=r("a"),Dh=n("Data2VecTextModel"),Fh=n(`. It
is used to instantiate a Data2VecText 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 Data2VecText
`),Ga=r("a"),Ch=n("facebook/data2vec-text-base"),Ah=n(" architecture."),Mh=u(),ht=r("p"),jh=n("Configuration objects inherit from "),jr=r("a"),Eh=n("PretrainedConfig"),qh=n(` and can be used to control the model outputs. Read the
documentation from `),Er=r("a"),zh=n("PretrainedConfig"),Ph=n(" for more information."),Sh=u(),T(so.$$.fragment),Yd=u(),mt=r("h2"),ro=r("a"),Hi=r("span"),T(Xa.$$.fragment),Lh=u(),Ri=r("span"),Oh=n("Data2VecAudioConfig"),Zd=u(),ge=r("div"),T(Ua.$$.fragment),Ih=u(),ut=r("p"),Nh=n("This is the configuration class to store the configuration of a "),qr=r("a"),Wh=n("Data2VecAudioModel"),Bh=n(`. It is used to instantiate
an Data2VecAudio 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 Data2VecAudio
`),Ja=r("a"),Hh=n("facebook/data2vec-audio-base-960h"),Rh=n(" architecture."),Qh=u(),ft=r("p"),Gh=n("Configuration objects inherit from "),zr=r("a"),Xh=n("PretrainedConfig"),Uh=n(` and can be used to control the model outputs. Read the
documentation from `),Pr=r("a"),Jh=n("PretrainedConfig"),Kh=n(" for more information."),Yh=u(),T(io.$$.fragment),ec=u(),gt=r("h2"),lo=r("a"),Qi=r("span"),T(Ka.$$.fragment),Zh=u(),Gi=r("span"),em=n("Data2VecVisionConfig"),tc=u(),Qe=r("div"),T(Ya.$$.fragment),tm=u(),_t=r("p"),om=n("This is the configuration class to store the configuration of a "),Sr=r("a"),am=n("Data2VecVisionModel"),nm=n(`. It is used to instantiate
an Data2VecVision 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 Data2VecVision
`),Za=r("a"),sm=n("facebook/data2vec-vision-base"),rm=n(" architecture."),im=u(),T(co.$$.fragment),oc=u(),vt=r("h2"),po=r("a"),Xi=r("span"),T(en.$$.fragment),lm=u(),Ui=r("span"),dm=n("Data2VecAudioModel"),ac=u(),te=r("div"),T(tn.$$.fragment),cm=u(),on=r("p"),pm=n(`The bare Data2VecAudio Model transformer outputting raw hidden-states without any specific head on top.
Data2VecAudio was proposed in `),an=r("a"),hm=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),mm=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),um=u(),nn=r("p"),fm=n("This model inherits from "),Lr=r("a"),gm=n("PreTrainedModel"),_m=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),vm=u(),sn=r("p"),bm=n("This model is a PyTorch "),rn=r("a"),Tm=n("torch.nn.Module"),wm=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),km=u(),$e=r("div"),T(ln.$$.fragment),$m=u(),bt=r("p"),ym=n("The "),Or=r("a"),Vm=n("Data2VecAudioModel"),xm=n(" forward method, overrides the "),Ji=r("code"),Dm=n("__call__"),Fm=n(" special method."),Cm=u(),T(ho.$$.fragment),Am=u(),T(mo.$$.fragment),nc=u(),Tt=r("h2"),uo=r("a"),Ki=r("span"),T(dn.$$.fragment),Mm=u(),Yi=r("span"),jm=n("Data2VecAudioForAudioFrameClassification"),sc=u(),B=r("div"),T(cn.$$.fragment),Em=u(),Zi=r("p"),qm=n("Data2VecAudio Model with a frame classification head on top for tasks like Speaker Diarization."),zm=u(),pn=r("p"),Pm=n("Data2VecAudio was proposed in "),hn=r("a"),Sm=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Lm=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Om=u(),mn=r("p"),Im=n("This model inherits from "),Ir=r("a"),Nm=n("PreTrainedModel"),Wm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Bm=u(),un=r("p"),Hm=n("This model is a PyTorch "),fn=r("a"),Rm=n("torch.nn.Module"),Qm=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gm=u(),ye=r("div"),T(gn.$$.fragment),Xm=u(),wt=r("p"),Um=n("The "),Nr=r("a"),Jm=n("Data2VecAudioForAudioFrameClassification"),Km=n(" forward method, overrides the "),el=r("code"),Ym=n("__call__"),Zm=n(" special method."),eu=u(),T(fo.$$.fragment),tu=u(),T(go.$$.fragment),rc=u(),kt=r("h2"),_o=r("a"),tl=r("span"),T(_n.$$.fragment),ou=u(),ol=r("span"),au=n("Data2VecAudioForCTC"),ic=u(),oe=r("div"),T(vn.$$.fragment),nu=u(),$t=r("p"),su=n("Data2VecAudio Model with a "),al=r("code"),ru=n("language modeling"),iu=n(` head on top for Connectionist Temporal Classification (CTC).
Data2VecAudio was proposed in `),bn=r("a"),lu=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),du=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),cu=u(),Tn=r("p"),pu=n("This model inherits from "),Wr=r("a"),hu=n("PreTrainedModel"),mu=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),uu=u(),wn=r("p"),fu=n("This model is a PyTorch "),kn=r("a"),gu=n("torch.nn.Module"),_u=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vu=u(),le=r("div"),T($n.$$.fragment),bu=u(),yt=r("p"),Tu=n("The "),Br=r("a"),wu=n("Data2VecAudioForCTC"),ku=n(" forward method, overrides the "),nl=r("code"),$u=n("__call__"),yu=n(" special method."),Vu=u(),T(vo.$$.fragment),xu=u(),T(bo.$$.fragment),Du=u(),T(To.$$.fragment),lc=u(),Vt=r("h2"),wo=r("a"),sl=r("span"),T(yn.$$.fragment),Fu=u(),rl=r("span"),Cu=n("Data2VecAudioForSequenceClassification"),dc=u(),H=r("div"),T(Vn.$$.fragment),Au=u(),il=r("p"),Mu=n(`Data2VecAudio Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),ju=u(),xn=r("p"),Eu=n("Data2VecAudio was proposed in "),Dn=r("a"),qu=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),zu=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Pu=u(),Fn=r("p"),Su=n("This model inherits from "),Hr=r("a"),Lu=n("PreTrainedModel"),Ou=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Iu=u(),Cn=r("p"),Nu=n("This model is a PyTorch "),An=r("a"),Wu=n("torch.nn.Module"),Bu=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hu=u(),de=r("div"),T(Mn.$$.fragment),Ru=u(),xt=r("p"),Qu=n("The "),Rr=r("a"),Gu=n("Data2VecAudioForSequenceClassification"),Xu=n(" forward method, overrides the "),ll=r("code"),Uu=n("__call__"),Ju=n(" special method."),Ku=u(),T(ko.$$.fragment),Yu=u(),T($o.$$.fragment),Zu=u(),T(yo.$$.fragment),cc=u(),Dt=r("h2"),Vo=r("a"),dl=r("span"),T(jn.$$.fragment),ef=u(),cl=r("span"),tf=n("Data2VecAudioForXVector"),pc=u(),R=r("div"),T(En.$$.fragment),of=u(),pl=r("p"),af=n("Data2VecAudio Model with an XVector feature extraction head on top for tasks like Speaker Verification."),nf=u(),qn=r("p"),sf=n("Data2VecAudio was proposed in "),zn=r("a"),rf=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),lf=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),df=u(),Pn=r("p"),cf=n("This model inherits from "),Qr=r("a"),pf=n("PreTrainedModel"),hf=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),mf=u(),Sn=r("p"),uf=n("This model is a PyTorch "),Ln=r("a"),ff=n("torch.nn.Module"),gf=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_f=u(),Ve=r("div"),T(On.$$.fragment),vf=u(),Ft=r("p"),bf=n("The "),Gr=r("a"),Tf=n("Data2VecAudioForXVector"),wf=n(" forward method, overrides the "),hl=r("code"),kf=n("__call__"),$f=n(" special method."),yf=u(),T(xo.$$.fragment),Vf=u(),T(Do.$$.fragment),hc=u(),Ct=r("h2"),Fo=r("a"),ml=r("span"),T(In.$$.fragment),xf=u(),ul=r("span"),Df=n("Data2VecTextModel"),mc=u(),P=r("div"),T(Nn.$$.fragment),Ff=u(),Wn=r("p"),Cf=n(`The bare Data2VecText Model for text transformer outputting raw hidden-states without any specific head on top.
Data2VecText was proposed in `),Bn=r("a"),Af=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Mf=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),jf=u(),Hn=r("p"),Ef=n("This model inherits from "),Xr=r("a"),qf=n("PreTrainedModel"),zf=n(`. 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.)`),Pf=u(),Rn=r("p"),Sf=n("This model is also a PyTorch "),Qn=r("a"),Lf=n("torch.nn.Module"),Of=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),If=u(),Gn=r("p"),Nf=n(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),fl=r("em"),Wf=n(`Attention is
all you need`),Bf=n(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Hf=u(),Q=r("p"),Rf=n("To behave as an decoder the model needs to be initialized with the "),gl=r("code"),Qf=n("is_decoder"),Gf=n(` argument of the configuration set
to `),_l=r("code"),Xf=n("True"),Uf=n(". To be used in a Seq2Seq model, the model needs to initialized with both "),vl=r("code"),Jf=n("is_decoder"),Kf=n(` argument and
`),bl=r("code"),Yf=n("add_cross_attention"),Zf=n(" set to "),Tl=r("code"),eg=n("True"),tg=n("; an "),wl=r("code"),og=n("encoder_hidden_states"),ag=n(" is then expected as an input to the forward pass."),ng=u(),Co=r("p"),sg=n(".. _"),kl=r("em"),rg=n("Attention is all you need"),ig=n(": "),Xn=r("a"),lg=n("https://arxiv.org/abs/1706.03762"),dg=u(),xe=r("div"),T(Un.$$.fragment),cg=u(),At=r("p"),pg=n("The "),Ur=r("a"),hg=n("Data2VecTextModel"),mg=n(" forward method, overrides the "),$l=r("code"),ug=n("__call__"),fg=n(" special method."),gg=u(),T(Ao.$$.fragment),_g=u(),T(Mo.$$.fragment),uc=u(),Mt=r("h2"),jo=r("a"),yl=r("span"),T(Jn.$$.fragment),vg=u(),Vl=r("span"),bg=n("Data2VecTextForCausalLM"),fc=u(),ae=r("div"),T(Kn.$$.fragment),Tg=u(),jt=r("p"),wg=n("Data2VecText Model with a "),xl=r("code"),kg=n("language modeling"),$g=n(` head on top for CLM fine-tuning.
Data2VecText was proposed in `),Yn=r("a"),yg=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Vg=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),xg=u(),Zn=r("p"),Dg=n("This model inherits from "),Jr=r("a"),Fg=n("PreTrainedModel"),Cg=n(`. 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.)`),Ag=u(),es=r("p"),Mg=n("This model is also a PyTorch "),ts=r("a"),jg=n("torch.nn.Module"),Eg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qg=u(),De=r("div"),T(os.$$.fragment),zg=u(),Et=r("p"),Pg=n("The "),Kr=r("a"),Sg=n("Data2VecTextForCausalLM"),Lg=n(" forward method, overrides the "),Dl=r("code"),Og=n("__call__"),Ig=n(" special method."),Ng=u(),T(Eo.$$.fragment),Wg=u(),T(qo.$$.fragment),gc=u(),qt=r("h2"),zo=r("a"),Fl=r("span"),T(as.$$.fragment),Bg=u(),Cl=r("span"),Hg=n("Data2VecTextForMaskedLM"),_c=u(),ne=r("div"),T(ns.$$.fragment),Rg=u(),zt=r("p"),Qg=n("data2vec Model with a "),Al=r("code"),Gg=n("language modeling"),Xg=n(` head on top.
Data2VecText was proposed in `),ss=r("a"),Ug=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Jg=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Kg=u(),rs=r("p"),Yg=n("This model inherits from "),Yr=r("a"),Zg=n("PreTrainedModel"),e_=n(`. 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.)`),t_=u(),is=r("p"),o_=n("This model is also a PyTorch "),ls=r("a"),a_=n("torch.nn.Module"),n_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),s_=u(),ce=r("div"),T(ds.$$.fragment),r_=u(),Pt=r("p"),i_=n("The "),Zr=r("a"),l_=n("Data2VecTextForMaskedLM"),d_=n(" forward method, overrides the "),Ml=r("code"),c_=n("__call__"),p_=n(" special method."),h_=u(),T(Po.$$.fragment),m_=u(),T(So.$$.fragment),u_=u(),T(Lo.$$.fragment),vc=u(),St=r("h2"),Oo=r("a"),jl=r("span"),T(cs.$$.fragment),f_=u(),El=r("span"),g_=n("Data2VecTextForSequenceClassification"),bc=u(),G=r("div"),T(ps.$$.fragment),__=u(),ql=r("p"),v_=n(`Data2VecText Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),b_=u(),hs=r("p"),T_=n("Data2VecText was proposed in "),ms=r("a"),w_=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),k_=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),$_=u(),us=r("p"),y_=n("This model inherits from "),ei=r("a"),V_=n("PreTrainedModel"),x_=n(`. 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.)`),D_=u(),fs=r("p"),F_=n("This model is also a PyTorch "),gs=r("a"),C_=n("torch.nn.Module"),A_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),M_=u(),O=r("div"),T(_s.$$.fragment),j_=u(),Lt=r("p"),E_=n("The "),ti=r("a"),q_=n("Data2VecTextForSequenceClassification"),z_=n(" forward method, overrides the "),zl=r("code"),P_=n("__call__"),S_=n(" special method."),L_=u(),T(Io.$$.fragment),O_=u(),T(No.$$.fragment),I_=u(),T(Wo.$$.fragment),N_=u(),T(Bo.$$.fragment),W_=u(),T(Ho.$$.fragment),Tc=u(),Ot=r("h2"),Ro=r("a"),Pl=r("span"),T(vs.$$.fragment),B_=u(),Sl=r("span"),H_=n("Data2VecTextForMultipleChoice"),wc=u(),X=r("div"),T(bs.$$.fragment),R_=u(),Ll=r("p"),Q_=n(`Data2VecText Model with a multiple choice classification head on top (a linear layer on top of the pooled output
and a softmax) e.g. for RocStories/SWAG tasks.`),G_=u(),Ts=r("p"),X_=n("Data2VecText was proposed in "),ws=r("a"),U_=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),J_=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),K_=u(),ks=r("p"),Y_=n("This model inherits from "),oi=r("a"),Z_=n("PreTrainedModel"),e2=n(`. 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.)`),t2=u(),$s=r("p"),o2=n("This model is also a PyTorch "),ys=r("a"),a2=n("torch.nn.Module"),n2=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),s2=u(),Fe=r("div"),T(Vs.$$.fragment),r2=u(),It=r("p"),i2=n("The "),ai=r("a"),l2=n("Data2VecTextForMultipleChoice"),d2=n(" forward method, overrides the "),Ol=r("code"),c2=n("__call__"),p2=n(" special method."),h2=u(),T(Qo.$$.fragment),m2=u(),T(Go.$$.fragment),kc=u(),Nt=r("h2"),Xo=r("a"),Il=r("span"),T(xs.$$.fragment),u2=u(),Nl=r("span"),f2=n("Data2VecTextForTokenClassification"),$c=u(),U=r("div"),T(Ds.$$.fragment),g2=u(),Wl=r("p"),_2=n(`Data2VecText Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),v2=u(),Fs=r("p"),b2=n("Data2VecText was proposed in "),Cs=r("a"),T2=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),w2=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),k2=u(),As=r("p"),$2=n("This model inherits from "),ni=r("a"),y2=n("PreTrainedModel"),V2=n(`. 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.)`),x2=u(),Ms=r("p"),D2=n("This model is also a PyTorch "),js=r("a"),F2=n("torch.nn.Module"),C2=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),A2=u(),pe=r("div"),T(Es.$$.fragment),M2=u(),Wt=r("p"),j2=n("The "),si=r("a"),E2=n("Data2VecTextForTokenClassification"),q2=n(" forward method, overrides the "),Bl=r("code"),z2=n("__call__"),P2=n(" special method."),S2=u(),T(Uo.$$.fragment),L2=u(),T(Jo.$$.fragment),O2=u(),T(Ko.$$.fragment),yc=u(),Bt=r("h2"),Yo=r("a"),Hl=r("span"),T(qs.$$.fragment),I2=u(),Rl=r("span"),N2=n("Data2VecTextForQuestionAnswering"),Vc=u(),J=r("div"),T(zs.$$.fragment),W2=u(),Ht=r("p"),B2=n(`Data2VecText Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Ql=r("code"),H2=n("span start logits"),R2=n(" and "),Gl=r("code"),Q2=n("span end logits"),G2=n(")."),X2=u(),Ps=r("p"),U2=n("Data2VecText was proposed in "),Ss=r("a"),J2=n(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),K2=n(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Y2=u(),Ls=r("p"),Z2=n("This model inherits from "),ri=r("a"),ev=n("PreTrainedModel"),tv=n(`. 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.)`),ov=u(),Os=r("p"),av=n("This model is also a PyTorch "),Is=r("a"),nv=n("torch.nn.Module"),sv=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rv=u(),he=r("div"),T(Ns.$$.fragment),iv=u(),Rt=r("p"),lv=n("The "),ii=r("a"),dv=n("Data2VecTextForQuestionAnswering"),cv=n(" forward method, overrides the "),Xl=r("code"),pv=n("__call__"),hv=n(" special method."),mv=u(),T(Zo.$$.fragment),uv=u(),T(ea.$$.fragment),fv=u(),T(ta.$$.fragment),xc=u(),Qt=r("h2"),oa=r("a"),Ul=r("span"),T(Ws.$$.fragment),gv=u(),Jl=r("span"),_v=n("Data2VecVisionModel"),Dc=u(),Ge=r("div"),T(Bs.$$.fragment),vv=u(),Hs=r("p"),bv=n(`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rs=r("a"),Tv=n("torch.nn.Module"),wv=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),kv=u(),Ce=r("div"),T(Qs.$$.fragment),$v=u(),Gt=r("p"),yv=n("The "),li=r("a"),Vv=n("Data2VecVisionModel"),xv=n(" forward method, overrides the "),Kl=r("code"),Dv=n("__call__"),Fv=n(" special method."),Cv=u(),T(aa.$$.fragment),Av=u(),T(na.$$.fragment),Fc=u(),Xt=r("h2"),sa=r("a"),Yl=r("span"),T(Gs.$$.fragment),Mv=u(),Zl=r("span"),jv=n("Data2VecVisionForImageClassification"),Cc=u(),_e=r("div"),T(Xs.$$.fragment),Ev=u(),ed=r("p"),qv=n(`Data2VecVision Model transformer with an image classification head on top (a linear layer on top of the average of
the final hidden states of the patch tokens) e.g. for ImageNet.`),zv=u(),Us=r("p"),Pv=n("This model is a PyTorch "),Js=r("a"),Sv=n("torch.nn.Module"),Lv=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ov=u(),Ae=r("div"),T(Ks.$$.fragment),Iv=u(),Ut=r("p"),Nv=n("The "),di=r("a"),Wv=n("Data2VecVisionForImageClassification"),Bv=n(" forward method, overrides the "),td=r("code"),Hv=n("__call__"),Rv=n(" special method."),Qv=u(),T(ra.$$.fragment),Gv=u(),T(ia.$$.fragment),Ac=u(),Jt=r("h2"),la=r("a"),od=r("span"),T(Ys.$$.fragment),Xv=u(),ad=r("span"),Uv=n("Data2VecVisionForSemanticSegmentation"),Mc=u(),ve=r("div"),T(Zs.$$.fragment),Jv=u(),nd=r("p"),Kv=n("Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Yv=u(),er=r("p"),Zv=n("This model is a PyTorch "),tr=r("a"),eb=n("torch.nn.Module"),tb=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ob=u(),Me=r("div"),T(or.$$.fragment),ab=u(),Kt=r("p"),nb=n("The "),ci=r("a"),sb=n("Data2VecVisionForSemanticSegmentation"),rb=n(" forward method, overrides the "),sd=r("code"),ib=n("__call__"),lb=n(" special method."),db=u(),T(da.$$.fragment),cb=u(),T(ca.$$.fragment),jc=u(),Yt=r("h2"),pa=r("a"),rd=r("span"),T(ar.$$.fragment),pb=u(),id=r("span"),hb=n("TFData2VecVisionModel"),Ec=u(),se=r("div"),T(nr.$$.fragment),mb=u(),sr=r("p"),ub=n(`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),pi=r("a"),fb=n("TFPreTrainedModel"),gb=n(`. 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.).`),_b=u(),rr=r("p"),vb=n("This model is also a "),ir=r("a"),bb=n("tf.keras.Model"),Tb=n(` 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.`),wb=u(),T(ha.$$.fragment),kb=u(),je=r("div"),T(lr.$$.fragment),$b=u(),Zt=r("p"),yb=n("The "),hi=r("a"),Vb=n("TFData2VecVisionModel"),xb=n(" forward method, overrides the "),ld=r("code"),Db=n("__call__"),Fb=n(" special method."),Cb=u(),T(ma.$$.fragment),Ab=u(),T(ua.$$.fragment),qc=u(),eo=r("h2"),fa=r("a"),dd=r("span"),T(dr.$$.fragment),Mb=u(),cd=r("span"),jb=n("TFData2VecVisionForImageClassification"),zc=u(),K=r("div"),T(cr.$$.fragment),Eb=u(),pd=r("p"),qb=n(`Data2VecVision Model transformer with an image classification head on top (a linear layer on top of the average of
the final hidden states of the patch tokens) e.g. for ImageNet.`),zb=u(),pr=r("p"),Pb=n("This model inherits from "),mi=r("a"),Sb=n("TFPreTrainedModel"),Lb=n(`. 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.).`),Ob=u(),hr=r("p"),Ib=n("This model is also a "),mr=r("a"),Nb=n("tf.keras.Model"),Wb=n(` 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.`),Bb=u(),T(ga.$$.fragment),Hb=u(),Ee=r("div"),T(ur.$$.fragment),Rb=u(),to=r("p"),Qb=n("The "),ui=r("a"),Gb=n("TFData2VecVisionForImageClassification"),Xb=n(" forward method, overrides the "),hd=r("code"),Ub=n("__call__"),Jb=n(" special method."),Kb=u(),T(_a.$$.fragment),Yb=u(),T(va.$$.fragment),this.h()},l(o){const _=tk('[data-svelte="svelte-1phssyn"]',document.head);d=i(_,"META",{name:!0,content:!0}),_.forEach(t),g=f(o),c=i(o,"H1",{class:!0});var fr=l(c);h=i(fr,"A",{id:!0,class:!0,href:!0});var md=l(h);v=i(md,"SPAN",{});var ud=l(v);w(a.$$.fragment,ud),ud.forEach(t),md.forEach(t),p=f(fr),D=i(fr,"SPAN",{});var fd=l(D);We=s(fd,"Data2Vec"),fd.forEach(t),fr.forEach(t),re=f(o),A=i(o,"H2",{class:!0});var gr=l(A);Y=i(gr,"A",{id:!0,class:!0,href:!0});var gd=l(Y);I=i(gd,"SPAN",{});var _d=l(I);w(ee.$$.fragment,_d),_d.forEach(t),gd.forEach(t),Be=f(gr),N=i(gr,"SPAN",{});var vd=l(N);He=s(vd,"Overview"),vd.forEach(t),gr.forEach(t),Te=f(o),F=i(o,"P",{});var _r=l(F);z=s(_r,"The Data2Vec model was proposed in "),W=i(_r,"A",{href:!0,rel:!0});var bd=l(W);lt=s(bd,"data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language"),bd.forEach(t),dt=s(_r,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and Michael Auli.
Data2Vec proposes a unified framework for self-supervised learning across different data modalities - text, audio and images.
Importantly, predicted targets for pre-training are contextualized latent representations of the inputs, rather than modality-specific, context-independent targets.`),_r.forEach(t),L=f(o),we=i(o,"P",{});var Td=l(we);ct=s(Td,"The abstract from the paper is the following:"),Td.forEach(t),Rd=f(o),Vr=i(o,"P",{});var wd=l(Vr);Ea=i(wd,"EM",{});var vr=l(Ea);Wp=s(vr,`While the general idea of self-supervised learning is identical across modalities, the actual algorithms and
objectives differ widely because they were developed with a single modality in mind. To get us closer to general
self-supervised learning, we present data2vec, a framework that uses the same learning method for either speech,
NLP or computer vision. The core idea is to predict latent representations of the full input data based on a
masked view of the input in a selfdistillation setup using a standard Transformer architecture.
Instead of predicting modality-specific targets such as words, visual tokens or units of human speech which
are local in nature, data2vec predicts contextualized latent representations that contain information from
the entire input. Experiments on the major benchmarks of speech recognition, image classification, and
natural language understanding demonstrate a new state of the art or competitive performance to predominant approaches.
Models and code are available at `),qa=i(vr,"A",{href:!0,rel:!0});var kd=l(qa);Bp=s(kd,"www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),kd.forEach(t),Hp=s(vr,"."),vr.forEach(t),wd.forEach(t),Qd=f(o),xr=i(o,"P",{});var $d=l(xr);Rp=s($d,"Tips:"),$d.forEach(t),Gd=f(o),ie=i(o,"UL",{});var be=l(ie);Ni=i(be,"LI",{});var yd=l(Ni);Qp=s(yd,"Data2VecAudio, Data2VecText, and Data2VecVision have all been trained using the same self-supervised learning method."),yd.forEach(t),Gp=f(be),za=i(be,"LI",{});var br=l(za);Xp=s(br,"For Data2VecAudio, preprocessing is identical to "),Dr=i(br,"A",{href:!0});var Vd=l(Dr);Up=s(Vd,"Wav2Vec2Model"),Vd.forEach(t),Jp=s(br,", including feature extraction"),br.forEach(t),Kp=f(be),Pa=i(be,"LI",{});var Tr=l(Pa);Yp=s(Tr,"For Data2VecText, preprocessing is identical to "),Fr=i(Tr,"A",{href:!0});var xd=l(Fr);Zp=s(xd,"RobertaModel"),xd.forEach(t),eh=s(Tr,", including tokenization."),Tr.forEach(t),th=f(be),Sa=i(be,"LI",{});var wr=l(Sa);oh=s(wr,"For Data2VecVision, preprocessing is identical to "),Cr=i(wr,"A",{href:!0});var Dd=l(Cr);ah=s(Dd,"BeitModel"),Dd.forEach(t),nh=s(wr,", including feature extraction."),wr.forEach(t),sh=f(be),La=i(be,"LI",{});var kr=l(La);rh=s(kr,`To know how a pre-trained Data2Vec vision model can be fine-tuned on the task of image classification, you can check out
`),Oa=i(kr,"A",{href:!0,rel:!0});var Fd=l(Oa);ih=s(Fd,"this notebook"),Fd.forEach(t),lh=s(kr,"."),kr.forEach(t),be.forEach(t),Xd=f(o),ke=i(o,"P",{});var Xe=l(ke);dh=s(Xe,"This model was contributed by "),Ia=i(Xe,"A",{href:!0,rel:!0});var Cd=l(Ia);ch=s(Cd,"edugp"),Cd.forEach(t),ph=s(Xe," and "),Na=i(Xe,"A",{href:!0,rel:!0});var Ad=l(Na);hh=s(Ad,"patrickvonplaten"),Ad.forEach(t),mh=s(Xe,`.
`),Wa=i(Xe,"A",{href:!0,rel:!0});var Md=l(Wa);uh=s(Md,"sayakpaul"),Md.forEach(t),fh=s(Xe," contributed Data2Vec for vision in TensorFlow."),Xe.forEach(t),Ud=f(o),Ke=i(o,"P",{});var oo=l(Ke);gh=s(oo,"The original code (for NLP and Speech) can be found "),Ba=i(oo,"A",{href:!0,rel:!0});var jd=l(Ba);_h=s(jd,"here"),jd.forEach(t),vh=s(oo,`.
The original code for vision can be found `),Ha=i(oo,"A",{href:!0,rel:!0});var Ed=l(Ha);bh=s(Ed,"here"),Ed.forEach(t),Th=s(oo,"."),oo.forEach(t),Jd=f(o),pt=i(o,"H2",{class:!0});var $r=l(pt);no=i($r,"A",{id:!0,class:!0,href:!0});var qd=l(no);Wi=i(qd,"SPAN",{});var zd=l(Wi);w(Ra.$$.fragment,zd),zd.forEach(t),qd.forEach(t),wh=f($r),Bi=i($r,"SPAN",{});var Pd=l(Bi);kh=s(Pd,"Data2VecTextConfig"),Pd.forEach(t),$r.forEach(t),Kd=f(o),fe=i(o,"DIV",{class:!0});var Ue=l(fe);w(Qa.$$.fragment,Ue),$h=f(Ue),Re=i(Ue,"P",{});var Je=l(Re);yh=s(Je,"This is the configuration class to store the configuration of a "),Ar=i(Je,"A",{href:!0});var Sd=l(Ar);Vh=s(Sd,"Data2VecTextModel"),Sd.forEach(t),xh=s(Je," and "),Mr=i(Je,"A",{href:!0});var Ld=l(Mr);Dh=s(Ld,"Data2VecTextModel"),Ld.forEach(t),Fh=s(Je,`. It
is used to instantiate a Data2VecText 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 Data2VecText
`),Ga=i(Je,"A",{href:!0,rel:!0});var Od=l(Ga);Ch=s(Od,"facebook/data2vec-text-base"),Od.forEach(t),Ah=s(Je," architecture."),Je.forEach(t),Mh=f(Ue),ht=i(Ue,"P",{});var ao=l(ht);jh=s(ao,"Configuration objects inherit from "),jr=i(ao,"A",{href:!0});var Id=l(jr);Eh=s(Id,"PretrainedConfig"),Id.forEach(t),qh=s(ao,` and can be used to control the model outputs. Read the
documentation from `),Er=i(ao,"A",{href:!0});var Nd=l(Er);zh=s(Nd,"PretrainedConfig"),Nd.forEach(t),Ph=s(ao," for more information."),ao.forEach(t),Sh=f(Ue),w(so.$$.fragment,Ue),Ue.forEach(t),Yd=f(o),mt=i(o,"H2",{class:!0});var yr=l(mt);ro=i(yr,"A",{id:!0,class:!0,href:!0});var Wd=l(ro);Hi=i(Wd,"SPAN",{});var Bd=l(Hi);w(Xa.$$.fragment,Bd),Bd.forEach(t),Wd.forEach(t),Lh=f(yr),Ri=i(yr,"SPAN",{});var Zb=l(Ri);Oh=s(Zb,"Data2VecAudioConfig"),Zb.forEach(t),yr.forEach(t),Zd=f(o),ge=i(o,"DIV",{class:!0});var ba=l(ge);w(Ua.$$.fragment,ba),Ih=f(ba),ut=i(ba,"P",{});var fi=l(ut);Nh=s(fi,"This is the configuration class to store the configuration of a "),qr=i(fi,"A",{href:!0});var e1=l(qr);Wh=s(e1,"Data2VecAudioModel"),e1.forEach(t),Bh=s(fi,`. It is used to instantiate
an Data2VecAudio 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 Data2VecAudio
`),Ja=i(fi,"A",{href:!0,rel:!0});var t1=l(Ja);Hh=s(t1,"facebook/data2vec-audio-base-960h"),t1.forEach(t),Rh=s(fi," architecture."),fi.forEach(t),Qh=f(ba),ft=i(ba,"P",{});var gi=l(ft);Gh=s(gi,"Configuration objects inherit from "),zr=i(gi,"A",{href:!0});var o1=l(zr);Xh=s(o1,"PretrainedConfig"),o1.forEach(t),Uh=s(gi,` and can be used to control the model outputs. Read the
documentation from `),Pr=i(gi,"A",{href:!0});var a1=l(Pr);Jh=s(a1,"PretrainedConfig"),a1.forEach(t),Kh=s(gi," for more information."),gi.forEach(t),Yh=f(ba),w(io.$$.fragment,ba),ba.forEach(t),ec=f(o),gt=i(o,"H2",{class:!0});var Sc=l(gt);lo=i(Sc,"A",{id:!0,class:!0,href:!0});var n1=l(lo);Qi=i(n1,"SPAN",{});var s1=l(Qi);w(Ka.$$.fragment,s1),s1.forEach(t),n1.forEach(t),Zh=f(Sc),Gi=i(Sc,"SPAN",{});var r1=l(Gi);em=s(r1,"Data2VecVisionConfig"),r1.forEach(t),Sc.forEach(t),tc=f(o),Qe=i(o,"DIV",{class:!0});var _i=l(Qe);w(Ya.$$.fragment,_i),tm=f(_i),_t=i(_i,"P",{});var vi=l(_t);om=s(vi,"This is the configuration class to store the configuration of a "),Sr=i(vi,"A",{href:!0});var i1=l(Sr);am=s(i1,"Data2VecVisionModel"),i1.forEach(t),nm=s(vi,`. It is used to instantiate
an Data2VecVision 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 Data2VecVision
`),Za=i(vi,"A",{href:!0,rel:!0});var l1=l(Za);sm=s(l1,"facebook/data2vec-vision-base"),l1.forEach(t),rm=s(vi," architecture."),vi.forEach(t),im=f(_i),w(co.$$.fragment,_i),_i.forEach(t),oc=f(o),vt=i(o,"H2",{class:!0});var Lc=l(vt);po=i(Lc,"A",{id:!0,class:!0,href:!0});var d1=l(po);Xi=i(d1,"SPAN",{});var c1=l(Xi);w(en.$$.fragment,c1),c1.forEach(t),d1.forEach(t),lm=f(Lc),Ui=i(Lc,"SPAN",{});var p1=l(Ui);dm=s(p1,"Data2VecAudioModel"),p1.forEach(t),Lc.forEach(t),ac=f(o),te=i(o,"DIV",{class:!0});var Ye=l(te);w(tn.$$.fragment,Ye),cm=f(Ye),on=i(Ye,"P",{});var Oc=l(on);pm=s(Oc,`The bare Data2VecAudio Model transformer outputting raw hidden-states without any specific head on top.
Data2VecAudio was proposed in `),an=i(Oc,"A",{href:!0,rel:!0});var h1=l(an);hm=s(h1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),h1.forEach(t),mm=s(Oc,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Oc.forEach(t),um=f(Ye),nn=i(Ye,"P",{});var Ic=l(nn);fm=s(Ic,"This model inherits from "),Lr=i(Ic,"A",{href:!0});var m1=l(Lr);gm=s(m1,"PreTrainedModel"),m1.forEach(t),_m=s(Ic,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ic.forEach(t),vm=f(Ye),sn=i(Ye,"P",{});var Nc=l(sn);bm=s(Nc,"This model is a PyTorch "),rn=i(Nc,"A",{href:!0,rel:!0});var u1=l(rn);Tm=s(u1,"torch.nn.Module"),u1.forEach(t),wm=s(Nc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Nc.forEach(t),km=f(Ye),$e=i(Ye,"DIV",{class:!0});var Ta=l($e);w(ln.$$.fragment,Ta),$m=f(Ta),bt=i(Ta,"P",{});var bi=l(bt);ym=s(bi,"The "),Or=i(bi,"A",{href:!0});var f1=l(Or);Vm=s(f1,"Data2VecAudioModel"),f1.forEach(t),xm=s(bi," forward method, overrides the "),Ji=i(bi,"CODE",{});var g1=l(Ji);Dm=s(g1,"__call__"),g1.forEach(t),Fm=s(bi," special method."),bi.forEach(t),Cm=f(Ta),w(ho.$$.fragment,Ta),Am=f(Ta),w(mo.$$.fragment,Ta),Ta.forEach(t),Ye.forEach(t),nc=f(o),Tt=i(o,"H2",{class:!0});var Wc=l(Tt);uo=i(Wc,"A",{id:!0,class:!0,href:!0});var _1=l(uo);Ki=i(_1,"SPAN",{});var v1=l(Ki);w(dn.$$.fragment,v1),v1.forEach(t),_1.forEach(t),Mm=f(Wc),Yi=i(Wc,"SPAN",{});var b1=l(Yi);jm=s(b1,"Data2VecAudioForAudioFrameClassification"),b1.forEach(t),Wc.forEach(t),sc=f(o),B=i(o,"DIV",{class:!0});var qe=l(B);w(cn.$$.fragment,qe),Em=f(qe),Zi=i(qe,"P",{});var T1=l(Zi);qm=s(T1,"Data2VecAudio Model with a frame classification head on top for tasks like Speaker Diarization."),T1.forEach(t),zm=f(qe),pn=i(qe,"P",{});var Bc=l(pn);Pm=s(Bc,"Data2VecAudio was proposed in "),hn=i(Bc,"A",{href:!0,rel:!0});var w1=l(hn);Sm=s(w1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),w1.forEach(t),Lm=s(Bc,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Bc.forEach(t),Om=f(qe),mn=i(qe,"P",{});var Hc=l(mn);Im=s(Hc,"This model inherits from "),Ir=i(Hc,"A",{href:!0});var k1=l(Ir);Nm=s(k1,"PreTrainedModel"),k1.forEach(t),Wm=s(Hc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Hc.forEach(t),Bm=f(qe),un=i(qe,"P",{});var Rc=l(un);Hm=s(Rc,"This model is a PyTorch "),fn=i(Rc,"A",{href:!0,rel:!0});var $1=l(fn);Rm=s($1,"torch.nn.Module"),$1.forEach(t),Qm=s(Rc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Rc.forEach(t),Gm=f(qe),ye=i(qe,"DIV",{class:!0});var wa=l(ye);w(gn.$$.fragment,wa),Xm=f(wa),wt=i(wa,"P",{});var Ti=l(wt);Um=s(Ti,"The "),Nr=i(Ti,"A",{href:!0});var y1=l(Nr);Jm=s(y1,"Data2VecAudioForAudioFrameClassification"),y1.forEach(t),Km=s(Ti," forward method, overrides the "),el=i(Ti,"CODE",{});var V1=l(el);Ym=s(V1,"__call__"),V1.forEach(t),Zm=s(Ti," special method."),Ti.forEach(t),eu=f(wa),w(fo.$$.fragment,wa),tu=f(wa),w(go.$$.fragment,wa),wa.forEach(t),qe.forEach(t),rc=f(o),kt=i(o,"H2",{class:!0});var Qc=l(kt);_o=i(Qc,"A",{id:!0,class:!0,href:!0});var x1=l(_o);tl=i(x1,"SPAN",{});var D1=l(tl);w(_n.$$.fragment,D1),D1.forEach(t),x1.forEach(t),ou=f(Qc),ol=i(Qc,"SPAN",{});var F1=l(ol);au=s(F1,"Data2VecAudioForCTC"),F1.forEach(t),Qc.forEach(t),ic=f(o),oe=i(o,"DIV",{class:!0});var Ze=l(oe);w(vn.$$.fragment,Ze),nu=f(Ze),$t=i(Ze,"P",{});var wi=l($t);su=s(wi,"Data2VecAudio Model with a "),al=i(wi,"CODE",{});var C1=l(al);ru=s(C1,"language modeling"),C1.forEach(t),iu=s(wi,` head on top for Connectionist Temporal Classification (CTC).
Data2VecAudio was proposed in `),bn=i(wi,"A",{href:!0,rel:!0});var A1=l(bn);lu=s(A1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),A1.forEach(t),du=s(wi,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),wi.forEach(t),cu=f(Ze),Tn=i(Ze,"P",{});var Gc=l(Tn);pu=s(Gc,"This model inherits from "),Wr=i(Gc,"A",{href:!0});var M1=l(Wr);hu=s(M1,"PreTrainedModel"),M1.forEach(t),mu=s(Gc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Gc.forEach(t),uu=f(Ze),wn=i(Ze,"P",{});var Xc=l(wn);fu=s(Xc,"This model is a PyTorch "),kn=i(Xc,"A",{href:!0,rel:!0});var j1=l(kn);gu=s(j1,"torch.nn.Module"),j1.forEach(t),_u=s(Xc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xc.forEach(t),vu=f(Ze),le=i(Ze,"DIV",{class:!0});var et=l(le);w($n.$$.fragment,et),bu=f(et),yt=i(et,"P",{});var ki=l(yt);Tu=s(ki,"The "),Br=i(ki,"A",{href:!0});var E1=l(Br);wu=s(E1,"Data2VecAudioForCTC"),E1.forEach(t),ku=s(ki," forward method, overrides the "),nl=i(ki,"CODE",{});var q1=l(nl);$u=s(q1,"__call__"),q1.forEach(t),yu=s(ki," special method."),ki.forEach(t),Vu=f(et),w(vo.$$.fragment,et),xu=f(et),w(bo.$$.fragment,et),Du=f(et),w(To.$$.fragment,et),et.forEach(t),Ze.forEach(t),lc=f(o),Vt=i(o,"H2",{class:!0});var Uc=l(Vt);wo=i(Uc,"A",{id:!0,class:!0,href:!0});var z1=l(wo);sl=i(z1,"SPAN",{});var P1=l(sl);w(yn.$$.fragment,P1),P1.forEach(t),z1.forEach(t),Fu=f(Uc),rl=i(Uc,"SPAN",{});var S1=l(rl);Cu=s(S1,"Data2VecAudioForSequenceClassification"),S1.forEach(t),Uc.forEach(t),dc=f(o),H=i(o,"DIV",{class:!0});var ze=l(H);w(Vn.$$.fragment,ze),Au=f(ze),il=i(ze,"P",{});var L1=l(il);Mu=s(L1,`Data2VecAudio Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),L1.forEach(t),ju=f(ze),xn=i(ze,"P",{});var Jc=l(xn);Eu=s(Jc,"Data2VecAudio was proposed in "),Dn=i(Jc,"A",{href:!0,rel:!0});var O1=l(Dn);qu=s(O1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),O1.forEach(t),zu=s(Jc,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Jc.forEach(t),Pu=f(ze),Fn=i(ze,"P",{});var Kc=l(Fn);Su=s(Kc,"This model inherits from "),Hr=i(Kc,"A",{href:!0});var I1=l(Hr);Lu=s(I1,"PreTrainedModel"),I1.forEach(t),Ou=s(Kc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Kc.forEach(t),Iu=f(ze),Cn=i(ze,"P",{});var Yc=l(Cn);Nu=s(Yc,"This model is a PyTorch "),An=i(Yc,"A",{href:!0,rel:!0});var N1=l(An);Wu=s(N1,"torch.nn.Module"),N1.forEach(t),Bu=s(Yc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Yc.forEach(t),Hu=f(ze),de=i(ze,"DIV",{class:!0});var tt=l(de);w(Mn.$$.fragment,tt),Ru=f(tt),xt=i(tt,"P",{});var $i=l(xt);Qu=s($i,"The "),Rr=i($i,"A",{href:!0});var W1=l(Rr);Gu=s(W1,"Data2VecAudioForSequenceClassification"),W1.forEach(t),Xu=s($i," forward method, overrides the "),ll=i($i,"CODE",{});var B1=l(ll);Uu=s(B1,"__call__"),B1.forEach(t),Ju=s($i," special method."),$i.forEach(t),Ku=f(tt),w(ko.$$.fragment,tt),Yu=f(tt),w($o.$$.fragment,tt),Zu=f(tt),w(yo.$$.fragment,tt),tt.forEach(t),ze.forEach(t),cc=f(o),Dt=i(o,"H2",{class:!0});var Zc=l(Dt);Vo=i(Zc,"A",{id:!0,class:!0,href:!0});var H1=l(Vo);dl=i(H1,"SPAN",{});var R1=l(dl);w(jn.$$.fragment,R1),R1.forEach(t),H1.forEach(t),ef=f(Zc),cl=i(Zc,"SPAN",{});var Q1=l(cl);tf=s(Q1,"Data2VecAudioForXVector"),Q1.forEach(t),Zc.forEach(t),pc=f(o),R=i(o,"DIV",{class:!0});var Pe=l(R);w(En.$$.fragment,Pe),of=f(Pe),pl=i(Pe,"P",{});var G1=l(pl);af=s(G1,"Data2VecAudio Model with an XVector feature extraction head on top for tasks like Speaker Verification."),G1.forEach(t),nf=f(Pe),qn=i(Pe,"P",{});var ep=l(qn);sf=s(ep,"Data2VecAudio was proposed in "),zn=i(ep,"A",{href:!0,rel:!0});var X1=l(zn);rf=s(X1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),X1.forEach(t),lf=s(ep,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),ep.forEach(t),df=f(Pe),Pn=i(Pe,"P",{});var tp=l(Pn);cf=s(tp,"This model inherits from "),Qr=i(tp,"A",{href:!0});var U1=l(Qr);pf=s(U1,"PreTrainedModel"),U1.forEach(t),hf=s(tp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),tp.forEach(t),mf=f(Pe),Sn=i(Pe,"P",{});var op=l(Sn);uf=s(op,"This model is a PyTorch "),Ln=i(op,"A",{href:!0,rel:!0});var J1=l(Ln);ff=s(J1,"torch.nn.Module"),J1.forEach(t),gf=s(op,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),op.forEach(t),_f=f(Pe),Ve=i(Pe,"DIV",{class:!0});var ka=l(Ve);w(On.$$.fragment,ka),vf=f(ka),Ft=i(ka,"P",{});var yi=l(Ft);bf=s(yi,"The "),Gr=i(yi,"A",{href:!0});var K1=l(Gr);Tf=s(K1,"Data2VecAudioForXVector"),K1.forEach(t),wf=s(yi," forward method, overrides the "),hl=i(yi,"CODE",{});var Y1=l(hl);kf=s(Y1,"__call__"),Y1.forEach(t),$f=s(yi," special method."),yi.forEach(t),yf=f(ka),w(xo.$$.fragment,ka),Vf=f(ka),w(Do.$$.fragment,ka),ka.forEach(t),Pe.forEach(t),hc=f(o),Ct=i(o,"H2",{class:!0});var ap=l(Ct);Fo=i(ap,"A",{id:!0,class:!0,href:!0});var Z1=l(Fo);ml=i(Z1,"SPAN",{});var eT=l(ml);w(In.$$.fragment,eT),eT.forEach(t),Z1.forEach(t),xf=f(ap),ul=i(ap,"SPAN",{});var tT=l(ul);Df=s(tT,"Data2VecTextModel"),tT.forEach(t),ap.forEach(t),mc=f(o),P=i(o,"DIV",{class:!0});var Z=l(P);w(Nn.$$.fragment,Z),Ff=f(Z),Wn=i(Z,"P",{});var np=l(Wn);Cf=s(np,`The bare Data2VecText Model for text transformer outputting raw hidden-states without any specific head on top.
Data2VecText was proposed in `),Bn=i(np,"A",{href:!0,rel:!0});var oT=l(Bn);Af=s(oT,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),oT.forEach(t),Mf=s(np,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),np.forEach(t),jf=f(Z),Hn=i(Z,"P",{});var sp=l(Hn);Ef=s(sp,"This model inherits from "),Xr=i(sp,"A",{href:!0});var aT=l(Xr);qf=s(aT,"PreTrainedModel"),aT.forEach(t),zf=s(sp,`. 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.)`),sp.forEach(t),Pf=f(Z),Rn=i(Z,"P",{});var rp=l(Rn);Sf=s(rp,"This model is also a PyTorch "),Qn=i(rp,"A",{href:!0,rel:!0});var nT=l(Qn);Lf=s(nT,"torch.nn.Module"),nT.forEach(t),Of=s(rp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rp.forEach(t),If=f(Z),Gn=i(Z,"P",{});var ip=l(Gn);Nf=s(ip,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),fl=i(ip,"EM",{});var sT=l(fl);Wf=s(sT,`Attention is
all you need`),sT.forEach(t),Bf=s(ip,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),ip.forEach(t),Hf=f(Z),Q=i(Z,"P",{});var me=l(Q);Rf=s(me,"To behave as an decoder the model needs to be initialized with the "),gl=i(me,"CODE",{});var rT=l(gl);Qf=s(rT,"is_decoder"),rT.forEach(t),Gf=s(me,` argument of the configuration set
to `),_l=i(me,"CODE",{});var iT=l(_l);Xf=s(iT,"True"),iT.forEach(t),Uf=s(me,". To be used in a Seq2Seq model, the model needs to initialized with both "),vl=i(me,"CODE",{});var lT=l(vl);Jf=s(lT,"is_decoder"),lT.forEach(t),Kf=s(me,` argument and
`),bl=i(me,"CODE",{});var dT=l(bl);Yf=s(dT,"add_cross_attention"),dT.forEach(t),Zf=s(me," set to "),Tl=i(me,"CODE",{});var cT=l(Tl);eg=s(cT,"True"),cT.forEach(t),tg=s(me,"; an "),wl=i(me,"CODE",{});var pT=l(wl);og=s(pT,"encoder_hidden_states"),pT.forEach(t),ag=s(me," is then expected as an input to the forward pass."),me.forEach(t),ng=f(Z),Co=i(Z,"P",{});var Hd=l(Co);sg=s(Hd,".. _"),kl=i(Hd,"EM",{});var hT=l(kl);rg=s(hT,"Attention is all you need"),hT.forEach(t),ig=s(Hd,": "),Xn=i(Hd,"A",{href:!0,rel:!0});var mT=l(Xn);lg=s(mT,"https://arxiv.org/abs/1706.03762"),mT.forEach(t),Hd.forEach(t),dg=f(Z),xe=i(Z,"DIV",{class:!0});var $a=l(xe);w(Un.$$.fragment,$a),cg=f($a),At=i($a,"P",{});var Vi=l(At);pg=s(Vi,"The "),Ur=i(Vi,"A",{href:!0});var uT=l(Ur);hg=s(uT,"Data2VecTextModel"),uT.forEach(t),mg=s(Vi," forward method, overrides the "),$l=i(Vi,"CODE",{});var fT=l($l);ug=s(fT,"__call__"),fT.forEach(t),fg=s(Vi," special method."),Vi.forEach(t),gg=f($a),w(Ao.$$.fragment,$a),_g=f($a),w(Mo.$$.fragment,$a),$a.forEach(t),Z.forEach(t),uc=f(o),Mt=i(o,"H2",{class:!0});var lp=l(Mt);jo=i(lp,"A",{id:!0,class:!0,href:!0});var gT=l(jo);yl=i(gT,"SPAN",{});var _T=l(yl);w(Jn.$$.fragment,_T),_T.forEach(t),gT.forEach(t),vg=f(lp),Vl=i(lp,"SPAN",{});var vT=l(Vl);bg=s(vT,"Data2VecTextForCausalLM"),vT.forEach(t),lp.forEach(t),fc=f(o),ae=i(o,"DIV",{class:!0});var ot=l(ae);w(Kn.$$.fragment,ot),Tg=f(ot),jt=i(ot,"P",{});var xi=l(jt);wg=s(xi,"Data2VecText Model with a "),xl=i(xi,"CODE",{});var bT=l(xl);kg=s(bT,"language modeling"),bT.forEach(t),$g=s(xi,` head on top for CLM fine-tuning.
Data2VecText was proposed in `),Yn=i(xi,"A",{href:!0,rel:!0});var TT=l(Yn);yg=s(TT,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),TT.forEach(t),Vg=s(xi,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),xi.forEach(t),xg=f(ot),Zn=i(ot,"P",{});var dp=l(Zn);Dg=s(dp,"This model inherits from "),Jr=i(dp,"A",{href:!0});var wT=l(Jr);Fg=s(wT,"PreTrainedModel"),wT.forEach(t),Cg=s(dp,`. 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.)`),dp.forEach(t),Ag=f(ot),es=i(ot,"P",{});var cp=l(es);Mg=s(cp,"This model is also a PyTorch "),ts=i(cp,"A",{href:!0,rel:!0});var kT=l(ts);jg=s(kT,"torch.nn.Module"),kT.forEach(t),Eg=s(cp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cp.forEach(t),qg=f(ot),De=i(ot,"DIV",{class:!0});var ya=l(De);w(os.$$.fragment,ya),zg=f(ya),Et=i(ya,"P",{});var Di=l(Et);Pg=s(Di,"The "),Kr=i(Di,"A",{href:!0});var $T=l(Kr);Sg=s($T,"Data2VecTextForCausalLM"),$T.forEach(t),Lg=s(Di," forward method, overrides the "),Dl=i(Di,"CODE",{});var yT=l(Dl);Og=s(yT,"__call__"),yT.forEach(t),Ig=s(Di," special method."),Di.forEach(t),Ng=f(ya),w(Eo.$$.fragment,ya),Wg=f(ya),w(qo.$$.fragment,ya),ya.forEach(t),ot.forEach(t),gc=f(o),qt=i(o,"H2",{class:!0});var pp=l(qt);zo=i(pp,"A",{id:!0,class:!0,href:!0});var VT=l(zo);Fl=i(VT,"SPAN",{});var xT=l(Fl);w(as.$$.fragment,xT),xT.forEach(t),VT.forEach(t),Bg=f(pp),Cl=i(pp,"SPAN",{});var DT=l(Cl);Hg=s(DT,"Data2VecTextForMaskedLM"),DT.forEach(t),pp.forEach(t),_c=f(o),ne=i(o,"DIV",{class:!0});var at=l(ne);w(ns.$$.fragment,at),Rg=f(at),zt=i(at,"P",{});var Fi=l(zt);Qg=s(Fi,"data2vec Model with a "),Al=i(Fi,"CODE",{});var FT=l(Al);Gg=s(FT,"language modeling"),FT.forEach(t),Xg=s(Fi,` head on top.
Data2VecText was proposed in `),ss=i(Fi,"A",{href:!0,rel:!0});var CT=l(ss);Ug=s(CT,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),CT.forEach(t),Jg=s(Fi,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Fi.forEach(t),Kg=f(at),rs=i(at,"P",{});var hp=l(rs);Yg=s(hp,"This model inherits from "),Yr=i(hp,"A",{href:!0});var AT=l(Yr);Zg=s(AT,"PreTrainedModel"),AT.forEach(t),e_=s(hp,`. 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.)`),hp.forEach(t),t_=f(at),is=i(at,"P",{});var mp=l(is);o_=s(mp,"This model is also a PyTorch "),ls=i(mp,"A",{href:!0,rel:!0});var MT=l(ls);a_=s(MT,"torch.nn.Module"),MT.forEach(t),n_=s(mp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mp.forEach(t),s_=f(at),ce=i(at,"DIV",{class:!0});var nt=l(ce);w(ds.$$.fragment,nt),r_=f(nt),Pt=i(nt,"P",{});var Ci=l(Pt);i_=s(Ci,"The "),Zr=i(Ci,"A",{href:!0});var jT=l(Zr);l_=s(jT,"Data2VecTextForMaskedLM"),jT.forEach(t),d_=s(Ci," forward method, overrides the "),Ml=i(Ci,"CODE",{});var ET=l(Ml);c_=s(ET,"__call__"),ET.forEach(t),p_=s(Ci," special method."),Ci.forEach(t),h_=f(nt),w(Po.$$.fragment,nt),m_=f(nt),w(So.$$.fragment,nt),u_=f(nt),w(Lo.$$.fragment,nt),nt.forEach(t),at.forEach(t),vc=f(o),St=i(o,"H2",{class:!0});var up=l(St);Oo=i(up,"A",{id:!0,class:!0,href:!0});var qT=l(Oo);jl=i(qT,"SPAN",{});var zT=l(jl);w(cs.$$.fragment,zT),zT.forEach(t),qT.forEach(t),f_=f(up),El=i(up,"SPAN",{});var PT=l(El);g_=s(PT,"Data2VecTextForSequenceClassification"),PT.forEach(t),up.forEach(t),bc=f(o),G=i(o,"DIV",{class:!0});var Se=l(G);w(ps.$$.fragment,Se),__=f(Se),ql=i(Se,"P",{});var ST=l(ql);v_=s(ST,`Data2VecText Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ST.forEach(t),b_=f(Se),hs=i(Se,"P",{});var fp=l(hs);T_=s(fp,"Data2VecText was proposed in "),ms=i(fp,"A",{href:!0,rel:!0});var LT=l(ms);w_=s(LT,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),LT.forEach(t),k_=s(fp,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),fp.forEach(t),$_=f(Se),us=i(Se,"P",{});var gp=l(us);y_=s(gp,"This model inherits from "),ei=i(gp,"A",{href:!0});var OT=l(ei);V_=s(OT,"PreTrainedModel"),OT.forEach(t),x_=s(gp,`. 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.)`),gp.forEach(t),D_=f(Se),fs=i(Se,"P",{});var _p=l(fs);F_=s(_p,"This model is also a PyTorch "),gs=i(_p,"A",{href:!0,rel:!0});var IT=l(gs);C_=s(IT,"torch.nn.Module"),IT.forEach(t),A_=s(_p,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_p.forEach(t),M_=f(Se),O=i(Se,"DIV",{class:!0});var ue=l(O);w(_s.$$.fragment,ue),j_=f(ue),Lt=i(ue,"P",{});var Ai=l(Lt);E_=s(Ai,"The "),ti=i(Ai,"A",{href:!0});var NT=l(ti);q_=s(NT,"Data2VecTextForSequenceClassification"),NT.forEach(t),z_=s(Ai," forward method, overrides the "),zl=i(Ai,"CODE",{});var WT=l(zl);P_=s(WT,"__call__"),WT.forEach(t),S_=s(Ai," special method."),Ai.forEach(t),L_=f(ue),w(Io.$$.fragment,ue),O_=f(ue),w(No.$$.fragment,ue),I_=f(ue),w(Wo.$$.fragment,ue),N_=f(ue),w(Bo.$$.fragment,ue),W_=f(ue),w(Ho.$$.fragment,ue),ue.forEach(t),Se.forEach(t),Tc=f(o),Ot=i(o,"H2",{class:!0});var vp=l(Ot);Ro=i(vp,"A",{id:!0,class:!0,href:!0});var BT=l(Ro);Pl=i(BT,"SPAN",{});var HT=l(Pl);w(vs.$$.fragment,HT),HT.forEach(t),BT.forEach(t),B_=f(vp),Sl=i(vp,"SPAN",{});var RT=l(Sl);H_=s(RT,"Data2VecTextForMultipleChoice"),RT.forEach(t),vp.forEach(t),wc=f(o),X=i(o,"DIV",{class:!0});var Le=l(X);w(bs.$$.fragment,Le),R_=f(Le),Ll=i(Le,"P",{});var QT=l(Ll);Q_=s(QT,`Data2VecText Model with a multiple choice classification head on top (a linear layer on top of the pooled output
and a softmax) e.g. for RocStories/SWAG tasks.`),QT.forEach(t),G_=f(Le),Ts=i(Le,"P",{});var bp=l(Ts);X_=s(bp,"Data2VecText was proposed in "),ws=i(bp,"A",{href:!0,rel:!0});var GT=l(ws);U_=s(GT,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),GT.forEach(t),J_=s(bp,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),bp.forEach(t),K_=f(Le),ks=i(Le,"P",{});var Tp=l(ks);Y_=s(Tp,"This model inherits from "),oi=i(Tp,"A",{href:!0});var XT=l(oi);Z_=s(XT,"PreTrainedModel"),XT.forEach(t),e2=s(Tp,`. 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.)`),Tp.forEach(t),t2=f(Le),$s=i(Le,"P",{});var wp=l($s);o2=s(wp,"This model is also a PyTorch "),ys=i(wp,"A",{href:!0,rel:!0});var UT=l(ys);a2=s(UT,"torch.nn.Module"),UT.forEach(t),n2=s(wp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wp.forEach(t),s2=f(Le),Fe=i(Le,"DIV",{class:!0});var Va=l(Fe);w(Vs.$$.fragment,Va),r2=f(Va),It=i(Va,"P",{});var Mi=l(It);i2=s(Mi,"The "),ai=i(Mi,"A",{href:!0});var JT=l(ai);l2=s(JT,"Data2VecTextForMultipleChoice"),JT.forEach(t),d2=s(Mi," forward method, overrides the "),Ol=i(Mi,"CODE",{});var KT=l(Ol);c2=s(KT,"__call__"),KT.forEach(t),p2=s(Mi," special method."),Mi.forEach(t),h2=f(Va),w(Qo.$$.fragment,Va),m2=f(Va),w(Go.$$.fragment,Va),Va.forEach(t),Le.forEach(t),kc=f(o),Nt=i(o,"H2",{class:!0});var kp=l(Nt);Xo=i(kp,"A",{id:!0,class:!0,href:!0});var YT=l(Xo);Il=i(YT,"SPAN",{});var ZT=l(Il);w(xs.$$.fragment,ZT),ZT.forEach(t),YT.forEach(t),u2=f(kp),Nl=i(kp,"SPAN",{});var ew=l(Nl);f2=s(ew,"Data2VecTextForTokenClassification"),ew.forEach(t),kp.forEach(t),$c=f(o),U=i(o,"DIV",{class:!0});var Oe=l(U);w(Ds.$$.fragment,Oe),g2=f(Oe),Wl=i(Oe,"P",{});var tw=l(Wl);_2=s(tw,`Data2VecText Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),tw.forEach(t),v2=f(Oe),Fs=i(Oe,"P",{});var $p=l(Fs);b2=s($p,"Data2VecText was proposed in "),Cs=i($p,"A",{href:!0,rel:!0});var ow=l(Cs);T2=s(ow,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),ow.forEach(t),w2=s($p,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),$p.forEach(t),k2=f(Oe),As=i(Oe,"P",{});var yp=l(As);$2=s(yp,"This model inherits from "),ni=i(yp,"A",{href:!0});var aw=l(ni);y2=s(aw,"PreTrainedModel"),aw.forEach(t),V2=s(yp,`. 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.)`),yp.forEach(t),x2=f(Oe),Ms=i(Oe,"P",{});var Vp=l(Ms);D2=s(Vp,"This model is also a PyTorch "),js=i(Vp,"A",{href:!0,rel:!0});var nw=l(js);F2=s(nw,"torch.nn.Module"),nw.forEach(t),C2=s(Vp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vp.forEach(t),A2=f(Oe),pe=i(Oe,"DIV",{class:!0});var st=l(pe);w(Es.$$.fragment,st),M2=f(st),Wt=i(st,"P",{});var ji=l(Wt);j2=s(ji,"The "),si=i(ji,"A",{href:!0});var sw=l(si);E2=s(sw,"Data2VecTextForTokenClassification"),sw.forEach(t),q2=s(ji," forward method, overrides the "),Bl=i(ji,"CODE",{});var rw=l(Bl);z2=s(rw,"__call__"),rw.forEach(t),P2=s(ji," special method."),ji.forEach(t),S2=f(st),w(Uo.$$.fragment,st),L2=f(st),w(Jo.$$.fragment,st),O2=f(st),w(Ko.$$.fragment,st),st.forEach(t),Oe.forEach(t),yc=f(o),Bt=i(o,"H2",{class:!0});var xp=l(Bt);Yo=i(xp,"A",{id:!0,class:!0,href:!0});var iw=l(Yo);Hl=i(iw,"SPAN",{});var lw=l(Hl);w(qs.$$.fragment,lw),lw.forEach(t),iw.forEach(t),I2=f(xp),Rl=i(xp,"SPAN",{});var dw=l(Rl);N2=s(dw,"Data2VecTextForQuestionAnswering"),dw.forEach(t),xp.forEach(t),Vc=f(o),J=i(o,"DIV",{class:!0});var Ie=l(J);w(zs.$$.fragment,Ie),W2=f(Ie),Ht=i(Ie,"P",{});var Ei=l(Ht);B2=s(Ei,`Data2VecText Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Ql=i(Ei,"CODE",{});var cw=l(Ql);H2=s(cw,"span start logits"),cw.forEach(t),R2=s(Ei," and "),Gl=i(Ei,"CODE",{});var pw=l(Gl);Q2=s(pw,"span end logits"),pw.forEach(t),G2=s(Ei,")."),Ei.forEach(t),X2=f(Ie),Ps=i(Ie,"P",{});var Dp=l(Ps);U2=s(Dp,"Data2VecText was proposed in "),Ss=i(Dp,"A",{href:!0,rel:!0});var hw=l(Ss);J2=s(hw,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),hw.forEach(t),K2=s(Dp,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Dp.forEach(t),Y2=f(Ie),Ls=i(Ie,"P",{});var Fp=l(Ls);Z2=s(Fp,"This model inherits from "),ri=i(Fp,"A",{href:!0});var mw=l(ri);ev=s(mw,"PreTrainedModel"),mw.forEach(t),tv=s(Fp,`. 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.)`),Fp.forEach(t),ov=f(Ie),Os=i(Ie,"P",{});var Cp=l(Os);av=s(Cp,"This model is also a PyTorch "),Is=i(Cp,"A",{href:!0,rel:!0});var uw=l(Is);nv=s(uw,"torch.nn.Module"),uw.forEach(t),sv=s(Cp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cp.forEach(t),rv=f(Ie),he=i(Ie,"DIV",{class:!0});var rt=l(he);w(Ns.$$.fragment,rt),iv=f(rt),Rt=i(rt,"P",{});var qi=l(Rt);lv=s(qi,"The "),ii=i(qi,"A",{href:!0});var fw=l(ii);dv=s(fw,"Data2VecTextForQuestionAnswering"),fw.forEach(t),cv=s(qi," forward method, overrides the "),Xl=i(qi,"CODE",{});var gw=l(Xl);pv=s(gw,"__call__"),gw.forEach(t),hv=s(qi," special method."),qi.forEach(t),mv=f(rt),w(Zo.$$.fragment,rt),uv=f(rt),w(ea.$$.fragment,rt),fv=f(rt),w(ta.$$.fragment,rt),rt.forEach(t),Ie.forEach(t),xc=f(o),Qt=i(o,"H2",{class:!0});var Ap=l(Qt);oa=i(Ap,"A",{id:!0,class:!0,href:!0});var _w=l(oa);Ul=i(_w,"SPAN",{});var vw=l(Ul);w(Ws.$$.fragment,vw),vw.forEach(t),_w.forEach(t),gv=f(Ap),Jl=i(Ap,"SPAN",{});var bw=l(Jl);_v=s(bw,"Data2VecVisionModel"),bw.forEach(t),Ap.forEach(t),Dc=f(o),Ge=i(o,"DIV",{class:!0});var zi=l(Ge);w(Bs.$$.fragment,zi),vv=f(zi),Hs=i(zi,"P",{});var Mp=l(Hs);bv=s(Mp,`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rs=i(Mp,"A",{href:!0,rel:!0});var Tw=l(Rs);Tv=s(Tw,"torch.nn.Module"),Tw.forEach(t),wv=s(Mp,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Mp.forEach(t),kv=f(zi),Ce=i(zi,"DIV",{class:!0});var xa=l(Ce);w(Qs.$$.fragment,xa),$v=f(xa),Gt=i(xa,"P",{});var Pi=l(Gt);yv=s(Pi,"The "),li=i(Pi,"A",{href:!0});var ww=l(li);Vv=s(ww,"Data2VecVisionModel"),ww.forEach(t),xv=s(Pi," forward method, overrides the "),Kl=i(Pi,"CODE",{});var kw=l(Kl);Dv=s(kw,"__call__"),kw.forEach(t),Fv=s(Pi," special method."),Pi.forEach(t),Cv=f(xa),w(aa.$$.fragment,xa),Av=f(xa),w(na.$$.fragment,xa),xa.forEach(t),zi.forEach(t),Fc=f(o),Xt=i(o,"H2",{class:!0});var jp=l(Xt);sa=i(jp,"A",{id:!0,class:!0,href:!0});var $w=l(sa);Yl=i($w,"SPAN",{});var yw=l(Yl);w(Gs.$$.fragment,yw),yw.forEach(t),$w.forEach(t),Mv=f(jp),Zl=i(jp,"SPAN",{});var Vw=l(Zl);jv=s(Vw,"Data2VecVisionForImageClassification"),Vw.forEach(t),jp.forEach(t),Cc=f(o),_e=i(o,"DIV",{class:!0});var Da=l(_e);w(Xs.$$.fragment,Da),Ev=f(Da),ed=i(Da,"P",{});var xw=l(ed);qv=s(xw,`Data2VecVision Model transformer with an image classification head on top (a linear layer on top of the average of
the final hidden states of the patch tokens) e.g. for ImageNet.`),xw.forEach(t),zv=f(Da),Us=i(Da,"P",{});var Ep=l(Us);Pv=s(Ep,"This model is a PyTorch "),Js=i(Ep,"A",{href:!0,rel:!0});var Dw=l(Js);Sv=s(Dw,"torch.nn.Module"),Dw.forEach(t),Lv=s(Ep,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ep.forEach(t),Ov=f(Da),Ae=i(Da,"DIV",{class:!0});var Fa=l(Ae);w(Ks.$$.fragment,Fa),Iv=f(Fa),Ut=i(Fa,"P",{});var Si=l(Ut);Nv=s(Si,"The "),di=i(Si,"A",{href:!0});var Fw=l(di);Wv=s(Fw,"Data2VecVisionForImageClassification"),Fw.forEach(t),Bv=s(Si," forward method, overrides the "),td=i(Si,"CODE",{});var Cw=l(td);Hv=s(Cw,"__call__"),Cw.forEach(t),Rv=s(Si," special method."),Si.forEach(t),Qv=f(Fa),w(ra.$$.fragment,Fa),Gv=f(Fa),w(ia.$$.fragment,Fa),Fa.forEach(t),Da.forEach(t),Ac=f(o),Jt=i(o,"H2",{class:!0});var qp=l(Jt);la=i(qp,"A",{id:!0,class:!0,href:!0});var Aw=l(la);od=i(Aw,"SPAN",{});var Mw=l(od);w(Ys.$$.fragment,Mw),Mw.forEach(t),Aw.forEach(t),Xv=f(qp),ad=i(qp,"SPAN",{});var jw=l(ad);Uv=s(jw,"Data2VecVisionForSemanticSegmentation"),jw.forEach(t),qp.forEach(t),Mc=f(o),ve=i(o,"DIV",{class:!0});var Ca=l(ve);w(Zs.$$.fragment,Ca),Jv=f(Ca),nd=i(Ca,"P",{});var Ew=l(nd);Kv=s(Ew,"Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Ew.forEach(t),Yv=f(Ca),er=i(Ca,"P",{});var zp=l(er);Zv=s(zp,"This model is a PyTorch "),tr=i(zp,"A",{href:!0,rel:!0});var qw=l(tr);eb=s(qw,"torch.nn.Module"),qw.forEach(t),tb=s(zp,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zp.forEach(t),ob=f(Ca),Me=i(Ca,"DIV",{class:!0});var Aa=l(Me);w(or.$$.fragment,Aa),ab=f(Aa),Kt=i(Aa,"P",{});var Li=l(Kt);nb=s(Li,"The "),ci=i(Li,"A",{href:!0});var zw=l(ci);sb=s(zw,"Data2VecVisionForSemanticSegmentation"),zw.forEach(t),rb=s(Li," forward method, overrides the "),sd=i(Li,"CODE",{});var Pw=l(sd);ib=s(Pw,"__call__"),Pw.forEach(t),lb=s(Li," special method."),Li.forEach(t),db=f(Aa),w(da.$$.fragment,Aa),cb=f(Aa),w(ca.$$.fragment,Aa),Aa.forEach(t),Ca.forEach(t),jc=f(o),Yt=i(o,"H2",{class:!0});var Pp=l(Yt);pa=i(Pp,"A",{id:!0,class:!0,href:!0});var Sw=l(pa);rd=i(Sw,"SPAN",{});var Lw=l(rd);w(ar.$$.fragment,Lw),Lw.forEach(t),Sw.forEach(t),pb=f(Pp),id=i(Pp,"SPAN",{});var Ow=l(id);hb=s(Ow,"TFData2VecVisionModel"),Ow.forEach(t),Pp.forEach(t),Ec=f(o),se=i(o,"DIV",{class:!0});var it=l(se);w(nr.$$.fragment,it),mb=f(it),sr=i(it,"P",{});var Sp=l(sr);ub=s(Sp,`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),pi=i(Sp,"A",{href:!0});var Iw=l(pi);fb=s(Iw,"TFPreTrainedModel"),Iw.forEach(t),gb=s(Sp,`. 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.).`),Sp.forEach(t),_b=f(it),rr=i(it,"P",{});var Lp=l(rr);vb=s(Lp,"This model is also a "),ir=i(Lp,"A",{href:!0,rel:!0});var Nw=l(ir);bb=s(Nw,"tf.keras.Model"),Nw.forEach(t),Tb=s(Lp,` 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.`),Lp.forEach(t),wb=f(it),w(ha.$$.fragment,it),kb=f(it),je=i(it,"DIV",{class:!0});var Ma=l(je);w(lr.$$.fragment,Ma),$b=f(Ma),Zt=i(Ma,"P",{});var Oi=l(Zt);yb=s(Oi,"The "),hi=i(Oi,"A",{href:!0});var Ww=l(hi);Vb=s(Ww,"TFData2VecVisionModel"),Ww.forEach(t),xb=s(Oi," forward method, overrides the "),ld=i(Oi,"CODE",{});var Bw=l(ld);Db=s(Bw,"__call__"),Bw.forEach(t),Fb=s(Oi," special method."),Oi.forEach(t),Cb=f(Ma),w(ma.$$.fragment,Ma),Ab=f(Ma),w(ua.$$.fragment,Ma),Ma.forEach(t),it.forEach(t),qc=f(o),eo=i(o,"H2",{class:!0});var Op=l(eo);fa=i(Op,"A",{id:!0,class:!0,href:!0});var Hw=l(fa);dd=i(Hw,"SPAN",{});var Rw=l(dd);w(dr.$$.fragment,Rw),Rw.forEach(t),Hw.forEach(t),Mb=f(Op),cd=i(Op,"SPAN",{});var Qw=l(cd);jb=s(Qw,"TFData2VecVisionForImageClassification"),Qw.forEach(t),Op.forEach(t),zc=f(o),K=i(o,"DIV",{class:!0});var Ne=l(K);w(cr.$$.fragment,Ne),Eb=f(Ne),pd=i(Ne,"P",{});var Gw=l(pd);qb=s(Gw,`Data2VecVision Model transformer with an image classification head on top (a linear layer on top of the average of
the final hidden states of the patch tokens) e.g. for ImageNet.`),Gw.forEach(t),zb=f(Ne),pr=i(Ne,"P",{});var Ip=l(pr);Pb=s(Ip,"This model inherits from "),mi=i(Ip,"A",{href:!0});var Xw=l(mi);Sb=s(Xw,"TFPreTrainedModel"),Xw.forEach(t),Lb=s(Ip,`. 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.).`),Ip.forEach(t),Ob=f(Ne),hr=i(Ne,"P",{});var Np=l(hr);Ib=s(Np,"This model is also a "),mr=i(Np,"A",{href:!0,rel:!0});var Uw=l(mr);Nb=s(Uw,"tf.keras.Model"),Uw.forEach(t),Wb=s(Np,` 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.`),Np.forEach(t),Bb=f(Ne),w(ga.$$.fragment,Ne),Hb=f(Ne),Ee=i(Ne,"DIV",{class:!0});var ja=l(Ee);w(ur.$$.fragment,ja),Rb=f(ja),to=i(ja,"P",{});var Ii=l(to);Qb=s(Ii,"The "),ui=i(Ii,"A",{href:!0});var Jw=l(ui);Gb=s(Jw,"TFData2VecVisionForImageClassification"),Jw.forEach(t),Xb=s(Ii," forward method, overrides the "),hd=i(Ii,"CODE",{});var Kw=l(hd);Ub=s(Kw,"__call__"),Kw.forEach(t),Jb=s(Ii," special method."),Ii.forEach(t),Kb=f(ja),w(_a.$$.fragment,ja),Yb=f(ja),w(va.$$.fragment,ja),ja.forEach(t),Ne.forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Kk)),m(h,"id","data2vec"),m(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(h,"href","#data2vec"),m(c,"class","relative group"),m(Y,"id","overview"),m(Y,"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"),m(Y,"href","#overview"),m(A,"class","relative group"),m(W,"href","https://arxiv.org/pdf/2202.03555"),m(W,"rel","nofollow"),m(qa,"href","http://www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),m(qa,"rel","nofollow"),m(Dr,"href","/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2Model"),m(Fr,"href","/docs/transformers/pr_17548/en/model_doc/roberta#transformers.RobertaModel"),m(Cr,"href","/docs/transformers/pr_17548/en/model_doc/beit#transformers.BeitModel"),m(Oa,"href","https://colab.research.google.com/github/sayakpaul/TF-2.0-Hacks/blob/master/data2vec_vision_image_classification.ipynb"),m(Oa,"rel","nofollow"),m(Ia,"href","https://huggingface.co/edugp"),m(Ia,"rel","nofollow"),m(Na,"href","https://huggingface.co/patrickvonplaten"),m(Na,"rel","nofollow"),m(Wa,"href","https://github.com/sayakpaul"),m(Wa,"rel","nofollow"),m(Ba,"href","https://github.com/pytorch/fairseq/tree/main/examples/data2vec"),m(Ba,"rel","nofollow"),m(Ha,"href","https://github.com/facebookresearch/data2vec_vision/tree/main/beit"),m(Ha,"rel","nofollow"),m(no,"id","transformers.Data2VecTextConfig"),m(no,"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"),m(no,"href","#transformers.Data2VecTextConfig"),m(pt,"class","relative group"),m(Ar,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextModel"),m(Mr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextModel"),m(Ga,"href","https://huggingface.co/facebook/data2vec-text-base"),m(Ga,"rel","nofollow"),m(jr,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),m(Er,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),m(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ro,"id","transformers.Data2VecAudioConfig"),m(ro,"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"),m(ro,"href","#transformers.Data2VecAudioConfig"),m(mt,"class","relative group"),m(qr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioModel"),m(Ja,"href","https://huggingface.co/facebook/data2vec-audio-base-960h"),m(Ja,"rel","nofollow"),m(zr,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),m(Pr,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),m(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(lo,"id","transformers.Data2VecVisionConfig"),m(lo,"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"),m(lo,"href","#transformers.Data2VecVisionConfig"),m(gt,"class","relative group"),m(Sr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionModel"),m(Za,"href","https://huggingface.co/facebook/data2vec-vision-base"),m(Za,"rel","nofollow"),m(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(po,"id","transformers.Data2VecAudioModel"),m(po,"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"),m(po,"href","#transformers.Data2VecAudioModel"),m(vt,"class","relative group"),m(an,"href","https://arxiv.org/pdf/2202.03555"),m(an,"rel","nofollow"),m(Lr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(rn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(rn,"rel","nofollow"),m(Or,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioModel"),m($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(uo,"id","transformers.Data2VecAudioForAudioFrameClassification"),m(uo,"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"),m(uo,"href","#transformers.Data2VecAudioForAudioFrameClassification"),m(Tt,"class","relative group"),m(hn,"href","https://arxiv.org/pdf/2202.03555"),m(hn,"rel","nofollow"),m(Ir,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(fn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(fn,"rel","nofollow"),m(Nr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForAudioFrameClassification"),m(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"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,"id","transformers.Data2VecAudioForCTC"),m(_o,"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"),m(_o,"href","#transformers.Data2VecAudioForCTC"),m(kt,"class","relative group"),m(bn,"href","https://arxiv.org/pdf/2202.03555"),m(bn,"rel","nofollow"),m(Wr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(kn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(kn,"rel","nofollow"),m(Br,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForCTC"),m(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(wo,"id","transformers.Data2VecAudioForSequenceClassification"),m(wo,"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"),m(wo,"href","#transformers.Data2VecAudioForSequenceClassification"),m(Vt,"class","relative group"),m(Dn,"href","https://arxiv.org/pdf/2202.03555"),m(Dn,"rel","nofollow"),m(Hr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(An,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(An,"rel","nofollow"),m(Rr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForSequenceClassification"),m(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Vo,"id","transformers.Data2VecAudioForXVector"),m(Vo,"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"),m(Vo,"href","#transformers.Data2VecAudioForXVector"),m(Dt,"class","relative group"),m(zn,"href","https://arxiv.org/pdf/2202.03555"),m(zn,"rel","nofollow"),m(Qr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(Ln,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Ln,"rel","nofollow"),m(Gr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecAudioForXVector"),m(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Fo,"id","transformers.Data2VecTextModel"),m(Fo,"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"),m(Fo,"href","#transformers.Data2VecTextModel"),m(Ct,"class","relative group"),m(Bn,"href","https://arxiv.org/pdf/2202.03555"),m(Bn,"rel","nofollow"),m(Xr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(Qn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Qn,"rel","nofollow"),m(Xn,"href","https://arxiv.org/abs/1706.03762"),m(Xn,"rel","nofollow"),m(Ur,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextModel"),m(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(jo,"id","transformers.Data2VecTextForCausalLM"),m(jo,"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"),m(jo,"href","#transformers.Data2VecTextForCausalLM"),m(Mt,"class","relative group"),m(Yn,"href","https://arxiv.org/pdf/2202.03555"),m(Yn,"rel","nofollow"),m(Jr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ts,"rel","nofollow"),m(Kr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForCausalLM"),m(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(zo,"id","transformers.Data2VecTextForMaskedLM"),m(zo,"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"),m(zo,"href","#transformers.Data2VecTextForMaskedLM"),m(qt,"class","relative group"),m(ss,"href","https://arxiv.org/pdf/2202.03555"),m(ss,"rel","nofollow"),m(Yr,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ls,"rel","nofollow"),m(Zr,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForMaskedLM"),m(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Oo,"id","transformers.Data2VecTextForSequenceClassification"),m(Oo,"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"),m(Oo,"href","#transformers.Data2VecTextForSequenceClassification"),m(St,"class","relative group"),m(ms,"href","https://arxiv.org/pdf/2202.03555"),m(ms,"rel","nofollow"),m(ei,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(gs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(gs,"rel","nofollow"),m(ti,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForSequenceClassification"),m(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ro,"id","transformers.Data2VecTextForMultipleChoice"),m(Ro,"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"),m(Ro,"href","#transformers.Data2VecTextForMultipleChoice"),m(Ot,"class","relative group"),m(ws,"href","https://arxiv.org/pdf/2202.03555"),m(ws,"rel","nofollow"),m(oi,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(ys,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(ys,"rel","nofollow"),m(ai,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForMultipleChoice"),m(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(Xo,"id","transformers.Data2VecTextForTokenClassification"),m(Xo,"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"),m(Xo,"href","#transformers.Data2VecTextForTokenClassification"),m(Nt,"class","relative group"),m(Cs,"href","https://arxiv.org/pdf/2202.03555"),m(Cs,"rel","nofollow"),m(ni,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(js,"rel","nofollow"),m(si,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForTokenClassification"),m(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Yo,"id","transformers.Data2VecTextForQuestionAnswering"),m(Yo,"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"),m(Yo,"href","#transformers.Data2VecTextForQuestionAnswering"),m(Bt,"class","relative group"),m(Ss,"href","https://arxiv.org/pdf/2202.03555"),m(Ss,"rel","nofollow"),m(ri,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel"),m(Is,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Is,"rel","nofollow"),m(ii,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecTextForQuestionAnswering"),m(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oa,"id","transformers.Data2VecVisionModel"),m(oa,"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"),m(oa,"href","#transformers.Data2VecVisionModel"),m(Qt,"class","relative group"),m(Rs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Rs,"rel","nofollow"),m(li,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionModel"),m(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(sa,"id","transformers.Data2VecVisionForImageClassification"),m(sa,"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"),m(sa,"href","#transformers.Data2VecVisionForImageClassification"),m(Xt,"class","relative group"),m(Js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Js,"rel","nofollow"),m(di,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionForImageClassification"),m(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(la,"id","transformers.Data2VecVisionForSemanticSegmentation"),m(la,"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"),m(la,"href","#transformers.Data2VecVisionForSemanticSegmentation"),m(Jt,"class","relative group"),m(tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(tr,"rel","nofollow"),m(ci,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.Data2VecVisionForSemanticSegmentation"),m(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pa,"id","transformers.TFData2VecVisionModel"),m(pa,"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"),m(pa,"href","#transformers.TFData2VecVisionModel"),m(Yt,"class","relative group"),m(pi,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel"),m(ir,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(ir,"rel","nofollow"),m(hi,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.TFData2VecVisionModel"),m(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fa,"id","transformers.TFData2VecVisionForImageClassification"),m(fa,"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"),m(fa,"href","#transformers.TFData2VecVisionForImageClassification"),m(eo,"class","relative group"),m(mi,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel"),m(mr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),m(mr,"rel","nofollow"),m(ui,"href","/docs/transformers/pr_17548/en/model_doc/data2vec#transformers.TFData2VecVisionForImageClassification"),m(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,d),b(o,g,_),b(o,c,_),e(c,h),e(h,v),k(a,v,null),e(c,p),e(c,D),e(D,We),b(o,re,_),b(o,A,_),e(A,Y),e(Y,I),k(ee,I,null),e(A,Be),e(A,N),e(N,He),b(o,Te,_),b(o,F,_),e(F,z),e(F,W),e(W,lt),e(F,dt),b(o,L,_),b(o,we,_),e(we,ct),b(o,Rd,_),b(o,Vr,_),e(Vr,Ea),e(Ea,Wp),e(Ea,qa),e(qa,Bp),e(Ea,Hp),b(o,Qd,_),b(o,xr,_),e(xr,Rp),b(o,Gd,_),b(o,ie,_),e(ie,Ni),e(Ni,Qp),e(ie,Gp),e(ie,za),e(za,Xp),e(za,Dr),e(Dr,Up),e(za,Jp),e(ie,Kp),e(ie,Pa),e(Pa,Yp),e(Pa,Fr),e(Fr,Zp),e(Pa,eh),e(ie,th),e(ie,Sa),e(Sa,oh),e(Sa,Cr),e(Cr,ah),e(Sa,nh),e(ie,sh),e(ie,La),e(La,rh),e(La,Oa),e(Oa,ih),e(La,lh),b(o,Xd,_),b(o,ke,_),e(ke,dh),e(ke,Ia),e(Ia,ch),e(ke,ph),e(ke,Na),e(Na,hh),e(ke,mh),e(ke,Wa),e(Wa,uh),e(ke,fh),b(o,Ud,_),b(o,Ke,_),e(Ke,gh),e(Ke,Ba),e(Ba,_h),e(Ke,vh),e(Ke,Ha),e(Ha,bh),e(Ke,Th),b(o,Jd,_),b(o,pt,_),e(pt,no),e(no,Wi),k(Ra,Wi,null),e(pt,wh),e(pt,Bi),e(Bi,kh),b(o,Kd,_),b(o,fe,_),k(Qa,fe,null),e(fe,$h),e(fe,Re),e(Re,yh),e(Re,Ar),e(Ar,Vh),e(Re,xh),e(Re,Mr),e(Mr,Dh),e(Re,Fh),e(Re,Ga),e(Ga,Ch),e(Re,Ah),e(fe,Mh),e(fe,ht),e(ht,jh),e(ht,jr),e(jr,Eh),e(ht,qh),e(ht,Er),e(Er,zh),e(ht,Ph),e(fe,Sh),k(so,fe,null),b(o,Yd,_),b(o,mt,_),e(mt,ro),e(ro,Hi),k(Xa,Hi,null),e(mt,Lh),e(mt,Ri),e(Ri,Oh),b(o,Zd,_),b(o,ge,_),k(Ua,ge,null),e(ge,Ih),e(ge,ut),e(ut,Nh),e(ut,qr),e(qr,Wh),e(ut,Bh),e(ut,Ja),e(Ja,Hh),e(ut,Rh),e(ge,Qh),e(ge,ft),e(ft,Gh),e(ft,zr),e(zr,Xh),e(ft,Uh),e(ft,Pr),e(Pr,Jh),e(ft,Kh),e(ge,Yh),k(io,ge,null),b(o,ec,_),b(o,gt,_),e(gt,lo),e(lo,Qi),k(Ka,Qi,null),e(gt,Zh),e(gt,Gi),e(Gi,em),b(o,tc,_),b(o,Qe,_),k(Ya,Qe,null),e(Qe,tm),e(Qe,_t),e(_t,om),e(_t,Sr),e(Sr,am),e(_t,nm),e(_t,Za),e(Za,sm),e(_t,rm),e(Qe,im),k(co,Qe,null),b(o,oc,_),b(o,vt,_),e(vt,po),e(po,Xi),k(en,Xi,null),e(vt,lm),e(vt,Ui),e(Ui,dm),b(o,ac,_),b(o,te,_),k(tn,te,null),e(te,cm),e(te,on),e(on,pm),e(on,an),e(an,hm),e(on,mm),e(te,um),e(te,nn),e(nn,fm),e(nn,Lr),e(Lr,gm),e(nn,_m),e(te,vm),e(te,sn),e(sn,bm),e(sn,rn),e(rn,Tm),e(sn,wm),e(te,km),e(te,$e),k(ln,$e,null),e($e,$m),e($e,bt),e(bt,ym),e(bt,Or),e(Or,Vm),e(bt,xm),e(bt,Ji),e(Ji,Dm),e(bt,Fm),e($e,Cm),k(ho,$e,null),e($e,Am),k(mo,$e,null),b(o,nc,_),b(o,Tt,_),e(Tt,uo),e(uo,Ki),k(dn,Ki,null),e(Tt,Mm),e(Tt,Yi),e(Yi,jm),b(o,sc,_),b(o,B,_),k(cn,B,null),e(B,Em),e(B,Zi),e(Zi,qm),e(B,zm),e(B,pn),e(pn,Pm),e(pn,hn),e(hn,Sm),e(pn,Lm),e(B,Om),e(B,mn),e(mn,Im),e(mn,Ir),e(Ir,Nm),e(mn,Wm),e(B,Bm),e(B,un),e(un,Hm),e(un,fn),e(fn,Rm),e(un,Qm),e(B,Gm),e(B,ye),k(gn,ye,null),e(ye,Xm),e(ye,wt),e(wt,Um),e(wt,Nr),e(Nr,Jm),e(wt,Km),e(wt,el),e(el,Ym),e(wt,Zm),e(ye,eu),k(fo,ye,null),e(ye,tu),k(go,ye,null),b(o,rc,_),b(o,kt,_),e(kt,_o),e(_o,tl),k(_n,tl,null),e(kt,ou),e(kt,ol),e(ol,au),b(o,ic,_),b(o,oe,_),k(vn,oe,null),e(oe,nu),e(oe,$t),e($t,su),e($t,al),e(al,ru),e($t,iu),e($t,bn),e(bn,lu),e($t,du),e(oe,cu),e(oe,Tn),e(Tn,pu),e(Tn,Wr),e(Wr,hu),e(Tn,mu),e(oe,uu),e(oe,wn),e(wn,fu),e(wn,kn),e(kn,gu),e(wn,_u),e(oe,vu),e(oe,le),k($n,le,null),e(le,bu),e(le,yt),e(yt,Tu),e(yt,Br),e(Br,wu),e(yt,ku),e(yt,nl),e(nl,$u),e(yt,yu),e(le,Vu),k(vo,le,null),e(le,xu),k(bo,le,null),e(le,Du),k(To,le,null),b(o,lc,_),b(o,Vt,_),e(Vt,wo),e(wo,sl),k(yn,sl,null),e(Vt,Fu),e(Vt,rl),e(rl,Cu),b(o,dc,_),b(o,H,_),k(Vn,H,null),e(H,Au),e(H,il),e(il,Mu),e(H,ju),e(H,xn),e(xn,Eu),e(xn,Dn),e(Dn,qu),e(xn,zu),e(H,Pu),e(H,Fn),e(Fn,Su),e(Fn,Hr),e(Hr,Lu),e(Fn,Ou),e(H,Iu),e(H,Cn),e(Cn,Nu),e(Cn,An),e(An,Wu),e(Cn,Bu),e(H,Hu),e(H,de),k(Mn,de,null),e(de,Ru),e(de,xt),e(xt,Qu),e(xt,Rr),e(Rr,Gu),e(xt,Xu),e(xt,ll),e(ll,Uu),e(xt,Ju),e(de,Ku),k(ko,de,null),e(de,Yu),k($o,de,null),e(de,Zu),k(yo,de,null),b(o,cc,_),b(o,Dt,_),e(Dt,Vo),e(Vo,dl),k(jn,dl,null),e(Dt,ef),e(Dt,cl),e(cl,tf),b(o,pc,_),b(o,R,_),k(En,R,null),e(R,of),e(R,pl),e(pl,af),e(R,nf),e(R,qn),e(qn,sf),e(qn,zn),e(zn,rf),e(qn,lf),e(R,df),e(R,Pn),e(Pn,cf),e(Pn,Qr),e(Qr,pf),e(Pn,hf),e(R,mf),e(R,Sn),e(Sn,uf),e(Sn,Ln),e(Ln,ff),e(Sn,gf),e(R,_f),e(R,Ve),k(On,Ve,null),e(Ve,vf),e(Ve,Ft),e(Ft,bf),e(Ft,Gr),e(Gr,Tf),e(Ft,wf),e(Ft,hl),e(hl,kf),e(Ft,$f),e(Ve,yf),k(xo,Ve,null),e(Ve,Vf),k(Do,Ve,null),b(o,hc,_),b(o,Ct,_),e(Ct,Fo),e(Fo,ml),k(In,ml,null),e(Ct,xf),e(Ct,ul),e(ul,Df),b(o,mc,_),b(o,P,_),k(Nn,P,null),e(P,Ff),e(P,Wn),e(Wn,Cf),e(Wn,Bn),e(Bn,Af),e(Wn,Mf),e(P,jf),e(P,Hn),e(Hn,Ef),e(Hn,Xr),e(Xr,qf),e(Hn,zf),e(P,Pf),e(P,Rn),e(Rn,Sf),e(Rn,Qn),e(Qn,Lf),e(Rn,Of),e(P,If),e(P,Gn),e(Gn,Nf),e(Gn,fl),e(fl,Wf),e(Gn,Bf),e(P,Hf),e(P,Q),e(Q,Rf),e(Q,gl),e(gl,Qf),e(Q,Gf),e(Q,_l),e(_l,Xf),e(Q,Uf),e(Q,vl),e(vl,Jf),e(Q,Kf),e(Q,bl),e(bl,Yf),e(Q,Zf),e(Q,Tl),e(Tl,eg),e(Q,tg),e(Q,wl),e(wl,og),e(Q,ag),e(P,ng),e(P,Co),e(Co,sg),e(Co,kl),e(kl,rg),e(Co,ig),e(Co,Xn),e(Xn,lg),e(P,dg),e(P,xe),k(Un,xe,null),e(xe,cg),e(xe,At),e(At,pg),e(At,Ur),e(Ur,hg),e(At,mg),e(At,$l),e($l,ug),e(At,fg),e(xe,gg),k(Ao,xe,null),e(xe,_g),k(Mo,xe,null),b(o,uc,_),b(o,Mt,_),e(Mt,jo),e(jo,yl),k(Jn,yl,null),e(Mt,vg),e(Mt,Vl),e(Vl,bg),b(o,fc,_),b(o,ae,_),k(Kn,ae,null),e(ae,Tg),e(ae,jt),e(jt,wg),e(jt,xl),e(xl,kg),e(jt,$g),e(jt,Yn),e(Yn,yg),e(jt,Vg),e(ae,xg),e(ae,Zn),e(Zn,Dg),e(Zn,Jr),e(Jr,Fg),e(Zn,Cg),e(ae,Ag),e(ae,es),e(es,Mg),e(es,ts),e(ts,jg),e(es,Eg),e(ae,qg),e(ae,De),k(os,De,null),e(De,zg),e(De,Et),e(Et,Pg),e(Et,Kr),e(Kr,Sg),e(Et,Lg),e(Et,Dl),e(Dl,Og),e(Et,Ig),e(De,Ng),k(Eo,De,null),e(De,Wg),k(qo,De,null),b(o,gc,_),b(o,qt,_),e(qt,zo),e(zo,Fl),k(as,Fl,null),e(qt,Bg),e(qt,Cl),e(Cl,Hg),b(o,_c,_),b(o,ne,_),k(ns,ne,null),e(ne,Rg),e(ne,zt),e(zt,Qg),e(zt,Al),e(Al,Gg),e(zt,Xg),e(zt,ss),e(ss,Ug),e(zt,Jg),e(ne,Kg),e(ne,rs),e(rs,Yg),e(rs,Yr),e(Yr,Zg),e(rs,e_),e(ne,t_),e(ne,is),e(is,o_),e(is,ls),e(ls,a_),e(is,n_),e(ne,s_),e(ne,ce),k(ds,ce,null),e(ce,r_),e(ce,Pt),e(Pt,i_),e(Pt,Zr),e(Zr,l_),e(Pt,d_),e(Pt,Ml),e(Ml,c_),e(Pt,p_),e(ce,h_),k(Po,ce,null),e(ce,m_),k(So,ce,null),e(ce,u_),k(Lo,ce,null),b(o,vc,_),b(o,St,_),e(St,Oo),e(Oo,jl),k(cs,jl,null),e(St,f_),e(St,El),e(El,g_),b(o,bc,_),b(o,G,_),k(ps,G,null),e(G,__),e(G,ql),e(ql,v_),e(G,b_),e(G,hs),e(hs,T_),e(hs,ms),e(ms,w_),e(hs,k_),e(G,$_),e(G,us),e(us,y_),e(us,ei),e(ei,V_),e(us,x_),e(G,D_),e(G,fs),e(fs,F_),e(fs,gs),e(gs,C_),e(fs,A_),e(G,M_),e(G,O),k(_s,O,null),e(O,j_),e(O,Lt),e(Lt,E_),e(Lt,ti),e(ti,q_),e(Lt,z_),e(Lt,zl),e(zl,P_),e(Lt,S_),e(O,L_),k(Io,O,null),e(O,O_),k(No,O,null),e(O,I_),k(Wo,O,null),e(O,N_),k(Bo,O,null),e(O,W_),k(Ho,O,null),b(o,Tc,_),b(o,Ot,_),e(Ot,Ro),e(Ro,Pl),k(vs,Pl,null),e(Ot,B_),e(Ot,Sl),e(Sl,H_),b(o,wc,_),b(o,X,_),k(bs,X,null),e(X,R_),e(X,Ll),e(Ll,Q_),e(X,G_),e(X,Ts),e(Ts,X_),e(Ts,ws),e(ws,U_),e(Ts,J_),e(X,K_),e(X,ks),e(ks,Y_),e(ks,oi),e(oi,Z_),e(ks,e2),e(X,t2),e(X,$s),e($s,o2),e($s,ys),e(ys,a2),e($s,n2),e(X,s2),e(X,Fe),k(Vs,Fe,null),e(Fe,r2),e(Fe,It),e(It,i2),e(It,ai),e(ai,l2),e(It,d2),e(It,Ol),e(Ol,c2),e(It,p2),e(Fe,h2),k(Qo,Fe,null),e(Fe,m2),k(Go,Fe,null),b(o,kc,_),b(o,Nt,_),e(Nt,Xo),e(Xo,Il),k(xs,Il,null),e(Nt,u2),e(Nt,Nl),e(Nl,f2),b(o,$c,_),b(o,U,_),k(Ds,U,null),e(U,g2),e(U,Wl),e(Wl,_2),e(U,v2),e(U,Fs),e(Fs,b2),e(Fs,Cs),e(Cs,T2),e(Fs,w2),e(U,k2),e(U,As),e(As,$2),e(As,ni),e(ni,y2),e(As,V2),e(U,x2),e(U,Ms),e(Ms,D2),e(Ms,js),e(js,F2),e(Ms,C2),e(U,A2),e(U,pe),k(Es,pe,null),e(pe,M2),e(pe,Wt),e(Wt,j2),e(Wt,si),e(si,E2),e(Wt,q2),e(Wt,Bl),e(Bl,z2),e(Wt,P2),e(pe,S2),k(Uo,pe,null),e(pe,L2),k(Jo,pe,null),e(pe,O2),k(Ko,pe,null),b(o,yc,_),b(o,Bt,_),e(Bt,Yo),e(Yo,Hl),k(qs,Hl,null),e(Bt,I2),e(Bt,Rl),e(Rl,N2),b(o,Vc,_),b(o,J,_),k(zs,J,null),e(J,W2),e(J,Ht),e(Ht,B2),e(Ht,Ql),e(Ql,H2),e(Ht,R2),e(Ht,Gl),e(Gl,Q2),e(Ht,G2),e(J,X2),e(J,Ps),e(Ps,U2),e(Ps,Ss),e(Ss,J2),e(Ps,K2),e(J,Y2),e(J,Ls),e(Ls,Z2),e(Ls,ri),e(ri,ev),e(Ls,tv),e(J,ov),e(J,Os),e(Os,av),e(Os,Is),e(Is,nv),e(Os,sv),e(J,rv),e(J,he),k(Ns,he,null),e(he,iv),e(he,Rt),e(Rt,lv),e(Rt,ii),e(ii,dv),e(Rt,cv),e(Rt,Xl),e(Xl,pv),e(Rt,hv),e(he,mv),k(Zo,he,null),e(he,uv),k(ea,he,null),e(he,fv),k(ta,he,null),b(o,xc,_),b(o,Qt,_),e(Qt,oa),e(oa,Ul),k(Ws,Ul,null),e(Qt,gv),e(Qt,Jl),e(Jl,_v),b(o,Dc,_),b(o,Ge,_),k(Bs,Ge,null),e(Ge,vv),e(Ge,Hs),e(Hs,bv),e(Hs,Rs),e(Rs,Tv),e(Hs,wv),e(Ge,kv),e(Ge,Ce),k(Qs,Ce,null),e(Ce,$v),e(Ce,Gt),e(Gt,yv),e(Gt,li),e(li,Vv),e(Gt,xv),e(Gt,Kl),e(Kl,Dv),e(Gt,Fv),e(Ce,Cv),k(aa,Ce,null),e(Ce,Av),k(na,Ce,null),b(o,Fc,_),b(o,Xt,_),e(Xt,sa),e(sa,Yl),k(Gs,Yl,null),e(Xt,Mv),e(Xt,Zl),e(Zl,jv),b(o,Cc,_),b(o,_e,_),k(Xs,_e,null),e(_e,Ev),e(_e,ed),e(ed,qv),e(_e,zv),e(_e,Us),e(Us,Pv),e(Us,Js),e(Js,Sv),e(Us,Lv),e(_e,Ov),e(_e,Ae),k(Ks,Ae,null),e(Ae,Iv),e(Ae,Ut),e(Ut,Nv),e(Ut,di),e(di,Wv),e(Ut,Bv),e(Ut,td),e(td,Hv),e(Ut,Rv),e(Ae,Qv),k(ra,Ae,null),e(Ae,Gv),k(ia,Ae,null),b(o,Ac,_),b(o,Jt,_),e(Jt,la),e(la,od),k(Ys,od,null),e(Jt,Xv),e(Jt,ad),e(ad,Uv),b(o,Mc,_),b(o,ve,_),k(Zs,ve,null),e(ve,Jv),e(ve,nd),e(nd,Kv),e(ve,Yv),e(ve,er),e(er,Zv),e(er,tr),e(tr,eb),e(er,tb),e(ve,ob),e(ve,Me),k(or,Me,null),e(Me,ab),e(Me,Kt),e(Kt,nb),e(Kt,ci),e(ci,sb),e(Kt,rb),e(Kt,sd),e(sd,ib),e(Kt,lb),e(Me,db),k(da,Me,null),e(Me,cb),k(ca,Me,null),b(o,jc,_),b(o,Yt,_),e(Yt,pa),e(pa,rd),k(ar,rd,null),e(Yt,pb),e(Yt,id),e(id,hb),b(o,Ec,_),b(o,se,_),k(nr,se,null),e(se,mb),e(se,sr),e(sr,ub),e(sr,pi),e(pi,fb),e(sr,gb),e(se,_b),e(se,rr),e(rr,vb),e(rr,ir),e(ir,bb),e(rr,Tb),e(se,wb),k(ha,se,null),e(se,kb),e(se,je),k(lr,je,null),e(je,$b),e(je,Zt),e(Zt,yb),e(Zt,hi),e(hi,Vb),e(Zt,xb),e(Zt,ld),e(ld,Db),e(Zt,Fb),e(je,Cb),k(ma,je,null),e(je,Ab),k(ua,je,null),b(o,qc,_),b(o,eo,_),e(eo,fa),e(fa,dd),k(dr,dd,null),e(eo,Mb),e(eo,cd),e(cd,jb),b(o,zc,_),b(o,K,_),k(cr,K,null),e(K,Eb),e(K,pd),e(pd,qb),e(K,zb),e(K,pr),e(pr,Pb),e(pr,mi),e(mi,Sb),e(pr,Lb),e(K,Ob),e(K,hr),e(hr,Ib),e(hr,mr),e(mr,Nb),e(hr,Wb),e(K,Bb),k(ga,K,null),e(K,Hb),e(K,Ee),k(ur,Ee,null),e(Ee,Rb),e(Ee,to),e(to,Qb),e(to,ui),e(ui,Gb),e(to,Xb),e(to,hd),e(hd,Ub),e(to,Jb),e(Ee,Kb),k(_a,Ee,null),e(Ee,Yb),k(va,Ee,null),Pc=!0},p(o,[_]){const fr={};_&2&&(fr.$$scope={dirty:_,ctx:o}),so.$set(fr);const md={};_&2&&(md.$$scope={dirty:_,ctx:o}),io.$set(md);const ud={};_&2&&(ud.$$scope={dirty:_,ctx:o}),co.$set(ud);const fd={};_&2&&(fd.$$scope={dirty:_,ctx:o}),ho.$set(fd);const gr={};_&2&&(gr.$$scope={dirty:_,ctx:o}),mo.$set(gr);const gd={};_&2&&(gd.$$scope={dirty:_,ctx:o}),fo.$set(gd);const _d={};_&2&&(_d.$$scope={dirty:_,ctx:o}),go.$set(_d);const vd={};_&2&&(vd.$$scope={dirty:_,ctx:o}),vo.$set(vd);const _r={};_&2&&(_r.$$scope={dirty:_,ctx:o}),bo.$set(_r);const bd={};_&2&&(bd.$$scope={dirty:_,ctx:o}),To.$set(bd);const Td={};_&2&&(Td.$$scope={dirty:_,ctx:o}),ko.$set(Td);const wd={};_&2&&(wd.$$scope={dirty:_,ctx:o}),$o.$set(wd);const vr={};_&2&&(vr.$$scope={dirty:_,ctx:o}),yo.$set(vr);const kd={};_&2&&(kd.$$scope={dirty:_,ctx:o}),xo.$set(kd);const $d={};_&2&&($d.$$scope={dirty:_,ctx:o}),Do.$set($d);const be={};_&2&&(be.$$scope={dirty:_,ctx:o}),Ao.$set(be);const yd={};_&2&&(yd.$$scope={dirty:_,ctx:o}),Mo.$set(yd);const br={};_&2&&(br.$$scope={dirty:_,ctx:o}),Eo.$set(br);const Vd={};_&2&&(Vd.$$scope={dirty:_,ctx:o}),qo.$set(Vd);const Tr={};_&2&&(Tr.$$scope={dirty:_,ctx:o}),Po.$set(Tr);const xd={};_&2&&(xd.$$scope={dirty:_,ctx:o}),So.$set(xd);const wr={};_&2&&(wr.$$scope={dirty:_,ctx:o}),Lo.$set(wr);const Dd={};_&2&&(Dd.$$scope={dirty:_,ctx:o}),Io.$set(Dd);const kr={};_&2&&(kr.$$scope={dirty:_,ctx:o}),No.$set(kr);const Fd={};_&2&&(Fd.$$scope={dirty:_,ctx:o}),Wo.$set(Fd);const Xe={};_&2&&(Xe.$$scope={dirty:_,ctx:o}),Bo.$set(Xe);const Cd={};_&2&&(Cd.$$scope={dirty:_,ctx:o}),Ho.$set(Cd);const Ad={};_&2&&(Ad.$$scope={dirty:_,ctx:o}),Qo.$set(Ad);const Md={};_&2&&(Md.$$scope={dirty:_,ctx:o}),Go.$set(Md);const oo={};_&2&&(oo.$$scope={dirty:_,ctx:o}),Uo.$set(oo);const jd={};_&2&&(jd.$$scope={dirty:_,ctx:o}),Jo.$set(jd);const Ed={};_&2&&(Ed.$$scope={dirty:_,ctx:o}),Ko.$set(Ed);const $r={};_&2&&($r.$$scope={dirty:_,ctx:o}),Zo.$set($r);const qd={};_&2&&(qd.$$scope={dirty:_,ctx:o}),ea.$set(qd);const zd={};_&2&&(zd.$$scope={dirty:_,ctx:o}),ta.$set(zd);const Pd={};_&2&&(Pd.$$scope={dirty:_,ctx:o}),aa.$set(Pd);const Ue={};_&2&&(Ue.$$scope={dirty:_,ctx:o}),na.$set(Ue);const Je={};_&2&&(Je.$$scope={dirty:_,ctx:o}),ra.$set(Je);const Sd={};_&2&&(Sd.$$scope={dirty:_,ctx:o}),ia.$set(Sd);const Ld={};_&2&&(Ld.$$scope={dirty:_,ctx:o}),da.$set(Ld);const Od={};_&2&&(Od.$$scope={dirty:_,ctx:o}),ca.$set(Od);const ao={};_&2&&(ao.$$scope={dirty:_,ctx:o}),ha.$set(ao);const Id={};_&2&&(Id.$$scope={dirty:_,ctx:o}),ma.$set(Id);const Nd={};_&2&&(Nd.$$scope={dirty:_,ctx:o}),ua.$set(Nd);const yr={};_&2&&(yr.$$scope={dirty:_,ctx:o}),ga.$set(yr);const Wd={};_&2&&(Wd.$$scope={dirty:_,ctx:o}),_a.$set(Wd);const Bd={};_&2&&(Bd.$$scope={dirty:_,ctx:o}),va.$set(Bd)},i(o){Pc||($(a.$$.fragment,o),$(ee.$$.fragment,o),$(Ra.$$.fragment,o),$(Qa.$$.fragment,o),$(so.$$.fragment,o),$(Xa.$$.fragment,o),$(Ua.$$.fragment,o),$(io.$$.fragment,o),$(Ka.$$.fragment,o),$(Ya.$$.fragment,o),$(co.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(ln.$$.fragment,o),$(ho.$$.fragment,o),$(mo.$$.fragment,o),$(dn.$$.fragment,o),$(cn.$$.fragment,o),$(gn.$$.fragment,o),$(fo.$$.fragment,o),$(go.$$.fragment,o),$(_n.$$.fragment,o),$(vn.$$.fragment,o),$($n.$$.fragment,o),$(vo.$$.fragment,o),$(bo.$$.fragment,o),$(To.$$.fragment,o),$(yn.$$.fragment,o),$(Vn.$$.fragment,o),$(Mn.$$.fragment,o),$(ko.$$.fragment,o),$($o.$$.fragment,o),$(yo.$$.fragment,o),$(jn.$$.fragment,o),$(En.$$.fragment,o),$(On.$$.fragment,o),$(xo.$$.fragment,o),$(Do.$$.fragment,o),$(In.$$.fragment,o),$(Nn.$$.fragment,o),$(Un.$$.fragment,o),$(Ao.$$.fragment,o),$(Mo.$$.fragment,o),$(Jn.$$.fragment,o),$(Kn.$$.fragment,o),$(os.$$.fragment,o),$(Eo.$$.fragment,o),$(qo.$$.fragment,o),$(as.$$.fragment,o),$(ns.$$.fragment,o),$(ds.$$.fragment,o),$(Po.$$.fragment,o),$(So.$$.fragment,o),$(Lo.$$.fragment,o),$(cs.$$.fragment,o),$(ps.$$.fragment,o),$(_s.$$.fragment,o),$(Io.$$.fragment,o),$(No.$$.fragment,o),$(Wo.$$.fragment,o),$(Bo.$$.fragment,o),$(Ho.$$.fragment,o),$(vs.$$.fragment,o),$(bs.$$.fragment,o),$(Vs.$$.fragment,o),$(Qo.$$.fragment,o),$(Go.$$.fragment,o),$(xs.$$.fragment,o),$(Ds.$$.fragment,o),$(Es.$$.fragment,o),$(Uo.$$.fragment,o),$(Jo.$$.fragment,o),$(Ko.$$.fragment,o),$(qs.$$.fragment,o),$(zs.$$.fragment,o),$(Ns.$$.fragment,o),$(Zo.$$.fragment,o),$(ea.$$.fragment,o),$(ta.$$.fragment,o),$(Ws.$$.fragment,o),$(Bs.$$.fragment,o),$(Qs.$$.fragment,o),$(aa.$$.fragment,o),$(na.$$.fragment,o),$(Gs.$$.fragment,o),$(Xs.$$.fragment,o),$(Ks.$$.fragment,o),$(ra.$$.fragment,o),$(ia.$$.fragment,o),$(Ys.$$.fragment,o),$(Zs.$$.fragment,o),$(or.$$.fragment,o),$(da.$$.fragment,o),$(ca.$$.fragment,o),$(ar.$$.fragment,o),$(nr.$$.fragment,o),$(ha.$$.fragment,o),$(lr.$$.fragment,o),$(ma.$$.fragment,o),$(ua.$$.fragment,o),$(dr.$$.fragment,o),$(cr.$$.fragment,o),$(ga.$$.fragment,o),$(ur.$$.fragment,o),$(_a.$$.fragment,o),$(va.$$.fragment,o),Pc=!0)},o(o){y(a.$$.fragment,o),y(ee.$$.fragment,o),y(Ra.$$.fragment,o),y(Qa.$$.fragment,o),y(so.$$.fragment,o),y(Xa.$$.fragment,o),y(Ua.$$.fragment,o),y(io.$$.fragment,o),y(Ka.$$.fragment,o),y(Ya.$$.fragment,o),y(co.$$.fragment,o),y(en.$$.fragment,o),y(tn.$$.fragment,o),y(ln.$$.fragment,o),y(ho.$$.fragment,o),y(mo.$$.fragment,o),y(dn.$$.fragment,o),y(cn.$$.fragment,o),y(gn.$$.fragment,o),y(fo.$$.fragment,o),y(go.$$.fragment,o),y(_n.$$.fragment,o),y(vn.$$.fragment,o),y($n.$$.fragment,o),y(vo.$$.fragment,o),y(bo.$$.fragment,o),y(To.$$.fragment,o),y(yn.$$.fragment,o),y(Vn.$$.fragment,o),y(Mn.$$.fragment,o),y(ko.$$.fragment,o),y($o.$$.fragment,o),y(yo.$$.fragment,o),y(jn.$$.fragment,o),y(En.$$.fragment,o),y(On.$$.fragment,o),y(xo.$$.fragment,o),y(Do.$$.fragment,o),y(In.$$.fragment,o),y(Nn.$$.fragment,o),y(Un.$$.fragment,o),y(Ao.$$.fragment,o),y(Mo.$$.fragment,o),y(Jn.$$.fragment,o),y(Kn.$$.fragment,o),y(os.$$.fragment,o),y(Eo.$$.fragment,o),y(qo.$$.fragment,o),y(as.$$.fragment,o),y(ns.$$.fragment,o),y(ds.$$.fragment,o),y(Po.$$.fragment,o),y(So.$$.fragment,o),y(Lo.$$.fragment,o),y(cs.$$.fragment,o),y(ps.$$.fragment,o),y(_s.$$.fragment,o),y(Io.$$.fragment,o),y(No.$$.fragment,o),y(Wo.$$.fragment,o),y(Bo.$$.fragment,o),y(Ho.$$.fragment,o),y(vs.$$.fragment,o),y(bs.$$.fragment,o),y(Vs.$$.fragment,o),y(Qo.$$.fragment,o),y(Go.$$.fragment,o),y(xs.$$.fragment,o),y(Ds.$$.fragment,o),y(Es.$$.fragment,o),y(Uo.$$.fragment,o),y(Jo.$$.fragment,o),y(Ko.$$.fragment,o),y(qs.$$.fragment,o),y(zs.$$.fragment,o),y(Ns.$$.fragment,o),y(Zo.$$.fragment,o),y(ea.$$.fragment,o),y(ta.$$.fragment,o),y(Ws.$$.fragment,o),y(Bs.$$.fragment,o),y(Qs.$$.fragment,o),y(aa.$$.fragment,o),y(na.$$.fragment,o),y(Gs.$$.fragment,o),y(Xs.$$.fragment,o),y(Ks.$$.fragment,o),y(ra.$$.fragment,o),y(ia.$$.fragment,o),y(Ys.$$.fragment,o),y(Zs.$$.fragment,o),y(or.$$.fragment,o),y(da.$$.fragment,o),y(ca.$$.fragment,o),y(ar.$$.fragment,o),y(nr.$$.fragment,o),y(ha.$$.fragment,o),y(lr.$$.fragment,o),y(ma.$$.fragment,o),y(ua.$$.fragment,o),y(dr.$$.fragment,o),y(cr.$$.fragment,o),y(ga.$$.fragment,o),y(ur.$$.fragment,o),y(_a.$$.fragment,o),y(va.$$.fragment,o),Pc=!1},d(o){t(d),o&&t(g),o&&t(c),V(a),o&&t(re),o&&t(A),V(ee),o&&t(Te),o&&t(F),o&&t(L),o&&t(we),o&&t(Rd),o&&t(Vr),o&&t(Qd),o&&t(xr),o&&t(Gd),o&&t(ie),o&&t(Xd),o&&t(ke),o&&t(Ud),o&&t(Ke),o&&t(Jd),o&&t(pt),V(Ra),o&&t(Kd),o&&t(fe),V(Qa),V(so),o&&t(Yd),o&&t(mt),V(Xa),o&&t(Zd),o&&t(ge),V(Ua),V(io),o&&t(ec),o&&t(gt),V(Ka),o&&t(tc),o&&t(Qe),V(Ya),V(co),o&&t(oc),o&&t(vt),V(en),o&&t(ac),o&&t(te),V(tn),V(ln),V(ho),V(mo),o&&t(nc),o&&t(Tt),V(dn),o&&t(sc),o&&t(B),V(cn),V(gn),V(fo),V(go),o&&t(rc),o&&t(kt),V(_n),o&&t(ic),o&&t(oe),V(vn),V($n),V(vo),V(bo),V(To),o&&t(lc),o&&t(Vt),V(yn),o&&t(dc),o&&t(H),V(Vn),V(Mn),V(ko),V($o),V(yo),o&&t(cc),o&&t(Dt),V(jn),o&&t(pc),o&&t(R),V(En),V(On),V(xo),V(Do),o&&t(hc),o&&t(Ct),V(In),o&&t(mc),o&&t(P),V(Nn),V(Un),V(Ao),V(Mo),o&&t(uc),o&&t(Mt),V(Jn),o&&t(fc),o&&t(ae),V(Kn),V(os),V(Eo),V(qo),o&&t(gc),o&&t(qt),V(as),o&&t(_c),o&&t(ne),V(ns),V(ds),V(Po),V(So),V(Lo),o&&t(vc),o&&t(St),V(cs),o&&t(bc),o&&t(G),V(ps),V(_s),V(Io),V(No),V(Wo),V(Bo),V(Ho),o&&t(Tc),o&&t(Ot),V(vs),o&&t(wc),o&&t(X),V(bs),V(Vs),V(Qo),V(Go),o&&t(kc),o&&t(Nt),V(xs),o&&t($c),o&&t(U),V(Ds),V(Es),V(Uo),V(Jo),V(Ko),o&&t(yc),o&&t(Bt),V(qs),o&&t(Vc),o&&t(J),V(zs),V(Ns),V(Zo),V(ea),V(ta),o&&t(xc),o&&t(Qt),V(Ws),o&&t(Dc),o&&t(Ge),V(Bs),V(Qs),V(aa),V(na),o&&t(Fc),o&&t(Xt),V(Gs),o&&t(Cc),o&&t(_e),V(Xs),V(Ks),V(ra),V(ia),o&&t(Ac),o&&t(Jt),V(Ys),o&&t(Mc),o&&t(ve),V(Zs),V(or),V(da),V(ca),o&&t(jc),o&&t(Yt),V(ar),o&&t(Ec),o&&t(se),V(nr),V(ha),V(lr),V(ma),V(ua),o&&t(qc),o&&t(eo),V(dr),o&&t(zc),o&&t(K),V(cr),V(ga),V(ur),V(_a),V(va)}}}const Kk={local:"data2vec",sections:[{local:"overview",title:"Overview"},{local:"transformers.Data2VecTextConfig",title:"Data2VecTextConfig"},{local:"transformers.Data2VecAudioConfig",title:"Data2VecAudioConfig"},{local:"transformers.Data2VecVisionConfig",title:"Data2VecVisionConfig"},{local:"transformers.Data2VecAudioModel",title:"Data2VecAudioModel"},{local:"transformers.Data2VecAudioForAudioFrameClassification",title:"Data2VecAudioForAudioFrameClassification"},{local:"transformers.Data2VecAudioForCTC",title:"Data2VecAudioForCTC"},{local:"transformers.Data2VecAudioForSequenceClassification",title:"Data2VecAudioForSequenceClassification"},{local:"transformers.Data2VecAudioForXVector",title:"Data2VecAudioForXVector"},{local:"transformers.Data2VecTextModel",title:"Data2VecTextModel"},{local:"transformers.Data2VecTextForCausalLM",title:"Data2VecTextForCausalLM"},{local:"transformers.Data2VecTextForMaskedLM",title:"Data2VecTextForMaskedLM"},{local:"transformers.Data2VecTextForSequenceClassification",title:"Data2VecTextForSequenceClassification"},{local:"transformers.Data2VecTextForMultipleChoice",title:"Data2VecTextForMultipleChoice"},{local:"transformers.Data2VecTextForTokenClassification",title:"Data2VecTextForTokenClassification"},{local:"transformers.Data2VecTextForQuestionAnswering",title:"Data2VecTextForQuestionAnswering"},{local:"transformers.Data2VecVisionModel",title:"Data2VecVisionModel"},{local:"transformers.Data2VecVisionForImageClassification",title:"Data2VecVisionForImageClassification"},{local:"transformers.Data2VecVisionForSemanticSegmentation",title:"Data2VecVisionForSemanticSegmentation"},{local:"transformers.TFData2VecVisionModel",title:"TFData2VecVisionModel"},{local:"transformers.TFData2VecVisionForImageClassification",title:"TFData2VecVisionForImageClassification"}],title:"Data2Vec"};function Yk(x){return ok(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class s$ extends Yw{constructor(d){super();Zw(this,d,Yk,Jk,ek,{})}}export{s$ as default,Kk as metadata};
