import{S as pk,i as hk,s as mk,e as s,k as h,w as y,t as a,M as uk,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 fk,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 gk}from"../../chunks/PipelineTag-hf-doc-builder.js";function _k(F){let d,b,f,u,v;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"),b=a("Examples:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function vk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function bk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function yk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Tk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function wk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Mk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function kk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Vk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function $k(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Fk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function jk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function xk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Ck(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Jk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Ek(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Dk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Uk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Wk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Zk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Ak(F){let d,b,f,u,v;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"),b=a("Example of single-label classification:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=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,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function zk(F){let d,b,f,u,v;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"),b=a("Example of multi-label classification:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=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,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Ik(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Gk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Nk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Rk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Bk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Xk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Sk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function qk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Yk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Pk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Qk(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Lk(F){let d,b,f,u,v;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"),b=a("Examples:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function Hk(F){let d,b,f,u,v,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"),b=a("TensorFlow models and layers in "),f=s("code"),u=a("transformers"),v=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);b=n(x,"TensorFlow models and layers in "),f=r(x,"CODE",{});var mt=i(f);u=n(mt,"transformers"),mt.forEach(t),v=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 vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Je=n(J,`, such as when creating your own layers or models with
the Keras `),X=r(J,"CODE",{});var bt=i(X);pe=n(bt,"Functional"),bt.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 yt=i(S);Se=n(yt,"pixel_values"),yt.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,b),e(d,f),e(f,u),e(d,v),_($,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 Ok(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function Kk(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function eV(F){let d,b,f,u,v,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"),b=a("TensorFlow models and layers in "),f=s("code"),u=a("transformers"),v=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);b=n(x,"TensorFlow models and layers in "),f=r(x,"CODE",{});var mt=i(f);u=n(mt,"transformers"),mt.forEach(t),v=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 vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Je=n(J,`, such as when creating your own layers or models with
the Keras `),X=r(J,"CODE",{});var bt=i(X);pe=n(bt,"Functional"),bt.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 yt=i(S);Se=n(yt,"pixel_values"),yt.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,b),e(d,f),e(f,u),e(d,v),_($,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 tV(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function oV(F){let d,b,f,u,v;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"),b=a("Example:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function aV(F){let d,b,f,u,v,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"),b=a("TensorFlow models and layers in "),f=s("code"),u=a("transformers"),v=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);b=n(x,"TensorFlow models and layers in "),f=r(x,"CODE",{});var mt=i(f);u=n(mt,"transformers"),mt.forEach(t),v=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 vt=i(B);Be=n(vt,"predict()"),vt.forEach(t),Je=n(J,`, such as when creating your own layers or models with
the Keras `),X=r(J,"CODE",{});var bt=i(X);pe=n(bt,"Functional"),bt.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 yt=i(S);Se=n(yt,"pixel_values"),yt.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,b),e(d,f),e(f,u),e(d,v),_($,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 nV(F){let d,b,f,u,v;return{c(){d=s("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(c,"CODE",{});var j=i(f);u=n(j,"Module"),j.forEach(t),v=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,f),e(f,u),e(d,v)},d(l){l&&t(d)}}}function sV(F){let d,b,f,u,v;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"),b=a("Examples:"),f=h(),y(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),f=m(l),T(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,f,c),w(u,l,c),v=!0},p:K,i(l){v||(M(u.$$.fragment,l),v=!0)},o(l){k(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(f),V(u,l)}}}function rV(F){let d,b,f,u,v,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,vt,bt,I,se,yt,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,vd,Ni,mu,uu,bd,Ri,fu,gu,yd,Bi,_u,zp,Xi,Td,vu,Ip,da,wd,Si,bu,yu,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,vo,df,nl,cf,pf,ns,hf,mf,uf,ga,Qp,bo,_a,Dd,ss,ff,Ud,gf,Lp,et,rs,_f,is,vf,ls,bf,yf,Tf,ds,wf,sl,Mf,kf,Vf,cs,$f,ps,Ff,jf,xf,kt,hs,Cf,yo,Jf,rl,Ef,Df,Wd,Uf,Wf,Zf,va,Af,ba,Hp,To,ya,Zd,ms,zf,Ad,If,Op,ve,us,Gf,zd,Nf,Rf,fs,Bf,gs,Xf,Sf,qf,_s,Yf,il,Pf,Qf,Lf,vs,Hf,bs,Of,Kf,eg,Vt,ys,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,vg,dl,bg,yg,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,be,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,ye,As,i_,Ld,l_,d_,zs,c_,Is,p_,h_,m_,Gs,u_,ml,f_,g_,__,Ns,v_,Rs,b_,y_,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,v2,b2,y2,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,vl,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,ev,tv,cr,ov,bl,av,nv,sv,pr,rv,hr,iv,lv,dv,Jt,mr,cv,Ao,pv,yl,hv,mv,gc,uv,fv,gv,Ga,_v,Na,ph,zo,Ra,_c,ur,vv,vc,bv,hh,we,fr,yv,bc,Tv,wv,gr,Mv,_r,kv,Vv,$v,vr,Fv,Tl,jv,xv,Cv,br,Jv,yr,Ev,Dv,Uv,st,Tr,Wv,Io,Zv,wl,Av,zv,yc,Iv,Gv,Nv,Ba,Rv,Xa,Bv,Sa,mh,Go,qa,Tc,wr,Xv,wc,Sv,uh,Me,Mr,qv,Mc,Yv,Pv,kr,Qv,Vr,Lv,Hv,Ov,$r,Kv,Ml,eb,tb,ob,Fr,ab,jr,nb,sb,rb,Et,xr,ib,No,lb,kl,db,cb,kc,pb,hb,mb,Ya,ub,Pa,fh,Ro,Qa,Vc,Cr,fb,$c,gb,gh,ke,Jr,_b,Fc,vb,bb,Er,yb,Dr,Tb,wb,Mb,Ur,kb,Vl,Vb,$b,Fb,Wr,jb,Zr,xb,Cb,Jb,Dt,Ar,Eb,Bo,Db,$l,Ub,Wb,jc,Zb,Ab,zb,La,Ib,Ha,_h,Xo,Oa,xc,zr,Gb,Cc,Nb,vh,Ve,Ir,Rb,So,Bb,Jc,Xb,Sb,Ec,qb,Yb,Pb,Gr,Qb,Nr,Lb,Hb,Ob,Rr,Kb,Fl,ey,ty,oy,Br,ay,Xr,ny,sy,ry,Ut,Sr,iy,qo,ly,jl,dy,cy,Dc,py,hy,my,Ka,uy,en,bh,Yo,tn,Uc,qr,fy,Wc,gy,yh,Kt,Yr,_y,Pr,vy,Qr,by,yy,Ty,Wt,Lr,wy,Po,My,xl,ky,Vy,Zc,$y,Fy,jy,on,xy,an,Th,Qo,nn,Ac,Hr,Cy,zc,Jy,wh,ct,Or,Ey,Ic,Dy,Uy,Kr,Wy,ei,Zy,Ay,zy,Zt,ti,Iy,Lo,Gy,Cl,Ny,Ry,Gc,By,Xy,Sy,sn,qy,rn,Mh,Ho,ln,Nc,oi,Yy,Rc,Py,kh,pt,ai,Qy,Bc,Ly,Hy,ni,Oy,si,Ky,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,vT,bT,yT,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,vi,XT,oa,ST,Wl,qT,YT,Hc,PT,QT,LT,_n,HT,vn,xh,aa,bn,Oc,bi,OT,Kc,KT,Ch,Fe,yi,ew,ep,tw,ow,Ti,aw,Zl,nw,sw,rw,wi,iw,Mi,lw,dw,cw,yn,pw,Gt,ki,hw,na,mw,Al,uw,fw,tp,gw,_w,vw,Tn,bw,wn,Jh;return l=new Y({}),C=new Y({}),Sn=new Y({}),qn=new gk({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/v4.32.0/src/transformers/models/data2vec/configuration_data2vec_text.py#L31"}}),ha=new O({props:{anchor:"transformers.Data2VecTextConfig.example",$$slots:{default:[_k]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioModel">Data2VecAudioModel</a> or <code>TFData2VecAudioModel</code>. Vocabulary size
of the model. Defines the different tokens that can be represented by the <em>inputs_ids</em> passed to the
forward method of <a href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioModel">Data2VecAudioModel</a>.`,name:"vocab_size"},{anchor:"transformers.Data2VecAudioConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.Data2VecAudioConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.Data2VecAudioConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.Data2VecAudioConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.Data2VecAudioConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.Data2VecAudioConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.Data2VecAudioConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.Data2VecAudioConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioForCTC">Data2VecAudioForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.Data2VecAudioConfig.ctc_zero_infinity",description:`<strong>ctc_zero_infinity</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to zero infinite losses and the associated gradients of <code>torch.nn.CTCLoss</code>. Infinite losses mainly
occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
of <a href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioForCTC">Data2VecAudioForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.Data2VecAudioConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioForSequenceClassification">Data2VecAudioForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.Data2VecAudioConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.Data2VecAudioConfig.tdnn_dim",description:`<strong>tdnn_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 1500)</code>) &#x2014;
A tuple of integers defining the number of output channels of each 1D convolutional layer in the <em>TDNN</em>
module of the <em>XVector</em> model. The length of <em>tdnn_dim</em> defines the number of <em>TDNN</em> layers.`,name:"tdnn_dim"},{anchor:"transformers.Data2VecAudioConfig.tdnn_kernel",description:`<strong>tdnn_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 3, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_kernel</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_kernel"},{anchor:"transformers.Data2VecAudioConfig.tdnn_dilation",description:`<strong>tdnn_dilation</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(1, 2, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the dilation factor of each 1D convolutional layer in <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_dilation</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_dilation"},{anchor:"transformers.Data2VecAudioConfig.xvector_output_dim",description:`<strong>xvector_output_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"xvector_output_dim"},{anchor:"transformers.Data2VecAudioConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional network should be stacked on top of the Data2VecAudio Encoder. Can be very useful
for warm-starting Data2VecAudio for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.Data2VecAudioConfig.adapter_kernel_size",description:`<strong>adapter_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_kernel_size"},{anchor:"transformers.Data2VecAudioConfig.adapter_stride",description:`<strong>adapter_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_stride"},{anchor:"transformers.Data2VecAudioConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of convolutional layers that should be used in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"num_adapter_layers"},{anchor:"transformers.Data2VecAudioConfig.output_hidden_size",description:`<strong>output_hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the encoder output layer. If not defined, this defaults to <em>hidden-size</em>. Only relevant
if <code>add_adapter is True</code>.`,name:"output_hidden_size"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/configuration_data2vec_audio.py#L31"}}),ua=new O({props:{anchor:"transformers.Data2VecAudioConfig.example",$$slots:{default:[vk]},$$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/v4.32.0/src/transformers/models/data2vec/configuration_data2vec_vision.py#L35"}}),ga=new O({props:{anchor:"transformers.Data2VecVisionConfig.example",$$slots:{default:[bk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-base</a>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Data2VecAudioModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecAudioModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecAudioModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L901",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>extract_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, conv_dim[-1])</code>) \u2014 Sequence of extracted feature vectors of the last convolutional layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),va=new ie({props:{$$slots:{default:[yk]},$$scope:{ctx:F}}}),ba=new O({props:{anchor:"transformers.Data2VecAudioModel.forward.example",$$slots:{default:[Tk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1216"}}),ys=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/v4.32.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-base</a>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1261",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[wk]},$$scope:{ctx:F}}}),wa=new O({props:{anchor:"transformers.Data2VecAudioForAudioFrameClassification.forward.example",$$slots:{default:[Mk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForCTC.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-base</a>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Data2VecAudioForCTC.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecAudioForCTC.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecAudioForCTC.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForCTC.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_length)</code>, <em>optional</em>) &#x2014;
Labels for connectionist temporal classification. Note that <code>target_length</code> has to be smaller or equal to
the sequence length of the output logits. Indices are selected in <code>[-100, 0, ..., config.vocab_size - 1]</code>.
All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1007",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[kk]},$$scope:{ctx:F}}}),Va=new O({props:{anchor:"transformers.Data2VecAudioForCTC.forward.example",$$slots:{default:[Vk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-base</a>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1140",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[$k]},$$scope:{ctx:F}}}),ja=new O({props:{anchor:"transformers.Data2VecAudioForSequenceClassification.forward.example",$$slots:{default:[Fk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig">Data2VecAudioConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <em>torch.FloatTensor</em>. See <a href="/docs/transformers/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Data2VecAudioForXVector.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/facebook/data2vec-audio-base-960h" rel="nofollow">data2vec-audio-base</a>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.Data2VecAudioForXVector.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecAudioForXVector.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecAudioForXVector.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecAudioForXVector.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_audio.py#L1442",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioConfig"
>Data2VecAudioConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[jk]},$$scope:{ctx:F}}}),Ja=new O({props:{anchor:"transformers.Data2VecAudioForXVector.forward.example",$$slots:{default:[xk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.Data2VecTextModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.Data2VecTextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Data2VecTextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L736",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Ck]},$$scope:{ctx:F}}}),Wa=new O({props:{anchor:"transformers.Data2VecTextModel.forward.example",$$slots:{default:[Jk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.Data2VecTextForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.Data2VecTextForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.Data2VecTextForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Data2VecTextForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L898",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Ek]},$$scope:{ctx:F}}}),za=new O({props:{anchor:"transformers.Data2VecTextForCausalLM.forward.example",$$slots:{default:[Dk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.Data2VecTextForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L1050",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Uk]},$$scope:{ctx:F}}}),Na=new O({props:{anchor:"transformers.Data2VecTextForMaskedLM.forward.example",$$slots:{default:[Wk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L1168",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Zk]},$$scope:{ctx:F}}}),Xa=new O({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example",$$slots:{default:[Ak]},$$scope:{ctx:F}}}),Sa=new O({props:{anchor:"transformers.Data2VecTextForSequenceClassification.forward.example-2",$$slots:{default:[zk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L1264",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Ik]},$$scope:{ctx:F}}}),Pa=new O({props:{anchor:"transformers.Data2VecTextForMultipleChoice.forward.example",$$slots:{default:[Gk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L1362",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Nk]},$$scope:{ctx:F}}}),Ha=new O({props:{anchor:"transformers.Data2VecTextForTokenClassification.forward.example",$$slots:{default:[Rk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig">Data2VecTextConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_text.py#L1464",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextConfig"
>Data2VecTextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Bk]},$$scope:{ctx:F}}}),en=new O({props:{anchor:"transformers.Data2VecTextForQuestionAnswering.forward.example",$$slots:{default:[Xk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecVisionModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecVisionModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/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/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_vision.py#L659",returnDescription:`
<p>A <code>transformers.models.data2vec.modeling_data2vec_vision.Data2VecVisionModelOutputWithPooling</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/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:[Sk]},$$scope:{ctx:F}}}),an=new O({props:{anchor:"transformers.Data2VecVisionModel.forward.example",$$slots:{default:[qk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecVisionForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_vision.py#L762",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Yk]},$$scope:{ctx:F}}}),rn=new O({props:{anchor:"transformers.Data2VecVisionForImageClassification.forward.example",$$slots:{default:[Pk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_data2vec_vision.py#L1130",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, patch_size, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[Qk]},$$scope:{ctx:F}}}),cn=new O({props:{anchor:"transformers.Data2VecVisionForSemanticSegmentation.forward.example",$$slots:{default:[Lk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L852"}}),hn=new ie({props:{$$slots:{default:[Hk]},$$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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFData2VecVisionModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFData2VecVisionModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFData2VecVisionModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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:[Ok]},$$scope:{ctx:F}}}),un=new O({props:{anchor:"transformers.TFData2VecVisionModel.call.example",$$slots:{default:[Kk]},$$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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L907"}}),gn=new ie({props:{$$slots:{default:[eV]},$$scope:{ctx:F}}}),vi=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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used
in eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFData2VecVisionForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L921",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig"
>Data2VecVisionConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/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:[tV]},$$scope:{ctx:F}}}),vn=new O({props:{anchor:"transformers.TFData2VecVisionForImageClassification.call.example",$$slots:{default:[oV]},$$scope:{ctx:F}}}),bi=new Y({}),yi=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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecVisionConfig">Data2VecVisionConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py#L1279"}}),yn=new ie({props:{$$slots:{default:[aV]},$$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/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/beit#transformers.BeitFeatureExtractor.__call__">BeitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used
in eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/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/v4.32.0/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:[nV]},$$scope:{ctx:F}}}),wn=new O({props:{anchor:"transformers.TFData2VecVisionForSemanticSegmentation.call.example",$$slots:{default:[sV]},$$scope:{ctx:F}}}),{c(){d=s("meta"),b=h(),f=s("h1"),u=s("a"),v=s("span"),y(l.$$.fragment),c=h(),j=s("span"),ze=a("Data2Vec"),je=h(),N=s("h2"),le=s("a"),de=s("span"),y(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"),vt=a("sayakpaul"),bt=a(" and "),I=s("a"),se=a("Rocketknight1"),yt=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"),y(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(),y(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(),vd=s("li"),Ni=s("a"),mu=a("Causal language modeling task guide"),uu=h(),bd=s("li"),Ri=s("a"),fu=a("Masked language modeling task guide"),gu=h(),yd=s("li"),Bi=s("a"),_u=a("Multiple choice task guide"),zp=h(),Xi=s("p"),Td=s("strong"),vu=a("Data2VecAudio documentation resources"),Ip=h(),da=s("ul"),wd=s("li"),Si=s("a"),bu=a("Audio classification task guide"),yu=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"),y(Ln.$$.fragment),Fu=h(),jd=s("span"),ju=a("Data2VecTextConfig"),Xp=h(),lt=s("div"),y(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(),y(ha.$$.fragment),Sp=h(),uo=s("h2"),ma=s("a"),xd=s("span"),y(Kn.$$.fragment),Xu=h(),Cd=s("span"),Su=a("Data2VecAudioConfig"),qp=h(),dt=s("div"),y(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(),y(ua.$$.fragment),Yp=h(),_o=s("h2"),fa=s("a"),Jd=s("span"),y(os.$$.fragment),sf=h(),Ed=s("span"),rf=a("Data2VecVisionConfig"),Pp=h(),Ot=s("div"),y(as.$$.fragment),lf=h(),vo=s("p"),df=a("This is the configuration class to store the configuration of a "),nl=s("a"),cf=a("Data2VecVisionModel"),pf=a(`. It is used to instantiate
an Data2VecVision model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Data2VecVision
`),ns=s("a"),hf=a("facebook/data2vec-vision-base"),mf=a(" architecture."),uf=h(),y(ga.$$.fragment),Qp=h(),bo=s("h2"),_a=s("a"),Dd=s("span"),y(ss.$$.fragment),ff=h(),Ud=s("span"),gf=a("Data2VecAudioModel"),Lp=h(),et=s("div"),y(rs.$$.fragment),_f=h(),is=s("p"),vf=a(`The bare Data2VecAudio Model transformer outputting raw hidden-states without any specific head on top.
Data2VecAudio was proposed in `),ls=s("a"),bf=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),yf=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"),y(hs.$$.fragment),Cf=h(),yo=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(),y(va.$$.fragment),Af=h(),y(ba.$$.fragment),Hp=h(),To=s("h2"),ya=s("a"),Zd=s("span"),y(ms.$$.fragment),zf=h(),Ad=s("span"),If=a("Data2VecAudioForAudioFrameClassification"),Op=h(),ve=s("div"),y(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(),vs=s("p"),Hf=a("This model is a PyTorch "),bs=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"),y(ys.$$.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(),y(Ta.$$.fragment),lg=h(),y(wa.$$.fragment),Kp=h(),Mo=s("h2"),Ma=s("a"),Gd=s("span"),y(Ts.$$.fragment),dg=h(),Nd=s("span"),cg=a("Data2VecAudioForCTC"),eh=h(),tt=s("div"),y(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"),vg=a("This model inherits from "),dl=s("a"),bg=a("PreTrainedModel"),yg=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"),y(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(),y(ka.$$.fragment),Dg=h(),y(Va.$$.fragment),th=h(),$o=s("h2"),$a=s("a"),Xd=s("span"),y(js.$$.fragment),Ug=h(),Sd=s("span"),Wg=a("Data2VecAudioForSequenceClassification"),oh=h(),be=s("div"),y(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"),y(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(),y(Fa.$$.fragment),n_=h(),y(ja.$$.fragment),ah=h(),jo=s("h2"),xa=s("a"),Pd=s("span"),y(Zs.$$.fragment),s_=h(),Qd=s("span"),r_=a("Data2VecAudioForXVector"),nh=h(),ye=s("div"),y(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"),v_=a("This model is a PyTorch "),Rs=s("a"),b_=a("torch.nn.Module"),y_=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"),y(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(),y(Ca.$$.fragment),x_=h(),y(Ja.$$.fragment),sh=h(),Co=s("h2"),Ea=s("a"),Od=s("span"),y(Xs.$$.fragment),C_=h(),Kd=s("span"),J_=a("Data2VecTextModel"),rh=h(),re=s("div"),y(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"),y(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"),v2=a("__call__"),b2=a(" special method."),y2=h(),y(Ua.$$.fragment),T2=h(),y(Wa.$$.fragment),ih=h(),Eo=s("h2"),Za=s("a"),dc=s("span"),y(er.$$.fragment),w2=h(),cc=s("span"),M2=a("Data2VecTextForCausalLM"),lh=h(),ot=s("div"),y(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"),y(rr.$$.fragment),I2=h(),Uo=s("p"),G2=a("The "),vl=s("a"),N2=a("Data2VecTextForCausalLM"),R2=a(" forward method, overrides the "),hc=s("code"),B2=a("__call__"),X2=a(" special method."),S2=h(),y(Aa.$$.fragment),q2=h(),y(za.$$.fragment),dh=h(),Wo=s("h2"),Ia=s("a"),mc=s("span"),y(ir.$$.fragment),Y2=h(),uc=s("span"),P2=a("Data2VecTextForMaskedLM"),ch=h(),at=s("div"),y(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`),ev=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),tv=h(),cr=s("p"),ov=a("This model inherits from "),bl=s("a"),av=a("PreTrainedModel"),nv=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sv=h(),pr=s("p"),rv=a("This model is also a PyTorch "),hr=s("a"),iv=a("torch.nn.Module"),lv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dv=h(),Jt=s("div"),y(mr.$$.fragment),cv=h(),Ao=s("p"),pv=a("The "),yl=s("a"),hv=a("Data2VecTextForMaskedLM"),mv=a(" forward method, overrides the "),gc=s("code"),uv=a("__call__"),fv=a(" special method."),gv=h(),y(Ga.$$.fragment),_v=h(),y(Na.$$.fragment),ph=h(),zo=s("h2"),Ra=s("a"),_c=s("span"),y(ur.$$.fragment),vv=h(),vc=s("span"),bv=a("Data2VecTextForSequenceClassification"),hh=h(),we=s("div"),y(fr.$$.fragment),yv=h(),bc=s("p"),Tv=a(`Data2VecText Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),wv=h(),gr=s("p"),Mv=a("Data2VecText was proposed in "),_r=s("a"),kv=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Vv=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),$v=h(),vr=s("p"),Fv=a("This model inherits from "),Tl=s("a"),jv=a("PreTrainedModel"),xv=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Cv=h(),br=s("p"),Jv=a("This model is also a PyTorch "),yr=s("a"),Ev=a("torch.nn.Module"),Dv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uv=h(),st=s("div"),y(Tr.$$.fragment),Wv=h(),Io=s("p"),Zv=a("The "),wl=s("a"),Av=a("Data2VecTextForSequenceClassification"),zv=a(" forward method, overrides the "),yc=s("code"),Iv=a("__call__"),Gv=a(" special method."),Nv=h(),y(Ba.$$.fragment),Rv=h(),y(Xa.$$.fragment),Bv=h(),y(Sa.$$.fragment),mh=h(),Go=s("h2"),qa=s("a"),Tc=s("span"),y(wr.$$.fragment),Xv=h(),wc=s("span"),Sv=a("Data2VecTextForMultipleChoice"),uh=h(),Me=s("div"),y(Mr.$$.fragment),qv=h(),Mc=s("p"),Yv=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.`),Pv=h(),kr=s("p"),Qv=a("Data2VecText was proposed in "),Vr=s("a"),Lv=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),Hv=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Ov=h(),$r=s("p"),Kv=a("This model inherits from "),Ml=s("a"),eb=a("PreTrainedModel"),tb=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ob=h(),Fr=s("p"),ab=a("This model is also a PyTorch "),jr=s("a"),nb=a("torch.nn.Module"),sb=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rb=h(),Et=s("div"),y(xr.$$.fragment),ib=h(),No=s("p"),lb=a("The "),kl=s("a"),db=a("Data2VecTextForMultipleChoice"),cb=a(" forward method, overrides the "),kc=s("code"),pb=a("__call__"),hb=a(" special method."),mb=h(),y(Ya.$$.fragment),ub=h(),y(Pa.$$.fragment),fh=h(),Ro=s("h2"),Qa=s("a"),Vc=s("span"),y(Cr.$$.fragment),fb=h(),$c=s("span"),gb=a("Data2VecTextForTokenClassification"),gh=h(),ke=s("div"),y(Jr.$$.fragment),_b=h(),Fc=s("p"),vb=a(`Data2VecText Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),bb=h(),Er=s("p"),yb=a("Data2VecText was proposed in "),Dr=s("a"),Tb=a(`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),wb=a(` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Mb=h(),Ur=s("p"),kb=a("This model inherits from "),Vl=s("a"),Vb=a("PreTrainedModel"),$b=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.)`),Fb=h(),Wr=s("p"),jb=a("This model is also a PyTorch "),Zr=s("a"),xb=a("torch.nn.Module"),Cb=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jb=h(),Dt=s("div"),y(Ar.$$.fragment),Eb=h(),Bo=s("p"),Db=a("The "),$l=s("a"),Ub=a("Data2VecTextForTokenClassification"),Wb=a(" forward method, overrides the "),jc=s("code"),Zb=a("__call__"),Ab=a(" special method."),zb=h(),y(La.$$.fragment),Ib=h(),y(Ha.$$.fragment),_h=h(),Xo=s("h2"),Oa=s("a"),xc=s("span"),y(zr.$$.fragment),Gb=h(),Cc=s("span"),Nb=a("Data2VecTextForQuestionAnswering"),vh=h(),Ve=s("div"),y(Ir.$$.fragment),Rb=h(),So=s("p"),Bb=a(`Data2VecText Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Jc=s("code"),Xb=a("span start logits"),Sb=a(" and "),Ec=s("code"),qb=a("span end logits"),Yb=a(")."),Pb=h(),Gr=s("p"),Qb=a("Data2VecText was proposed in "),Nr=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(),Rr=s("p"),Kb=a("This model inherits from "),Fl=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(),Br=s("p"),ay=a("This model is also a PyTorch "),Xr=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(),Ut=s("div"),y(Sr.$$.fragment),iy=h(),qo=s("p"),ly=a("The "),jl=s("a"),dy=a("Data2VecTextForQuestionAnswering"),cy=a(" forward method, overrides the "),Dc=s("code"),py=a("__call__"),hy=a(" special method."),my=h(),y(Ka.$$.fragment),uy=h(),y(en.$$.fragment),bh=h(),Yo=s("h2"),tn=s("a"),Uc=s("span"),y(qr.$$.fragment),fy=h(),Wc=s("span"),gy=a("Data2VecVisionModel"),yh=h(),Kt=s("div"),y(Yr.$$.fragment),_y=h(),Pr=s("p"),vy=a(`The bare Data2VecVision Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Qr=s("a"),by=a("torch.nn.Module"),yy=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ty=h(),Wt=s("div"),y(Lr.$$.fragment),wy=h(),Po=s("p"),My=a("The "),xl=s("a"),ky=a("Data2VecVisionModel"),Vy=a(" forward method, overrides the "),Zc=s("code"),$y=a("__call__"),Fy=a(" special method."),jy=h(),y(on.$$.fragment),xy=h(),y(an.$$.fragment),Th=h(),Qo=s("h2"),nn=s("a"),Ac=s("span"),y(Hr.$$.fragment),Cy=h(),zc=s("span"),Jy=a("Data2VecVisionForImageClassification"),wh=h(),ct=s("div"),y(Or.$$.fragment),Ey=h(),Ic=s("p"),Dy=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.`),Uy=h(),Kr=s("p"),Wy=a("This model is a PyTorch "),ei=s("a"),Zy=a("torch.nn.Module"),Ay=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zy=h(),Zt=s("div"),y(ti.$$.fragment),Iy=h(),Lo=s("p"),Gy=a("The "),Cl=s("a"),Ny=a("Data2VecVisionForImageClassification"),Ry=a(" forward method, overrides the "),Gc=s("code"),By=a("__call__"),Xy=a(" special method."),Sy=h(),y(sn.$$.fragment),qy=h(),y(rn.$$.fragment),Mh=h(),Ho=s("h2"),ln=s("a"),Nc=s("span"),y(oi.$$.fragment),Yy=h(),Rc=s("span"),Py=a("Data2VecVisionForSemanticSegmentation"),kh=h(),pt=s("div"),y(ai.$$.fragment),Qy=h(),Bc=s("p"),Ly=a("Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Hy=h(),ni=s("p"),Oy=a("This model is a PyTorch "),si=s("a"),Ky=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"),y(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(),y(dn.$$.fragment),dT=h(),y(cn.$$.fragment),Vh=h(),Ko=s("h2"),pn=s("a"),Sc=s("span"),y(ii.$$.fragment),cT=h(),qc=s("span"),pT=a("TFData2VecVisionModel"),$h=h(),nt=s("div"),y(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"),vT=a("tf.keras.Model"),bT=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.`),yT=h(),y(hn.$$.fragment),TT=h(),zt=s("div"),y(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(),y(mn.$$.fragment),xT=h(),y(un.$$.fragment),Fh=h(),ta=s("h2"),fn=s("a"),Pc=s("span"),y(mi.$$.fragment),CT=h(),Qc=s("span"),JT=a("TFData2VecVisionForImageClassification"),jh=h(),$e=s("div"),y(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(),y(gn.$$.fragment),BT=h(),It=s("div"),y(vi.$$.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(),y(_n.$$.fragment),HT=h(),y(vn.$$.fragment),xh=h(),aa=s("h2"),bn=s("a"),Oc=s("span"),y(bi.$$.fragment),OT=h(),Kc=s("span"),KT=a("TFData2VecVisionForSemanticSegmentation"),Ch=h(),Fe=s("div"),y(yi.$$.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(),y(yn.$$.fragment),pw=h(),Gt=s("div"),y(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."),vw=h(),y(Tn.$$.fragment),bw=h(),y(wn.$$.fragment),this.h()},l(o){const g=uk('[data-svelte="svelte-1phssyn"]',document.head);d=r(g,"META",{name:!0,content:!0}),g.forEach(t),b=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);v=r(op,"SPAN",{});var ap=i(v);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 vp=i(J);gt=n(vp,"patrickvonplaten"),vp.forEach(t),_t=n(ht,`.
`),Ue=r(ht,"A",{href:!0,rel:!0});var bp=i(Ue);vt=n(bp,"sayakpaul"),bp.forEach(t),bt=n(ht," and "),I=r(ht,"A",{href:!0,rel:!0});var yp=i(I);se=n(yp,"Rocketknight1"),yp.forEach(t),yt=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 yw=i(Qn);nu=n(yw,"this notebook"),yw.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),vd=r(Nt,"LI",{});var xw=i(vd);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),bd=r(Nt,"LI",{});var Jw=i(bd);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),yd=r(Nt,"LI",{});var Dw=i(yd);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);vu=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);bu=n(zw,"Audio classification task guide"),zw.forEach(t),Aw.forEach(t),yu=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),vo=r(Nl,"P",{});var Rl=i(vo);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),bo=r(o,"H2",{class:!0});var Ah=i(bo);_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);vf=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);bf=n(_M,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),_M.forEach(t),yf=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 vM=i(sl);Mf=n(vM,"PreTrainedModel"),vM.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 bM=i(ps);Ff=n(bM,"torch.nn.Module"),bM.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),yo=r($n,"P",{});var Bl=i(yo);Jf=n(Bl,"The "),rl=r(Bl,"A",{href:!0});var yM=i(rl);Ef=n(yM,"Data2VecAudioModel"),yM.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(va.$$.fragment,$n),Af=m($n),T(ba.$$.fragment,$n),$n.forEach(t),ao.forEach(t),Hp=m(o),To=r(o,"H2",{class:!0});var Nh=i(To);ya=r(Nh,"A",{id:!0,class:!0,href:!0});var wM=i(ya);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),ve=r(o,"DIV",{class:!0});var Rt=i(ve);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),vs=r(Rt,"P",{});var Xh=i(vs);Hf=n(Xh,"This model is a PyTorch "),bs=r(Xh,"A",{href:!0,rel:!0});var jM=i(bs);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(ys.$$.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);vg=n(qh,"This model inherits from "),dl=r(qh,"A",{href:!0});var ZM=i(dl);bg=n(ZM,"PreTrainedModel"),ZM.forEach(t),yg=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),be=r(o,"DIV",{class:!0});var Bt=i(be);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),ye=r(o,"DIV",{class:!0});var Xt=i(ye);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 e0=i(ml);f_=n(e0,"PreTrainedModel"),e0.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);v_=n(tm,"This model is a PyTorch "),Rs=r(tm,"A",{href:!0,rel:!0});var t0=i(Rs);b_=n(t0,"torch.nn.Module"),t0.forEach(t),y_=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 o0=i(ul);k_=n(o0,"Data2VecAudioForXVector"),o0.forEach(t),V_=n(Pl," forward method, overrides the "),Hd=r(Pl,"CODE",{});var a0=i(Hd);$_=n(a0,"__call__"),a0.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 n0=i(Ea);Od=r(n0,"SPAN",{});var s0=i(Od);T(Xs.$$.fragment,s0),s0.forEach(t),n0.forEach(t),C_=m(om),Kd=r(om,"SPAN",{});var r0=i(Kd);J_=n(r0,"Data2VecTextModel"),r0.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 i0=i(Ys);U_=n(i0,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),i0.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 l0=i(fl);z_=n(l0,"PreTrainedModel"),l0.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 d0=i(Ls);R_=n(d0,"torch.nn.Module"),d0.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 c0=i(ec);q_=n(c0,`Attention is
all you need`),c0.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 p0=i(tc);L_=n(p0,"is_decoder"),p0.forEach(t),H_=n(rt,` argument of the configuration set
to `),oc=r(rt,"CODE",{});var h0=i(oc);O_=n(h0,"True"),h0.forEach(t),K_=n(rt,". To be used in a Seq2Seq model, the model needs to initialized with both "),ac=r(rt,"CODE",{});var m0=i(ac);e2=n(m0,"is_decoder"),m0.forEach(t),t2=n(rt,` argument and
`),nc=r(rt,"CODE",{});var u0=i(nc);o2=n(u0,"add_cross_attention"),u0.forEach(t),a2=n(rt," set to "),sc=r(rt,"CODE",{});var f0=i(sc);n2=n(f0,"True"),f0.forEach(t),s2=n(rt,"; an "),rc=r(rt,"CODE",{});var g0=i(rc);r2=n(g0,"encoder_hidden_states"),g0.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 _0=i(ic);c2=n(_0,"Attention is all you need"),_0.forEach(t),p2=n(Jp,": "),Os=r(Jp,"A",{href:!0,rel:!0});var v0=i(Os);h2=n(v0,"https://arxiv.org/abs/1706.03762"),v0.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 b0=i(gl);g2=n(b0,"Data2VecTextModel"),b0.forEach(t),_2=n(Ql," forward method, overrides the "),lc=r(Ql,"CODE",{});var y0=i(lc);v2=n(y0,"__call__"),y0.forEach(t),b2=n(Ql," special method."),Ql.forEach(t),y2=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 T0=i(Za);dc=r(T0,"SPAN",{});var w0=i(dc);T(er.$$.fragment,w0),w0.forEach(t),T0.forEach(t),w2=m(im),cc=r(im,"SPAN",{});var M0=i(cc);M2=n(M0,"Data2VecTextForCausalLM"),M0.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 k0=i(pc);$2=n(k0,"language modeling"),k0.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 V0=i(or);j2=n(V0,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),V0.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 $0=i(_l);E2=n($0,"PreTrainedModel"),$0.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 F0=i(sr);Z2=n(F0,"torch.nn.Module"),F0.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 "),vl=r(Hl,"A",{href:!0});var j0=i(vl);N2=n(j0,"Data2VecTextForCausalLM"),j0.forEach(t),R2=n(Hl," forward method, overrides the "),hc=r(Hl,"CODE",{});var x0=i(hc);B2=n(x0,"__call__"),x0.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 C0=i(Ia);mc=r(C0,"SPAN",{});var J0=i(mc);T(ir.$$.fragment,J0),J0.forEach(t),C0.forEach(t),Y2=m(cm),uc=r(cm,"SPAN",{});var E0=i(uc);P2=n(E0,"Data2VecTextForMaskedLM"),E0.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 D0=i(fc);H2=n(D0,"language modeling"),D0.forEach(t),O2=n(Ol,` head on top.
Data2VecText was proposed in `),dr=r(Ol,"A",{href:!0,rel:!0});var U0=i(dr);K2=n(U0,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),U0.forEach(t),ev=n(Ol,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),Ol.forEach(t),tv=m(ro),cr=r(ro,"P",{});var pm=i(cr);ov=n(pm,"This model inherits from "),bl=r(pm,"A",{href:!0});var W0=i(bl);av=n(W0,"PreTrainedModel"),W0.forEach(t),nv=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),sv=m(ro),pr=r(ro,"P",{});var hm=i(pr);rv=n(hm,"This model is also a PyTorch "),hr=r(hm,"A",{href:!0,rel:!0});var Z0=i(hr);iv=n(Z0,"torch.nn.Module"),Z0.forEach(t),lv=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),dv=m(ro),Jt=r(ro,"DIV",{class:!0});var Dn=i(Jt);T(mr.$$.fragment,Dn),cv=m(Dn),Ao=r(Dn,"P",{});var Kl=i(Ao);pv=n(Kl,"The "),yl=r(Kl,"A",{href:!0});var A0=i(yl);hv=n(A0,"Data2VecTextForMaskedLM"),A0.forEach(t),mv=n(Kl," forward method, overrides the "),gc=r(Kl,"CODE",{});var z0=i(gc);uv=n(z0,"__call__"),z0.forEach(t),fv=n(Kl," special method."),Kl.forEach(t),gv=m(Dn),T(Ga.$$.fragment,Dn),_v=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 I0=i(Ra);_c=r(I0,"SPAN",{});var G0=i(_c);T(ur.$$.fragment,G0),G0.forEach(t),I0.forEach(t),vv=m(mm),vc=r(mm,"SPAN",{});var N0=i(vc);bv=n(N0,"Data2VecTextForSequenceClassification"),N0.forEach(t),mm.forEach(t),hh=m(o),we=r(o,"DIV",{class:!0});var St=i(we);T(fr.$$.fragment,St),yv=m(St),bc=r(St,"P",{});var R0=i(bc);Tv=n(R0,`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.`),R0.forEach(t),wv=m(St),gr=r(St,"P",{});var um=i(gr);Mv=n(um,"Data2VecText was proposed in "),_r=r(um,"A",{href:!0,rel:!0});var B0=i(_r);kv=n(B0,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),B0.forEach(t),Vv=n(um,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),um.forEach(t),$v=m(St),vr=r(St,"P",{});var fm=i(vr);Fv=n(fm,"This model inherits from "),Tl=r(fm,"A",{href:!0});var X0=i(Tl);jv=n(X0,"PreTrainedModel"),X0.forEach(t),xv=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),Cv=m(St),br=r(St,"P",{});var gm=i(br);Jv=n(gm,"This model is also a PyTorch "),yr=r(gm,"A",{href:!0,rel:!0});var S0=i(yr);Ev=n(S0,"torch.nn.Module"),S0.forEach(t),Dv=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),Uv=m(St),st=r(St,"DIV",{class:!0});var io=i(st);T(Tr.$$.fragment,io),Wv=m(io),Io=r(io,"P",{});var ed=i(Io);Zv=n(ed,"The "),wl=r(ed,"A",{href:!0});var q0=i(wl);Av=n(q0,"Data2VecTextForSequenceClassification"),q0.forEach(t),zv=n(ed," forward method, overrides the "),yc=r(ed,"CODE",{});var Y0=i(yc);Iv=n(Y0,"__call__"),Y0.forEach(t),Gv=n(ed," special method."),ed.forEach(t),Nv=m(io),T(Ba.$$.fragment,io),Rv=m(io),T(Xa.$$.fragment,io),Bv=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 P0=i(qa);Tc=r(P0,"SPAN",{});var Q0=i(Tc);T(wr.$$.fragment,Q0),Q0.forEach(t),P0.forEach(t),Xv=m(_m),wc=r(_m,"SPAN",{});var L0=i(wc);Sv=n(L0,"Data2VecTextForMultipleChoice"),L0.forEach(t),_m.forEach(t),uh=m(o),Me=r(o,"DIV",{class:!0});var qt=i(Me);T(Mr.$$.fragment,qt),qv=m(qt),Mc=r(qt,"P",{});var H0=i(Mc);Yv=n(H0,`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.`),H0.forEach(t),Pv=m(qt),kr=r(qt,"P",{});var vm=i(kr);Qv=n(vm,"Data2VecText was proposed in "),Vr=r(vm,"A",{href:!0,rel:!0});var O0=i(Vr);Lv=n(O0,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),O0.forEach(t),Hv=n(vm,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),vm.forEach(t),Ov=m(qt),$r=r(qt,"P",{});var bm=i($r);Kv=n(bm,"This model inherits from "),Ml=r(bm,"A",{href:!0});var K0=i(Ml);eb=n(K0,"PreTrainedModel"),K0.forEach(t),tb=n(bm,`. 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.)`),bm.forEach(t),ob=m(qt),Fr=r(qt,"P",{});var ym=i(Fr);ab=n(ym,"This model is also a PyTorch "),jr=r(ym,"A",{href:!0,rel:!0});var e1=i(jr);nb=n(e1,"torch.nn.Module"),e1.forEach(t),sb=n(ym,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ym.forEach(t),rb=m(qt),Et=r(qt,"DIV",{class:!0});var Un=i(Et);T(xr.$$.fragment,Un),ib=m(Un),No=r(Un,"P",{});var td=i(No);lb=n(td,"The "),kl=r(td,"A",{href:!0});var t1=i(kl);db=n(t1,"Data2VecTextForMultipleChoice"),t1.forEach(t),cb=n(td," forward method, overrides the "),kc=r(td,"CODE",{});var o1=i(kc);pb=n(o1,"__call__"),o1.forEach(t),hb=n(td," special method."),td.forEach(t),mb=m(Un),T(Ya.$$.fragment,Un),ub=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 a1=i(Qa);Vc=r(a1,"SPAN",{});var n1=i(Vc);T(Cr.$$.fragment,n1),n1.forEach(t),a1.forEach(t),fb=m(Tm),$c=r(Tm,"SPAN",{});var s1=i($c);gb=n(s1,"Data2VecTextForTokenClassification"),s1.forEach(t),Tm.forEach(t),gh=m(o),ke=r(o,"DIV",{class:!0});var Yt=i(ke);T(Jr.$$.fragment,Yt),_b=m(Yt),Fc=r(Yt,"P",{});var r1=i(Fc);vb=n(r1,`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.`),r1.forEach(t),bb=m(Yt),Er=r(Yt,"P",{});var wm=i(Er);yb=n(wm,"Data2VecText was proposed in "),Dr=r(wm,"A",{href:!0,rel:!0});var i1=i(Dr);Tb=n(i1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),i1.forEach(t),wb=n(wm,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),wm.forEach(t),Mb=m(Yt),Ur=r(Yt,"P",{});var Mm=i(Ur);kb=n(Mm,"This model inherits from "),Vl=r(Mm,"A",{href:!0});var l1=i(Vl);Vb=n(l1,"PreTrainedModel"),l1.forEach(t),$b=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),Fb=m(Yt),Wr=r(Yt,"P",{});var km=i(Wr);jb=n(km,"This model is also a PyTorch "),Zr=r(km,"A",{href:!0,rel:!0});var d1=i(Zr);xb=n(d1,"torch.nn.Module"),d1.forEach(t),Cb=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),Jb=m(Yt),Dt=r(Yt,"DIV",{class:!0});var Wn=i(Dt);T(Ar.$$.fragment,Wn),Eb=m(Wn),Bo=r(Wn,"P",{});var od=i(Bo);Db=n(od,"The "),$l=r(od,"A",{href:!0});var c1=i($l);Ub=n(c1,"Data2VecTextForTokenClassification"),c1.forEach(t),Wb=n(od," forward method, overrides the "),jc=r(od,"CODE",{});var p1=i(jc);Zb=n(p1,"__call__"),p1.forEach(t),Ab=n(od," special method."),od.forEach(t),zb=m(Wn),T(La.$$.fragment,Wn),Ib=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 h1=i(Oa);xc=r(h1,"SPAN",{});var m1=i(xc);T(zr.$$.fragment,m1),m1.forEach(t),h1.forEach(t),Gb=m(Vm),Cc=r(Vm,"SPAN",{});var u1=i(Cc);Nb=n(u1,"Data2VecTextForQuestionAnswering"),u1.forEach(t),Vm.forEach(t),vh=m(o),Ve=r(o,"DIV",{class:!0});var Pt=i(Ve);T(Ir.$$.fragment,Pt),Rb=m(Pt),So=r(Pt,"P",{});var ad=i(So);Bb=n(ad,`Data2VecText Model with a span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Jc=r(ad,"CODE",{});var f1=i(Jc);Xb=n(f1,"span start logits"),f1.forEach(t),Sb=n(ad," and "),Ec=r(ad,"CODE",{});var g1=i(Ec);qb=n(g1,"span end logits"),g1.forEach(t),Yb=n(ad,")."),ad.forEach(t),Pb=m(Pt),Gr=r(Pt,"P",{});var $m=i(Gr);Qb=n($m,"Data2VecText was proposed in "),Nr=r($m,"A",{href:!0,rel:!0});var _1=i(Nr);Lb=n(_1,`data2vec: A General Framework for Self-supervised Learning in Speech, Vision and
Language`),_1.forEach(t),Hb=n($m,` by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu and
Michael Auli.`),$m.forEach(t),Ob=m(Pt),Rr=r(Pt,"P",{});var Fm=i(Rr);Kb=n(Fm,"This model inherits from "),Fl=r(Fm,"A",{href:!0});var v1=i(Fl);ey=n(v1,"PreTrainedModel"),v1.forEach(t),ty=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),oy=m(Pt),Br=r(Pt,"P",{});var jm=i(Br);ay=n(jm,"This model is also a PyTorch "),Xr=r(jm,"A",{href:!0,rel:!0});var b1=i(Xr);ny=n(b1,"torch.nn.Module"),b1.forEach(t),sy=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),ry=m(Pt),Ut=r(Pt,"DIV",{class:!0});var Zn=i(Ut);T(Sr.$$.fragment,Zn),iy=m(Zn),qo=r(Zn,"P",{});var nd=i(qo);ly=n(nd,"The "),jl=r(nd,"A",{href:!0});var y1=i(jl);dy=n(y1,"Data2VecTextForQuestionAnswering"),y1.forEach(t),cy=n(nd," forward method, overrides the "),Dc=r(nd,"CODE",{});var T1=i(Dc);py=n(T1,"__call__"),T1.forEach(t),hy=n(nd," special method."),nd.forEach(t),my=m(Zn),T(Ka.$$.fragment,Zn),uy=m(Zn),T(en.$$.fragment,Zn),Zn.forEach(t),Pt.forEach(t),bh=m(o),Yo=r(o,"H2",{class:!0});var xm=i(Yo);tn=r(xm,"A",{id:!0,class:!0,href:!0});var w1=i(tn);Uc=r(w1,"SPAN",{});var M1=i(Uc);T(qr.$$.fragment,M1),M1.forEach(t),w1.forEach(t),fy=m(xm),Wc=r(xm,"SPAN",{});var k1=i(Wc);gy=n(k1,"Data2VecVisionModel"),k1.forEach(t),xm.forEach(t),yh=m(o),Kt=r(o,"DIV",{class:!0});var sd=i(Kt);T(Yr.$$.fragment,sd),_y=m(sd),Pr=r(sd,"P",{});var Cm=i(Pr);vy=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 V1=i(Qr);by=n(V1,"torch.nn.Module"),V1.forEach(t),yy=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),Ty=m(sd),Wt=r(sd,"DIV",{class:!0});var An=i(Wt);T(Lr.$$.fragment,An),wy=m(An),Po=r(An,"P",{});var rd=i(Po);My=n(rd,"The "),xl=r(rd,"A",{href:!0});var $1=i(xl);ky=n($1,"Data2VecVisionModel"),$1.forEach(t),Vy=n(rd," forward method, overrides the "),Zc=r(rd,"CODE",{});var F1=i(Zc);$y=n(F1,"__call__"),F1.forEach(t),Fy=n(rd," special method."),rd.forEach(t),jy=m(An),T(on.$$.fragment,An),xy=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 j1=i(nn);Ac=r(j1,"SPAN",{});var x1=i(Ac);T(Hr.$$.fragment,x1),x1.forEach(t),j1.forEach(t),Cy=m(Jm),zc=r(Jm,"SPAN",{});var C1=i(zc);Jy=n(C1,"Data2VecVisionForImageClassification"),C1.forEach(t),Jm.forEach(t),wh=m(o),ct=r(o,"DIV",{class:!0});var zn=i(ct);T(Or.$$.fragment,zn),Ey=m(zn),Ic=r(zn,"P",{});var J1=i(Ic);Dy=n(J1,`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.`),J1.forEach(t),Uy=m(zn),Kr=r(zn,"P",{});var Em=i(Kr);Wy=n(Em,"This model is a PyTorch "),ei=r(Em,"A",{href:!0,rel:!0});var E1=i(ei);Zy=n(E1,"torch.nn.Module"),E1.forEach(t),Ay=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),zy=m(zn),Zt=r(zn,"DIV",{class:!0});var In=i(Zt);T(ti.$$.fragment,In),Iy=m(In),Lo=r(In,"P",{});var id=i(Lo);Gy=n(id,"The "),Cl=r(id,"A",{href:!0});var D1=i(Cl);Ny=n(D1,"Data2VecVisionForImageClassification"),D1.forEach(t),Ry=n(id," forward method, overrides the "),Gc=r(id,"CODE",{});var U1=i(Gc);By=n(U1,"__call__"),U1.forEach(t),Xy=n(id," special method."),id.forEach(t),Sy=m(In),T(sn.$$.fragment,In),qy=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 W1=i(ln);Nc=r(W1,"SPAN",{});var Z1=i(Nc);T(oi.$$.fragment,Z1),Z1.forEach(t),W1.forEach(t),Yy=m(Dm),Rc=r(Dm,"SPAN",{});var A1=i(Rc);Py=n(A1,"Data2VecVisionForSemanticSegmentation"),A1.forEach(t),Dm.forEach(t),kh=m(o),pt=r(o,"DIV",{class:!0});var Gn=i(pt);T(ai.$$.fragment,Gn),Qy=m(Gn),Bc=r(Gn,"P",{});var z1=i(Bc);Ly=n(z1,"Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),z1.forEach(t),Hy=m(Gn),ni=r(Gn,"P",{});var Um=i(ni);Oy=n(Um,"This model is a PyTorch "),si=r(Um,"A",{href:!0,rel:!0});var I1=i(si);Ky=n(I1,"torch.nn.Module"),I1.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 G1=i(Jl);nT=n(G1,"Data2VecVisionForSemanticSegmentation"),G1.forEach(t),sT=n(ld," forward method, overrides the "),Xc=r(ld,"CODE",{});var N1=i(Xc);rT=n(N1,"__call__"),N1.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 R1=i(pn);Sc=r(R1,"SPAN",{});var B1=i(Sc);T(ii.$$.fragment,B1),B1.forEach(t),R1.forEach(t),cT=m(Wm),qc=r(Wm,"SPAN",{});var X1=i(qc);pT=n(X1,"TFData2VecVisionModel"),X1.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 S1=i(El);uT=n(S1,"TFPreTrainedModel"),S1.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 q1=i(pi);vT=n(q1,"tf.keras.Model"),q1.forEach(t),bT=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),yT=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 Y1=i(Dl);kT=n(Y1,"TFData2VecVisionModel"),Y1.forEach(t),VT=n(dd," forward method, overrides the "),Yc=r(dd,"CODE",{});var P1=i(Yc);$T=n(P1,"__call__"),P1.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 Q1=i(fn);Pc=r(Q1,"SPAN",{});var L1=i(Pc);T(mi.$$.fragment,L1),L1.forEach(t),Q1.forEach(t),CT=m(zm),Qc=r(zm,"SPAN",{});var H1=i(Qc);JT=n(H1,"TFData2VecVisionForImageClassification"),H1.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 O1=i(Lc);DT=n(O1,`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.`),O1.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 K1=i(Ul);ZT=n(K1,"TFPreTrainedModel"),K1.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 ek=i(_i);GT=n(ek,"tf.keras.Model"),ek.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(vi.$$.fragment,Bn),XT=m(Bn),oa=r(Bn,"P",{});var cd=i(oa);ST=n(cd,"The "),Wl=r(cd,"A",{href:!0});var tk=i(Wl);qT=n(tk,"TFData2VecVisionForImageClassification"),tk.forEach(t),YT=n(cd," forward method, overrides the "),Hc=r(cd,"CODE",{});var ok=i(Hc);PT=n(ok,"__call__"),ok.forEach(t),QT=n(cd," special method."),cd.forEach(t),LT=m(Bn),T(_n.$$.fragment,Bn),HT=m(Bn),T(vn.$$.fragment,Bn),Bn.forEach(t),Qt.forEach(t),xh=m(o),aa=r(o,"H2",{class:!0});var Nm=i(aa);bn=r(Nm,"A",{id:!0,class:!0,href:!0});var ak=i(bn);Oc=r(ak,"SPAN",{});var nk=i(Oc);T(bi.$$.fragment,nk),nk.forEach(t),ak.forEach(t),OT=m(Nm),Kc=r(Nm,"SPAN",{});var sk=i(Kc);KT=n(sk,"TFData2VecVisionForSemanticSegmentation"),sk.forEach(t),Nm.forEach(t),Ch=m(o),Fe=r(o,"DIV",{class:!0});var Lt=i(Fe);T(yi.$$.fragment,Lt),ew=m(Lt),ep=r(Lt,"P",{});var rk=i(ep);tw=n(rk,"Data2VecVision Model transformer with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),rk.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 ik=i(Zl);nw=n(ik,"TFPreTrainedModel"),ik.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 lk=i(Mi);lw=n(lk,"tf.keras.Model"),lk.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(yn.$$.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 dk=i(Al);uw=n(dk,"TFData2VecVisionForSemanticSegmentation"),dk.forEach(t),fw=n(pd," forward method, overrides the "),tp=r(pd,"CODE",{});var ck=i(tp);gw=n(ck,"__call__"),ck.forEach(t),_w=n(pd," special method."),pd.forEach(t),vw=m(Xn),T(Tn.$$.fragment,Xn),bw=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(iV)),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/v4.32.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Model"),p(fe,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaModel"),p(z,"href","/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecTextModel"),p(Oi,"href","/docs/transformers/v4.32.0/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/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),p(el,"href","/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioModel"),p(ts,"href","https://huggingface.co/facebook/data2vec-audio-base-960h"),p(ts,"rel","nofollow"),p(ol,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),p(al,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),p(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(fa,"id","transformers.Data2VecVisionConfig"),p(fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(fa,"href","#transformers.Data2VecVisionConfig"),p(_o,"class","relative group"),p(nl,"href","/docs/transformers/v4.32.0/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(bo,"class","relative group"),p(ls,"href","https://arxiv.org/pdf/2202.03555"),p(ls,"rel","nofollow"),p(sl,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),p(ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(ps,"rel","nofollow"),p(rl,"href","/docs/transformers/v4.32.0/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(ya,"id","transformers.Data2VecAudioForAudioFrameClassification"),p(ya,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ya,"href","#transformers.Data2VecAudioForAudioFrameClassification"),p(To,"class","relative group"),p(gs,"href","https://arxiv.org/pdf/2202.03555"),p(gs,"rel","nofollow"),p(il,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),p(bs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(bs,"rel","nofollow"),p(ll,"href","/docs/transformers/v4.32.0/en/model_doc/data2vec#transformers.Data2VecAudioForAudioFrameClassification"),p(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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(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(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/v4.32.0/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/v4.32.0/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(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(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/v4.32.0/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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),p(sr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(sr,"rel","nofollow"),p(vl,"href","/docs/transformers/v4.32.0/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(bl,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),p(hr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(hr,"rel","nofollow"),p(yl,"href","/docs/transformers/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),p(yr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(yr,"rel","nofollow"),p(wl,"href","/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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(bn,"id","transformers.TFData2VecVisionForSemanticSegmentation"),p(bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(bn,"href","#transformers.TFData2VecVisionForSemanticSegmentation"),p(aa,"class","relative group"),p(Zl,"href","/docs/transformers/v4.32.0/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/v4.32.0/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,b,g),_(o,f,g),e(f,u),e(u,v),w(l,v,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,vt),e(x,bt),e(x,I),e(I,se),e(x,yt),_(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,vd),e(vd,Ni),e(Ni,mu),e(Ze,uu),e(Ze,bd),e(bd,Ri),e(Ri,fu),e(Ze,gu),e(Ze,yd),e(yd,Bi),e(Bi,_u),_(o,zp,g),_(o,Xi,g),e(Xi,Td),e(Td,vu),_(o,Ip,g),_(o,da,g),e(da,wd),e(wd,Si),e(Si,bu),e(da,yu),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,vo),e(vo,df),e(vo,nl),e(nl,cf),e(vo,pf),e(vo,ns),e(ns,hf),e(vo,mf),e(Ot,uf),w(ga,Ot,null),_(o,Qp,g),_(o,bo,g),e(bo,_a),e(_a,Dd),w(ss,Dd,null),e(bo,ff),e(bo,Ud),e(Ud,gf),_(o,Lp,g),_(o,et,g),w(rs,et,null),e(et,_f),e(et,is),e(is,vf),e(is,ls),e(ls,bf),e(is,yf),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,yo),e(yo,Jf),e(yo,rl),e(rl,Ef),e(yo,Df),e(yo,Wd),e(Wd,Uf),e(yo,Wf),e(kt,Zf),w(va,kt,null),e(kt,Af),w(ba,kt,null),_(o,Hp,g),_(o,To,g),e(To,ya),e(ya,Zd),w(ms,Zd,null),e(To,zf),e(To,Ad),e(Ad,If),_(o,Op,g),_(o,ve,g),w(us,ve,null),e(ve,Gf),e(ve,zd),e(zd,Nf),e(ve,Rf),e(ve,fs),e(fs,Bf),e(fs,gs),e(gs,Xf),e(fs,Sf),e(ve,qf),e(ve,_s),e(_s,Yf),e(_s,il),e(il,Pf),e(_s,Qf),e(ve,Lf),e(ve,vs),e(vs,Hf),e(vs,bs),e(bs,Of),e(vs,Kf),e(ve,eg),e(ve,Vt),w(ys,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,vg),e(ks,dl),e(dl,bg),e(ks,yg),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,be,g),w(xs,be,null),e(be,Zg),e(be,qd),e(qd,Ag),e(be,zg),e(be,Cs),e(Cs,Ig),e(Cs,Js),e(Js,Gg),e(Cs,Ng),e(be,Rg),e(be,Es),e(Es,Bg),e(Es,pl),e(pl,Xg),e(Es,Sg),e(be,qg),e(be,Ds),e(Ds,Yg),e(Ds,Us),e(Us,Pg),e(Ds,Qg),e(be,Lg),e(be,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,ye,g),w(As,ye,null),e(ye,i_),e(ye,Ld),e(Ld,l_),e(ye,d_),e(ye,zs),e(zs,c_),e(zs,Is),e(Is,p_),e(zs,h_),e(ye,m_),e(ye,Gs),e(Gs,u_),e(Gs,ml),e(ml,f_),e(Gs,g_),e(ye,__),e(ye,Ns),e(Ns,v_),e(Ns,Rs),e(Rs,b_),e(Ns,y_),e(ye,T_),e(ye,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,v2),e(Jo,b2),e(xt,y2),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,vl),e(vl,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,ev),e(at,tv),e(at,cr),e(cr,ov),e(cr,bl),e(bl,av),e(cr,nv),e(at,sv),e(at,pr),e(pr,rv),e(pr,hr),e(hr,iv),e(pr,lv),e(at,dv),e(at,Jt),w(mr,Jt,null),e(Jt,cv),e(Jt,Ao),e(Ao,pv),e(Ao,yl),e(yl,hv),e(Ao,mv),e(Ao,gc),e(gc,uv),e(Ao,fv),e(Jt,gv),w(Ga,Jt,null),e(Jt,_v),w(Na,Jt,null),_(o,ph,g),_(o,zo,g),e(zo,Ra),e(Ra,_c),w(ur,_c,null),e(zo,vv),e(zo,vc),e(vc,bv),_(o,hh,g),_(o,we,g),w(fr,we,null),e(we,yv),e(we,bc),e(bc,Tv),e(we,wv),e(we,gr),e(gr,Mv),e(gr,_r),e(_r,kv),e(gr,Vv),e(we,$v),e(we,vr),e(vr,Fv),e(vr,Tl),e(Tl,jv),e(vr,xv),e(we,Cv),e(we,br),e(br,Jv),e(br,yr),e(yr,Ev),e(br,Dv),e(we,Uv),e(we,st),w(Tr,st,null),e(st,Wv),e(st,Io),e(Io,Zv),e(Io,wl),e(wl,Av),e(Io,zv),e(Io,yc),e(yc,Iv),e(Io,Gv),e(st,Nv),w(Ba,st,null),e(st,Rv),w(Xa,st,null),e(st,Bv),w(Sa,st,null),_(o,mh,g),_(o,Go,g),e(Go,qa),e(qa,Tc),w(wr,Tc,null),e(Go,Xv),e(Go,wc),e(wc,Sv),_(o,uh,g),_(o,Me,g),w(Mr,Me,null),e(Me,qv),e(Me,Mc),e(Mc,Yv),e(Me,Pv),e(Me,kr),e(kr,Qv),e(kr,Vr),e(Vr,Lv),e(kr,Hv),e(Me,Ov),e(Me,$r),e($r,Kv),e($r,Ml),e(Ml,eb),e($r,tb),e(Me,ob),e(Me,Fr),e(Fr,ab),e(Fr,jr),e(jr,nb),e(Fr,sb),e(Me,rb),e(Me,Et),w(xr,Et,null),e(Et,ib),e(Et,No),e(No,lb),e(No,kl),e(kl,db),e(No,cb),e(No,kc),e(kc,pb),e(No,hb),e(Et,mb),w(Ya,Et,null),e(Et,ub),w(Pa,Et,null),_(o,fh,g),_(o,Ro,g),e(Ro,Qa),e(Qa,Vc),w(Cr,Vc,null),e(Ro,fb),e(Ro,$c),e($c,gb),_(o,gh,g),_(o,ke,g),w(Jr,ke,null),e(ke,_b),e(ke,Fc),e(Fc,vb),e(ke,bb),e(ke,Er),e(Er,yb),e(Er,Dr),e(Dr,Tb),e(Er,wb),e(ke,Mb),e(ke,Ur),e(Ur,kb),e(Ur,Vl),e(Vl,Vb),e(Ur,$b),e(ke,Fb),e(ke,Wr),e(Wr,jb),e(Wr,Zr),e(Zr,xb),e(Wr,Cb),e(ke,Jb),e(ke,Dt),w(Ar,Dt,null),e(Dt,Eb),e(Dt,Bo),e(Bo,Db),e(Bo,$l),e($l,Ub),e(Bo,Wb),e(Bo,jc),e(jc,Zb),e(Bo,Ab),e(Dt,zb),w(La,Dt,null),e(Dt,Ib),w(Ha,Dt,null),_(o,_h,g),_(o,Xo,g),e(Xo,Oa),e(Oa,xc),w(zr,xc,null),e(Xo,Gb),e(Xo,Cc),e(Cc,Nb),_(o,vh,g),_(o,Ve,g),w(Ir,Ve,null),e(Ve,Rb),e(Ve,So),e(So,Bb),e(So,Jc),e(Jc,Xb),e(So,Sb),e(So,Ec),e(Ec,qb),e(So,Yb),e(Ve,Pb),e(Ve,Gr),e(Gr,Qb),e(Gr,Nr),e(Nr,Lb),e(Gr,Hb),e(Ve,Ob),e(Ve,Rr),e(Rr,Kb),e(Rr,Fl),e(Fl,ey),e(Rr,ty),e(Ve,oy),e(Ve,Br),e(Br,ay),e(Br,Xr),e(Xr,ny),e(Br,sy),e(Ve,ry),e(Ve,Ut),w(Sr,Ut,null),e(Ut,iy),e(Ut,qo),e(qo,ly),e(qo,jl),e(jl,dy),e(qo,cy),e(qo,Dc),e(Dc,py),e(qo,hy),e(Ut,my),w(Ka,Ut,null),e(Ut,uy),w(en,Ut,null),_(o,bh,g),_(o,Yo,g),e(Yo,tn),e(tn,Uc),w(qr,Uc,null),e(Yo,fy),e(Yo,Wc),e(Wc,gy),_(o,yh,g),_(o,Kt,g),w(Yr,Kt,null),e(Kt,_y),e(Kt,Pr),e(Pr,vy),e(Pr,Qr),e(Qr,by),e(Pr,yy),e(Kt,Ty),e(Kt,Wt),w(Lr,Wt,null),e(Wt,wy),e(Wt,Po),e(Po,My),e(Po,xl),e(xl,ky),e(Po,Vy),e(Po,Zc),e(Zc,$y),e(Po,Fy),e(Wt,jy),w(on,Wt,null),e(Wt,xy),w(an,Wt,null),_(o,Th,g),_(o,Qo,g),e(Qo,nn),e(nn,Ac),w(Hr,Ac,null),e(Qo,Cy),e(Qo,zc),e(zc,Jy),_(o,wh,g),_(o,ct,g),w(Or,ct,null),e(ct,Ey),e(ct,Ic),e(Ic,Dy),e(ct,Uy),e(ct,Kr),e(Kr,Wy),e(Kr,ei),e(ei,Zy),e(Kr,Ay),e(ct,zy),e(ct,Zt),w(ti,Zt,null),e(Zt,Iy),e(Zt,Lo),e(Lo,Gy),e(Lo,Cl),e(Cl,Ny),e(Lo,Ry),e(Lo,Gc),e(Gc,By),e(Lo,Xy),e(Zt,Sy),w(sn,Zt,null),e(Zt,qy),w(rn,Zt,null),_(o,Mh,g),_(o,Ho,g),e(Ho,ln),e(ln,Nc),w(oi,Nc,null),e(Ho,Yy),e(Ho,Rc),e(Rc,Py),_(o,kh,g),_(o,pt,g),w(ai,pt,null),e(pt,Qy),e(pt,Bc),e(Bc,Ly),e(pt,Hy),e(pt,ni),e(ni,Oy),e(ni,si),e(si,Ky),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,vT),e(ci,bT),e(nt,yT),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(vi,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(vn,It,null),_(o,xh,g),_(o,aa,g),e(aa,bn),e(bn,Oc),w(bi,Oc,null),e(aa,OT),e(aa,Kc),e(Kc,KT),_(o,Ch,g),_(o,Fe,g),w(yi,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(yn,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,vw),w(Tn,Gt,null),e(Gt,bw),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}),va.$set(np);const $i={};g&2&&($i.$$scope={dirty:g,ctx:o}),ba.$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 vp={};g&2&&(vp.$$scope={dirty:g,ctx:o}),Ha.$set(vp);const bp={};g&2&&(bp.$$scope={dirty:g,ctx:o}),Ka.$set(bp);const yp={};g&2&&(yp.$$scope={dirty:g,ctx:o}),en.$set(yp);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}),vn.$set(jp);const xp={};g&2&&(xp.$$scope={dirty:g,ctx:o}),yn.$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(va.$$.fragment,o),M(ba.$$.fragment,o),M(ms.$$.fragment,o),M(us.$$.fragment,o),M(ys.$$.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(vi.$$.fragment,o),M(_n.$$.fragment,o),M(vn.$$.fragment,o),M(bi.$$.fragment,o),M(yi.$$.fragment,o),M(yn.$$.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(va.$$.fragment,o),k(ba.$$.fragment,o),k(ms.$$.fragment,o),k(us.$$.fragment,o),k(ys.$$.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(vi.$$.fragment,o),k(_n.$$.fragment,o),k(vn.$$.fragment,o),k(bi.$$.fragment,o),k(yi.$$.fragment,o),k(yn.$$.fragment,o),k(ki.$$.fragment,o),k(Tn.$$.fragment,o),k(wn.$$.fragment,o),Jh=!1},d(o){t(d),o&&t(b),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(bo),V(ss),o&&t(Lp),o&&t(et),V(rs),V(hs),V(va),V(ba),o&&t(Hp),o&&t(To),V(ms),o&&t(Op),o&&t(ve),V(us),V(ys),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(be),V(xs),V(Ws),V(Fa),V(ja),o&&t(ah),o&&t(jo),V(Zs),o&&t(nh),o&&t(ye),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(vh),o&&t(Ve),V(Ir),V(Sr),V(Ka),V(en),o&&t(bh),o&&t(Yo),V(qr),o&&t(yh),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(vi),V(_n),V(vn),o&&t(xh),o&&t(aa),V(bi),o&&t(Ch),o&&t(Fe),V(yi),V(yn),V(ki),V(Tn),V(wn)}}}const iV={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 lV(F){return fk(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gV extends pk{constructor(d){super();hk(this,d,lV,rV,mk,{})}}export{gV as default,iV as metadata};
