import{S as pV,i as hV,s as mV,e as s,k as h,w as v,t as a,M as uV,c as r,d as t,m,a as i,x as T,h as n,b as p,G as e,g as _,y as w,q as M,o as k,B as V,v as fV,L as K}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 Y}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as O}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as gV}from"../../chunks/PipelineTag-hf-doc-builder.js";function _V(F){let d,y,f,u,b;return u=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGEyVmVjVGV4dENvbmZpZyUyQyUyMERhdGEyVmVjVGV4dE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMERhdGEyVmVjVGV4dCUyMGZhY2Vib29rJTJGZGF0YTJ2ZWMtdGV4dC1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMERhdGEyVmVjVGV4dENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRmRhdGEydmVjLXRleHQtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwRGF0YTJWZWNUZXh0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Data2VecTextConfig, Data2VecTextModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/data2vec-text-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=a("Examples:"),f=h(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Examples:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,f,c),w(u,l,c),b=!0},p:K,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){k(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function bV(F){let d,y,f,u,b;return u=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGEyVmVjQXVkaW9Db25maWclMkMlMjBEYXRhMlZlY0F1ZGlvTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRGF0YTJWZWNBdWRpbyUyMGZhY2Vib29rJTJGZGF0YTJ2ZWMtYXVkaW8tYmFzZS05NjBoJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMERhdGEyVmVjQXVkaW9Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZmFjZWJvb2slMkZkYXRhMnZlYy1hdWRpby1iYXNlLTk2MGglMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMERhdGEyVmVjQXVkaW9Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Data2VecAudioConfig, Data2VecAudioModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/data2vec-audio-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecAudioModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=a("Example:"),f=h(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,f,c),w(u,l,c),b=!0},p:K,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){k(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function yV(F){let d,y,f,u,b;return u=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGEyVmVjVmlzaW9uQ29uZmlnJTJDJTIwRGF0YTJWZWNWaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBEYXRhMlZlY1Zpc2lvbiUyMGRhdGEydmVjX3Zpc2lvbi1iYXNlLXBhdGNoMTYtMjI0LWluMjJrJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMERhdGEyVmVjVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGRhdGEydmVjX3Zpc2lvbi1iYXNlLXBhdGNoMTYtMjI0LWluMjJrJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBEYXRhMlZlY1Zpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Data2VecVisionConfig, Data2VecVisionModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the data2vec_vision-base-patch16-224-in22k style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecVisionModel(configuration)

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

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

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># transcribe speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;MISTER QUILTER IS THE APOSTLE OF THE MIDDLE CLASSES AND WE ARE GLAD TO WELCOME HIS GOSPEL&#x27;</span>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=a("Example of single-label classification:"),f=h(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);y=n(c,"Example of single-label classification:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,f,c),w(u,l,c),b=!0},p:K,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){k(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function zV(F){let d,y,f,u,b;return u=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMERhdGEyVmVjVGV4dEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRhdGEydmVjLXRleHQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMERhdGEyVmVjVGV4dEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGF0YTJ2ZWMtdGV4dC1iYXNlJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBEYXRhMlZlY1RleHRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWNlYm9vayUyRmRhdGEydmVjLXRleHQtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, Data2VecTextForSequenceClassification

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Data2VecTextForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/data2vec-text-base&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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