import{S as pV,i as hV,s as uV,e as s,k as h,w,t as a,M as mV,c as r,d as t,m as u,a as i,x as T,h as n,b as p,G as e,g as _,y as k,q as y,o as $,B as V,v as fV,L as Z}from"../../chunks/vendor-hf-doc-builder.js";import{T as ie}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ee}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as U}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Y}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as gV}from"../../chunks/PipelineTag-hf-doc-builder.js";function _V(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import Data2VecTextConfig, Data2VecTextModel

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

# Initializing a model (with random weights) 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> Data2VecTextConfig, Data2VecTextModel

<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 (with random weights) 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=s("p"),b=a("Examples:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function vV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import Data2VecAudioConfig, Data2VecAudioModel

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

# Initializing a model (with random weights) 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> Data2VecAudioConfig, Data2VecAudioModel

<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 (with random weights) 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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function bV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import Data2VecVisionConfig, Data2VecVisionModel

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

# Initializing a model (with random weights) 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> Data2VecVisionConfig, Data2VecVisionModel

<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 (with random weights) 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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function wV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function TV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoProcessor, 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 = AutoProcessor.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> AutoProcessor, 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 = AutoProcessor.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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function kV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function yV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoFeatureExtractor, 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 = AutoFeatureExtractor.from_pretrained("facebook/data2vec-audio-base-960h")
model = Data2VecAudioForAudioFrameClassification.from_pretrained("facebook/data2vec-audio-base-960h")

# 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()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, 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 = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForAudioFrameClassification.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 = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, sampling_rate=sampling_rate)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

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

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

# compute loss
loss = model(**inputs).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, 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 = AutoProcessor.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>

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">66.95</span>`}}),{c(){d=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function xV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function DV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoFeatureExtractor, 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 = AutoFeatureExtractor.from_pretrained("facebook/data2vec-audio-base-960h")
model = Data2VecAudioForSequenceClassification.from_pretrained("facebook/data2vec-audio-base-960h")

# 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]

# 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`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, 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 = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForSequenceClassification.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 = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

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

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

# 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!")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, 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 = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-audio-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioForXVector.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 = feature_extractor(
<span class="hljs-meta">... </span>    [d[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> dataset[:<span class="hljs-number">2</span>][<span class="hljs-string">&quot;audio&quot;</span>]], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    embeddings = model(**inputs).embeddings

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

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

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

tokenizer = AutoTokenizer.from_pretrained("facebook/data2vec-text-base")
config = Data2VecTextConfig.from_pretrained("facebook/data2vec-text-base")
config.is_decoder = True
model = Data2VecTextForCausalLM.from_pretrained("facebook/data2vec-text-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> AutoTokenizer, 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 = AutoTokenizer.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;facebook/data2vec-text-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;facebook/data2vec-text-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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function qV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function PV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoTokenizer, Data2VecTextForMaskedLM
import torch

tokenizer = AutoTokenizer.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)

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

tokenizer = AutoTokenizer.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()

# 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`,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> AutoTokenizer, Data2VecTextForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.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><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`}}),{c(){d=s("p"),b=a("Example of single-label classification:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example of single-label classification:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function IV(D){let d,b,f,m,v;return m=new ee({props:{code:`import torch
from transformers import AutoTokenizer, Data2VecTextForSequenceClassification

tokenizer = AutoTokenizer.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_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# 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.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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> AutoTokenizer, Data2VecTextForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.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_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<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.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),b=a("Example of multi-label classification:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example of multi-label classification:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function OV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function LV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoTokenizer, Data2VecTextForMultipleChoice
import torch

tokenizer = AutoTokenizer.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> AutoTokenizer, 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 = AutoTokenizer.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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function NV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function WV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoTokenizer, Data2VecTextForTokenClassification
import torch

tokenizer = AutoTokenizer.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]]

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

tokenizer = AutoTokenizer.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]

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

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base")
model = Data2VecVisionModel.from_pretrained("facebook/data2vec-vision-base")

