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