inputs = image_processor(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> AutoImageProcessor, 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>image_processor = AutoImageProcessor.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 = image_processor(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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function UV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function XV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoImageProcessor, Data2VecVisionForImageClassification
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base-ft1k")
model = Data2VecVisionForImageClassification.from_pretrained("facebook/data2vec-vision-base-ft1k")

inputs = image_processor(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> AutoImageProcessor, 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>image_processor = AutoImageProcessor.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 = image_processor(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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function RV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function JV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoImageProcessor, Data2VecVisionForSemanticSegmentation
from PIL import Image
import requests

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base")
model = Data2VecVisionForSemanticSegmentation.from_pretrained("facebook/data2vec-vision-base")

inputs = image_processor(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> AutoImageProcessor, 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>image_processor = AutoImageProcessor.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 = image_processor(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=s("p"),b=a("Examples:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function KV(D){let d,b,f,m,v,l,c,F,Ie,Fe,N,le,de,C,Oe,X,Le,Ae,W,Ne,ce,te,We,Ce,B,Be,Ee,H,pe,He,R,j,P,Me,G,Ge,je,z,_e,Qe,S,he,oe,me,Ue,ae,Xe,ue,Q,fe,ne,Re,ge,q,Je,I,Ke,Ye;return{c(){d=s("p"),b=a("TensorFlow models and layers in "),f=s("code"),m=a("transformers"),v=a(" accept two formats as input:"),l=h(),c=s("ul"),F=s("li"),Ie=a("having all inputs as keyword arguments (like PyTorch models), or"),Fe=h(),N=s("li"),le=a("having all inputs as a list, tuple or dict in the first positional argument."),de=h(),C=s("p"),Oe=a(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s("code"),Le=a("model.fit()"),Ae=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s("code"),Ne=a("model.fit()"),ce=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),te=s("code"),We=a("fit()"),Ce=a(" and "),B=s("code"),Be=a("predict()"),Ee=a(`, such as when creating your own layers or models with
the Keras `),H=s("code"),pe=a("Functional"),He=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R=h(),j=s("ul"),P=s("li"),Me=a("a single Tensor with "),G=s("code"),Ge=a("pixel_values"),je=a(" only and nothing else: "),z=s("code"),_e=a("model(pixel_values)"),Qe=h(),S=s("li"),he=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=s("code"),me=a("model([pixel_values, attention_mask])"),Ue=a(" or "),ae=s("code"),Xe=a("model([pixel_values, attention_mask, token_type_ids])"),ue=h(),Q=s("li"),fe=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s("code"),Re=a('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),ge=h(),q=s("p"),Je=a(`Note that when creating models and layers with
`),I=s("a"),Ke=a("subclassing"),Ye=a(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(x){d=r(x,"P",{});var A=i(d);b=n(A,"TensorFlow models and layers in "),f=r(A,"CODE",{});var ut=i(f);m=n(ut,"transformers"),ut.forEach(t),v=n(A," accept two formats as input:"),A.forEach(t),l=u(x),c=r(x,"UL",{});var J=i(c);F=r(J,"LI",{});var mt=i(F);Ie=n(mt,"having all inputs as keyword arguments (like PyTorch models), or"),mt.forEach(t),Fe=u(J),N=r(J,"LI",{});var ft=i(N);le=n(ft,"having all inputs as a list, tuple or dict in the first positional argument."),ft.forEach(t),J.forEach(t),de=u(x),C=r(x,"P",{});var E=i(C);Oe=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(E,"CODE",{});var gt=i(X);Le=n(gt,"model.fit()"),gt.forEach(t),Ae=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var _t=i(W);Ne=n(_t,"model.fit()"),_t.forEach(t),ce=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),te=r(E,"CODE",{});var qe=i(te);We=n(qe,"fit()"),qe.forEach(t),Ce=n(E," and "),B=r(E,"CODE",{});var vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Ee=n(E,`, such as when creating your own layers or models with
the Keras `),H=r(E,"CODE",{});var bt=i(H);pe=n(bt,"Functional"),bt.forEach(t),He=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),R=u(x),j=r(x,"UL",{});var O=i(j);P=r(O,"LI",{});var se=i(P);Me=n(se,"a single Tensor with "),G=r(se,"CODE",{});var wt=i(G);Ge=n(wt,"pixel_values"),wt.forEach(t),je=n(se," only and nothing else: "),z=r(se,"CODE",{});var it=i(z);_e=n(it,"model(pixel_values)"),it.forEach(t),se.forEach(t),Qe=u(O),S=r(O,"LI",{});var L=i(S);he=n(L,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=r(L,"CODE",{});var Tt=i(oe);me=n(Tt,"model([pixel_values, attention_mask])"),Tt.forEach(t),Ue=n(L," or "),ae=r(L,"CODE",{});var Pe=i(ae);Xe=n(Pe,"model([pixel_values, attention_mask, token_type_ids])"),Pe.forEach(t),L.forEach(t),ue=u(O),Q=r(O,"LI",{});var Ze=i(Q);fe=n(Ze,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=r(Ze,"CODE",{});var kt=i(ne);Re=n(kt,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),kt.forEach(t),Ze.forEach(t),O.forEach(t),ge=u(x),q=r(x,"P",{});var K=i(q);Je=n(K,`Note that when creating models and layers with
`),I=r(K,"A",{href:!0,rel:!0});var yt=i(I);Ke=n(yt,"subclassing"),yt.forEach(t),Ye=n(K,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),K.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(x,A){_(x,d,A),e(d,b),e(d,f),e(f,m),e(d,v),_(x,l,A),_(x,c,A),e(c,F),e(F,Ie),e(c,Fe),e(c,N),e(N,le),_(x,de,A),_(x,C,A),e(C,Oe),e(C,X),e(X,Le),e(C,Ae),e(C,W),e(W,Ne),e(C,ce),e(C,te),e(te,We),e(C,Ce),e(C,B),e(B,Be),e(C,Ee),e(C,H),e(H,pe),e(C,He),_(x,R,A),_(x,j,A),e(j,P),e(P,Me),e(P,G),e(G,Ge),e(P,je),e(P,z),e(z,_e),e(j,Qe),e(j,S),e(S,he),e(S,oe),e(oe,me),e(S,Ue),e(S,ae),e(ae,Xe),e(j,ue),e(j,Q),e(Q,fe),e(Q,ne),e(ne,Re),_(x,ge,A),_(x,q,A),e(q,Je),e(q,I),e(I,Ke),e(q,Ye)},d(x){x&&t(d),x&&t(l),x&&t(c),x&&t(de),x&&t(C),x&&t(R),x&&t(j),x&&t(ge),x&&t(q)}}}function YV(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function ZV(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoImageProcessor, TFData2VecVisionModel
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base")
model = TFData2VecVisionModel.from_pretrained("facebook/data2vec-vision-base")

inputs = image_processor(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> AutoImageProcessor, 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>image_processor = AutoImageProcessor.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 = image_processor(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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function e0(D){let d,b,f,m,v,l,c,F,Ie,Fe,N,le,de,C,Oe,X,Le,Ae,W,Ne,ce,te,We,Ce,B,Be,Ee,H,pe,He,R,j,P,Me,G,Ge,je,z,_e,Qe,S,he,oe,me,Ue,ae,Xe,ue,Q,fe,ne,Re,ge,q,Je,I,Ke,Ye;return{c(){d=s("p"),b=a("TensorFlow models and layers in "),f=s("code"),m=a("transformers"),v=a(" accept two formats as input:"),l=h(),c=s("ul"),F=s("li"),Ie=a("having all inputs as keyword arguments (like PyTorch models), or"),Fe=h(),N=s("li"),le=a("having all inputs as a list, tuple or dict in the first positional argument."),de=h(),C=s("p"),Oe=a(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s("code"),Le=a("model.fit()"),Ae=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s("code"),Ne=a("model.fit()"),ce=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),te=s("code"),We=a("fit()"),Ce=a(" and "),B=s("code"),Be=a("predict()"),Ee=a(`, such as when creating your own layers or models with
the Keras `),H=s("code"),pe=a("Functional"),He=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R=h(),j=s("ul"),P=s("li"),Me=a("a single Tensor with "),G=s("code"),Ge=a("pixel_values"),je=a(" only and nothing else: "),z=s("code"),_e=a("model(pixel_values)"),Qe=h(),S=s("li"),he=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=s("code"),me=a("model([pixel_values, attention_mask])"),Ue=a(" or "),ae=s("code"),Xe=a("model([pixel_values, attention_mask, token_type_ids])"),ue=h(),Q=s("li"),fe=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s("code"),Re=a('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),ge=h(),q=s("p"),Je=a(`Note that when creating models and layers with
`),I=s("a"),Ke=a("subclassing"),Ye=a(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(x){d=r(x,"P",{});var A=i(d);b=n(A,"TensorFlow models and layers in "),f=r(A,"CODE",{});var ut=i(f);m=n(ut,"transformers"),ut.forEach(t),v=n(A," accept two formats as input:"),A.forEach(t),l=u(x),c=r(x,"UL",{});var J=i(c);F=r(J,"LI",{});var mt=i(F);Ie=n(mt,"having all inputs as keyword arguments (like PyTorch models), or"),mt.forEach(t),Fe=u(J),N=r(J,"LI",{});var ft=i(N);le=n(ft,"having all inputs as a list, tuple or dict in the first positional argument."),ft.forEach(t),J.forEach(t),de=u(x),C=r(x,"P",{});var E=i(C);Oe=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(E,"CODE",{});var gt=i(X);Le=n(gt,"model.fit()"),gt.forEach(t),Ae=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var _t=i(W);Ne=n(_t,"model.fit()"),_t.forEach(t),ce=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),te=r(E,"CODE",{});var qe=i(te);We=n(qe,"fit()"),qe.forEach(t),Ce=n(E," and "),B=r(E,"CODE",{});var vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Ee=n(E,`, such as when creating your own layers or models with
the Keras `),H=r(E,"CODE",{});var bt=i(H);pe=n(bt,"Functional"),bt.forEach(t),He=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),R=u(x),j=r(x,"UL",{});var O=i(j);P=r(O,"LI",{});var se=i(P);Me=n(se,"a single Tensor with "),G=r(se,"CODE",{});var wt=i(G);Ge=n(wt,"pixel_values"),wt.forEach(t),je=n(se," only and nothing else: "),z=r(se,"CODE",{});var it=i(z);_e=n(it,"model(pixel_values)"),it.forEach(t),se.forEach(t),Qe=u(O),S=r(O,"LI",{});var L=i(S);he=n(L,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=r(L,"CODE",{});var Tt=i(oe);me=n(Tt,"model([pixel_values, attention_mask])"),Tt.forEach(t),Ue=n(L," or "),ae=r(L,"CODE",{});var Pe=i(ae);Xe=n(Pe,"model([pixel_values, attention_mask, token_type_ids])"),Pe.forEach(t),L.forEach(t),ue=u(O),Q=r(O,"LI",{});var Ze=i(Q);fe=n(Ze,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=r(Ze,"CODE",{});var kt=i(ne);Re=n(kt,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),kt.forEach(t),Ze.forEach(t),O.forEach(t),ge=u(x),q=r(x,"P",{});var K=i(q);Je=n(K,`Note that when creating models and layers with
`),I=r(K,"A",{href:!0,rel:!0});var yt=i(I);Ke=n(yt,"subclassing"),yt.forEach(t),Ye=n(K,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),K.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(x,A){_(x,d,A),e(d,b),e(d,f),e(f,m),e(d,v),_(x,l,A),_(x,c,A),e(c,F),e(F,Ie),e(c,Fe),e(c,N),e(N,le),_(x,de,A),_(x,C,A),e(C,Oe),e(C,X),e(X,Le),e(C,Ae),e(C,W),e(W,Ne),e(C,ce),e(C,te),e(te,We),e(C,Ce),e(C,B),e(B,Be),e(C,Ee),e(C,H),e(H,pe),e(C,He),_(x,R,A),_(x,j,A),e(j,P),e(P,Me),e(P,G),e(G,Ge),e(P,je),e(P,z),e(z,_e),e(j,Qe),e(j,S),e(S,he),e(S,oe),e(oe,me),e(S,Ue),e(S,ae),e(ae,Xe),e(j,ue),e(j,Q),e(Q,fe),e(Q,ne),e(ne,Re),_(x,ge,A),_(x,q,A),e(q,Je),e(q,I),e(I,Ke),e(q,Ye)},d(x){x&&t(d),x&&t(l),x&&t(c),x&&t(de),x&&t(C),x&&t(R),x&&t(j),x&&t(ge),x&&t(q)}}}function t0(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function o0(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoImageProcessor, TFData2VecVisionForImageClassification
import tensorflow as tf
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base-ft1k")
model = TFData2VecVisionForImageClassification.from_pretrained("facebook/data2vec-vision-base-ft1k")

inputs = image_processor(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> AutoImageProcessor, 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>image_processor = AutoImageProcessor.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 = image_processor(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=s("p"),b=a("Example:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function a0(D){let d,b,f,m,v,l,c,F,Ie,Fe,N,le,de,C,Oe,X,Le,Ae,W,Ne,ce,te,We,Ce,B,Be,Ee,H,pe,He,R,j,P,Me,G,Ge,je,z,_e,Qe,S,he,oe,me,Ue,ae,Xe,ue,Q,fe,ne,Re,ge,q,Je,I,Ke,Ye;return{c(){d=s("p"),b=a("TensorFlow models and layers in "),f=s("code"),m=a("transformers"),v=a(" accept two formats as input:"),l=h(),c=s("ul"),F=s("li"),Ie=a("having all inputs as keyword arguments (like PyTorch models), or"),Fe=h(),N=s("li"),le=a("having all inputs as a list, tuple or dict in the first positional argument."),de=h(),C=s("p"),Oe=a(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=s("code"),Le=a("model.fit()"),Ae=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s("code"),Ne=a("model.fit()"),ce=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),te=s("code"),We=a("fit()"),Ce=a(" and "),B=s("code"),Be=a("predict()"),Ee=a(`, such as when creating your own layers or models with
the Keras `),H=s("code"),pe=a("Functional"),He=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),R=h(),j=s("ul"),P=s("li"),Me=a("a single Tensor with "),G=s("code"),Ge=a("pixel_values"),je=a(" only and nothing else: "),z=s("code"),_e=a("model(pixel_values)"),Qe=h(),S=s("li"),he=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=s("code"),me=a("model([pixel_values, attention_mask])"),Ue=a(" or "),ae=s("code"),Xe=a("model([pixel_values, attention_mask, token_type_ids])"),ue=h(),Q=s("li"),fe=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s("code"),Re=a('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),ge=h(),q=s("p"),Je=a(`Note that when creating models and layers with
`),I=s("a"),Ke=a("subclassing"),Ye=a(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(x){d=r(x,"P",{});var A=i(d);b=n(A,"TensorFlow models and layers in "),f=r(A,"CODE",{});var ut=i(f);m=n(ut,"transformers"),ut.forEach(t),v=n(A," accept two formats as input:"),A.forEach(t),l=u(x),c=r(x,"UL",{});var J=i(c);F=r(J,"LI",{});var mt=i(F);Ie=n(mt,"having all inputs as keyword arguments (like PyTorch models), or"),mt.forEach(t),Fe=u(J),N=r(J,"LI",{});var ft=i(N);le=n(ft,"having all inputs as a list, tuple or dict in the first positional argument."),ft.forEach(t),J.forEach(t),de=u(x),C=r(x,"P",{});var E=i(C);Oe=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),X=r(E,"CODE",{});var gt=i(X);Le=n(gt,"model.fit()"),gt.forEach(t),Ae=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var _t=i(W);Ne=n(_t,"model.fit()"),_t.forEach(t),ce=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),te=r(E,"CODE",{});var qe=i(te);We=n(qe,"fit()"),qe.forEach(t),Ce=n(E," and "),B=r(E,"CODE",{});var vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Ee=n(E,`, such as when creating your own layers or models with
the Keras `),H=r(E,"CODE",{});var bt=i(H);pe=n(bt,"Functional"),bt.forEach(t),He=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),R=u(x),j=r(x,"UL",{});var O=i(j);P=r(O,"LI",{});var se=i(P);Me=n(se,"a single Tensor with "),G=r(se,"CODE",{});var wt=i(G);Ge=n(wt,"pixel_values"),wt.forEach(t),je=n(se," only and nothing else: "),z=r(se,"CODE",{});var it=i(z);_e=n(it,"model(pixel_values)"),it.forEach(t),se.forEach(t),Qe=u(O),S=r(O,"LI",{});var L=i(S);he=n(L,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),oe=r(L,"CODE",{});var Tt=i(oe);me=n(Tt,"model([pixel_values, attention_mask])"),Tt.forEach(t),Ue=n(L," or "),ae=r(L,"CODE",{});var Pe=i(ae);Xe=n(Pe,"model([pixel_values, attention_mask, token_type_ids])"),Pe.forEach(t),L.forEach(t),ue=u(O),Q=r(O,"LI",{});var Ze=i(Q);fe=n(Ze,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=r(Ze,"CODE",{});var kt=i(ne);Re=n(kt,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),kt.forEach(t),Ze.forEach(t),O.forEach(t),ge=u(x),q=r(x,"P",{});var K=i(q);Je=n(K,`Note that when creating models and layers with
`),I=r(K,"A",{href:!0,rel:!0});var yt=i(I);Ke=n(yt,"subclassing"),yt.forEach(t),Ye=n(K,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),K.forEach(t),this.h()},h(){p(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(I,"rel","nofollow")},m(x,A){_(x,d,A),e(d,b),e(d,f),e(f,m),e(d,v),_(x,l,A),_(x,c,A),e(c,F),e(F,Ie),e(c,Fe),e(c,N),e(N,le),_(x,de,A),_(x,C,A),e(C,Oe),e(C,X),e(X,Le),e(C,Ae),e(C,W),e(W,Ne),e(C,ce),e(C,te),e(te,We),e(C,Ce),e(C,B),e(B,Be),e(C,Ee),e(C,H),e(H,pe),e(C,He),_(x,R,A),_(x,j,A),e(j,P),e(P,Me),e(P,G),e(G,Ge),e(P,je),e(P,z),e(z,_e),e(j,Qe),e(j,S),e(S,he),e(S,oe),e(oe,me),e(S,Ue),e(S,ae),e(ae,Xe),e(j,ue),e(j,Q),e(Q,fe),e(Q,ne),e(ne,Re),_(x,ge,A),_(x,q,A),e(q,Je),e(q,I),e(I,Ke),e(q,Ye)},d(x){x&&t(d),x&&t(l),x&&t(c),x&&t(de),x&&t(C),x&&t(R),x&&t(j),x&&t(ge),x&&t(q)}}}function n0(D){let d,b,f,m,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),m=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var F=i(f);m=n(F,"Module"),F.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,m),e(d,v)},d(l){l&&t(d)}}}function s0(D){let d,b,f,m,v;return m=new ee({props:{code:`from transformers import AutoImageProcessor, TFData2VecVisionForSemanticSegmentation
from PIL import Image
import requests

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

image_processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-base")
model = TFData2VecVisionForSemanticSegmentation.from_pretrained("facebook/data2vec-vision-base")

inputs = image_processor(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> AutoImageProcessor, TFData2VecVisionForSemanticSegmentation
<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>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFData2VecVisionForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-vision-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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=s("p"),b=a("Examples:"),f=h(),w(m.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=u(l),T(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),k(m,l,c),v=!0},p:Z,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){$(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(m,l)}}}function r0(D){let d,b,f,m,v,l,c,F,Ie,Fe,N,le,de,C,Oe,X,Le,Ae,W,Ne,ce,te,We,Ce,B,Be,Ee,H,pe,He,R,j,P,Me,G,Ge,je,z,_e,Qe,S,he,oe,me,Ue,ae,Xe,ue,Q,fe,ne,Re,ge,q,Je,I,Ke,Ye,x,A,ut,J,mt,ft,E,gt,_t,qe,vt,bt,O,se,wt,it,L,Tt,Pe,Ze,kt,K,yt,Hu,Mp,co,ia,hd,Gn,Gu,ud,Qu,jp,qi,Uu,qp,Qn,Pp,la,to,Pi,Xu,Ru,Un,Ju,Ku,Xn,Yu,Zu,em,po,tm,zi,om,am,Rn,nm,sm,zp,Si,md,rm,Sp,ze,fd,Ii,im,lm,gd,Oi,dm,cm,_d,Li,pm,hm,vd,Ni,um,mm,bd,Wi,fm,gm,wd,Bi,_m,Ip,Hi,Td,vm,Op,da,kd,Gi,bm,wm,yd,Qi,Tm,Lp,Ui,$d,km,Np,ca,Vd,Xi,ym,$m,xd,Ri,Vm,Wp,Ji,xm,Bp,ho,pa,Dd,Jn,Dm,Fd,Fm,Hp,lt,Kn,Am,Kt,Cm,Ki,Em,Mm,Yi,jm,qm,Yn,Pm,zm,Sm,uo,Im,Zi,Om,Lm,el,Nm,Wm,Bm,ha,Gp,mo,ua,Ad,Zn,Hm,Cd,Gm,Qp,dt,es,Qm,fo,Um,tl,Xm,Rm,ts,Jm,Km,Ym,go,Zm,ol,ef,tf,al,of,af,nf,ma,Up,_o,fa,Ed,os,sf,Md,rf,Xp,Yt,as,lf,vo,df,nl,cf,pf,ns,hf,uf,mf,ga,Rp,bo,_a,jd,ss,ff,qd,gf,Jp,et,rs,_f,is,vf,ls,bf,wf,Tf,ds,kf,sl,yf,$f,Vf,cs,xf,ps,Df,Ff,Af,$t,hs,Cf,wo,Ef,rl,Mf,jf,Pd,qf,Pf,zf,va,Sf,ba,Kp,To,wa,zd,us,If,Sd,Of,Yp,ve,ms,Lf,Id,Nf,Wf,fs,Bf,gs,Hf,Gf,Qf,_s,Uf,il,Xf,Rf,Jf,vs,Kf,bs,Yf,Zf,eg,Vt,ws,tg,ko,og,ll,ag,ng,Od,sg,rg,ig,Ta,lg,ka,Zp,yo,ya,Ld,Ts,dg,Nd,cg,eh,tt,ks,pg,$o,hg,Wd,ug,mg,ys,fg,gg,_g,$s,vg,dl,bg,wg,Tg,Vs,kg,xs,yg,$g,Vg,xt,Ds,xg,Vo,Dg,cl,Fg,Ag,Bd,Cg,Eg,Mg,$a,jg,Va,th,xo,xa,Hd,Fs,qg,Gd,Pg,oh,be,As,zg,Qd,Sg,Ig,Cs,Og,Es,Lg,Ng,Wg,Ms,Bg,pl,Hg,Gg,Qg,js,Ug,qs,Xg,Rg,Jg,Dt,Ps,Kg,Do,Yg,hl,Zg,e_,Ud,t_,o_,a_,Da,n_,Fa,ah,Fo,Aa,Xd,zs,s_,Rd,r_,nh,we,Ss,i_,Jd,l_,d_,Is,c_,Os,p_,h_,u_,Ls,m_,ul,f_,g_,__,Ns,v_,Ws,b_,w_,T_,Ft,Bs,k_,Ao,y_,ml,$_,V_,Kd,x_,D_,F_,Ca,A_,Ea,sh,Co,Ma,Yd,Hs,C_,Zd,E_,rh,re,Gs,M_,Qs,j_,Us,q_,P_,z_,Xs,S_,fl,I_,O_,L_,Rs,N_,Js,W_,B_,H_,Ks,G_,ec,Q_,U_,X_,Te,R_,tc,J_,K_,oc,Y_,Z_,ac,e2,t2,nc,o2,a2,sc,n2,s2,rc,r2,i2,l2,ja,d2,ic,c2,p2,Ys,h2,u2,At,Zs,m2,Eo,f2,gl,g2,_2,lc,v2,b2,w2,qa,T2,Pa,ih,Mo,za,dc,er,k2,cc,y2,lh,ot,tr,$2,jo,V2,pc,x2,D2,or,F2,A2,C2,ar,E2,_l,M2,j2,q2,nr,P2,sr,z2,S2,I2,Ct,rr,O2,qo,L2,vl,N2,W2,hc,B2,H2,G2,Sa,Q2,Ia,dh,Po,Oa,uc,ir,U2,mc,X2,ch,at,lr,R2,zo,J2,fc,K2,Y2,dr,Z2,ev,tv,cr,ov,bl,av,nv,sv,pr,rv,hr,iv,lv,dv,Et,ur,cv,So,pv,wl,hv,uv,gc,mv,fv,gv,La,_v,Na,ph,Io,Wa,_c,mr,vv,vc,bv,hh,ke,fr,wv,bc,Tv,kv,gr,yv,_r,$v,Vv,xv,vr,Dv,Tl,Fv,Av,Cv,br,Ev,wr,Mv,jv,qv,st,Tr,Pv,Oo,zv,kl,Sv,Iv,wc,Ov,Lv,Nv,Ba,Wv,Ha,Bv,Ga,uh,Lo,Qa,Tc,kr,Hv,kc,Gv,mh,ye,yr,Qv,yc,Uv,Xv,$r,Rv,Vr,Jv,Kv,Yv,xr,Zv,yl,eb,tb,ob,Dr,ab,Fr,nb,sb,rb,Mt,Ar,ib,No,lb,$l,db,cb,$c,pb,hb,ub,Ua,mb,Xa,fh,Wo,Ra,Vc,Cr,fb,xc,gb,gh,$e,Er,_b,Dc,vb,bb,Mr,wb,jr,Tb,kb,yb,qr,$b,Vl,Vb,xb,Db,Pr,Fb,zr,Ab,Cb,Eb,jt,Sr,Mb,Bo,jb,xl,qb,Pb,Fc,zb,Sb,Ib,Ja,Ob,Ka,_h,Ho,Ya,Ac,Ir,Lb,Cc,Nb,vh,Ve,Or,Wb,Go,Bb,Ec,Hb,Gb,Mc,Qb,Ub,Xb,Lr,Rb,Nr,Jb,Kb,Yb,Wr,Zb,Dl,e1,t1,o1,Br,a1,Hr,n1,s1,r1,qt,Gr,i1,Qo,l1,Fl,d1,c1,jc,p1,h1,u1,Za,m1,en,bh,Uo,tn,qc,Qr,f1,Pc,g1,wh,Zt,Ur,_1,Xr,v1,Rr,b1,w1,T1,Pt,Jr,k1,Xo,y1,Al,$1,V1,zc,x1,D1,F1,on,A1,an,Th,Ro,nn,Sc,Kr,C1,Ic,E1,kh,ct,Yr,M1,Oc,j1,q1,Zr,P1,ei,z1,S1,I1,zt,ti,O1,Jo,L1,Cl,N1,W1,Lc,B1,H1,G1,sn,Q1,rn,yh,Ko,ln,Nc,oi,U1,Wc,X1,$h,pt,ai,R1,Bc,J1,K1,ni,Y1,si,Z1,ew,tw,St,ri,ow,Yo,aw,El,nw,sw,Hc,rw,iw,lw,dn,dw,cn,Vh,Zo,pn,Gc,ii,cw,Qc,pw,xh,nt,li,hw,di,uw,Ml,mw,fw,gw,ci,_w,pi,vw,bw,ww,hn,Tw,It,hi,kw,ea,yw,jl,$w,Vw,Uc,xw,Dw,Fw,un,Aw,mn,Dh,ta,fn,Xc,ui,Cw,Rc,Ew,Fh,xe,mi,Mw,Jc,jw,qw,fi,Pw,ql,zw,Sw,Iw,gi,Ow,_i,Lw,Nw,Ww,gn,Bw,Ot,vi,Hw,oa,Gw,Pl,Qw,Uw,Kc,Xw,Rw,Jw,_n,Kw,vn,Ah,aa,bn,Yc,bi,Yw,Zc,Zw,Ch,De,wi,eT,ep,tT,oT,Ti,aT,zl,nT,sT,rT,ki,iT,yi,lT,dT,cT,wn,pT,Lt,$i,hT,na,uT,Sl,mT,fT,tp,gT,_T,vT,Tn,bT,kn,Eh;return l=new U({}),C=new U({}),Gn=new U({}),Qn=new gV({props:{pipeline:"image-classification"}}),Jn=new U({}),Kn=new M({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.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{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/v4.27.1/src/transformers/models/data2vec/configuration_data2vec_text.py#L31"}}),ha=new Y({props:{anchor:"transformers.Data2VecTextConfig.example",$$slots:{default:[_V]},$$scope:{ctx:D}}}),Zn=new U({}),es=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/configuration_data2vec_audio.py#L31"}}),ma=new Y({props:{anchor:"transformers.Data2VecAudioConfig.example",$$slots:{default:[vV]},$$scope:{ctx:D}}}),os=new U({}),as=new M({props:{name:"class transformers.Data2VecVisionConfig",anchor:"transformers.Data2VecVisionConfig",parameters:[{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:"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.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/v4.27.1/src/transformers/models/data2vec/configuration_data2vec_vision.py#L35"}}),ga=new Y({props:{anchor:"transformers.Data2VecVisionConfig.example",$$slots:{default:[bV]},$$scope:{ctx:D}}}),ss=new U({}),rs=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L832"}}),hs=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L903",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),va=new ie({props:{$$slots:{default:[wV]},$$scope:{ctx:D}}}),ba=new Y({props:{anchor:"transformers.Data2VecAudioModel.forward.example",$$slots:{default:[TV]},$$scope:{ctx:D}}}),us=new U({}),ms=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1218"}}),ws=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1263",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new ie({props:{$$slots:{default:[kV]},$$scope:{ctx:D}}}),ka=new Y({props:{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.example",$$slots:{default:[yV]},$$scope:{ctx:D}}}),Ts=new U({}),ks=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L968"}}),Ds=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1009",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$a=new ie({props:{$$slots:{default:[$V]},$$scope:{ctx:D}}}),Va=new Y({props:{anchor:"transformers.Data2VecAudioForCTC.forward.example",$$slots:{default:[VV]},$$scope:{ctx:D}}}),Fs=new U({}),As=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1097"}}),Ps=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Da=new ie({props:{$$slots:{default:[xV]},$$scope:{ctx:D}}}),Fa=new Y({props:{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.example",$$slots:{default:[DV]},$$scope:{ctx:D}}}),zs=new U({}),Ss=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1382"}}),Bs=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1444",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ca=new ie({props:{$$slots:{default:[FV]},$$scope:{ctx:D}}}),Ea=new Y({props:{anchor:"transformers.Data2VecAudioForXVector.forward.example",$$slots:{default:[AV]},$$scope:{ctx:D}}}),Hs=new U({}),Gs=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L701"}}),Zs=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L745",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qa=new ie({props:{$$slots:{default:[CV]},$$scope:{ctx:D}}}),Pa=new Y({props:{anchor:"transformers.Data2VecTextModel.forward.example",$$slots:{default:[EV]},$$scope:{ctx:D}}}),er=new U({}),tr=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L885"}}),rr=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L911",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Sa=new ie({props:{$$slots:{default:[MV]},$$scope:{ctx:D}}}),Ia=new Y({props:{anchor:"transformers.Data2VecTextForCausalLM.forward.example",$$slots:{default:[jV]},$$scope:{ctx:D}}}),ir=new U({}),lr=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1037"}}),ur=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1066",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),La=new ie({props:{$$slots:{default:[qV]},$$scope:{ctx:D}}}),Na=new Y({props:{anchor:"transformers.Data2VecTextForMaskedLM.forward.example",$$slots:{default:[PV]},$$scope:{ctx:D}}}),mr=new U({}),fr=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1170"}}),Tr=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1184",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ba=new ie({props:{$$slots:{default:[zV]},$$scope:{ctx:D}}}),Ha=new Y({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example",$$slots:{default:[SV]},$$scope:{ctx:D}}}),Ga=new Y({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example-2",$$slots:{default:[IV]},$$scope:{ctx:D}}}),kr=new U({}),yr=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1267"}}),Ar=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1280",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ua=new ie({props:{$$slots:{default:[OV]},$$scope:{ctx:D}}}),Xa=new Y({props:{anchor:"transformers.Data2VecTextForMultipleChoice.forward.example",$$slots:{default:[LV]},$$scope:{ctx:D}}}),Cr=new U({}),Er=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1361"}}),Sr=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1379",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ja=new ie({props:{$$slots:{default:[NV]},$$scope:{ctx:D}}}),Ka=new Y({props:{anchor:"transformers.Data2VecTextForTokenClassification.forward.example",$$slots:{default:[WV]},$$scope:{ctx:D}}}),Ir=new U({}),Or=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1468"}}),Gr=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_text.py#L1482",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Za=new ie({props:{$$slots:{default:[BV]},$$scope:{ctx:D}}}),en=new Y({props:{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.example",$$slots:{default:[HV]},$$scope:{ctx:D}}}),Qr=new U({}),Ur=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L632"}}),Jr=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L659",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/v4.27.1/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>
`}}),on=new ie({props:{$$slots:{default:[GV]},$$scope:{ctx:D}}}),an=new Y({props:{anchor:"transformers.Data2VecVisionModel.forward.example",$$slots:{default:[QV]},$$scope:{ctx:D}}}),Kr=new U({}),Yr=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L745"}}),ti=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L758",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sn=new ie({props:{$$slots:{default:[UV]},$$scope:{ctx:D}}}),rn=new Y({props:{anchor:"transformers.Data2VecVisionForImageClassification.forward.example",$$slots:{default:[XV]},$$scope:{ctx:D}}}),oi=new U({}),ai=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L1080"}}),ri=new M({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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_data2vec_vision.py#L1124",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),dn=new ie({props:{$$slots:{default:[RV]},$$scope:{ctx:D}}}),cn=new Y({props:{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.example",$$slots:{default:[JV]},$$scope:{ctx:D}}}),ii=new U({}),li=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L879"}}),hn=new ie({props:{$$slots:{default:[KV]},$$scope:{ctx:D}}}),hi=new M({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[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, 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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L891",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/v4.27.1/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>
`}}),un=new ie({props:{$$slots:{default:[YV]},$$scope:{ctx:D}}}),mn=new Y({props:{anchor:"transformers.TFData2VecVisionModel.call.example",$$slots:{default:[ZV]},$$scope:{ctx:D}}}),ui=new U({}),mi=new M({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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L941"}}),gn=new ie({props:{$$slots:{default:[e0]},$$scope:{ctx:D}}}),vi=new M({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[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, 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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L955",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_n=new ie({props:{$$slots:{default:[t0]},$$scope:{ctx:D}}}),vn=new Y({props:{anchor:"transformers.TFData2VecVisionForImageClassification.call.example",$$slots:{default:[o0]},$$scope:{ctx:D}}}),bi=new U({}),wi=new M({props:{name:"class transformers.TFData2VecVisionForSemanticSegmentation",anchor:"transformers.TFData2VecVisionForSemanticSegmentation",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L1319"}}),wn=new ie({props:{$$slots:{default:[a0]},$$scope:{ctx:D}}}),$i=new M({props:{name:"call",anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call",parameters:[{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.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.TFData2VecVisionForSemanticSegmentation.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.TFData2VecVisionForSemanticSegmentation.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.TFData2VecVisionForSemanticSegmentation.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/v4.27.1/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.TFData2VecVisionForSemanticSegmentation.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.TFData2VecVisionForSemanticSegmentation.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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/v4.27.1/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L1372",returnDescription:`
<p>A <code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutput</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/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</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>tf.Tensor</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(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, 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(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, 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><code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Tn=new ie({props:{$$slots:{default:[n0]},$$scope:{ctx:D}}}),kn=new Y({props:{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.example",$$slots:{default:[s0]},$$scope:{ctx:D}}}),{c(){d=s("meta"),b=h(),f=s("h1"),m=s("a"),v=s("span"),w(l.$$.fragment),c=h(),F=s("span"),Ie=a("Data2Vec"),Fe=h(),N=s("h2"),le=s("a"),de=s("span"),w(C.$$.fragment),Oe=h(),X=s("span"),Le=a("Overview"),Ae=h(),W=s("p"),Ne=a("The Data2Vec model was proposed in "),ce=s("a"),te=a("data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language"),We=a(` 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.`),Ce=h(),B=s("p"),Be=a("The abstract from the paper is the following:"),Ee=h(),H=s("p"),pe=s("em"),He=a(`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 `),R=s("a"),j=a("www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),P=a("."),Me=h(),G=s("p"),Ge=a("Tips:"),je=h(),z=s("ul"),_e=s("li"),Qe=a("Data2VecAudio, Data2VecText, and Data2VecVision have all been trained using the same self-supervised learning method."),S=h(),he=s("li"),oe=a("For Data2VecAudio, preprocessing is identical to "),me=s("a"),Ue=a("Wav2Vec2Model"),ae=a(", including feature extraction"),Xe=h(),ue=s("li"),Q=a("For Data2VecText, preprocessing is identical to "),fe=s("a"),ne=a("RobertaModel"),Re=a(", including tokenization."),ge=h(),q=s("li"),Je=a("For Data2VecVision, preprocessing is identical to "),I=s("a"),Ke=a("BeitModel"),Ye=a(", including feature extraction."),x=h(),A=s("p"),ut=a("This model was contributed by "),J=s("a"),mt=a("edugp"),ft=a(" and "),E=s("a"),gt=a("patrickvonplaten"),_t=a(`.
`),qe=s("a"),vt=a("sayakpaul"),bt=a(" and "),O=s("a"),se=a("Rocketknight1"),wt=a(" contributed Data2Vec for vision in TensorFlow."),it=h(),L=s("p"),Tt=a("The original code (for NLP and Speech) can be found "),Pe=s("a"),Ze=a("here"),kt=a(`.
The original code for vision can be found `),K=s("a"),yt=a("here"),Hu=a("."),Mp=h(),co=s("h2"),ia=s("a"),hd=s("span"),w(Gn.$$.fragment),Gu=h(),ud=s("span"),Qu=a("Resources"),jp=h(),qi=s("p"),Uu=a("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with Data2Vec."),qp=h(),w(Qn.$$.fragment),Pp=h(),la=s("ul"),to=s("li"),Pi=s("a"),Xu=a("Data2VecVisionForImageClassification"),Ru=a(" is supported by this "),Un=s("a"),Ju=a("example script"),Ku=a(" and "),Xn=s("a"),Yu=a("notebook"),Zu=a("."),em=h(),po=s("li"),tm=a("To fine-tune "),zi=s("a"),om=a("TFData2VecVisionForImageClassification"),am=a(" on a custom dataset, see "),Rn=s("a"),nm=a("this notebook"),sm=a("."),zp=h(),Si=s("p"),md=s("strong"),rm=a("Data2VecText documentation resources"),Sp=h(),ze=s("ul"),fd=s("li"),Ii=s("a"),im=a("Text classification task guide"),lm=h(),gd=s("li"),Oi=s("a"),dm=a("Token classification task guide"),cm=h(),_d=s("li"),Li=s("a"),pm=a("Question answering task guide"),hm=h(),vd=s("li"),Ni=s("a"),um=a("Causal language modeling task guide"),mm=h(),bd=s("li"),Wi=s("a"),fm=a("Masked language modeling task guide"),gm=h(),wd=s("li"),Bi=s("a"),_m=a("Multiple choice task guide"),Ip=h(),Hi=s("p"),Td=s("strong"),vm=a("Data2VecAudio documentation resources"),Op=h(),da=s("ul"),kd=s("li"),Gi=s("a"),bm=a("Audio classification task guide"),wm=h(),yd=s("li"),Qi=s("a"),Tm=a("Automatic speech recognition task guide"),Lp=h(),Ui=s("p"),$d=s("strong"),km=a("Data2VecVision documentation resources"),Np=h(),ca=s("ul"),Vd=s("li"),Xi=s("a"),ym=a("Image classification"),$m=h(),xd=s("li"),Ri=s("a"),Vm=a("Semantic segmentation"),Wp=h(),Ji=s("p"),xm=a("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Bp=h(),ho=s("h2"),pa=s("a"),Dd=s("span"),w(Jn.$$.fragment),Dm=h(),Fd=s("span"),Fm=a("Data2VecTextConfig"),Hp=h(),lt=s("div"),w(Kn.$$.fragment),Am=h(),Kt=s("p"),Cm=a("This is the configuration class to store the configuration of a "),Ki=s("a"),Em=a("Data2VecTextModel"),Mm=a(" and "),Yi=s("a"),jm=a("Data2VecTextModel"),qm=a(`. 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
`),Yn=s("a"),Pm=a("facebook/data2vec-text-base"),zm=a(" architecture."),Sm=h(),uo=s("p"),Im=a("Configuration objects inherit from "),Zi=s("a"),Om=a("PretrainedConfig"),Lm=a(` and can be used to control the model outputs. Read the
documentation from `),el=s("a"),Nm=a("PretrainedConfig"),Wm=a(" for more information."),Bm=h(),w(ha.$$.fragment),Gp=h(),mo=s("h2"),ua=s("a"),Ad=s("span"),w(Zn.$$.fragment),Hm=h(),Cd=s("span"),Gm=a("Data2VecAudioConfig"),Qp=h(),dt=s("div"),w(es.$$.fragment),Qm=h(),fo=s("p"),Um=a("This is the configuration class to store the configuration of a "),tl=s("a"),Xm=a("Data2VecAudioModel"),Rm=a(`. 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
`),ts=s("a"),Jm=a("facebook/data2vec-audio-base-960h"),Km=a(" architecture."),Ym=h(),go=s("p"),Zm=a("Configuration objects inherit from "),ol=s("a"),ef=a("PretrainedConfig"),tf=a(` and can be used to control the model outputs. Read the
documentation from `),al=s("a"),of=a("PretrainedConfig"),af=a(" for more information."),nf=h(),w(ma.$$.fragment),Up=h(),_o=s("h2"),fa=s("a"),Ed=s("span"),w(os.$$.fragment),sf=h(),Md=s("span"),rf=a("Data2VecVisionConfig"),Xp=h(),Yt=s("div"),w(as.$$.fragment),lf=h(),vo=s("p"),df=a("This is the configuration class to store the configuration of a "),nl=s("a"),cf=a("Data2VecVisionModel"),pf=a(`. 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
`),ns=s("a"),hf=a("facebook/data2vec-vision-base"),uf=a(" architecture."),mf=h(),w(ga.$$.fragment),Rp=h(),bo=s("h2"),_a=s("a"),jd=s("span"),w(ss.$$.fragment),ff=h(),qd=s("span"),gf=a("Data2VecAudioModel"),Jp=h(),et=s("div"),w(rs.$$.fragment),_f=h(),is=s("p"),vf=a(`The bare Data2VecAudio Model transformer outputting raw hidden-states without any specific head on top.
Data2VecAudio was proposed in `),ls=s("a"),bf=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),wf=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Tf=h(),ds=s("p"),kf=a("This model inherits from "),sl=s("a"),yf=a("PreTrainedModel"),$f=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Vf=h(),cs=s("p"),xf=a("This model is a PyTorch "),ps=s("a"),Df=a("torch.nn.Module"),Ff=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Af=h(),$t=s("div"),w(hs.$$.fragment),Cf=h(),wo=s("p"),Ef=a("The "),rl=s("a"),Mf=a("Data2VecAudioModel"),jf=a(" forward method, overrides the "),Pd=s("code"),qf=a("__call__"),Pf=a(" special method."),zf=h(),w(va.$$.fragment),Sf=h(),w(ba.$$.fragment),Kp=h(),To=s("h2"),wa=s("a"),zd=s("span"),w(us.$$.fragment),If=h(),Sd=s("span"),Of=a("Data2VecAudioForAudioFrameClassification"),Yp=h(),ve=s("div"),w(ms.$$.fragment),Lf=h(),Id=s("p"),Nf=a("Data2VecAudio Model with a frame classification head on top for tasks like Speaker Diarization."),Wf=h(),fs=s("p"),Bf=a("Data2VecAudio was proposed in "),gs=s("a"),Hf=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Gf=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Qf=h(),_s=s("p"),Uf=a("This model inherits from "),il=s("a"),Xf=a("PreTrainedModel"),Rf=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Jf=h(),vs=s("p"),Kf=a("This model is a PyTorch "),bs=s("a"),Yf=a("torch.nn.Module"),Zf=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),eg=h(),Vt=s("div"),w(ws.$$.fragment),tg=h(),ko=s("p"),og=a("The "),ll=s("a"),ag=a("Data2VecAudioForAudioFrameClassification"),ng=a(" forward method, overrides the "),Od=s("code"),sg=a("__call__"),rg=a(" special method."),ig=h(),w(Ta.$$.fragment),lg=h(),w(ka.$$.fragment),Zp=h(),yo=s("h2"),ya=s("a"),Ld=s("span"),w(Ts.$$.fragment),dg=h(),Nd=s("span"),cg=a("Data2VecAudioForCTC"),eh=h(),tt=s("div"),w(ks.$$.fragment),pg=h(),$o=s("p"),hg=a("Data2VecAudio Model with a "),Wd=s("code"),ug=a("language modeling"),mg=a(` head on top for Connectionist Temporal Classification (CTC).
Data2VecAudio was proposed in `),ys=s("a"),fg=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),gg=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),_g=h(),$s=s("p"),vg=a("This model inherits from "),dl=s("a"),bg=a("PreTrainedModel"),wg=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Tg=h(),Vs=s("p"),kg=a("This model is a PyTorch "),xs=s("a"),yg=a("torch.nn.Module"),$g=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Vg=h(),xt=s("div"),w(Ds.$$.fragment),xg=h(),Vo=s("p"),Dg=a("The "),cl=s("a"),Fg=a("Data2VecAudioForCTC"),Ag=a(" forward method, overrides the "),Bd=s("code"),Cg=a("__call__"),Eg=a(" special method."),Mg=h(),w($a.$$.fragment),jg=h(),w(Va.$$.fragment),th=h(),xo=s("h2"),xa=s("a"),Hd=s("span"),w(Fs.$$.fragment),qg=h(),Gd=s("span"),Pg=a("Data2VecAudioForSequenceClassification"),oh=h(),be=s("div"),w(As.$$.fragment),zg=h(),Qd=s("p"),Sg=a(`Data2VecAudio Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Ig=h(),Cs=s("p"),Og=a("Data2VecAudio was proposed in "),Es=s("a"),Lg=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Ng=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Wg=h(),Ms=s("p"),Bg=a("This model inherits from "),pl=s("a"),Hg=a("PreTrainedModel"),Gg=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Qg=h(),js=s("p"),Ug=a("This model is a PyTorch "),qs=s("a"),Xg=a("torch.nn.Module"),Rg=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Jg=h(),Dt=s("div"),w(Ps.$$.fragment),Kg=h(),Do=s("p"),Yg=a("The "),hl=s("a"),Zg=a("Data2VecAudioForSequenceClassification"),e_=a(" forward method, overrides the "),Ud=s("code"),t_=a("__call__"),o_=a(" special method."),a_=h(),w(Da.$$.fragment),n_=h(),w(Fa.$$.fragment),ah=h(),Fo=s("h2"),Aa=s("a"),Xd=s("span"),w(zs.$$.fragment),s_=h(),Rd=s("span"),r_=a("Data2VecAudioForXVector"),nh=h(),we=s("div"),w(Ss.$$.fragment),i_=h(),Jd=s("p"),l_=a("Data2VecAudio Model with an XVector feature extraction head on top for tasks like Speaker Verification."),d_=h(),Is=s("p"),c_=a("Data2VecAudio was proposed in "),Os=s("a"),p_=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),h_=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),u_=h(),Ls=s("p"),m_=a("This model inherits from "),ul=s("a"),f_=a("PreTrainedModel"),g_=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),__=h(),Ns=s("p"),v_=a("This model is a PyTorch "),Ws=s("a"),b_=a("torch.nn.Module"),w_=a(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),T_=h(),Ft=s("div"),w(Bs.$$.fragment),k_=h(),Ao=s("p"),y_=a("The "),ml=s("a"),$_=a("Data2VecAudioForXVector"),V_=a(" forward method, overrides the "),Kd=s("code"),x_=a("__call__"),D_=a(" special method."),F_=h(),w(Ca.$$.fragment),A_=h(),w(Ea.$$.fragment),sh=h(),Co=s("h2"),Ma=s("a"),Yd=s("span"),w(Hs.$$.fragment),C_=h(),Zd=s("span"),E_=a("Data2VecTextModel"),rh=h(),re=s("div"),w(Gs.$$.fragment),M_=h(),Qs=s("p"),j_=a(`The bare Data2VecText Model for text transformer outputting raw hidden-states without any specific head on top.
Data2VecText was proposed in `),Us=s("a"),q_=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),P_=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),z_=h(),Xs=s("p"),S_=a("This model inherits from "),fl=s("a"),I_=a("PreTrainedModel"),O_=a(`. 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.)`),L_=h(),Rs=s("p"),N_=a("This model is also a PyTorch "),Js=s("a"),W_=a("torch.nn.Module"),B_=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),H_=h(),Ks=s("p"),G_=a(`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 `),ec=s("em"),Q_=a(`Attention is
all you need`),U_=a(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),X_=h(),Te=s("p"),R_=a("To behave as an decoder the model needs to be initialized with the "),tc=s("code"),J_=a("is_decoder"),K_=a(` argument of the configuration set
to `),oc=s("code"),Y_=a("True"),Z_=a(". To be used in a Seq2Seq model, the model needs to initialized with both "),ac=s("code"),e2=a("is_decoder"),t2=a(` argument and
`),nc=s("code"),o2=a("add_cross_attention"),a2=a(" set to "),sc=s("code"),n2=a("True"),s2=a("; an "),rc=s("code"),r2=a("encoder_hidden_states"),i2=a(" is then expected as an input to the forward pass."),l2=h(),ja=s("p"),d2=a(".. _"),ic=s("em"),c2=a("Attention is all you need"),p2=a(": "),Ys=s("a"),h2=a("https://arxiv.org/abs/1706.03762"),u2=h(),At=s("div"),w(Zs.$$.fragment),m2=h(),Eo=s("p"),f2=a("The "),gl=s("a"),g2=a("Data2VecTextModel"),_2=a(" forward method, overrides the "),lc=s("code"),v2=a("__call__"),b2=a(" special method."),w2=h(),w(qa.$$.fragment),T2=h(),w(Pa.$$.fragment),ih=h(),Mo=s("h2"),za=s("a"),dc=s("span"),w(er.$$.fragment),k2=h(),cc=s("span"),y2=a("Data2VecTextForCausalLM"),lh=h(),ot=s("div"),w(tr.$$.fragment),$2=h(),jo=s("p"),V2=a("Data2VecText Model with a "),pc=s("code"),x2=a("language modeling"),D2=a(` head on top for CLM fine-tuning.
Data2VecText was proposed in `),or=s("a"),F2=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),A2=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),C2=h(),ar=s("p"),E2=a("This model inherits from "),_l=s("a"),M2=a("PreTrainedModel"),j2=a(`. 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.)`),q2=h(),nr=s("p"),P2=a("This model is also a PyTorch "),sr=s("a"),z2=a("torch.nn.Module"),S2=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),I2=h(),Ct=s("div"),w(rr.$$.fragment),O2=h(),qo=s("p"),L2=a("The "),vl=s("a"),N2=a("Data2VecTextForCausalLM"),W2=a(" forward method, overrides the "),hc=s("code"),B2=a("__call__"),H2=a(" special method."),G2=h(),w(Sa.$$.fragment),Q2=h(),w(Ia.$$.fragment),dh=h(),Po=s("h2"),Oa=s("a"),uc=s("span"),w(ir.$$.fragment),U2=h(),mc=s("span"),X2=a("Data2VecTextForMaskedLM"),ch=h(),at=s("div"),w(lr.$$.fragment),R2=h(),zo=s("p"),J2=a("data2vec Model with a "),fc=s("code"),K2=a("language modeling"),Y2=a(` head on top.
Data2VecText was proposed in `),dr=s("a"),Z2=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),ev=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),tv=h(),cr=s("p"),ov=a("This model inherits from "),bl=s("a"),av=a("PreTrainedModel"),nv=a(`. 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.)`),sv=h(),pr=s("p"),rv=a("This model is also a PyTorch "),hr=s("a"),iv=a("torch.nn.Module"),lv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dv=h(),Et=s("div"),w(ur.$$.fragment),cv=h(),So=s("p"),pv=a("The "),wl=s("a"),hv=a("Data2VecTextForMaskedLM"),uv=a(" forward method, overrides the "),gc=s("code"),mv=a("__call__"),fv=a(" special method."),gv=h(),w(La.$$.fragment),_v=h(),w(Na.$$.fragment),ph=h(),Io=s("h2"),Wa=s("a"),_c=s("span"),w(mr.$$.fragment),vv=h(),vc=s("span"),bv=a("Data2VecTextForSequenceClassification"),hh=h(),ke=s("div"),w(fr.$$.fragment),wv=h(),bc=s("p"),Tv=a(`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.`),kv=h(),gr=s("p"),yv=a("Data2VecText was proposed in "),_r=s("a"),$v=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Vv=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),xv=h(),vr=s("p"),Dv=a("This model inherits from "),Tl=s("a"),Fv=a("PreTrainedModel"),Av=a(`. 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.)`),Cv=h(),br=s("p"),Ev=a("This model is also a PyTorch "),wr=s("a"),Mv=a("torch.nn.Module"),jv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qv=h(),st=s("div"),w(Tr.$$.fragment),Pv=h(),Oo=s("p"),zv=a("The "),kl=s("a"),Sv=a("Data2VecTextForSequenceClassification"),Iv=a(" forward method, overrides the "),wc=s("code"),Ov=a("__call__"),Lv=a(" special method."),Nv=h(),w(Ba.$$.fragment),Wv=h(),w(Ha.$$.fragment),Bv=h(),w(Ga.$$.fragment),uh=h(),Lo=s("h2"),Qa=s("a"),Tc=s("span"),w(kr.$$.fragment),Hv=h(),kc=s("span"),Gv=a("Data2VecTextForMultipleChoice"),mh=h(),ye=s("div"),w(yr.$$.fragment),Qv=h(),yc=s("p"),Uv=a(`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.`),Xv=h(),$r=s("p"),Rv=a("Data2VecText was proposed in "),Vr=s("a"),Jv=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Kv=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Yv=h(),xr=s("p"),Zv=a("This model inherits from "),yl=s("a"),eb=a("PreTrainedModel"),tb=a(`. 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=h(),Dr=s("p"),ab=a("This model is also a PyTorch "),Fr=s("a"),nb=a("torch.nn.Module"),sb=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rb=h(),Mt=s("div"),w(Ar.$$.fragment),ib=h(),No=s("p"),lb=a("The "),$l=s("a"),db=a("Data2VecTextForMultipleChoice"),cb=a(" forward method, overrides the "),$c=s("code"),pb=a("__call__"),hb=a(" special method."),ub=h(),w(Ua.$$.fragment),mb=h(),w(Xa.$$.fragment),fh=h(),Wo=s("h2"),Ra=s("a"),Vc=s("span"),w(Cr.$$.fragment),fb=h(),xc=s("span"),gb=a("Data2VecTextForTokenClassification"),gh=h(),$e=s("div"),w(Er.$$.fragment),_b=h(),Dc=s("p"),vb=a(`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.`),bb=h(),Mr=s("p"),wb=a("Data2VecText was proposed in "),jr=s("a"),Tb=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),kb=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),yb=h(),qr=s("p"),$b=a("This model inherits from "),Vl=s("a"),Vb=a("PreTrainedModel"),xb=a(`. 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.)`),Db=h(),Pr=s("p"),Fb=a("This model is also a PyTorch "),zr=s("a"),Ab=a("torch.nn.Module"),Cb=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Eb=h(),jt=s("div"),w(Sr.$$.fragment),Mb=h(),Bo=s("p"),jb=a("The "),xl=s("a"),qb=a("Data2VecTextForTokenClassification"),Pb=a(" forward method, overrides the "),Fc=s("code"),zb=a("__call__"),Sb=a(" special method."),Ib=h(),w(Ja.$$.fragment),Ob=h(),w(Ka.$$.fragment),_h=h(),Ho=s("h2"),Ya=s("a"),Ac=s("span"),w(Ir.$$.fragment),Lb=h(),Cc=s("span"),Nb=a("Data2VecTextForQuestionAnswering"),vh=h(),Ve=s("div"),w(Or.$$.fragment),Wb=h(),Go=s("p"),Bb=a(`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 `),Ec=s("code"),Hb=a("span start logits"),Gb=a(" and "),Mc=s("code"),Qb=a("span end logits"),Ub=a(")."),Xb=h(),Lr=s("p"),Rb=a("Data2VecText was proposed in "),Nr=s("a"),Jb=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Kb=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Yb=h(),Wr=s("p"),Zb=a("This model inherits from "),Dl=s("a"),e1=a("PreTrainedModel"),t1=a(`. 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.)`),o1=h(),Br=s("p"),a1=a("This model is also a PyTorch "),Hr=s("a"),n1=a("torch.nn.Module"),s1=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),r1=h(),qt=s("div"),w(Gr.$$.fragment),i1=h(),Qo=s("p"),l1=a("The "),Fl=s("a"),d1=a("Data2VecTextForQuestionAnswering"),c1=a(" forward method, overrides the "),jc=s("code"),p1=a("__call__"),h1=a(" special method."),u1=h(),w(Za.$$.fragment),m1=h(),w(en.$$.fragment),bh=h(),Uo=s("h2"),tn=s("a"),qc=s("span"),w(Qr.$$.fragment),f1=h(),Pc=s("span"),g1=a("Data2VecVisionModel"),wh=h(),Zt=s("div"),w(Ur.$$.fragment),_1=h(),Xr=s("p"),v1=a(`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rr=s("a"),b1=a("torch.nn.Module"),w1=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),T1=h(),Pt=s("div"),w(Jr.$$.fragment),k1=h(),Xo=s("p"),y1=a("The "),Al=s("a"),$1=a("Data2VecVisionModel"),V1=a(" forward method, overrides the "),zc=s("code"),x1=a("__call__"),D1=a(" special method."),F1=h(),w(on.$$.fragment),A1=h(),w(an.$$.fragment),Th=h(),Ro=s("h2"),nn=s("a"),Sc=s("span"),w(Kr.$$.fragment),C1=h(),Ic=s("span"),E1=a("Data2VecVisionForImageClassification"),kh=h(),ct=s("div"),w(Yr.$$.fragment),M1=h(),Oc=s("p"),j1=a(`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.`),q1=h(),Zr=s("p"),P1=a("This model is a PyTorch "),ei=s("a"),z1=a("torch.nn.Module"),S1=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),I1=h(),zt=s("div"),w(ti.$$.fragment),O1=h(),Jo=s("p"),L1=a("The "),Cl=s("a"),N1=a("Data2VecVisionForImageClassification"),W1=a(" forward method, overrides the "),Lc=s("code"),B1=a("__call__"),H1=a(" special method."),G1=h(),w(sn.$$.fragment),Q1=h(),w(rn.$$.fragment),yh=h(),Ko=s("h2"),ln=s("a"),Nc=s("span"),w(oi.$$.fragment),U1=h(),Wc=s("span"),X1=a("Data2VecVisionForSemanticSegmentation"),$h=h(),pt=s("div"),w(ai.$$.fragment),R1=h(),Bc=s("p"),J1=a("Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),K1=h(),ni=s("p"),Y1=a("This model is a PyTorch "),si=s("a"),Z1=a("torch.nn.Module"),ew=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tw=h(),St=s("div"),w(ri.$$.fragment),ow=h(),Yo=s("p"),aw=a("The "),El=s("a"),nw=a("Data2VecVisionForSemanticSegmentation"),sw=a(" forward method, overrides the "),Hc=s("code"),rw=a("__call__"),iw=a(" special method."),lw=h(),w(dn.$$.fragment),dw=h(),w(cn.$$.fragment),Vh=h(),Zo=s("h2"),pn=s("a"),Gc=s("span"),w(ii.$$.fragment),cw=h(),Qc=s("span"),pw=a("TFData2VecVisionModel"),xh=h(),nt=s("div"),w(li.$$.fragment),hw=h(),di=s("p"),uw=a(`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Ml=s("a"),mw=a("TFPreTrainedModel"),fw=a(`. 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.).`),gw=h(),ci=s("p"),_w=a("This model is also a "),pi=s("a"),vw=a("tf.keras.Model"),bw=a(` 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.`),ww=h(),w(hn.$$.fragment),Tw=h(),It=s("div"),w(hi.$$.fragment),kw=h(),ea=s("p"),yw=a("The "),jl=s("a"),$w=a("TFData2VecVisionModel"),Vw=a(" forward method, overrides the "),Uc=s("code"),xw=a("__call__"),Dw=a(" special method."),Fw=h(),w(un.$$.fragment),Aw=h(),w(mn.$$.fragment),Dh=h(),ta=s("h2"),fn=s("a"),Xc=s("span"),w(ui.$$.fragment),Cw=h(),Rc=s("span"),Ew=a("TFData2VecVisionForImageClassification"),Fh=h(),xe=s("div"),w(mi.$$.fragment),Mw=h(),Jc=s("p"),jw=a(`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.`),qw=h(),fi=s("p"),Pw=a("This model inherits from "),ql=s("a"),zw=a("TFPreTrainedModel"),Sw=a(`. 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.).`),Iw=h(),gi=s("p"),Ow=a("This model is also a "),_i=s("a"),Lw=a("tf.keras.Model"),Nw=a(` 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.`),Ww=h(),w(gn.$$.fragment),Bw=h(),Ot=s("div"),w(vi.$$.fragment),Hw=h(),oa=s("p"),Gw=a("The "),Pl=s("a"),Qw=a("TFData2VecVisionForImageClassification"),Uw=a(" forward method, overrides the "),Kc=s("code"),Xw=a("__call__"),Rw=a(" special method."),Jw=h(),w(_n.$$.fragment),Kw=h(),w(vn.$$.fragment),Ah=h(),aa=s("h2"),bn=s("a"),Yc=s("span"),w(bi.$$.fragment),Yw=h(),Zc=s("span"),Zw=a("TFData2VecVisionForSemanticSegmentation"),Ch=h(),De=s("div"),w(wi.$$.fragment),eT=h(),ep=s("p"),tT=a("Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),oT=h(),Ti=s("p"),aT=a("This model inherits from "),zl=s("a"),nT=a("TFPreTrainedModel"),sT=a(`. 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.).`),rT=h(),ki=s("p"),iT=a("This model is also a "),yi=s("a"),lT=a("tf.keras.Model"),dT=a(` 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.`),cT=h(),w(wn.$$.fragment),pT=h(),Lt=s("div"),w($i.$$.fragment),hT=h(),na=s("p"),uT=a("The "),Sl=s("a"),mT=a("TFData2VecVisionForSemanticSegmentation"),fT=a(" forward method, overrides the "),tp=s("code"),gT=a("__call__"),_T=a(" special method."),vT=h(),w(Tn.$$.fragment),bT=h(),w(kn.$$.fragment),this.h()},l(o){const g=mV('[data-svelte="svelte-1phssyn"]',document.head);d=r(g,"META",{name:!0,content:!0}),g.forEach(t),b=u(o),f=r(o,"H1",{class:!0});var Vi=i(f);m=r(Vi,"A",{id:!0,class:!0,href:!0});var op=i(m);v=r(op,"SPAN",{});var ap=i(v);T(l.$$.fragment,ap),ap.forEach(t),op.forEach(t),c=u(Vi),F=r(Vi,"SPAN",{});var np=i(F);Ie=n(np,"Data2Vec"),np.forEach(t),Vi.forEach(t),Fe=u(o),N=r(o,"H2",{class:!0});var xi=i(N);le=r(xi,"A",{id:!0,class:!0,href:!0});var sp=i(le);de=r(sp,"SPAN",{});var rp=i(de);T(C.$$.fragment,rp),rp.forEach(t),sp.forEach(t),Oe=u(xi),X=r(xi,"SPAN",{});var ip=i(X);Le=n(ip,"Overview"),ip.forEach(t),xi.forEach(t),Ae=u(o),W=r(o,"P",{});var Di=i(W);Ne=n(Di,"The Data2Vec model was proposed in "),ce=r(Di,"A",{href:!0,rel:!0});var lp=i(ce);te=n(lp,"data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language"),lp.forEach(t),We=n(Di,` 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.`),Di.forEach(t),Ce=u(o),B=r(o,"P",{});var dp=i(B);Be=n(dp,"The abstract from the paper is the following:"),dp.forEach(t),Ee=u(o),H=r(o,"P",{});var cp=i(H);pe=r(cp,"EM",{});var Fi=i(pe);He=n(Fi,`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 `),R=r(Fi,"A",{href:!0,rel:!0});var pp=i(R);j=n(pp,"www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),pp.forEach(t),P=n(Fi,"."),Fi.forEach(t),cp.forEach(t),Me=u(o),G=r(o,"P",{});var hp=i(G);Ge=n(hp,"Tips:"),hp.forEach(t),je=u(o),z=r(o,"UL",{});var eo=i(z);_e=r(eo,"LI",{});var up=i(_e);Qe=n(up,"Data2VecAudio, Data2VecText, and Data2VecVision have all been trained using the same self-supervised learning method."),up.forEach(t),S=u(eo),he=r(eo,"LI",{});var Ai=i(he);oe=n(Ai,"For Data2VecAudio, preprocessing is identical to "),me=r(Ai,"A",{href:!0});var mp=i(me);Ue=n(mp,"Wav2Vec2Model"),mp.forEach(t),ae=n(Ai,", including feature extraction"),Ai.forEach(t),Xe=u(eo),ue=r(eo,"LI",{});var Ci=i(ue);Q=n(Ci,"For Data2VecText, preprocessing is identical to "),fe=r(Ci,"A",{href:!0});var fp=i(fe);ne=n(fp,"RobertaModel"),fp.forEach(t),Re=n(Ci,", including tokenization."),Ci.forEach(t),ge=u(eo),q=r(eo,"LI",{});var Ei=i(q);Je=n(Ei,"For Data2VecVision, preprocessing is identical to "),I=r(Ei,"A",{href:!0});var gp=i(I);Ke=n(gp,"BeitModel"),gp.forEach(t),Ye=n(Ei,", including feature extraction."),Ei.forEach(t),eo.forEach(t),x=u(o),A=r(o,"P",{});var ht=i(A);ut=n(ht,"This model was contributed by "),J=r(ht,"A",{href:!0,rel:!0});var _p=i(J);mt=n(_p,"edugp"),_p.forEach(t),ft=n(ht," and "),E=r(ht,"A",{href:!0,rel:!0});var vp=i(E);gt=n(vp,"patrickvonplaten"),vp.forEach(t),_t=n(ht,`.
`),qe=r(ht,"A",{href:!0,rel:!0});var bp=i(qe);vt=n(bp,"sayakpaul"),bp.forEach(t),bt=n(ht," and "),O=r(ht,"A",{href:!0,rel:!0});var wp=i(O);se=n(wp,"Rocketknight1"),wp.forEach(t),wt=n(ht," contributed Data2Vec for vision in TensorFlow."),ht.forEach(t),it=u(o),L=r(o,"P",{});var sa=i(L);Tt=n(sa,"The original code (for NLP and Speech) can be found "),Pe=r(sa,"A",{href:!0,rel:!0});var Tp=i(Pe);Ze=n(Tp,"here"),Tp.forEach(t),kt=n(sa,`.
The original code for vision can be found `),K=r(sa,"A",{href:!0,rel:!0});var kp=i(K);yt=n(kp,"here"),kp.forEach(t),Hu=n(sa,"."),sa.forEach(t),Mp=u(o),co=r(o,"H2",{class:!0});var Mi=i(co);ia=r(Mi,"A",{id:!0,class:!0,href:!0});var yp=i(ia);hd=r(yp,"SPAN",{});var $p=i(hd);T(Gn.$$.fragment,$p),$p.forEach(t),yp.forEach(t),Gu=u(Mi),ud=r(Mi,"SPAN",{});var Vp=i(ud);Qu=n(Vp,"Resources"),Vp.forEach(t),Mi.forEach(t),jp=u(o),qi=r(o,"P",{});var xp=i(qi);Uu=n(xp,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with Data2Vec."),xp.forEach(t),qp=u(o),T(Qn.$$.fragment,o),Pp=u(o),la=r(o,"UL",{});var ji=i(la);to=r(ji,"LI",{});var oo=i(to);Pi=r(oo,"A",{href:!0});var Dp=i(Pi);Xu=n(Dp,"Data2VecVisionForImageClassification"),Dp.forEach(t),Ru=n(oo," is supported by this "),Un=r(oo,"A",{href:!0,rel:!0});var Fp=i(Un);Ju=n(Fp,"example script"),Fp.forEach(t),Ku=n(oo," and "),Xn=r(oo,"A",{href:!0,rel:!0});var Ap=i(Xn);Yu=n(Ap,"notebook"),Ap.forEach(t),Zu=n(oo,"."),oo.forEach(t),em=u(ji),po=r(ji,"LI",{});var ra=i(po);tm=n(ra,"To fine-tune "),zi=r(ra,"A",{href:!0});var Cp=i(zi);om=n(Cp,"TFData2VecVisionForImageClassification"),Cp.forEach(t),am=n(ra," on a custom dataset, see "),Rn=r(ra,"A",{href:!0,rel:!0});var wT=i(Rn);nm=n(wT,"this notebook"),wT.forEach(t),sm=n(ra,"."),ra.forEach(t),ji.forEach(t),zp=u(o),Si=r(o,"P",{});var TT=i(Si);md=r(TT,"STRONG",{});var kT=i(md);rm=n(kT,"Data2VecText documentation resources"),kT.forEach(t),TT.forEach(t),Sp=u(o),ze=r(o,"UL",{});var Nt=i(ze);fd=r(Nt,"LI",{});var yT=i(fd);Ii=r(yT,"A",{href:!0});var $T=i(Ii);im=n($T,"Text classification task guide"),$T.forEach(t),yT.forEach(t),lm=u(Nt),gd=r(Nt,"LI",{});var VT=i(gd);Oi=r(VT,"A",{href:!0});var xT=i(Oi);dm=n(xT,"Token classification task guide"),xT.forEach(t),VT.forEach(t),cm=u(Nt),_d=r(Nt,"LI",{});var DT=i(_d);Li=r(DT,"A",{href:!0});var FT=i(Li);pm=n(FT,"Question answering task guide"),FT.forEach(t),DT.forEach(t),hm=u(Nt),vd=r(Nt,"LI",{});var AT=i(vd);Ni=r(AT,"A",{href:!0});var CT=i(Ni);um=n(CT,"Causal language modeling task guide"),CT.forEach(t),AT.forEach(t),mm=u(Nt),bd=r(Nt,"LI",{});var ET=i(bd);Wi=r(ET,"A",{href:!0});var MT=i(Wi);fm=n(MT,"Masked language modeling task guide"),MT.forEach(t),ET.forEach(t),gm=u(Nt),wd=r(Nt,"LI",{});var jT=i(wd);Bi=r(jT,"A",{href:!0});var qT=i(Bi);_m=n(qT,"Multiple choice task guide"),qT.forEach(t),jT.forEach(t),Nt.forEach(t),Ip=u(o),Hi=r(o,"P",{});var PT=i(Hi);Td=r(PT,"STRONG",{});var zT=i(Td);vm=n(zT,"Data2VecAudio documentation resources"),zT.forEach(t),PT.forEach(t),Op=u(o),da=r(o,"UL",{});var Mh=i(da);kd=r(Mh,"LI",{});var ST=i(kd);Gi=r(ST,"A",{href:!0});var IT=i(Gi);bm=n(IT,"Audio classification task guide"),IT.forEach(t),ST.forEach(t),wm=u(Mh),yd=r(Mh,"LI",{});var OT=i(yd);Qi=r(OT,"A",{href:!0});var LT=i(Qi);Tm=n(LT,"Automatic speech recognition task guide"),LT.forEach(t),OT.forEach(t),Mh.forEach(t),Lp=u(o),Ui=r(o,"P",{});var NT=i(Ui);$d=r(NT,"STRONG",{});var WT=i($d);km=n(WT,"Data2VecVision documentation resources"),WT.forEach(t),NT.forEach(t),Np=u(o),ca=r(o,"UL",{});var jh=i(ca);Vd=r(jh,"LI",{});var BT=i(Vd);Xi=r(BT,"A",{href:!0});var HT=i(Xi);ym=n(HT,"Image classification"),HT.forEach(t),BT.forEach(t),$m=u(jh),xd=r(jh,"LI",{});var GT=i(xd);Ri=r(GT,"A",{href:!0});var QT=i(Ri);Vm=n(QT,"Semantic segmentation"),QT.forEach(t),GT.forEach(t),jh.forEach(t),Wp=u(o),Ji=r(o,"P",{});var UT=i(Ji);xm=n(UT,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),UT.forEach(t),Bp=u(o),ho=r(o,"H2",{class:!0});var qh=i(ho);pa=r(qh,"A",{id:!0,class:!0,href:!0});var XT=i(pa);Dd=r(XT,"SPAN",{});var RT=i(Dd);T(Jn.$$.fragment,RT),RT.forEach(t),XT.forEach(t),Dm=u(qh),Fd=r(qh,"SPAN",{});var JT=i(Fd);Fm=n(JT,"Data2VecTextConfig"),JT.forEach(t),qh.forEach(t),Hp=u(o),lt=r(o,"DIV",{class:!0});var yn=i(lt);T(Kn.$$.fragment,yn),Am=u(yn),Kt=r(yn,"P",{});var $n=i(Kt);Cm=n($n,"This is the configuration class to store the configuration of a "),Ki=r($n,"A",{href:!0});var KT=i(Ki);Em=n(KT,"Data2VecTextModel"),KT.forEach(t),Mm=n($n," and "),Yi=r($n,"A",{href:!0});var YT=i(Yi);jm=n(YT,"Data2VecTextModel"),YT.forEach(t),qm=n($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
`),Yn=r($n,"A",{href:!0,rel:!0});var ZT=i(Yn);Pm=n(ZT,"facebook/data2vec-text-base"),ZT.forEach(t),zm=n($n," architecture."),$n.forEach(t),Sm=u(yn),uo=r(yn,"P",{});var Il=i(uo);Im=n(Il,"Configuration objects inherit from "),Zi=r(Il,"A",{href:!0});var ek=i(Zi);Om=n(ek,"PretrainedConfig"),ek.forEach(t),Lm=n(Il,` and can be used to control the model outputs. Read the
documentation from `),el=r(Il,"A",{href:!0});var tk=i(el);Nm=n(tk,"PretrainedConfig"),tk.forEach(t),Wm=n(Il," for more information."),Il.forEach(t),Bm=u(yn),T(ha.$$.fragment,yn),yn.forEach(t),Gp=u(o),mo=r(o,"H2",{class:!0});var Ph=i(mo);ua=r(Ph,"A",{id:!0,class:!0,href:!0});var ok=i(ua);Ad=r(ok,"SPAN",{});var ak=i(Ad);T(Zn.$$.fragment,ak),ak.forEach(t),ok.forEach(t),Hm=u(Ph),Cd=r(Ph,"SPAN",{});var nk=i(Cd);Gm=n(nk,"Data2VecAudioConfig"),nk.forEach(t),Ph.forEach(t),Qp=u(o),dt=r(o,"DIV",{class:!0});var Vn=i(dt);T(es.$$.fragment,Vn),Qm=u(Vn),fo=r(Vn,"P",{});var Ol=i(fo);Um=n(Ol,"This is the configuration class to store the configuration of a "),tl=r(Ol,"A",{href:!0});var sk=i(tl);Xm=n(sk,"Data2VecAudioModel"),sk.forEach(t),Rm=n(Ol,`. 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
`),ts=r(Ol,"A",{href:!0,rel:!0});var rk=i(ts);Jm=n(rk,"facebook/data2vec-audio-base-960h"),rk.forEach(t),Km=n(Ol," architecture."),Ol.forEach(t),Ym=u(Vn),go=r(Vn,"P",{});var Ll=i(go);Zm=n(Ll,"Configuration objects inherit from "),ol=r(Ll,"A",{href:!0});var ik=i(ol);ef=n(ik,"PretrainedConfig"),ik.forEach(t),tf=n(Ll,` and can be used to control the model outputs. Read the
documentation from `),al=r(Ll,"A",{href:!0});var lk=i(al);of=n(lk,"PretrainedConfig"),lk.forEach(t),af=n(Ll," for more information."),Ll.forEach(t),nf=u(Vn),T(ma.$$.fragment,Vn),Vn.forEach(t),Up=u(o),_o=r(o,"H2",{class:!0});var zh=i(_o);fa=r(zh,"A",{id:!0,class:!0,href:!0});var dk=i(fa);Ed=r(dk,"SPAN",{});var ck=i(Ed);T(os.$$.fragment,ck),ck.forEach(t),dk.forEach(t),sf=u(zh),Md=r(zh,"SPAN",{});var pk=i(Md);rf=n(pk,"Data2VecVisionConfig"),pk.forEach(t),zh.forEach(t),Xp=u(o),Yt=r(o,"DIV",{class:!0});var Nl=i(Yt);T(as.$$.fragment,Nl),lf=u(Nl),vo=r(Nl,"P",{});var Wl=i(vo);df=n(Wl,"This is the configuration class to store the configuration of a "),nl=r(Wl,"A",{href:!0});var hk=i(nl);cf=n(hk,"Data2VecVisionModel"),hk.forEach(t),pf=n(Wl,`. 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
`),ns=r(Wl,"A",{href:!0,rel:!0});var uk=i(ns);hf=n(uk,"facebook/data2vec-vision-base"),uk.forEach(t),uf=n(Wl," architecture."),Wl.forEach(t),mf=u(Nl),T(ga.$$.fragment,Nl),Nl.forEach(t),Rp=u(o),bo=r(o,"H2",{class:!0});var Sh=i(bo);_a=r(Sh,"A",{id:!0,class:!0,href:!0});var mk=i(_a);jd=r(mk,"SPAN",{});var fk=i(jd);T(ss.$$.fragment,fk),fk.forEach(t),mk.forEach(t),ff=u(Sh),qd=r(Sh,"SPAN",{});var gk=i(qd);gf=n(gk,"Data2VecAudioModel"),gk.forEach(t),Sh.forEach(t),Jp=u(o),et=r(o,"DIV",{class:!0});var ao=i(et);T(rs.$$.fragment,ao),_f=u(ao),is=r(ao,"P",{});var Ih=i(is);vf=n(Ih,`The bare Data2VecAudio Model transformer outputting raw hidden-states without any specific head on top.
Data2VecAudio was proposed in `),ls=r(Ih,"A",{href:!0,rel:!0});var _k=i(ls);bf=n(_k,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),_k.forEach(t),wf=n(Ih,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Ih.forEach(t),Tf=u(ao),ds=r(ao,"P",{});var Oh=i(ds);kf=n(Oh,"This model inherits from "),sl=r(Oh,"A",{href:!0});var vk=i(sl);yf=n(vk,"PreTrainedModel"),vk.forEach(t),$f=n(Oh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Oh.forEach(t),Vf=u(ao),cs=r(ao,"P",{});var Lh=i(cs);xf=n(Lh,"This model is a PyTorch "),ps=r(Lh,"A",{href:!0,rel:!0});var bk=i(ps);Df=n(bk,"torch.nn.Module"),bk.forEach(t),Ff=n(Lh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Lh.forEach(t),Af=u(ao),$t=r(ao,"DIV",{class:!0});var xn=i($t);T(hs.$$.fragment,xn),Cf=u(xn),wo=r(xn,"P",{});var Bl=i(wo);Ef=n(Bl,"The "),rl=r(Bl,"A",{href:!0});var wk=i(rl);Mf=n(wk,"Data2VecAudioModel"),wk.forEach(t),jf=n(Bl," forward method, overrides the "),Pd=r(Bl,"CODE",{});var Tk=i(Pd);qf=n(Tk,"__call__"),Tk.forEach(t),Pf=n(Bl," special method."),Bl.forEach(t),zf=u(xn),T(va.$$.fragment,xn),Sf=u(xn),T(ba.$$.fragment,xn),xn.forEach(t),ao.forEach(t),Kp=u(o),To=r(o,"H2",{class:!0});var Nh=i(To);wa=r(Nh,"A",{id:!0,class:!0,href:!0});var kk=i(wa);zd=r(kk,"SPAN",{});var yk=i(zd);T(us.$$.fragment,yk),yk.forEach(t),kk.forEach(t),If=u(Nh),Sd=r(Nh,"SPAN",{});var $k=i(Sd);Of=n($k,"Data2VecAudioForAudioFrameClassification"),$k.forEach(t),Nh.forEach(t),Yp=u(o),ve=r(o,"DIV",{class:!0});var Wt=i(ve);T(ms.$$.fragment,Wt),Lf=u(Wt),Id=r(Wt,"P",{});var Vk=i(Id);Nf=n(Vk,"Data2VecAudio Model with a frame classification head on top for tasks like Speaker Diarization."),Vk.forEach(t),Wf=u(Wt),fs=r(Wt,"P",{});var Wh=i(fs);Bf=n(Wh,"Data2VecAudio was proposed in "),gs=r(Wh,"A",{href:!0,rel:!0});var xk=i(gs);Hf=n(xk,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),xk.forEach(t),Gf=n(Wh,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Wh.forEach(t),Qf=u(Wt),_s=r(Wt,"P",{});var Bh=i(_s);Uf=n(Bh,"This model inherits from "),il=r(Bh,"A",{href:!0});var Dk=i(il);Xf=n(Dk,"PreTrainedModel"),Dk.forEach(t),Rf=n(Bh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Bh.forEach(t),Jf=u(Wt),vs=r(Wt,"P",{});var Hh=i(vs);Kf=n(Hh,"This model is a PyTorch "),bs=r(Hh,"A",{href:!0,rel:!0});var Fk=i(bs);Yf=n(Fk,"torch.nn.Module"),Fk.forEach(t),Zf=n(Hh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hh.forEach(t),eg=u(Wt),Vt=r(Wt,"DIV",{class:!0});var Dn=i(Vt);T(ws.$$.fragment,Dn),tg=u(Dn),ko=r(Dn,"P",{});var Hl=i(ko);og=n(Hl,"The "),ll=r(Hl,"A",{href:!0});var Ak=i(ll);ag=n(Ak,"Data2VecAudioForAudioFrameClassification"),Ak.forEach(t),ng=n(Hl," forward method, overrides the "),Od=r(Hl,"CODE",{});var Ck=i(Od);sg=n(Ck,"__call__"),Ck.forEach(t),rg=n(Hl," special method."),Hl.forEach(t),ig=u(Dn),T(Ta.$$.fragment,Dn),lg=u(Dn),T(ka.$$.fragment,Dn),Dn.forEach(t),Wt.forEach(t),Zp=u(o),yo=r(o,"H2",{class:!0});var Gh=i(yo);ya=r(Gh,"A",{id:!0,class:!0,href:!0});var Ek=i(ya);Ld=r(Ek,"SPAN",{});var Mk=i(Ld);T(Ts.$$.fragment,Mk),Mk.forEach(t),Ek.forEach(t),dg=u(Gh),Nd=r(Gh,"SPAN",{});var jk=i(Nd);cg=n(jk,"Data2VecAudioForCTC"),jk.forEach(t),Gh.forEach(t),eh=u(o),tt=r(o,"DIV",{class:!0});var no=i(tt);T(ks.$$.fragment,no),pg=u(no),$o=r(no,"P",{});var Gl=i($o);hg=n(Gl,"Data2VecAudio Model with a "),Wd=r(Gl,"CODE",{});var qk=i(Wd);ug=n(qk,"language modeling"),qk.forEach(t),mg=n(Gl,` head on top for Connectionist Temporal Classification (CTC).
Data2VecAudio was proposed in `),ys=r(Gl,"A",{href:!0,rel:!0});var Pk=i(ys);fg=n(Pk,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Pk.forEach(t),gg=n(Gl,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Gl.forEach(t),_g=u(no),$s=r(no,"P",{});var Qh=i($s);vg=n(Qh,"This model inherits from "),dl=r(Qh,"A",{href:!0});var zk=i(dl);bg=n(zk,"PreTrainedModel"),zk.forEach(t),wg=n(Qh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Qh.forEach(t),Tg=u(no),Vs=r(no,"P",{});var Uh=i(Vs);kg=n(Uh,"This model is a PyTorch "),xs=r(Uh,"A",{href:!0,rel:!0});var Sk=i(xs);yg=n(Sk,"torch.nn.Module"),Sk.forEach(t),$g=n(Uh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Uh.forEach(t),Vg=u(no),xt=r(no,"DIV",{class:!0});var Fn=i(xt);T(Ds.$$.fragment,Fn),xg=u(Fn),Vo=r(Fn,"P",{});var Ql=i(Vo);Dg=n(Ql,"The "),cl=r(Ql,"A",{href:!0});var Ik=i(cl);Fg=n(Ik,"Data2VecAudioForCTC"),Ik.forEach(t),Ag=n(Ql," forward method, overrides the "),Bd=r(Ql,"CODE",{});var Ok=i(Bd);Cg=n(Ok,"__call__"),Ok.forEach(t),Eg=n(Ql," special method."),Ql.forEach(t),Mg=u(Fn),T($a.$$.fragment,Fn),jg=u(Fn),T(Va.$$.fragment,Fn),Fn.forEach(t),no.forEach(t),th=u(o),xo=r(o,"H2",{class:!0});var Xh=i(xo);xa=r(Xh,"A",{id:!0,class:!0,href:!0});var Lk=i(xa);Hd=r(Lk,"SPAN",{});var Nk=i(Hd);T(Fs.$$.fragment,Nk),Nk.forEach(t),Lk.forEach(t),qg=u(Xh),Gd=r(Xh,"SPAN",{});var Wk=i(Gd);Pg=n(Wk,"Data2VecAudioForSequenceClassification"),Wk.forEach(t),Xh.forEach(t),oh=u(o),be=r(o,"DIV",{class:!0});var Bt=i(be);T(As.$$.fragment,Bt),zg=u(Bt),Qd=r(Bt,"P",{});var Bk=i(Qd);Sg=n(Bk,`Data2VecAudio Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Bk.forEach(t),Ig=u(Bt),Cs=r(Bt,"P",{});var Rh=i(Cs);Og=n(Rh,"Data2VecAudio was proposed in "),Es=r(Rh,"A",{href:!0,rel:!0});var Hk=i(Es);Lg=n(Hk,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Hk.forEach(t),Ng=n(Rh,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Rh.forEach(t),Wg=u(Bt),Ms=r(Bt,"P",{});var Jh=i(Ms);Bg=n(Jh,"This model inherits from "),pl=r(Jh,"A",{href:!0});var Gk=i(pl);Hg=n(Gk,"PreTrainedModel"),Gk.forEach(t),Gg=n(Jh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Jh.forEach(t),Qg=u(Bt),js=r(Bt,"P",{});var Kh=i(js);Ug=n(Kh,"This model is a PyTorch "),qs=r(Kh,"A",{href:!0,rel:!0});var Qk=i(qs);Xg=n(Qk,"torch.nn.Module"),Qk.forEach(t),Rg=n(Kh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Kh.forEach(t),Jg=u(Bt),Dt=r(Bt,"DIV",{class:!0});var An=i(Dt);T(Ps.$$.fragment,An),Kg=u(An),Do=r(An,"P",{});var Ul=i(Do);Yg=n(Ul,"The "),hl=r(Ul,"A",{href:!0});var Uk=i(hl);Zg=n(Uk,"Data2VecAudioForSequenceClassification"),Uk.forEach(t),e_=n(Ul," forward method, overrides the "),Ud=r(Ul,"CODE",{});var Xk=i(Ud);t_=n(Xk,"__call__"),Xk.forEach(t),o_=n(Ul," special method."),Ul.forEach(t),a_=u(An),T(Da.$$.fragment,An),n_=u(An),T(Fa.$$.fragment,An),An.forEach(t),Bt.forEach(t),ah=u(o),Fo=r(o,"H2",{class:!0});var Yh=i(Fo);Aa=r(Yh,"A",{id:!0,class:!0,href:!0});var Rk=i(Aa);Xd=r(Rk,"SPAN",{});var Jk=i(Xd);T(zs.$$.fragment,Jk),Jk.forEach(t),Rk.forEach(t),s_=u(Yh),Rd=r(Yh,"SPAN",{});var Kk=i(Rd);r_=n(Kk,"Data2VecAudioForXVector"),Kk.forEach(t),Yh.forEach(t),nh=u(o),we=r(o,"DIV",{class:!0});var Ht=i(we);T(Ss.$$.fragment,Ht),i_=u(Ht),Jd=r(Ht,"P",{});var Yk=i(Jd);l_=n(Yk,"Data2VecAudio Model with an XVector feature extraction head on top for tasks like Speaker Verification."),Yk.forEach(t),d_=u(Ht),Is=r(Ht,"P",{});var Zh=i(Is);c_=n(Zh,"Data2VecAudio was proposed in "),Os=r(Zh,"A",{href:!0,rel:!0});var Zk=i(Os);p_=n(Zk,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Zk.forEach(t),h_=n(Zh,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Zh.forEach(t),u_=u(Ht),Ls=r(Ht,"P",{});var eu=i(Ls);m_=n(eu,"This model inherits from "),ul=r(eu,"A",{href:!0});var ey=i(ul);f_=n(ey,"PreTrainedModel"),ey.forEach(t),g_=n(eu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),eu.forEach(t),__=u(Ht),Ns=r(Ht,"P",{});var tu=i(Ns);v_=n(tu,"This model is a PyTorch "),Ws=r(tu,"A",{href:!0,rel:!0});var ty=i(Ws);b_=n(ty,"torch.nn.Module"),ty.forEach(t),w_=n(tu,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tu.forEach(t),T_=u(Ht),Ft=r(Ht,"DIV",{class:!0});var Cn=i(Ft);T(Bs.$$.fragment,Cn),k_=u(Cn),Ao=r(Cn,"P",{});var Xl=i(Ao);y_=n(Xl,"The "),ml=r(Xl,"A",{href:!0});var oy=i(ml);$_=n(oy,"Data2VecAudioForXVector"),oy.forEach(t),V_=n(Xl," forward method, overrides the "),Kd=r(Xl,"CODE",{});var ay=i(Kd);x_=n(ay,"__call__"),ay.forEach(t),D_=n(Xl," special method."),Xl.forEach(t),F_=u(Cn),T(Ca.$$.fragment,Cn),A_=u(Cn),T(Ea.$$.fragment,Cn),Cn.forEach(t),Ht.forEach(t),sh=u(o),Co=r(o,"H2",{class:!0});var ou=i(Co);Ma=r(ou,"A",{id:!0,class:!0,href:!0});var ny=i(Ma);Yd=r(ny,"SPAN",{});var sy=i(Yd);T(Hs.$$.fragment,sy),sy.forEach(t),ny.forEach(t),C_=u(ou),Zd=r(ou,"SPAN",{});var ry=i(Zd);E_=n(ry,"Data2VecTextModel"),ry.forEach(t),ou.forEach(t),rh=u(o),re=r(o,"DIV",{class:!0});var Se=i(re);T(Gs.$$.fragment,Se),M_=u(Se),Qs=r(Se,"P",{});var au=i(Qs);j_=n(au,`The bare Data2VecText Model for text transformer outputting raw hidden-states without any specific head on top.
Data2VecText was proposed in `),Us=r(au,"A",{href:!0,rel:!0});var iy=i(Us);q_=n(iy,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),iy.forEach(t),P_=n(au,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),au.forEach(t),z_=u(Se),Xs=r(Se,"P",{});var nu=i(Xs);S_=n(nu,"This model inherits from "),fl=r(nu,"A",{href:!0});var ly=i(fl);I_=n(ly,"PreTrainedModel"),ly.forEach(t),O_=n(nu,`. 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.)`),nu.forEach(t),L_=u(Se),Rs=r(Se,"P",{});var su=i(Rs);N_=n(su,"This model is also a PyTorch "),Js=r(su,"A",{href:!0,rel:!0});var dy=i(Js);W_=n(dy,"torch.nn.Module"),dy.forEach(t),B_=n(su,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),su.forEach(t),H_=u(Se),Ks=r(Se,"P",{});var ru=i(Ks);G_=n(ru,`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 `),ec=r(ru,"EM",{});var cy=i(ec);Q_=n(cy,`Attention is
all you need`),cy.forEach(t),U_=n(ru,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),ru.forEach(t),X_=u(Se),Te=r(Se,"P",{});var rt=i(Te);R_=n(rt,"To behave as an decoder the model needs to be initialized with the "),tc=r(rt,"CODE",{});var py=i(tc);J_=n(py,"is_decoder"),py.forEach(t),K_=n(rt,` argument of the configuration set
to `),oc=r(rt,"CODE",{});var hy=i(oc);Y_=n(hy,"True"),hy.forEach(t),Z_=n(rt,". To be used in a Seq2Seq model, the model needs to initialized with both "),ac=r(rt,"CODE",{});var uy=i(ac);e2=n(uy,"is_decoder"),uy.forEach(t),t2=n(rt,` argument and
`),nc=r(rt,"CODE",{});var my=i(nc);o2=n(my,"add_cross_attention"),my.forEach(t),a2=n(rt," set to "),sc=r(rt,"CODE",{});var fy=i(sc);n2=n(fy,"True"),fy.forEach(t),s2=n(rt,"; an "),rc=r(rt,"CODE",{});var gy=i(rc);r2=n(gy,"encoder_hidden_states"),gy.forEach(t),i2=n(rt," is then expected as an input to the forward pass."),rt.forEach(t),l2=u(Se),ja=r(Se,"P",{});var Ep=i(ja);d2=n(Ep,".. _"),ic=r(Ep,"EM",{});var _y=i(ic);c2=n(_y,"Attention is all you need"),_y.forEach(t),p2=n(Ep,": "),Ys=r(Ep,"A",{href:!0,rel:!0});var vy=i(Ys);h2=n(vy,"https://arxiv.org/abs/1706.03762"),vy.forEach(t),Ep.forEach(t),u2=u(Se),At=r(Se,"DIV",{class:!0});var En=i(At);T(Zs.$$.fragment,En),m2=u(En),Eo=r(En,"P",{});var Rl=i(Eo);f2=n(Rl,"The "),gl=r(Rl,"A",{href:!0});var by=i(gl);g2=n(by,"Data2VecTextModel"),by.forEach(t),_2=n(Rl," forward method, overrides the "),lc=r(Rl,"CODE",{});var wy=i(lc);v2=n(wy,"__call__"),wy.forEach(t),b2=n(Rl," special method."),Rl.forEach(t),w2=u(En),T(qa.$$.fragment,En),T2=u(En),T(Pa.$$.fragment,En),En.forEach(t),Se.forEach(t),ih=u(o),Mo=r(o,"H2",{class:!0});var iu=i(Mo);za=r(iu,"A",{id:!0,class:!0,href:!0});var Ty=i(za);dc=r(Ty,"SPAN",{});var ky=i(dc);T(er.$$.fragment,ky),ky.forEach(t),Ty.forEach(t),k2=u(iu),cc=r(iu,"SPAN",{});var yy=i(cc);y2=n(yy,"Data2VecTextForCausalLM"),yy.forEach(t),iu.forEach(t),lh=u(o),ot=r(o,"DIV",{class:!0});var so=i(ot);T(tr.$$.fragment,so),$2=u(so),jo=r(so,"P",{});var Jl=i(jo);V2=n(Jl,"Data2VecText Model with a "),pc=r(Jl,"CODE",{});var $y=i(pc);x2=n($y,"language modeling"),$y.forEach(t),D2=n(Jl,` head on top for CLM fine-tuning.
Data2VecText was proposed in `),or=r(Jl,"A",{href:!0,rel:!0});var Vy=i(or);F2=n(Vy,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Vy.forEach(t),A2=n(Jl,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Jl.forEach(t),C2=u(so),ar=r(so,"P",{});var lu=i(ar);E2=n(lu,"This model inherits from "),_l=r(lu,"A",{href:!0});var xy=i(_l);M2=n(xy,"PreTrainedModel"),xy.forEach(t),j2=n(lu,`. 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.)`),lu.forEach(t),q2=u(so),nr=r(so,"P",{});var du=i(nr);P2=n(du,"This model is also a PyTorch "),sr=r(du,"A",{href:!0,rel:!0});var Dy=i(sr);z2=n(Dy,"torch.nn.Module"),Dy.forEach(t),S2=n(du,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),du.forEach(t),I2=u(so),Ct=r(so,"DIV",{class:!0});var Mn=i(Ct);T(rr.$$.fragment,Mn),O2=u(Mn),qo=r(Mn,"P",{});var Kl=i(qo);L2=n(Kl,"The "),vl=r(Kl,"A",{href:!0});var Fy=i(vl);N2=n(Fy,"Data2VecTextForCausalLM"),Fy.forEach(t),W2=n(Kl," forward method, overrides the "),hc=r(Kl,"CODE",{});var Ay=i(hc);B2=n(Ay,"__call__"),Ay.forEach(t),H2=n(Kl," special method."),Kl.forEach(t),G2=u(Mn),T(Sa.$$.fragment,Mn),Q2=u(Mn),T(Ia.$$.fragment,Mn),Mn.forEach(t),so.forEach(t),dh=u(o),Po=r(o,"H2",{class:!0});var cu=i(Po);Oa=r(cu,"A",{id:!0,class:!0,href:!0});var Cy=i(Oa);uc=r(Cy,"SPAN",{});var Ey=i(uc);T(ir.$$.fragment,Ey),Ey.forEach(t),Cy.forEach(t),U2=u(cu),mc=r(cu,"SPAN",{});var My=i(mc);X2=n(My,"Data2VecTextForMaskedLM"),My.forEach(t),cu.forEach(t),ch=u(o),at=r(o,"DIV",{class:!0});var ro=i(at);T(lr.$$.fragment,ro),R2=u(ro),zo=r(ro,"P",{});var Yl=i(zo);J2=n(Yl,"data2vec Model with a "),fc=r(Yl,"CODE",{});var jy=i(fc);K2=n(jy,"language modeling"),jy.forEach(t),Y2=n(Yl,` head on top.
Data2VecText was proposed in `),dr=r(Yl,"A",{href:!0,rel:!0});var qy=i(dr);Z2=n(qy,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),qy.forEach(t),ev=n(Yl,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Yl.forEach(t),tv=u(ro),cr=r(ro,"P",{});var pu=i(cr);ov=n(pu,"This model inherits from "),bl=r(pu,"A",{href:!0});var Py=i(bl);av=n(Py,"PreTrainedModel"),Py.forEach(t),nv=n(pu,`. 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.)`),pu.forEach(t),sv=u(ro),pr=r(ro,"P",{});var hu=i(pr);rv=n(hu,"This model is also a PyTorch "),hr=r(hu,"A",{href:!0,rel:!0});var zy=i(hr);iv=n(zy,"torch.nn.Module"),zy.forEach(t),lv=n(hu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hu.forEach(t),dv=u(ro),Et=r(ro,"DIV",{class:!0});var jn=i(Et);T(ur.$$.fragment,jn),cv=u(jn),So=r(jn,"P",{});var Zl=i(So);pv=n(Zl,"The "),wl=r(Zl,"A",{href:!0});var Sy=i(wl);hv=n(Sy,"Data2VecTextForMaskedLM"),Sy.forEach(t),uv=n(Zl," forward method, overrides the "),gc=r(Zl,"CODE",{});var Iy=i(gc);mv=n(Iy,"__call__"),Iy.forEach(t),fv=n(Zl," special method."),Zl.forEach(t),gv=u(jn),T(La.$$.fragment,jn),_v=u(jn),T(Na.$$.fragment,jn),jn.forEach(t),ro.forEach(t),ph=u(o),Io=r(o,"H2",{class:!0});var uu=i(Io);Wa=r(uu,"A",{id:!0,class:!0,href:!0});var Oy=i(Wa);_c=r(Oy,"SPAN",{});var Ly=i(_c);T(mr.$$.fragment,Ly),Ly.forEach(t),Oy.forEach(t),vv=u(uu),vc=r(uu,"SPAN",{});var Ny=i(vc);bv=n(Ny,"Data2VecTextForSequenceClassification"),Ny.forEach(t),uu.forEach(t),hh=u(o),ke=r(o,"DIV",{class:!0});var Gt=i(ke);T(fr.$$.fragment,Gt),wv=u(Gt),bc=r(Gt,"P",{});var Wy=i(bc);Tv=n(Wy,`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.`),Wy.forEach(t),kv=u(Gt),gr=r(Gt,"P",{});var mu=i(gr);yv=n(mu,"Data2VecText was proposed in "),_r=r(mu,"A",{href:!0,rel:!0});var By=i(_r);$v=n(By,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),By.forEach(t),Vv=n(mu,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),mu.forEach(t),xv=u(Gt),vr=r(Gt,"P",{});var fu=i(vr);Dv=n(fu,"This model inherits from "),Tl=r(fu,"A",{href:!0});var Hy=i(Tl);Fv=n(Hy,"PreTrainedModel"),Hy.forEach(t),Av=n(fu,`. 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.)`),fu.forEach(t),Cv=u(Gt),br=r(Gt,"P",{});var gu=i(br);Ev=n(gu,"This model is also a PyTorch "),wr=r(gu,"A",{href:!0,rel:!0});var Gy=i(wr);Mv=n(Gy,"torch.nn.Module"),Gy.forEach(t),jv=n(gu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gu.forEach(t),qv=u(Gt),st=r(Gt,"DIV",{class:!0});var io=i(st);T(Tr.$$.fragment,io),Pv=u(io),Oo=r(io,"P",{});var ed=i(Oo);zv=n(ed,"The "),kl=r(ed,"A",{href:!0});var Qy=i(kl);Sv=n(Qy,"Data2VecTextForSequenceClassification"),Qy.forEach(t),Iv=n(ed," forward method, overrides the "),wc=r(ed,"CODE",{});var Uy=i(wc);Ov=n(Uy,"__call__"),Uy.forEach(t),Lv=n(ed," special method."),ed.forEach(t),Nv=u(io),T(Ba.$$.fragment,io),Wv=u(io),T(Ha.$$.fragment,io),Bv=u(io),T(Ga.$$.fragment,io),io.forEach(t),Gt.forEach(t),uh=u(o),Lo=r(o,"H2",{class:!0});var _u=i(Lo);Qa=r(_u,"A",{id:!0,class:!0,href:!0});var Xy=i(Qa);Tc=r(Xy,"SPAN",{});var Ry=i(Tc);T(kr.$$.fragment,Ry),Ry.forEach(t),Xy.forEach(t),Hv=u(_u),kc=r(_u,"SPAN",{});var Jy=i(kc);Gv=n(Jy,"Data2VecTextForMultipleChoice"),Jy.forEach(t),_u.forEach(t),mh=u(o),ye=r(o,"DIV",{class:!0});var Qt=i(ye);T(yr.$$.fragment,Qt),Qv=u(Qt),yc=r(Qt,"P",{});var Ky=i(yc);Uv=n(Ky,`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.`),Ky.forEach(t),Xv=u(Qt),$r=r(Qt,"P",{});var vu=i($r);Rv=n(vu,"Data2VecText was proposed in "),Vr=r(vu,"A",{href:!0,rel:!0});var Yy=i(Vr);Jv=n(Yy,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Yy.forEach(t),Kv=n(vu,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),vu.forEach(t),Yv=u(Qt),xr=r(Qt,"P",{});var bu=i(xr);Zv=n(bu,"This model inherits from "),yl=r(bu,"A",{href:!0});var Zy=i(yl);eb=n(Zy,"PreTrainedModel"),Zy.forEach(t),tb=n(bu,`. 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.)`),bu.forEach(t),ob=u(Qt),Dr=r(Qt,"P",{});var wu=i(Dr);ab=n(wu,"This model is also a PyTorch "),Fr=r(wu,"A",{href:!0,rel:!0});var e$=i(Fr);nb=n(e$,"torch.nn.Module"),e$.forEach(t),sb=n(wu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wu.forEach(t),rb=u(Qt),Mt=r(Qt,"DIV",{class:!0});var qn=i(Mt);T(Ar.$$.fragment,qn),ib=u(qn),No=r(qn,"P",{});var td=i(No);lb=n(td,"The "),$l=r(td,"A",{href:!0});var t$=i($l);db=n(t$,"Data2VecTextForMultipleChoice"),t$.forEach(t),cb=n(td," forward method, overrides the "),$c=r(td,"CODE",{});var o$=i($c);pb=n(o$,"__call__"),o$.forEach(t),hb=n(td," special method."),td.forEach(t),ub=u(qn),T(Ua.$$.fragment,qn),mb=u(qn),T(Xa.$$.fragment,qn),qn.forEach(t),Qt.forEach(t),fh=u(o),Wo=r(o,"H2",{class:!0});var Tu=i(Wo);Ra=r(Tu,"A",{id:!0,class:!0,href:!0});var a$=i(Ra);Vc=r(a$,"SPAN",{});var n$=i(Vc);T(Cr.$$.fragment,n$),n$.forEach(t),a$.forEach(t),fb=u(Tu),xc=r(Tu,"SPAN",{});var s$=i(xc);gb=n(s$,"Data2VecTextForTokenClassification"),s$.forEach(t),Tu.forEach(t),gh=u(o),$e=r(o,"DIV",{class:!0});var Ut=i($e);T(Er.$$.fragment,Ut),_b=u(Ut),Dc=r(Ut,"P",{});var r$=i(Dc);vb=n(r$,`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.`),r$.forEach(t),bb=u(Ut),Mr=r(Ut,"P",{});var ku=i(Mr);wb=n(ku,"Data2VecText was proposed in "),jr=r(ku,"A",{href:!0,rel:!0});var i$=i(jr);Tb=n(i$,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),i$.forEach(t),kb=n(ku,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),ku.forEach(t),yb=u(Ut),qr=r(Ut,"P",{});var yu=i(qr);$b=n(yu,"This model inherits from "),Vl=r(yu,"A",{href:!0});var l$=i(Vl);Vb=n(l$,"PreTrainedModel"),l$.forEach(t),xb=n(yu,`. 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.)`),yu.forEach(t),Db=u(Ut),Pr=r(Ut,"P",{});var $u=i(Pr);Fb=n($u,"This model is also a PyTorch "),zr=r($u,"A",{href:!0,rel:!0});var d$=i(zr);Ab=n(d$,"torch.nn.Module"),d$.forEach(t),Cb=n($u,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$u.forEach(t),Eb=u(Ut),jt=r(Ut,"DIV",{class:!0});var Pn=i(jt);T(Sr.$$.fragment,Pn),Mb=u(Pn),Bo=r(Pn,"P",{});var od=i(Bo);jb=n(od,"The "),xl=r(od,"A",{href:!0});var c$=i(xl);qb=n(c$,"Data2VecTextForTokenClassification"),c$.forEach(t),Pb=n(od," forward method, overrides the "),Fc=r(od,"CODE",{});var p$=i(Fc);zb=n(p$,"__call__"),p$.forEach(t),Sb=n(od," special method."),od.forEach(t),Ib=u(Pn),T(Ja.$$.fragment,Pn),Ob=u(Pn),T(Ka.$$.fragment,Pn),Pn.forEach(t),Ut.forEach(t),_h=u(o),Ho=r(o,"H2",{class:!0});var Vu=i(Ho);Ya=r(Vu,"A",{id:!0,class:!0,href:!0});var h$=i(Ya);Ac=r(h$,"SPAN",{});var u$=i(Ac);T(Ir.$$.fragment,u$),u$.forEach(t),h$.forEach(t),Lb=u(Vu),Cc=r(Vu,"SPAN",{});var m$=i(Cc);Nb=n(m$,"Data2VecTextForQuestionAnswering"),m$.forEach(t),Vu.forEach(t),vh=u(o),Ve=r(o,"DIV",{class:!0});var Xt=i(Ve);T(Or.$$.fragment,Xt),Wb=u(Xt),Go=r(Xt,"P",{});var ad=i(Go);Bb=n(ad,`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 `),Ec=r(ad,"CODE",{});var f$=i(Ec);Hb=n(f$,"span start logits"),f$.forEach(t),Gb=n(ad," and "),Mc=r(ad,"CODE",{});var g$=i(Mc);Qb=n(g$,"span end logits"),g$.forEach(t),Ub=n(ad,")."),ad.forEach(t),Xb=u(Xt),Lr=r(Xt,"P",{});var xu=i(Lr);Rb=n(xu,"Data2VecText was proposed in "),Nr=r(xu,"A",{href:!0,rel:!0});var _$=i(Nr);Jb=n(_$,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),_$.forEach(t),Kb=n(xu,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),xu.forEach(t),Yb=u(Xt),Wr=r(Xt,"P",{});var Du=i(Wr);Zb=n(Du,"This model inherits from "),Dl=r(Du,"A",{href:!0});var v$=i(Dl);e1=n(v$,"PreTrainedModel"),v$.forEach(t),t1=n(Du,`. 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.)`),Du.forEach(t),o1=u(Xt),Br=r(Xt,"P",{});var Fu=i(Br);a1=n(Fu,"This model is also a PyTorch "),Hr=r(Fu,"A",{href:!0,rel:!0});var b$=i(Hr);n1=n(b$,"torch.nn.Module"),b$.forEach(t),s1=n(Fu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fu.forEach(t),r1=u(Xt),qt=r(Xt,"DIV",{class:!0});var zn=i(qt);T(Gr.$$.fragment,zn),i1=u(zn),Qo=r(zn,"P",{});var nd=i(Qo);l1=n(nd,"The "),Fl=r(nd,"A",{href:!0});var w$=i(Fl);d1=n(w$,"Data2VecTextForQuestionAnswering"),w$.forEach(t),c1=n(nd," forward method, overrides the "),jc=r(nd,"CODE",{});var T$=i(jc);p1=n(T$,"__call__"),T$.forEach(t),h1=n(nd," special method."),nd.forEach(t),u1=u(zn),T(Za.$$.fragment,zn),m1=u(zn),T(en.$$.fragment,zn),zn.forEach(t),Xt.forEach(t),bh=u(o),Uo=r(o,"H2",{class:!0});var Au=i(Uo);tn=r(Au,"A",{id:!0,class:!0,href:!0});var k$=i(tn);qc=r(k$,"SPAN",{});var y$=i(qc);T(Qr.$$.fragment,y$),y$.forEach(t),k$.forEach(t),f1=u(Au),Pc=r(Au,"SPAN",{});var $$=i(Pc);g1=n($$,"Data2VecVisionModel"),$$.forEach(t),Au.forEach(t),wh=u(o),Zt=r(o,"DIV",{class:!0});var sd=i(Zt);T(Ur.$$.fragment,sd),_1=u(sd),Xr=r(sd,"P",{});var Cu=i(Xr);v1=n(Cu,`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Rr=r(Cu,"A",{href:!0,rel:!0});var V$=i(Rr);b1=n(V$,"torch.nn.Module"),V$.forEach(t),w1=n(Cu,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cu.forEach(t),T1=u(sd),Pt=r(sd,"DIV",{class:!0});var Sn=i(Pt);T(Jr.$$.fragment,Sn),k1=u(Sn),Xo=r(Sn,"P",{});var rd=i(Xo);y1=n(rd,"The "),Al=r(rd,"A",{href:!0});var x$=i(Al);$1=n(x$,"Data2VecVisionModel"),x$.forEach(t),V1=n(rd," forward method, overrides the "),zc=r(rd,"CODE",{});var D$=i(zc);x1=n(D$,"__call__"),D$.forEach(t),D1=n(rd," special method."),rd.forEach(t),F1=u(Sn),T(on.$$.fragment,Sn),A1=u(Sn),T(an.$$.fragment,Sn),Sn.forEach(t),sd.forEach(t),Th=u(o),Ro=r(o,"H2",{class:!0});var Eu=i(Ro);nn=r(Eu,"A",{id:!0,class:!0,href:!0});var F$=i(nn);Sc=r(F$,"SPAN",{});var A$=i(Sc);T(Kr.$$.fragment,A$),A$.forEach(t),F$.forEach(t),C1=u(Eu),Ic=r(Eu,"SPAN",{});var C$=i(Ic);E1=n(C$,"Data2VecVisionForImageClassification"),C$.forEach(t),Eu.forEach(t),kh=u(o),ct=r(o,"DIV",{class:!0});var In=i(ct);T(Yr.$$.fragment,In),M1=u(In),Oc=r(In,"P",{});var E$=i(Oc);j1=n(E$,`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.`),E$.forEach(t),q1=u(In),Zr=r(In,"P",{});var Mu=i(Zr);P1=n(Mu,"This model is a PyTorch "),ei=r(Mu,"A",{href:!0,rel:!0});var M$=i(ei);z1=n(M$,"torch.nn.Module"),M$.forEach(t),S1=n(Mu,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Mu.forEach(t),I1=u(In),zt=r(In,"DIV",{class:!0});var On=i(zt);T(ti.$$.fragment,On),O1=u(On),Jo=r(On,"P",{});var id=i(Jo);L1=n(id,"The "),Cl=r(id,"A",{href:!0});var j$=i(Cl);N1=n(j$,"Data2VecVisionForImageClassification"),j$.forEach(t),W1=n(id," forward method, overrides the "),Lc=r(id,"CODE",{});var q$=i(Lc);B1=n(q$,"__call__"),q$.forEach(t),H1=n(id," special method."),id.forEach(t),G1=u(On),T(sn.$$.fragment,On),Q1=u(On),T(rn.$$.fragment,On),On.forEach(t),In.forEach(t),yh=u(o),Ko=r(o,"H2",{class:!0});var ju=i(Ko);ln=r(ju,"A",{id:!0,class:!0,href:!0});var P$=i(ln);Nc=r(P$,"SPAN",{});var z$=i(Nc);T(oi.$$.fragment,z$),z$.forEach(t),P$.forEach(t),U1=u(ju),Wc=r(ju,"SPAN",{});var S$=i(Wc);X1=n(S$,"Data2VecVisionForSemanticSegmentation"),S$.forEach(t),ju.forEach(t),$h=u(o),pt=r(o,"DIV",{class:!0});var Ln=i(pt);T(ai.$$.fragment,Ln),R1=u(Ln),Bc=r(Ln,"P",{});var I$=i(Bc);J1=n(I$,"Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),I$.forEach(t),K1=u(Ln),ni=r(Ln,"P",{});var qu=i(ni);Y1=n(qu,"This model is a PyTorch "),si=r(qu,"A",{href:!0,rel:!0});var O$=i(si);Z1=n(O$,"torch.nn.Module"),O$.forEach(t),ew=n(qu,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qu.forEach(t),tw=u(Ln),St=r(Ln,"DIV",{class:!0});var Nn=i(St);T(ri.$$.fragment,Nn),ow=u(Nn),Yo=r(Nn,"P",{});var ld=i(Yo);aw=n(ld,"The "),El=r(ld,"A",{href:!0});var L$=i(El);nw=n(L$,"Data2VecVisionForSemanticSegmentation"),L$.forEach(t),sw=n(ld," forward method, overrides the "),Hc=r(ld,"CODE",{});var N$=i(Hc);rw=n(N$,"__call__"),N$.forEach(t),iw=n(ld," special method."),ld.forEach(t),lw=u(Nn),T(dn.$$.fragment,Nn),dw=u(Nn),T(cn.$$.fragment,Nn),Nn.forEach(t),Ln.forEach(t),Vh=u(o),Zo=r(o,"H2",{class:!0});var Pu=i(Zo);pn=r(Pu,"A",{id:!0,class:!0,href:!0});var W$=i(pn);Gc=r(W$,"SPAN",{});var B$=i(Gc);T(ii.$$.fragment,B$),B$.forEach(t),W$.forEach(t),cw=u(Pu),Qc=r(Pu,"SPAN",{});var H$=i(Qc);pw=n(H$,"TFData2VecVisionModel"),H$.forEach(t),Pu.forEach(t),xh=u(o),nt=r(o,"DIV",{class:!0});var lo=i(nt);T(li.$$.fragment,lo),hw=u(lo),di=r(lo,"P",{});var zu=i(di);uw=n(zu,`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Ml=r(zu,"A",{href:!0});var G$=i(Ml);mw=n(G$,"TFPreTrainedModel"),G$.forEach(t),fw=n(zu,`. 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.).`),zu.forEach(t),gw=u(lo),ci=r(lo,"P",{});var Su=i(ci);_w=n(Su,"This model is also a "),pi=r(Su,"A",{href:!0,rel:!0});var Q$=i(pi);vw=n(Q$,"tf.keras.Model"),Q$.forEach(t),bw=n(Su,` 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.`),Su.forEach(t),ww=u(lo),T(hn.$$.fragment,lo),Tw=u(lo),It=r(lo,"DIV",{class:!0});var Wn=i(It);T(hi.$$.fragment,Wn),kw=u(Wn),ea=r(Wn,"P",{});var dd=i(ea);yw=n(dd,"The "),jl=r(dd,"A",{href:!0});var U$=i(jl);$w=n(U$,"TFData2VecVisionModel"),U$.forEach(t),Vw=n(dd," forward method, overrides the "),Uc=r(dd,"CODE",{});var X$=i(Uc);xw=n(X$,"__call__"),X$.forEach(t),Dw=n(dd," special method."),dd.forEach(t),Fw=u(Wn),T(un.$$.fragment,Wn),Aw=u(Wn),T(mn.$$.fragment,Wn),Wn.forEach(t),lo.forEach(t),Dh=u(o),ta=r(o,"H2",{class:!0});var Iu=i(ta);fn=r(Iu,"A",{id:!0,class:!0,href:!0});var R$=i(fn);Xc=r(R$,"SPAN",{});var J$=i(Xc);T(ui.$$.fragment,J$),J$.forEach(t),R$.forEach(t),Cw=u(Iu),Rc=r(Iu,"SPAN",{});var K$=i(Rc);Ew=n(K$,"TFData2VecVisionForImageClassification"),K$.forEach(t),Iu.forEach(t),Fh=u(o),xe=r(o,"DIV",{class:!0});var Rt=i(xe);T(mi.$$.fragment,Rt),Mw=u(Rt),Jc=r(Rt,"P",{});var Y$=i(Jc);jw=n(Y$,`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.`),Y$.forEach(t),qw=u(Rt),fi=r(Rt,"P",{});var Ou=i(fi);Pw=n(Ou,"This model inherits from "),ql=r(Ou,"A",{href:!0});var Z$=i(ql);zw=n(Z$,"TFPreTrainedModel"),Z$.forEach(t),Sw=n(Ou,`. 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.).`),Ou.forEach(t),Iw=u(Rt),gi=r(Rt,"P",{});var Lu=i(gi);Ow=n(Lu,"This model is also a "),_i=r(Lu,"A",{href:!0,rel:!0});var eV=i(_i);Lw=n(eV,"tf.keras.Model"),eV.forEach(t),Nw=n(Lu,` 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.`),Lu.forEach(t),Ww=u(Rt),T(gn.$$.fragment,Rt),Bw=u(Rt),Ot=r(Rt,"DIV",{class:!0});var Bn=i(Ot);T(vi.$$.fragment,Bn),Hw=u(Bn),oa=r(Bn,"P",{});var cd=i(oa);Gw=n(cd,"The "),Pl=r(cd,"A",{href:!0});var tV=i(Pl);Qw=n(tV,"TFData2VecVisionForImageClassification"),tV.forEach(t),Uw=n(cd," forward method, overrides the "),Kc=r(cd,"CODE",{});var oV=i(Kc);Xw=n(oV,"__call__"),oV.forEach(t),Rw=n(cd," special method."),cd.forEach(t),Jw=u(Bn),T(_n.$$.fragment,Bn),Kw=u(Bn),T(vn.$$.fragment,Bn),Bn.forEach(t),Rt.forEach(t),Ah=u(o),aa=r(o,"H2",{class:!0});var Nu=i(aa);bn=r(Nu,"A",{id:!0,class:!0,href:!0});var aV=i(bn);Yc=r(aV,"SPAN",{});var nV=i(Yc);T(bi.$$.fragment,nV),nV.forEach(t),aV.forEach(t),Yw=u(Nu),Zc=r(Nu,"SPAN",{});var sV=i(Zc);Zw=n(sV,"TFData2VecVisionForSemanticSegmentation"),sV.forEach(t),Nu.forEach(t),Ch=u(o),De=r(o,"DIV",{class:!0});var Jt=i(De);T(wi.$$.fragment,Jt),eT=u(Jt),ep=r(Jt,"P",{});var rV=i(ep);tT=n(rV,"Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),rV.forEach(t),oT=u(Jt),Ti=r(Jt,"P",{});var Wu=i(Ti);aT=n(Wu,"This model inherits from "),zl=r(Wu,"A",{href:!0});var iV=i(zl);nT=n(iV,"TFPreTrainedModel"),iV.forEach(t),sT=n(Wu,`. 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.).`),Wu.forEach(t),rT=u(Jt),ki=r(Jt,"P",{});var Bu=i(ki);iT=n(Bu,"This model is also a "),yi=r(Bu,"A",{href:!0,rel:!0});var lV=i(yi);lT=n(lV,"tf.keras.Model"),lV.forEach(t),dT=n(Bu,` 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.`),Bu.forEach(t),cT=u(Jt),T(wn.$$.fragment,Jt),pT=u(Jt),Lt=r(Jt,"DIV",{class:!0});var Hn=i(Lt);T($i.$$.fragment,Hn),hT=u(Hn),na=r(Hn,"P",{});var pd=i(na);uT=n(pd,"The "),Sl=r(pd,"A",{href:!0});var dV=i(Sl);mT=n(dV,"TFData2VecVisionForSemanticSegmentation"),dV.forEach(t),fT=n(pd," forward method, overrides the "),tp=r(pd,"CODE",{});var cV=i(tp);gT=n(cV,"__call__"),cV.forEach(t),_T=n(pd," special method."),pd.forEach(t),vT=u(Hn),T(Tn.$$.fragment,Hn),bT=u(Hn),T(kn.$$.fragment,Hn),Hn.forEach(t),Jt.forEach(t),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(i0)),p(m,"id","data2vec"),p(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(m,"href","#data2vec"),p(f,"class","relative group"),p(le,"id","overview"),p(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(le,"href","#overview"),p(N,"class","relative group"),p(ce,"href","https://arxiv.org/pdf/2202.03555"),p(ce,"rel","nofollow"),p(R,"href","http://www.github.com/pytorch/fairseq/tree/master/examples/data2vec"),p(R,"rel","nofollow"),p(me,"href","/docs/transformers/v4.27.1/en/model_doc/wav2vec2#transformers.Wav2Vec2Model"),p(fe,"href","/docs/transformers/v4.27.1/en/model_doc/roberta#transformers.RobertaModel"),p(I,"href","/docs/transformers/v4.27.1/en/model_doc/beit#transformers.BeitModel"),p(J,"href","https://huggingface.co/edugp"),p(J,"rel","nofollow"),p(E,"href","https://huggingface.co/patrickvonplaten"),p(E,"rel","nofollow"),p(qe,"href","https://github.com/sayakpaul"),p(qe,"rel","nofollow"),p(O,"href","https://github.com/Rocketknight1"),p(O,"rel","nofollow"),p(Pe,"href","https://github.com/pytorch/fairseq/tree/main/examples/data2vec"),p(Pe,"rel","nofollow"),p(K,"href","https://github.com/facebookresearch/data2vec_vision/tree/main/beit"),p(K,"rel","nofollow"),p(ia,"id","resources"),p(ia,"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"),p(ia,"href","#resources"),p(co,"class","relative group"),p(Pi,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionForImageClassification"),p(Un,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),p(Un,"rel","nofollow"),p(Xn,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),p(Xn,"rel","nofollow"),p(zi,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.TFData2VecVisionForImageClassification"),p(Rn,"href","https://colab.research.google.com/github/sayakpaul/TF-2.0-Hacks/blob/master/data2vec_vision_image_classification.ipynb"),p(Rn,"rel","nofollow"),p(Ii,"href","./tasks/sequence_classification"),p(Oi,"href","./tasks/token_classification"),p(Li,"href","./tasks/question_answering"),p(Ni,"href","./tasks/language_modeling"),p(Wi,"href","./tasks/masked_language_modeling"),p(Bi,"href","./tasks/multiple_choice"),p(Gi,"href","./tasks/audio_classification"),p(Qi,"href","./tasks/asr"),p(Xi,"href","./tasks/image_classification"),p(Ri,"href","./tasks/semantic_segmentation"),p(pa,"id","transformers.Data2VecTextConfig"),p(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"),p(pa,"href","#transformers.Data2VecTextConfig"),p(ho,"class","relative group"),p(Ki,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextModel"),p(Yi,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextModel"),p(Yn,"href","https://huggingface.co/facebook/data2vec-text-base"),p(Yn,"rel","nofollow"),p(Zi,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(el,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ua,"id","transformers.Data2VecAudioConfig"),p(ua,"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"),p(ua,"href","#transformers.Data2VecAudioConfig"),p(mo,"class","relative group"),p(tl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioModel"),p(ts,"href","https://huggingface.co/facebook/data2vec-audio-base-960h"),p(ts,"rel","nofollow"),p(ol,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(al,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(fa,"id","transformers.Data2VecVisionConfig"),p(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"),p(fa,"href","#transformers.Data2VecVisionConfig"),p(_o,"class","relative group"),p(nl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionModel"),p(ns,"href","https://huggingface.co/facebook/data2vec-vision-base"),p(ns,"rel","nofollow"),p(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(_a,"id","transformers.Data2VecAudioModel"),p(_a,"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"),p(_a,"href","#transformers.Data2VecAudioModel"),p(bo,"class","relative group"),p(ls,"href","https://arxiv.org/pdf/2202.03555"),p(ls,"rel","nofollow"),p(sl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(ps,"rel","nofollow"),p(rl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioModel"),p($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(wa,"id","transformers.Data2VecAudioForAudioFrameClassification"),p(wa,"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"),p(wa,"href","#transformers.Data2VecAudioForAudioFrameClassification"),p(To,"class","relative group"),p(gs,"href","https://arxiv.org/pdf/2202.03555"),p(gs,"rel","nofollow"),p(il,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(bs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(bs,"rel","nofollow"),p(ll,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioForAudioFrameClassification"),p(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ya,"id","transformers.Data2VecAudioForCTC"),p(ya,"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"),p(ya,"href","#transformers.Data2VecAudioForCTC"),p(yo,"class","relative group"),p(ys,"href","https://arxiv.org/pdf/2202.03555"),p(ys,"rel","nofollow"),p(dl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(xs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(xs,"rel","nofollow"),p(cl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioForCTC"),p(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xa,"id","transformers.Data2VecAudioForSequenceClassification"),p(xa,"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"),p(xa,"href","#transformers.Data2VecAudioForSequenceClassification"),p(xo,"class","relative group"),p(Es,"href","https://arxiv.org/pdf/2202.03555"),p(Es,"rel","nofollow"),p(pl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(qs,"rel","nofollow"),p(hl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioForSequenceClassification"),p(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Aa,"id","transformers.Data2VecAudioForXVector"),p(Aa,"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"),p(Aa,"href","#transformers.Data2VecAudioForXVector"),p(Fo,"class","relative group"),p(Os,"href","https://arxiv.org/pdf/2202.03555"),p(Os,"rel","nofollow"),p(ul,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Ws,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Ws,"rel","nofollow"),p(ml,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecAudioForXVector"),p(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ma,"id","transformers.Data2VecTextModel"),p(Ma,"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"),p(Ma,"href","#transformers.Data2VecTextModel"),p(Co,"class","relative group"),p(Us,"href","https://arxiv.org/pdf/2202.03555"),p(Us,"rel","nofollow"),p(fl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Js,"rel","nofollow"),p(Ys,"href","https://arxiv.org/abs/1706.03762"),p(Ys,"rel","nofollow"),p(gl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextModel"),p(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(za,"id","transformers.Data2VecTextForCausalLM"),p(za,"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"),p(za,"href","#transformers.Data2VecTextForCausalLM"),p(Mo,"class","relative group"),p(or,"href","https://arxiv.org/pdf/2202.03555"),p(or,"rel","nofollow"),p(_l,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(sr,"rel","nofollow"),p(vl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForCausalLM"),p(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Oa,"id","transformers.Data2VecTextForMaskedLM"),p(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"),p(Oa,"href","#transformers.Data2VecTextForMaskedLM"),p(Po,"class","relative group"),p(dr,"href","https://arxiv.org/pdf/2202.03555"),p(dr,"rel","nofollow"),p(bl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(hr,"rel","nofollow"),p(wl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForMaskedLM"),p(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Wa,"id","transformers.Data2VecTextForSequenceClassification"),p(Wa,"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"),p(Wa,"href","#transformers.Data2VecTextForSequenceClassification"),p(Io,"class","relative group"),p(_r,"href","https://arxiv.org/pdf/2202.03555"),p(_r,"rel","nofollow"),p(Tl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(wr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(wr,"rel","nofollow"),p(kl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForSequenceClassification"),p(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Qa,"id","transformers.Data2VecTextForMultipleChoice"),p(Qa,"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"),p(Qa,"href","#transformers.Data2VecTextForMultipleChoice"),p(Lo,"class","relative group"),p(Vr,"href","https://arxiv.org/pdf/2202.03555"),p(Vr,"rel","nofollow"),p(yl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Fr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Fr,"rel","nofollow"),p($l,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForMultipleChoice"),p(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ra,"id","transformers.Data2VecTextForTokenClassification"),p(Ra,"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"),p(Ra,"href","#transformers.Data2VecTextForTokenClassification"),p(Wo,"class","relative group"),p(jr,"href","https://arxiv.org/pdf/2202.03555"),p(jr,"rel","nofollow"),p(Vl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(zr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(zr,"rel","nofollow"),p(xl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForTokenClassification"),p(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ya,"id","transformers.Data2VecTextForQuestionAnswering"),p(Ya,"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"),p(Ya,"href","#transformers.Data2VecTextForQuestionAnswering"),p(Ho,"class","relative group"),p(Nr,"href","https://arxiv.org/pdf/2202.03555"),p(Nr,"rel","nofollow"),p(Dl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Hr,"rel","nofollow"),p(Fl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecTextForQuestionAnswering"),p(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(tn,"id","transformers.Data2VecVisionModel"),p(tn,"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"),p(tn,"href","#transformers.Data2VecVisionModel"),p(Uo,"class","relative group"),p(Rr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Rr,"rel","nofollow"),p(Al,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionModel"),p(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(nn,"id","transformers.Data2VecVisionForImageClassification"),p(nn,"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"),p(nn,"href","#transformers.Data2VecVisionForImageClassification"),p(Ro,"class","relative group"),p(ei,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(ei,"rel","nofollow"),p(Cl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionForImageClassification"),p(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ln,"id","transformers.Data2VecVisionForSemanticSegmentation"),p(ln,"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"),p(ln,"href","#transformers.Data2VecVisionForSemanticSegmentation"),p(Ko,"class","relative group"),p(si,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(si,"rel","nofollow"),p(El,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.Data2VecVisionForSemanticSegmentation"),p(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(pn,"id","transformers.TFData2VecVisionModel"),p(pn,"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"),p(pn,"href","#transformers.TFData2VecVisionModel"),p(Zo,"class","relative group"),p(Ml,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(pi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(pi,"rel","nofollow"),p(jl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.TFData2VecVisionModel"),p(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(fn,"id","transformers.TFData2VecVisionForImageClassification"),p(fn,"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"),p(fn,"href","#transformers.TFData2VecVisionForImageClassification"),p(ta,"class","relative group"),p(ql,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(_i,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(_i,"rel","nofollow"),p(Pl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.TFData2VecVisionForImageClassification"),p(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(bn,"id","transformers.TFData2VecVisionForSemanticSegmentation"),p(bn,"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"),p(bn,"href","#transformers.TFData2VecVisionForSemanticSegmentation"),p(aa,"class","relative group"),p(zl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(yi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(yi,"rel","nofollow"),p(Sl,"href","/docs/transformers/v4.27.1/en/model_doc/data2vec#transformers.TFData2VecVisionForSemanticSegmentation"),p(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(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(o,g){e(document.head,d),_(o,b,g),_(o,f,g),e(f,m),e(m,v),k(l,v,null),e(f,c),e(f,F),e(F,Ie),_(o,Fe,g),_(o,N,g),e(N,le),e(le,de),k(C,de,null),e(N,Oe),e(N,X),e(X,Le),_(o,Ae,g),_(o,W,g),e(W,Ne),e(W,ce),e(ce,te),e(W,We),_(o,Ce,g),_(o,B,g),e(B,Be),_(o,Ee,g),_(o,H,g),e(H,pe),e(pe,He),e(pe,R),e(R,j),e(pe,P),_(o,Me,g),_(o,G,g),e(G,Ge),_(o,je,g),_(o,z,g),e(z,_e),e(_e,Qe),e(z,S),e(z,he),e(he,oe),e(he,me),e(me,Ue),e(he,ae),e(z,Xe),e(z,ue),e(ue,Q),e(ue,fe),e(fe,ne),e(ue,Re),e(z,ge),e(z,q),e(q,Je),e(q,I),e(I,Ke),e(q,Ye),_(o,x,g),_(o,A,g),e(A,ut),e(A,J),e(J,mt),e(A,ft),e(A,E),e(E,gt),e(A,_t),e(A,qe),e(qe,vt),e(A,bt),e(A,O),e(O,se),e(A,wt),_(o,it,g),_(o,L,g),e(L,Tt),e(L,Pe),e(Pe,Ze),e(L,kt),e(L,K),e(K,yt),e(L,Hu),_(o,Mp,g),_(o,co,g),e(co,ia),e(ia,hd),k(Gn,hd,null),e(co,Gu),e(co,ud),e(ud,Qu),_(o,jp,g),_(o,qi,g),e(qi,Uu),_(o,qp,g),k(Qn,o,g),_(o,Pp,g),_(o,la,g),e(la,to),e(to,Pi),e(Pi,Xu),e(to,Ru),e(to,Un),e(Un,Ju),e(to,Ku),e(to,Xn),e(Xn,Yu),e(to,Zu),e(la,em),e(la,po),e(po,tm),e(po,zi),e(zi,om),e(po,am),e(po,Rn),e(Rn,nm),e(po,sm),_(o,zp,g),_(o,Si,g),e(Si,md),e(md,rm),_(o,Sp,g),_(o,ze,g),e(ze,fd),e(fd,Ii),e(Ii,im),e(ze,lm),e(ze,gd),e(gd,Oi),e(Oi,dm),e(ze,cm),e(ze,_d),e(_d,Li),e(Li,pm),e(ze,hm),e(ze,vd),e(vd,Ni),e(Ni,um),e(ze,mm),e(ze,bd),e(bd,Wi),e(Wi,fm),e(ze,gm),e(ze,wd),e(wd,Bi),e(Bi,_m),_(o,Ip,g),_(o,Hi,g),e(Hi,Td),e(Td,vm),_(o,Op,g),_(o,da,g),e(da,kd),e(kd,Gi),e(Gi,bm),e(da,wm),e(da,yd),e(yd,Qi),e(Qi,Tm),_(o,Lp,g),_(o,Ui,g),e(Ui,$d),e($d,km),_(o,Np,g),_(o,ca,g),e(ca,Vd),e(Vd,Xi),e(Xi,ym),e(ca,$m),e(ca,xd),e(xd,Ri),e(Ri,Vm),_(o,Wp,g),_(o,Ji,g),e(Ji,xm),_(o,Bp,g),_(o,ho,g),e(ho,pa),e(pa,Dd),k(Jn,Dd,null),e(ho,Dm),e(ho,Fd),e(Fd,Fm),_(o,Hp,g),_(o,lt,g),k(Kn,lt,null),e(lt,Am),e(lt,Kt),e(Kt,Cm),e(Kt,Ki),e(Ki,Em),e(Kt,Mm),e(Kt,Yi),e(Yi,jm),e(Kt,qm),e(Kt,Yn),e(Yn,Pm),e(Kt,zm),e(lt,Sm),e(lt,uo),e(uo,Im),e(uo,Zi),e(Zi,Om),e(uo,Lm),e(uo,el),e(el,Nm),e(uo,Wm),e(lt,Bm),k(ha,lt,null),_(o,Gp,g),_(o,mo,g),e(mo,ua),e(ua,Ad),k(Zn,Ad,null),e(mo,Hm),e(mo,Cd),e(Cd,Gm),_(o,Qp,g),_(o,dt,g),k(es,dt,null),e(dt,Qm),e(dt,fo),e(fo,Um),e(fo,tl),e(tl,Xm),e(fo,Rm),e(fo,ts),e(ts,Jm),e(fo,Km),e(dt,Ym),e(dt,go),e(go,Zm),e(go,ol),e(ol,ef),e(go,tf),e(go,al),e(al,of),e(go,af),e(dt,nf),k(ma,dt,null),_(o,Up,g),_(o,_o,g),e(_o,fa),e(fa,Ed),k(os,Ed,null),e(_o,sf),e(_o,Md),e(Md,rf),_(o,Xp,g),_(o,Yt,g),k(as,Yt,null),e(Yt,lf),e(Yt,vo),e(vo,df),e(vo,nl),e(nl,cf),e(vo,pf),e(vo,ns),e(ns,hf),e(vo,uf),e(Yt,mf),k(ga,Yt,null),_(o,Rp,g),_(o,bo,g),e(bo,_a),e(_a,jd),k(ss,jd,null),e(bo,ff),e(bo,qd),e(qd,gf),_(o,Jp,g),_(o,et,g),k(rs,et,null),e(et,_f),e(et,is),e(is,vf),e(is,ls),e(ls,bf),e(is,wf),e(et,Tf),e(et,ds),e(ds,kf),e(ds,sl),e(sl,yf),e(ds,$f),e(et,Vf),e(et,cs),e(cs,xf),e(cs,ps),e(ps,Df),e(cs,Ff),e(et,Af),e(et,$t),k(hs,$t,null),e($t,Cf),e($t,wo),e(wo,Ef),e(wo,rl),e(rl,Mf),e(wo,jf),e(wo,Pd),e(Pd,qf),e(wo,Pf),e($t,zf),k(va,$t,null),e($t,Sf),k(ba,$t,null),_(o,Kp,g),_(o,To,g),e(To,wa),e(wa,zd),k(us,zd,null),e(To,If),e(To,Sd),e(Sd,Of),_(o,Yp,g),_(o,ve,g),k(ms,ve,null),e(ve,Lf),e(ve,Id),e(Id,Nf),e(ve,Wf),e(ve,fs),e(fs,Bf),e(fs,gs),e(gs,Hf),e(fs,Gf),e(ve,Qf),e(ve,_s),e(_s,Uf),e(_s,il),e(il,Xf),e(_s,Rf),e(ve,Jf),e(ve,vs),e(vs,Kf),e(vs,bs),e(bs,Yf),e(vs,Zf),e(ve,eg),e(ve,Vt),k(ws,Vt,null),e(Vt,tg),e(Vt,ko),e(ko,og),e(ko,ll),e(ll,ag),e(ko,ng),e(ko,Od),e(Od,sg),e(ko,rg),e(Vt,ig),k(Ta,Vt,null),e(Vt,lg),k(ka,Vt,null),_(o,Zp,g),_(o,yo,g),e(yo,ya),e(ya,Ld),k(Ts,Ld,null),e(yo,dg),e(yo,Nd),e(Nd,cg),_(o,eh,g),_(o,tt,g),k(ks,tt,null),e(tt,pg),e(tt,$o),e($o,hg),e($o,Wd),e(Wd,ug),e($o,mg),e($o,ys),e(ys,fg),e($o,gg),e(tt,_g),e(tt,$s),e($s,vg),e($s,dl),e(dl,bg),e($s,wg),e(tt,Tg),e(tt,Vs),e(Vs,kg),e(Vs,xs),e(xs,yg),e(Vs,$g),e(tt,Vg),e(tt,xt),k(Ds,xt,null),e(xt,xg),e(xt,Vo),e(Vo,Dg),e(Vo,cl),e(cl,Fg),e(Vo,Ag),e(Vo,Bd),e(Bd,Cg),e(Vo,Eg),e(xt,Mg),k($a,xt,null),e(xt,jg),k(Va,xt,null),_(o,th,g),_(o,xo,g),e(xo,xa),e(xa,Hd),k(Fs,Hd,null),e(xo,qg),e(xo,Gd),e(Gd,Pg),_(o,oh,g),_(o,be,g),k(As,be,null),e(be,zg),e(be,Qd),e(Qd,Sg),e(be,Ig),e(be,Cs),e(Cs,Og),e(Cs,Es),e(Es,Lg),e(Cs,Ng),e(be,Wg),e(be,Ms),e(Ms,Bg),e(Ms,pl),e(pl,Hg),e(Ms,Gg),e(be,Qg),e(be,js),e(js,Ug),e(js,qs),e(qs,Xg),e(js,Rg),e(be,Jg),e(be,Dt),k(Ps,Dt,null),e(Dt,Kg),e(Dt,Do),e(Do,Yg),e(Do,hl),e(hl,Zg),e(Do,e_),e(Do,Ud),e(Ud,t_),e(Do,o_),e(Dt,a_),k(Da,Dt,null),e(Dt,n_),k(Fa,Dt,null),_(o,ah,g),_(o,Fo,g),e(Fo,Aa),e(Aa,Xd),k(zs,Xd,null),e(Fo,s_),e(Fo,Rd),e(Rd,r_),_(o,nh,g),_(o,we,g),k(Ss,we,null),e(we,i_),e(we,Jd),e(Jd,l_),e(we,d_),e(we,Is),e(Is,c_),e(Is,Os),e(Os,p_),e(Is,h_),e(we,u_),e(we,Ls),e(Ls,m_),e(Ls,ul),e(ul,f_),e(Ls,g_),e(we,__),e(we,Ns),e(Ns,v_),e(Ns,Ws),e(Ws,b_),e(Ns,w_),e(we,T_),e(we,Ft),k(Bs,Ft,null),e(Ft,k_),e(Ft,Ao),e(Ao,y_),e(Ao,ml),e(ml,$_),e(Ao,V_),e(Ao,Kd),e(Kd,x_),e(Ao,D_),e(Ft,F_),k(Ca,Ft,null),e(Ft,A_),k(Ea,Ft,null),_(o,sh,g),_(o,Co,g),e(Co,Ma),e(Ma,Yd),k(Hs,Yd,null),e(Co,C_),e(Co,Zd),e(Zd,E_),_(o,rh,g),_(o,re,g),k(Gs,re,null),e(re,M_),e(re,Qs),e(Qs,j_),e(Qs,Us),e(Us,q_),e(Qs,P_),e(re,z_),e(re,Xs),e(Xs,S_),e(Xs,fl),e(fl,I_),e(Xs,O_),e(re,L_),e(re,Rs),e(Rs,N_),e(Rs,Js),e(Js,W_),e(Rs,B_),e(re,H_),e(re,Ks),e(Ks,G_),e(Ks,ec),e(ec,Q_),e(Ks,U_),e(re,X_),e(re,Te),e(Te,R_),e(Te,tc),e(tc,J_),e(Te,K_),e(Te,oc),e(oc,Y_),e(Te,Z_),e(Te,ac),e(ac,e2),e(Te,t2),e(Te,nc),e(nc,o2),e(Te,a2),e(Te,sc),e(sc,n2),e(Te,s2),e(Te,rc),e(rc,r2),e(Te,i2),e(re,l2),e(re,ja),e(ja,d2),e(ja,ic),e(ic,c2),e(ja,p2),e(ja,Ys),e(Ys,h2),e(re,u2),e(re,At),k(Zs,At,null),e(At,m2),e(At,Eo),e(Eo,f2),e(Eo,gl),e(gl,g2),e(Eo,_2),e(Eo,lc),e(lc,v2),e(Eo,b2),e(At,w2),k(qa,At,null),e(At,T2),k(Pa,At,null),_(o,ih,g),_(o,Mo,g),e(Mo,za),e(za,dc),k(er,dc,null),e(Mo,k2),e(Mo,cc),e(cc,y2),_(o,lh,g),_(o,ot,g),k(tr,ot,null),e(ot,$2),e(ot,jo),e(jo,V2),e(jo,pc),e(pc,x2),e(jo,D2),e(jo,or),e(or,F2),e(jo,A2),e(ot,C2),e(ot,ar),e(ar,E2),e(ar,_l),e(_l,M2),e(ar,j2),e(ot,q2),e(ot,nr),e(nr,P2),e(nr,sr),e(sr,z2),e(nr,S2),e(ot,I2),e(ot,Ct),k(rr,Ct,null),e(Ct,O2),e(Ct,qo),e(qo,L2),e(qo,vl),e(vl,N2),e(qo,W2),e(qo,hc),e(hc,B2),e(qo,H2),e(Ct,G2),k(Sa,Ct,null),e(Ct,Q2),k(Ia,Ct,null),_(o,dh,g),_(o,Po,g),e(Po,Oa),e(Oa,uc),k(ir,uc,null),e(Po,U2),e(Po,mc),e(mc,X2),_(o,ch,g),_(o,at,g),k(lr,at,null),e(at,R2),e(at,zo),e(zo,J2),e(zo,fc),e(fc,K2),e(zo,Y2),e(zo,dr),e(dr,Z2),e(zo,ev),e(at,tv),e(at,cr),e(cr,ov),e(cr,bl),e(bl,av),e(cr,nv),e(at,sv),e(at,pr),e(pr,rv),e(pr,hr),e(hr,iv),e(pr,lv),e(at,dv),e(at,Et),k(ur,Et,null),e(Et,cv),e(Et,So),e(So,pv),e(So,wl),e(wl,hv),e(So,uv),e(So,gc),e(gc,mv),e(So,fv),e(Et,gv),k(La,Et,null),e(Et,_v),k(Na,Et,null),_(o,ph,g),_(o,Io,g),e(Io,Wa),e(Wa,_c),k(mr,_c,null),e(Io,vv),e(Io,vc),e(vc,bv),_(o,hh,g),_(o,ke,g),k(fr,ke,null),e(ke,wv),e(ke,bc),e(bc,Tv),e(ke,kv),e(ke,gr),e(gr,yv),e(gr,_r),e(_r,$v),e(gr,Vv),e(ke,xv),e(ke,vr),e(vr,Dv),e(vr,Tl),e(Tl,Fv),e(vr,Av),e(ke,Cv),e(ke,br),e(br,Ev),e(br,wr),e(wr,Mv),e(br,jv),e(ke,qv),e(ke,st),k(Tr,st,null),e(st,Pv),e(st,Oo),e(Oo,zv),e(Oo,kl),e(kl,Sv),e(Oo,Iv),e(Oo,wc),e(wc,Ov),e(Oo,Lv),e(st,Nv),k(Ba,st,null),e(st,Wv),k(Ha,st,null),e(st,Bv),k(Ga,st,null),_(o,uh,g),_(o,Lo,g),e(Lo,Qa),e(Qa,Tc),k(kr,Tc,null),e(Lo,Hv),e(Lo,kc),e(kc,Gv),_(o,mh,g),_(o,ye,g),k(yr,ye,null),e(ye,Qv),e(ye,yc),e(yc,Uv),e(ye,Xv),e(ye,$r),e($r,Rv),e($r,Vr),e(Vr,Jv),e($r,Kv),e(ye,Yv),e(ye,xr),e(xr,Zv),e(xr,yl),e(yl,eb),e(xr,tb),e(ye,ob),e(ye,Dr),e(Dr,ab),e(Dr,Fr),e(Fr,nb),e(Dr,sb),e(ye,rb),e(ye,Mt),k(Ar,Mt,null),e(Mt,ib),e(Mt,No),e(No,lb),e(No,$l),e($l,db),e(No,cb),e(No,$c),e($c,pb),e(No,hb),e(Mt,ub),k(Ua,Mt,null),e(Mt,mb),k(Xa,Mt,null),_(o,fh,g),_(o,Wo,g),e(Wo,Ra),e(Ra,Vc),k(Cr,Vc,null),e(Wo,fb),e(Wo,xc),e(xc,gb),_(o,gh,g),_(o,$e,g),k(Er,$e,null),e($e,_b),e($e,Dc),e(Dc,vb),e($e,bb),e($e,Mr),e(Mr,wb),e(Mr,jr),e(jr,Tb),e(Mr,kb),e($e,yb),e($e,qr),e(qr,$b),e(qr,Vl),e(Vl,Vb),e(qr,xb),e($e,Db),e($e,Pr),e(Pr,Fb),e(Pr,zr),e(zr,Ab),e(Pr,Cb),e($e,Eb),e($e,jt),k(Sr,jt,null),e(jt,Mb),e(jt,Bo),e(Bo,jb),e(Bo,xl),e(xl,qb),e(Bo,Pb),e(Bo,Fc),e(Fc,zb),e(Bo,Sb),e(jt,Ib),k(Ja,jt,null),e(jt,Ob),k(Ka,jt,null),_(o,_h,g),_(o,Ho,g),e(Ho,Ya),e(Ya,Ac),k(Ir,Ac,null),e(Ho,Lb),e(Ho,Cc),e(Cc,Nb),_(o,vh,g),_(o,Ve,g),k(Or,Ve,null),e(Ve,Wb),e(Ve,Go),e(Go,Bb),e(Go,Ec),e(Ec,Hb),e(Go,Gb),e(Go,Mc),e(Mc,Qb),e(Go,Ub),e(Ve,Xb),e(Ve,Lr),e(Lr,Rb),e(Lr,Nr),e(Nr,Jb),e(Lr,Kb),e(Ve,Yb),e(Ve,Wr),e(Wr,Zb),e(Wr,Dl),e(Dl,e1),e(Wr,t1),e(Ve,o1),e(Ve,Br),e(Br,a1),e(Br,Hr),e(Hr,n1),e(Br,s1),e(Ve,r1),e(Ve,qt),k(Gr,qt,null),e(qt,i1),e(qt,Qo),e(Qo,l1),e(Qo,Fl),e(Fl,d1),e(Qo,c1),e(Qo,jc),e(jc,p1),e(Qo,h1),e(qt,u1),k(Za,qt,null),e(qt,m1),k(en,qt,null),_(o,bh,g),_(o,Uo,g),e(Uo,tn),e(tn,qc),k(Qr,qc,null),e(Uo,f1),e(Uo,Pc),e(Pc,g1),_(o,wh,g),_(o,Zt,g),k(Ur,Zt,null),e(Zt,_1),e(Zt,Xr),e(Xr,v1),e(Xr,Rr),e(Rr,b1),e(Xr,w1),e(Zt,T1),e(Zt,Pt),k(Jr,Pt,null),e(Pt,k1),e(Pt,Xo),e(Xo,y1),e(Xo,Al),e(Al,$1),e(Xo,V1),e(Xo,zc),e(zc,x1),e(Xo,D1),e(Pt,F1),k(on,Pt,null),e(Pt,A1),k(an,Pt,null),_(o,Th,g),_(o,Ro,g),e(Ro,nn),e(nn,Sc),k(Kr,Sc,null),e(Ro,C1),e(Ro,Ic),e(Ic,E1),_(o,kh,g),_(o,ct,g),k(Yr,ct,null),e(ct,M1),e(ct,Oc),e(Oc,j1),e(ct,q1),e(ct,Zr),e(Zr,P1),e(Zr,ei),e(ei,z1),e(Zr,S1),e(ct,I1),e(ct,zt),k(ti,zt,null),e(zt,O1),e(zt,Jo),e(Jo,L1),e(Jo,Cl),e(Cl,N1),e(Jo,W1),e(Jo,Lc),e(Lc,B1),e(Jo,H1),e(zt,G1),k(sn,zt,null),e(zt,Q1),k(rn,zt,null),_(o,yh,g),_(o,Ko,g),e(Ko,ln),e(ln,Nc),k(oi,Nc,null),e(Ko,U1),e(Ko,Wc),e(Wc,X1),_(o,$h,g),_(o,pt,g),k(ai,pt,null),e(pt,R1),e(pt,Bc),e(Bc,J1),e(pt,K1),e(pt,ni),e(ni,Y1),e(ni,si),e(si,Z1),e(ni,ew),e(pt,tw),e(pt,St),k(ri,St,null),e(St,ow),e(St,Yo),e(Yo,aw),e(Yo,El),e(El,nw),e(Yo,sw),e(Yo,Hc),e(Hc,rw),e(Yo,iw),e(St,lw),k(dn,St,null),e(St,dw),k(cn,St,null),_(o,Vh,g),_(o,Zo,g),e(Zo,pn),e(pn,Gc),k(ii,Gc,null),e(Zo,cw),e(Zo,Qc),e(Qc,pw),_(o,xh,g),_(o,nt,g),k(li,nt,null),e(nt,hw),e(nt,di),e(di,uw),e(di,Ml),e(Ml,mw),e(di,fw),e(nt,gw),e(nt,ci),e(ci,_w),e(ci,pi),e(pi,vw),e(ci,bw),e(nt,ww),k(hn,nt,null),e(nt,Tw),e(nt,It),k(hi,It,null),e(It,kw),e(It,ea),e(ea,yw),e(ea,jl),e(jl,$w),e(ea,Vw),e(ea,Uc),e(Uc,xw),e(ea,Dw),e(It,Fw),k(un,It,null),e(It,Aw),k(mn,It,null),_(o,Dh,g),_(o,ta,g),e(ta,fn),e(fn,Xc),k(ui,Xc,null),e(ta,Cw),e(ta,Rc),e(Rc,Ew),_(o,Fh,g),_(o,xe,g),k(mi,xe,null),e(xe,Mw),e(xe,Jc),e(Jc,jw),e(xe,qw),e(xe,fi),e(fi,Pw),e(fi,ql),e(ql,zw),e(fi,Sw),e(xe,Iw),e(xe,gi),e(gi,Ow),e(gi,_i),e(_i,Lw),e(gi,Nw),e(xe,Ww),k(gn,xe,null),e(xe,Bw),e(xe,Ot),k(vi,Ot,null),e(Ot,Hw),e(Ot,oa),e(oa,Gw),e(oa,Pl),e(Pl,Qw),e(oa,Uw),e(oa,Kc),e(Kc,Xw),e(oa,Rw),e(Ot,Jw),k(_n,Ot,null),e(Ot,Kw),k(vn,Ot,null),_(o,Ah,g),_(o,aa,g),e(aa,bn),e(bn,Yc),k(bi,Yc,null),e(aa,Yw),e(aa,Zc),e(Zc,Zw),_(o,Ch,g),_(o,De,g),k(wi,De,null),e(De,eT),e(De,ep),e(ep,tT),e(De,oT),e(De,Ti),e(Ti,aT),e(Ti,zl),e(zl,nT),e(Ti,sT),e(De,rT),e(De,ki),e(ki,iT),e(ki,yi),e(yi,lT),e(ki,dT),e(De,cT),k(wn,De,null),e(De,pT),e(De,Lt),k($i,Lt,null),e(Lt,hT),e(Lt,na),e(na,uT),e(na,Sl),e(Sl,mT),e(na,fT),e(na,tp),e(tp,gT),e(na,_T),e(Lt,vT),k(Tn,Lt,null),e(Lt,bT),k(kn,Lt,null),Eh=!0},p(o,[g]){const Vi={};g&2&&(Vi.$$scope={dirty:g,ctx:o}),ha.$set(Vi);const op={};g&2&&(op.$$scope={dirty:g,ctx:o}),ma.$set(op);const ap={};g&2&&(ap.$$scope={dirty:g,ctx:o}),ga.$set(ap);const np={};g&2&&(np.$$scope={dirty:g,ctx:o}),va.$set(np);const xi={};g&2&&(xi.$$scope={dirty:g,ctx:o}),ba.$set(xi);const sp={};g&2&&(sp.$$scope={dirty:g,ctx:o}),Ta.$set(sp);const rp={};g&2&&(rp.$$scope={dirty:g,ctx:o}),ka.$set(rp);const ip={};g&2&&(ip.$$scope={dirty:g,ctx:o}),$a.$set(ip);const Di={};g&2&&(Di.$$scope={dirty:g,ctx:o}),Va.$set(Di);const lp={};g&2&&(lp.$$scope={dirty:g,ctx:o}),Da.$set(lp);const dp={};g&2&&(dp.$$scope={dirty:g,ctx:o}),Fa.$set(dp);const cp={};g&2&&(cp.$$scope={dirty:g,ctx:o}),Ca.$set(cp);const Fi={};g&2&&(Fi.$$scope={dirty:g,ctx:o}),Ea.$set(Fi);const pp={};g&2&&(pp.$$scope={dirty:g,ctx:o}),qa.$set(pp);const hp={};g&2&&(hp.$$scope={dirty:g,ctx:o}),Pa.$set(hp);const eo={};g&2&&(eo.$$scope={dirty:g,ctx:o}),Sa.$set(eo);const up={};g&2&&(up.$$scope={dirty:g,ctx:o}),Ia.$set(up);const Ai={};g&2&&(Ai.$$scope={dirty:g,ctx:o}),La.$set(Ai);const mp={};g&2&&(mp.$$scope={dirty:g,ctx:o}),Na.$set(mp);const Ci={};g&2&&(Ci.$$scope={dirty:g,ctx:o}),Ba.$set(Ci);const fp={};g&2&&(fp.$$scope={dirty:g,ctx:o}),Ha.$set(fp);const Ei={};g&2&&(Ei.$$scope={dirty:g,ctx:o}),Ga.$set(Ei);const gp={};g&2&&(gp.$$scope={dirty:g,ctx:o}),Ua.$set(gp);const ht={};g&2&&(ht.$$scope={dirty:g,ctx:o}),Xa.$set(ht);const _p={};g&2&&(_p.$$scope={dirty:g,ctx:o}),Ja.$set(_p);const vp={};g&2&&(vp.$$scope={dirty:g,ctx:o}),Ka.$set(vp);const bp={};g&2&&(bp.$$scope={dirty:g,ctx:o}),Za.$set(bp);const wp={};g&2&&(wp.$$scope={dirty:g,ctx:o}),en.$set(wp);const sa={};g&2&&(sa.$$scope={dirty:g,ctx:o}),on.$set(sa);const Tp={};g&2&&(Tp.$$scope={dirty:g,ctx:o}),an.$set(Tp);const kp={};g&2&&(kp.$$scope={dirty:g,ctx:o}),sn.$set(kp);const Mi={};g&2&&(Mi.$$scope={dirty:g,ctx:o}),rn.$set(Mi);const yp={};g&2&&(yp.$$scope={dirty:g,ctx:o}),dn.$set(yp);const $p={};g&2&&($p.$$scope={dirty:g,ctx:o}),cn.$set($p);const Vp={};g&2&&(Vp.$$scope={dirty:g,ctx:o}),hn.$set(Vp);const xp={};g&2&&(xp.$$scope={dirty:g,ctx:o}),un.$set(xp);const ji={};g&2&&(ji.$$scope={dirty:g,ctx:o}),mn.$set(ji);const oo={};g&2&&(oo.$$scope={dirty:g,ctx:o}),gn.$set(oo);const Dp={};g&2&&(Dp.$$scope={dirty:g,ctx:o}),_n.$set(Dp);const Fp={};g&2&&(Fp.$$scope={dirty:g,ctx:o}),vn.$set(Fp);const Ap={};g&2&&(Ap.$$scope={dirty:g,ctx:o}),wn.$set(Ap);const ra={};g&2&&(ra.$$scope={dirty:g,ctx:o}),Tn.$set(ra);const Cp={};g&2&&(Cp.$$scope={dirty:g,ctx:o}),kn.$set(Cp)},i(o){Eh||(y(l.$$.fragment,o),y(C.$$.fragment,o),y(Gn.$$.fragment,o),y(Qn.$$.fragment,o),y(Jn.$$.fragment,o),y(Kn.$$.fragment,o),y(ha.$$.fragment,o),y(Zn.$$.fragment,o),y(es.$$.fragment,o),y(ma.$$.fragment,o),y(os.$$.fragment,o),y(as.$$.fragment,o),y(ga.$$.fragment,o),y(ss.$$.fragment,o),y(rs.$$.fragment,o),y(hs.$$.fragment,o),y(va.$$.fragment,o),y(ba.$$.fragment,o),y(us.$$.fragment,o),y(ms.$$.fragment,o),y(ws.$$.fragment,o),y(Ta.$$.fragment,o),y(ka.$$.fragment,o),y(Ts.$$.fragment,o),y(ks.$$.fragment,o),y(Ds.$$.fragment,o),y($a.$$.fragment,o),y(Va.$$.fragment,o),y(Fs.$$.fragment,o),y(As.$$.fragment,o),y(Ps.$$.fragment,o),y(Da.$$.fragment,o),y(Fa.$$.fragment,o),y(zs.$$.fragment,o),y(Ss.$$.fragment,o),y(Bs.$$.fragment,o),y(Ca.$$.fragment,o),y(Ea.$$.fragment,o),y(Hs.$$.fragment,o),y(Gs.$$.fragment,o),y(Zs.$$.fragment,o),y(qa.$$.fragment,o),y(Pa.$$.fragment,o),y(er.$$.fragment,o),y(tr.$$.fragment,o),y(rr.$$.fragment,o),y(Sa.$$.fragment,o),y(Ia.$$.fragment,o),y(ir.$$.fragment,o),y(lr.$$.fragment,o),y(ur.$$.fragment,o),y(La.$$.fragment,o),y(Na.$$.fragment,o),y(mr.$$.fragment,o),y(fr.$$.fragment,o),y(Tr.$$.fragment,o),y(Ba.$$.fragment,o),y(Ha.$$.fragment,o),y(Ga.$$.fragment,o),y(kr.$$.fragment,o),y(yr.$$.fragment,o),y(Ar.$$.fragment,o),y(Ua.$$.fragment,o),y(Xa.$$.fragment,o),y(Cr.$$.fragment,o),y(Er.$$.fragment,o),y(Sr.$$.fragment,o),y(Ja.$$.fragment,o),y(Ka.$$.fragment,o),y(Ir.$$.fragment,o),y(Or.$$.fragment,o),y(Gr.$$.fragment,o),y(Za.$$.fragment,o),y(en.$$.fragment,o),y(Qr.$$.fragment,o),y(Ur.$$.fragment,o),y(Jr.$$.fragment,o),y(on.$$.fragment,o),y(an.$$.fragment,o),y(Kr.$$.fragment,o),y(Yr.$$.fragment,o),y(ti.$$.fragment,o),y(sn.$$.fragment,o),y(rn.$$.fragment,o),y(oi.$$.fragment,o),y(ai.$$.fragment,o),y(ri.$$.fragment,o),y(dn.$$.fragment,o),y(cn.$$.fragment,o),y(ii.$$.fragment,o),y(li.$$.fragment,o),y(hn.$$.fragment,o),y(hi.$$.fragment,o),y(un.$$.fragment,o),y(mn.$$.fragment,o),y(ui.$$.fragment,o),y(mi.$$.fragment,o),y(gn.$$.fragment,o),y(vi.$$.fragment,o),y(_n.$$.fragment,o),y(vn.$$.fragment,o),y(bi.$$.fragment,o),y(wi.$$.fragment,o),y(wn.$$.fragment,o),y($i.$$.fragment,o),y(Tn.$$.fragment,o),y(kn.$$.fragment,o),Eh=!0)},o(o){$(l.$$.fragment,o),$(C.$$.fragment,o),$(Gn.$$.fragment,o),$(Qn.$$.fragment,o),$(Jn.$$.fragment,o),$(Kn.$$.fragment,o),$(ha.$$.fragment,o),$(Zn.$$.fragment,o),$(es.$$.fragment,o),$(ma.$$.fragment,o),$(os.$$.fragment,o),$(as.$$.fragment,o),$(ga.$$.fragment,o),$(ss.$$.fragment,o),$(rs.$$.fragment,o),$(hs.$$.fragment,o),$(va.$$.fragment,o),$(ba.$$.fragment,o),$(us.$$.fragment,o),$(ms.$$.fragment,o),$(ws.$$.fragment,o),$(Ta.$$.fragment,o),$(ka.$$.fragment,o),$(Ts.$$.fragment,o),$(ks.$$.fragment,o),$(Ds.$$.fragment,o),$($a.$$.fragment,o),$(Va.$$.fragment,o),$(Fs.$$.fragment,o),$(As.$$.fragment,o),$(Ps.$$.fragment,o),$(Da.$$.fragment,o),$(Fa.$$.fragment,o),$(zs.$$.fragment,o),$(Ss.$$.fragment,o),$(Bs.$$.fragment,o),$(Ca.$$.fragment,o),$(Ea.$$.fragment,o),$(Hs.$$.fragment,o),$(Gs.$$.fragment,o),$(Zs.$$.fragment,o),$(qa.$$.fragment,o),$(Pa.$$.fragment,o),$(er.$$.fragment,o),$(tr.$$.fragment,o),$(rr.$$.fragment,o),$(Sa.$$.fragment,o),$(Ia.$$.fragment,o),$(ir.$$.fragment,o),$(lr.$$.fragment,o),$(ur.$$.fragment,o),$(La.$$.fragment,o),$(Na.$$.fragment,o),$(mr.$$.fragment,o),$(fr.$$.fragment,o),$(Tr.$$.fragment,o),$(Ba.$$.fragment,o),$(Ha.$$.fragment,o),$(Ga.$$.fragment,o),$(kr.$$.fragment,o),$(yr.$$.fragment,o),$(Ar.$$.fragment,o),$(Ua.$$.fragment,o),$(Xa.$$.fragment,o),$(Cr.$$.fragment,o),$(Er.$$.fragment,o),$(Sr.$$.fragment,o),$(Ja.$$.fragment,o),$(Ka.$$.fragment,o),$(Ir.$$.fragment,o),$(Or.$$.fragment,o),$(Gr.$$.fragment,o),$(Za.$$.fragment,o),$(en.$$.fragment,o),$(Qr.$$.fragment,o),$(Ur.$$.fragment,o),$(Jr.$$.fragment,o),$(on.$$.fragment,o),$(an.$$.fragment,o),$(Kr.$$.fragment,o),$(Yr.$$.fragment,o),$(ti.$$.fragment,o),$(sn.$$.fragment,o),$(rn.$$.fragment,o),$(oi.$$.fragment,o),$(ai.$$.fragment,o),$(ri.$$.fragment,o),$(dn.$$.fragment,o),$(cn.$$.fragment,o),$(ii.$$.fragment,o),$(li.$$.fragment,o),$(hn.$$.fragment,o),$(hi.$$.fragment,o),$(un.$$.fragment,o),$(mn.$$.fragment,o),$(ui.$$.fragment,o),$(mi.$$.fragment,o),$(gn.$$.fragment,o),$(vi.$$.fragment,o),$(_n.$$.fragment,o),$(vn.$$.fragment,o),$(bi.$$.fragment,o),$(wi.$$.fragment,o),$(wn.$$.fragment,o),$($i.$$.fragment,o),$(Tn.$$.fragment,o),$(kn.$$.fragment,o),Eh=!1},d(o){t(d),o&&t(b),o&&t(f),V(l),o&&t(Fe),o&&t(N),V(C),o&&t(Ae),o&&t(W),o&&t(Ce),o&&t(B),o&&t(Ee),o&&t(H),o&&t(Me),o&&t(G),o&&t(je),o&&t(z),o&&t(x),o&&t(A),o&&t(it),o&&t(L),o&&t(Mp),o&&t(co),V(Gn),o&&t(jp),o&&t(qi),o&&t(qp),V(Qn,o),o&&t(Pp),o&&t(la),o&&t(zp),o&&t(Si),o&&t(Sp),o&&t(ze),o&&t(Ip),o&&t(Hi),o&&t(Op),o&&t(da),o&&t(Lp),o&&t(Ui),o&&t(Np),o&&t(ca),o&&t(Wp),o&&t(Ji),o&&t(Bp),o&&t(ho),V(Jn),o&&t(Hp),o&&t(lt),V(Kn),V(ha),o&&t(Gp),o&&t(mo),V(Zn),o&&t(Qp),o&&t(dt),V(es),V(ma),o&&t(Up),o&&t(_o),V(os),o&&t(Xp),o&&t(Yt),V(as),V(ga),o&&t(Rp),o&&t(bo),V(ss),o&&t(Jp),o&&t(et),V(rs),V(hs),V(va),V(ba),o&&t(Kp),o&&t(To),V(us),o&&t(Yp),o&&t(ve),V(ms),V(ws),V(Ta),V(ka),o&&t(Zp),o&&t(yo),V(Ts),o&&t(eh),o&&t(tt),V(ks),V(Ds),V($a),V(Va),o&&t(th),o&&t(xo),V(Fs),o&&t(oh),o&&t(be),V(As),V(Ps),V(Da),V(Fa),o&&t(ah),o&&t(Fo),V(zs),o&&t(nh),o&&t(we),V(Ss),V(Bs),V(Ca),V(Ea),o&&t(sh),o&&t(Co),V(Hs),o&&t(rh),o&&t(re),V(Gs),V(Zs),V(qa),V(Pa),o&&t(ih),o&&t(Mo),V(er),o&&t(lh),o&&t(ot),V(tr),V(rr),V(Sa),V(Ia),o&&t(dh),o&&t(Po),V(ir),o&&t(ch),o&&t(at),V(lr),V(ur),V(La),V(Na),o&&t(ph),o&&t(Io),V(mr),o&&t(hh),o&&t(ke),V(fr),V(Tr),V(Ba),V(Ha),V(Ga),o&&t(uh),o&&t(Lo),V(kr),o&&t(mh),o&&t(ye),V(yr),V(Ar),V(Ua),V(Xa),o&&t(fh),o&&t(Wo),V(Cr),o&&t(gh),o&&t($e),V(Er),V(Sr),V(Ja),V(Ka),o&&t(_h),o&&t(Ho),V(Ir),o&&t(vh),o&&t(Ve),V(Or),V(Gr),V(Za),V(en),o&&t(bh),o&&t(Uo),V(Qr),o&&t(wh),o&&t(Zt),V(Ur),V(Jr),V(on),V(an),o&&t(Th),o&&t(Ro),V(Kr),o&&t(kh),o&&t(ct),V(Yr),V(ti),V(sn),V(rn),o&&t(yh),o&&t(Ko),V(oi),o&&t($h),o&&t(pt),V(ai),V(ri),V(dn),V(cn),o&&t(Vh),o&&t(Zo),V(ii),o&&t(xh),o&&t(nt),V(li),V(hn),V(hi),V(un),V(mn),o&&t(Dh),o&&t(ta),V(ui),o&&t(Fh),o&&t(xe),V(mi),V(gn),V(vi),V(_n),V(vn),o&&t(Ah),o&&t(aa),V(bi),o&&t(Ch),o&&t(De),V(wi),V(wn),V($i),V(Tn),V(kn)}}}const i0={local:"data2vec",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{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"},{local:"transformers.TFData2VecVisionForSemanticSegmentation",title:"TFData2VecVisionForSemanticSegmentation"}],title:"Data2Vec"};function l0(D){return fV(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class g0 extends pV{constructor(d){super();hV(this,d,l0,r0,uV,{})}}export{g0 as default,i0 as metadata};
