import{S as ru,i as su,s as lu,e as r,k as p,w as y,t as a,M as iu,c as s,d as t,m as h,a as l,x as C,h as n,b as c,G as e,g as _,y as w,q as T,o as M,B as $,v as du,L as Ze}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ca}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as te}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ie}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function cu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBDb25maWclMkMlMjBDbGFwTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ2xhcENvbmZpZyUyMHdpdGglMjBsYWlvbi1haSUyRmJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2xhcENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENsYXBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwbGFpb24tYWklMkZiYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDbGFwTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBDbGFwQ29uZmlnJTIwZnJvbSUyMGElMjBDbGFwVGV4dENvbmZpZyUyMGFuZCUyMGElMjBDbGFwQXVkaW9Db25maWclMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ2xhcFRleHRDb25maWclMkMlMjBDbGFwQXVkaW9Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ2xhcFRleHQlMjBhbmQlMjBDbGFwQXVkaW9Db25maWclMjBjb25maWd1cmF0aW9uJTBBY29uZmlnX3RleHQlMjAlM0QlMjBDbGFwVGV4dENvbmZpZygpJTBBY29uZmlnX2F1ZGlvJTIwJTNEJTIwQ2xhcEF1ZGlvQ29uZmlnKCklMEElMEFjb25maWclMjAlM0QlMjBDbGFwQ29uZmlnLmZyb21fdGV4dF9hdWRpb19jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX2F1ZGlvKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapConfig, ClapModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapConfig with laion-ai/base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapModel (with random weights) from the laion-ai/base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel(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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a ClapConfig from a ClapTextConfig and a ClapAudioConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapTextConfig, ClapAudioConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapText and ClapAudioConfig configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = ClapTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_audio = ClapAudioConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = ClapConfig.from_text_audio_configs(config_text, config_audio)`}}),{c(){d=r("p"),v=a("Example:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Example:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function pu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBUZXh0Q29uZmlnJTJDJTIwQ2xhcFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTEFQJTIwdGV4dCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2xhcFRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQ2xhcFRleHRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapTextConfig, ClapTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLAP text configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapTextModel(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapAudioConfig with laion/clap-htsat-fused style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapAudioConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapAudioModel (with random weights) from the laion/clap-htsat-fused style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModel(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_text = [<span class="hljs-string">&quot;Sound of a dog&quot;</span>, <span class="hljs-string">&quot;Sound of vaccum cleaner&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=input_text, audios=audio_sample, 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(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_audio = outputs.logits_per_audio  <span class="hljs-comment"># this is the audio-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_audio.softmax(dim=-<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function mu(x){let d,v,m,f,b;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(u,"CODE",{});var k=l(m);f=n(k,"Module"),k.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){_(i,d,u),e(d,v),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function gu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDbGFwTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENsYXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMnRoZSUyMHNvdW5kJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIydGhlJTIwc291bmQlMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;the sound of a cat&quot;</span>, <span class="hljs-string">&quot;the sound of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function _u(x){let d,v,m,f,b;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(u,"CODE",{});var k=l(m);f=n(k,"Module"),k.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){_(i,d,u),e(d,v),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function bu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwQ2xhcE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbCUyMCUzRCUyMENsYXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBcmFuZG9tX2F1ZGlvJTIwJTNEJTIwdG9yY2gucmFuZCgoMTZfMDAwKSklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvcihyYW5kb21fYXVkaW8lMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWF1ZGlvX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2F1ZGlvX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, ClapModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>random_audio = torch.rand((<span class="hljs-number">16_000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(random_audio, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_features = model.get_audio_features(**inputs)`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function vu(x){let d,v,m,f,b;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(u,"CODE",{});var k=l(m);f=n(k,"Module"),k.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){_(i,d,u),e(d,v),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function yu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDbGFwVGV4dE1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFtb2RlbCUyMCUzRCUyMENsYXBUZXh0TW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBzb3VuZCUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBzb3VuZCUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBdGV4dF9lbWJlZHMlMjAlM0QlMjBvdXRwdXRzLnRleHRfZW1iZWRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapTextModelWithProjection

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapTextModelWithProjection.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a sound of a cat&quot;</span>, <span class="hljs-string">&quot;a sound of a dog&quot;</span>], padding=<span class="hljs-literal">True</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>text_embeds = outputs.text_embeds`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function Cu(x){let d,v,m,f,b;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(u,"CODE",{});var k=l(m);f=n(k,"Module"),k.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){_(i,d,u),e(d,v),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function wu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBDbGFwQXVkaW9Nb2RlbCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXNocmFxJTJGZXNjNTAlMjIpJTBBYXVkaW9fc2FtcGxlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIwJTVEJTVCJTIyYXJyYXklMjIlNUQlMEElMEFtb2RlbCUyMCUzRCUyMENsYXBBdWRpb01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpb3MlM0RhdWRpb19zYW1wbGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<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">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, ClapAudioModel

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audios=audio_sample, 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_state = outputs.last_hidden_state`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function Tu(x){let d,v,m,f,b;return{c(){d=r("p"),v=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(u,"CODE",{});var k=l(m);f=n(k,"Module"),k.forEach(t),b=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(i,u){_(i,d,u),e(d,v),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function Mu(x){let d,v,m,f,b;return f=new Ne({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBBdWRpb01vZGVsV2l0aFByb2plY3Rpb24lMkMlMjBDbGFwUHJvY2Vzc29yJTBBJTBBbW9kZWwlMjAlM0QlMjBDbGFwQXVkaW9Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ2xhcFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXNocmFxJTJGZXNjNTAlMjIpJTBBYXVkaW9fc2FtcGxlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIwJTVEJTVCJTIyYXJyYXklMjIlNUQlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXVkaW9zJTNEYXVkaW9fc2FtcGxlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBYXVkaW9fZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy5hdWRpb19lbWJlZHM=",highlighted:`<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">from</span> transformers <span class="hljs-keyword">import</span> ClapAudioModelWithProjection, ClapProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModelWithProjection.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = ClapProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audios=audio_sample, 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>audio_embeds = outputs.audio_embeds`}}),{c(){d=r("p"),v=a("Examples:"),m=p(),y(f.$$.fragment)},l(i){d=s(i,"P",{});var u=l(d);v=n(u,"Examples:"),u.forEach(t),m=h(i),C(f.$$.fragment,i)},m(i,u){_(i,d,u),e(d,v),_(i,m,u),w(f,i,u),b=!0},p:Ze,i(i){b||(T(f.$$.fragment,i),b=!0)},o(i){M(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),$(f,i)}}}function $u(x){let d,v,m,f,b,i,u,k,Qr,Yn,he,Ue,wa,xt,Or,Ta,Lr,Qn,qe,Hr,Et,Kr,es,On,Wo,ts,Ln,Fo,os,Hn,Po,Ma,as,Kn,S,ns,kt,rs,ss,jt,ls,is,zt,ds,cs,er,ue,Be,$a,At,ps,xa,hs,tr,P,Jt,us,ne,Io,fs,ms,Zo,gs,_s,Wt,bs,vs,ys,fe,Cs,No,ws,Ts,Uo,Ms,$s,xs,Ge,Es,Re,Ft,ks,Pt,js,qo,zs,As,or,me,Ve,Ea,It,Js,ka,Ws,ar,R,Zt,Fs,ge,Ps,Bo,Is,Zs,Nt,Ns,Us,qs,_e,Bs,Go,Gs,Rs,Ro,Vs,Xs,Ss,Xe,nr,be,Se,ja,Ut,Ds,za,Ys,rr,V,qt,Qs,ve,Os,Vo,Ls,Hs,Bt,Ks,el,tl,ye,ol,Xo,al,nl,So,rl,sl,ll,De,sr,Ce,Ye,Aa,Gt,il,Ja,dl,lr,I,Rt,cl,Wa,pl,hl,Vt,ul,Do,fl,ml,gl,we,_l,Fa,bl,vl,Pa,yl,Cl,wl,Qe,Xt,Tl,Ia,Ml,ir,Te,Oe,Za,St,$l,Na,xl,dr,Z,Dt,El,Ua,kl,jl,B,Yo,zl,Al,Qo,Jl,Wl,Oo,Fl,Pl,qa,Il,Zl,Lo,Nl,Ul,ql,Le,Yt,Bl,Qt,Gl,Ho,Rl,Vl,Xl,He,Ot,Sl,Lt,Dl,Ko,Yl,Ql,cr,Me,Ke,Ba,Ht,Ol,Ga,Ll,pr,J,Kt,Hl,eo,Kl,ea,ei,ti,oi,to,ai,oo,ni,ri,si,D,ao,li,$e,ii,ta,di,ci,Ra,pi,hi,ui,et,fi,tt,mi,Y,no,gi,xe,_i,oa,bi,vi,Va,yi,Ci,wi,ot,Ti,at,Mi,Q,ro,$i,Ee,xi,aa,Ei,ki,Xa,ji,zi,Ai,nt,Ji,rt,hr,ke,st,Sa,so,Wi,Da,Fi,ur,N,lo,Pi,io,Ii,Ya,Zi,Ni,Ui,W,qi,Qa,Bi,Gi,Oa,Ri,Vi,La,Xi,Si,Ha,Di,Yi,Ka,Qi,Oi,en,Li,Hi,Ki,lt,ed,tn,td,od,co,ad,nd,O,po,rd,A,sd,on,ld,id,an,dd,cd,nn,pd,hd,rn,ud,fd,sn,md,gd,ln,_d,bd,dn,vd,yd,Cd,ho,uo,wd,cn,Td,Md,$d,X,xd,pn,Ed,kd,hn,jd,zd,un,Ad,Jd,fn,Wd,Fd,Pd,E,Id,mn,Zd,Nd,gn,Ud,qd,_n,Bd,Gd,bn,Rd,Vd,vn,Xd,Sd,yn,Dd,Yd,Cn,Qd,Od,wn,Ld,Hd,Tn,Kd,ec,Mn,tc,oc,fr,je,it,$n,fo,ac,xn,nc,mr,U,mo,rc,En,sc,lc,go,ic,na,dc,cc,pc,_o,hc,bo,uc,fc,mc,L,vo,gc,ze,_c,ra,bc,vc,kn,yc,Cc,wc,dt,Tc,ct,gr,Ae,pt,jn,yo,Mc,zn,$c,_r,Je,Co,xc,H,wo,Ec,We,kc,sa,jc,zc,An,Ac,Jc,Wc,ht,Fc,ut,br,Fe,ft,Jn,To,Pc,Wn,Ic,vr,q,Mo,Zc,Fn,Nc,Uc,$o,qc,la,Bc,Gc,Rc,xo,Vc,Eo,Xc,Sc,Dc,K,ko,Yc,Pe,Qc,ia,Oc,Lc,Pn,Hc,Kc,ep,mt,tp,gt,yr;return i=new te({}),xt=new te({}),At=new te({}),Jt=new z({props:{name:"class transformers.ClapConfig",anchor:"transformers.ClapConfig",parameters:[{name:"text_config",val:" = None"},{name:"audio_config",val:" = None"},{name:"logit_scale_init_value",val:" = 14.285714285714285"},{name:"projection_dim",val:" = 512"},{name:"projection_hidden_act",val:" = 'relu'"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextConfig">ClapTextConfig</a>.`,name:"text_config"},{anchor:"transformers.ClapConfig.audio_config",description:`<strong>audio_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioConfig">ClapAudioConfig</a>.`,name:"audio_config"},{anchor:"transformers.ClapConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and audio projection layers.`,name:"projection_dim"},{anchor:"transformers.ClapConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original CLAP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.ClapConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
Activation function for the projection layers.`,name:"projection_hidden_act"},{anchor:"transformers.ClapConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Factor to scale the initialization of the model weights.`,name:"initializer_factor"},{anchor:"transformers.ClapConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/configuration_clap.py#L333"}}),Ge=new Ie({props:{anchor:"transformers.ClapConfig.example",$$slots:{default:[cu]},$$scope:{ctx:x}}}),Ft=new z({props:{name:"from_text_audio_configs",anchor:"transformers.ClapConfig.from_text_audio_configs",parameters:[{name:"text_config",val:": ClapTextConfig"},{name:"audio_config",val:": ClapAudioConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/configuration_clap.py#L421",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig"
>ClapConfig</a></p>
`}}),It=new te({}),Zt=new z({props:{name:"class transformers.ClapTextConfig",anchor:"transformers.ClapTextConfig",parameters:[{name:"vocab_size",val:" = 50265"},{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:" = 514"},{name:"type_vocab_size",val:" = 1"},{name:"initializer_factor",val:" = 1.0"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"projection_dim",val:" = 512"},{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:"projection_hidden_act",val:" = 'relu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the CLAP 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/clap#transformers.ClapTextModel">ClapTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;relu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;relu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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 <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModel">ClapTextModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.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.ClapTextConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the projection layer. 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:"projection_hidden_act"},{anchor:"transformers.ClapTextConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the projection head of the <code>ClapTextModelWithProjection</code>.`,name:"projection_dim"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/configuration_clap.py#L32"}}),Xe=new Ie({props:{anchor:"transformers.ClapTextConfig.example",$$slots:{default:[pu]},$$scope:{ctx:x}}}),Ut=new te({}),qt=new z({props:{name:"class transformers.ClapAudioConfig",anchor:"transformers.ClapAudioConfig",parameters:[{name:"window_size",val:" = 8"},{name:"num_mel_bins",val:" = 64"},{name:"spec_size",val:" = 256"},{name:"hidden_act",val:" = 'gelu'"},{name:"patch_size",val:" = 4"},{name:"patch_stride",val:" = [4, 4]"},{name:"num_classes",val:" = 527"},{name:"hidden_size",val:" = 768"},{name:"projection_dim",val:" = 512"},{name:"depths",val:" = [2, 2, 6, 2]"},{name:"num_attention_heads",val:" = [4, 8, 16, 32]"},{name:"enable_fusion",val:" = False"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"fusion_type",val:" = None"},{name:"patch_embed_input_channels",val:" = 1"},{name:"flatten_patch_embeds",val:" = True"},{name:"patch_embeds_hidden_size",val:" = 96"},{name:"enable_patch_layer_norm",val:" = True"},{name:"drop_path_rate",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"qkv_bias",val:" = True"},{name:"mlp_ratio",val:" = 4.0"},{name:"aff_block_r",val:" = 4"},{name:"num_hidden_layers",val:" = 4"},{name:"projection_hidden_act",val:" = 'relu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapAudioConfig.window_size",description:`<strong>window_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Image size of the spectrogram`,name:"window_size"},{anchor:"transformers.ClapAudioConfig.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of mel features used per frames. Should correspond to the value used in the <code>ClapProcessor</code> class.`,name:"num_mel_bins"},{anchor:"transformers.ClapAudioConfig.spec_size",description:`<strong>spec_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Desired input size of the spectrogram that the model supports. It can be different from the output of the
<code>ClapFeatureExtractor</code>, in which case the input features will be resized. Corresponds to the <code>image_size</code>
of the audio models.`,name:"spec_size"},{anchor:"transformers.ClapAudioConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</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.ClapAudioConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Patch size for the audio spectrogram`,name:"patch_size"},{anchor:"transformers.ClapAudioConfig.patch_stride",description:`<strong>patch_stride</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[4, 4]</code>) &#x2014;
Patch stride for the audio spectrogram`,name:"patch_stride"},{anchor:"transformers.ClapAudioConfig.num_classes",description:`<strong>num_classes</strong> (<code>int</code>, <em>optional</em>, defaults to 527) &#x2014;
Number of classes used for the head training`,name:"num_classes"},{anchor:"transformers.ClapAudioConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Hidden size of the output of the audio encoder. Correspond to the dimension of the penultimate layer&#x2019;s
output,which is sent to the projection MLP layer.`,name:"hidden_size"},{anchor:"transformers.ClapAudioConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Hidden size of the projection layer.`,name:"projection_dim"},{anchor:"transformers.ClapAudioConfig.depths",description:`<strong>depths</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[2, 2, 6, 2]</code>) &#x2014;
Depths used for the Swin Layers of the audio model`,name:"depths"},{anchor:"transformers.ClapAudioConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[4, 8, 16, 32]</code>) &#x2014;
Number of attention heads used for the Swin Layers of the audio model`,name:"num_attention_heads"},{anchor:"transformers.ClapAudioConfig.enable_fusion",description:`<strong>enable_fusion</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to enable patch fusion. This is the main contribution of the authors, and should give the
best results.`,name:"enable_fusion"},{anchor:"transformers.ClapAudioConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the encoder.`,name:"hidden_dropout_prob"},{anchor:"transformers.ClapAudioConfig.fusion_type",description:`<strong>fusion_type</strong> (<code>[type]</code>, <em>optional</em>) &#x2014;
Fusion type used for the patch fusion.`,name:"fusion_type"},{anchor:"transformers.ClapAudioConfig.patch_embed_input_channels",description:`<strong>patch_embed_input_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of channels used for the input spectrogram`,name:"patch_embed_input_channels"},{anchor:"transformers.ClapAudioConfig.flatten_patch_embeds",description:`<strong>flatten_patch_embeds</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to flatten the patch embeddings`,name:"flatten_patch_embeds"},{anchor:"transformers.ClapAudioConfig.patch_embeds_hidden_size",description:`<strong>patch_embeds_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 96) &#x2014;
Hidden size of the patch embeddings. It is used as the number of output channels.`,name:"patch_embeds_hidden_size"},{anchor:"transformers.ClapAudioConfig.enable_patch_layer_norm",description:`<strong>enable_patch_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to enable layer normalization for the patch embeddings`,name:"enable_patch_layer_norm"},{anchor:"transformers.ClapAudioConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Drop path rate for the patch fusion`,name:"drop_path_rate"},{anchor:"transformers.ClapAudioConfig.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.ClapAudioConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add a bias to the query, key, value projections.`,name:"qkv_bias"},{anchor:"transformers.ClapAudioConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Ratio of the mlp hidden dim to embedding dim.`,name:"mlp_ratio"},{anchor:"transformers.ClapAudioConfig.aff_block_r",description:`<strong>aff_block_r</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
downsize_ratio used in the AudioFF block`,name:"aff_block_r"},{anchor:"transformers.ClapAudioConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ClapAudioConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the projection layer. 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:"projection_hidden_act"},{anchor:"transformers.ClapAudioConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>[type]</code>, <em>optional</em>, defaults to <code>1e-5</code>) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ClapAudioConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/configuration_clap.py#L163"}}),De=new Ie({props:{anchor:"transformers.ClapAudioConfig.example",$$slots:{default:[hu]},$$scope:{ctx:x}}}),Gt=new te({}),Rt=new z({props:{name:"class transformers.ClapFeatureExtractor",anchor:"transformers.ClapFeatureExtractor",parameters:[{name:"feature_size",val:" = 64"},{name:"sampling_rate",val:" = 48000"},{name:"hop_length",val:" = 480"},{name:"max_length_s",val:" = 10"},{name:"fft_window_size",val:" = 1024"},{name:"padding_value",val:" = 0.0"},{name:"return_attention_mask",val:" = False"},{name:"frequency_min",val:": float = 0"},{name:"frequency_max",val:": float = 14000"},{name:"top_db",val:": int = None"},{name:"truncation",val:": str = 'fusion'"},{name:"padding",val:": str = 'repeatpad'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, defaults to 64) &#x2014;
The feature dimension of the extracted Mel spectrograms. This corresponds to the number of mel filters
(<code>n_mels</code>).`,name:"feature_size"},{anchor:"transformers.ClapFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, defaults to 48_000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz). This only serves
to warn users if the audio fed to the feature extractor does not have the same sampling rate.`,name:"sampling_rate"},{anchor:"transformers.ClapFeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>, defaults to 480) &#x2014;
Length of the overlaping windows for the STFT used to obtain the Mel Spectrogram. The audio will be split
in smaller <code>frames</code> with a step of <code>hop_length</code> between each frame.`,name:"hop_length"},{anchor:"transformers.ClapFeatureExtractor.max_length_s",description:`<strong>max_length_s</strong> (<code>int</code>, defaults to 10) &#x2014;
The maximum input lenght of the model in seconds. This is used to pad the audio.`,name:"max_length_s"},{anchor:"transformers.ClapFeatureExtractor.fft_window_size",description:`<strong>fft_window_size</strong> (<code>int</code>, defaults to 1024) &#x2014;
Size of the window (in samples) on which the Fourier transform is applied. This controls the frequency
resolution of the spectrogram. 400 means that the fourrier transform is computed on windows of 400 samples.`,name:"fft_window_size"},{anchor:"transformers.ClapFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Padding value used to pad the audio. Should correspond to silences.`,name:"padding_value"},{anchor:"transformers.ClapFeatureExtractor.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should return the attention masks coresponding to the input.`,name:"return_attention_mask"},{anchor:"transformers.ClapFeatureExtractor.frequency_min",description:`<strong>frequency_min</strong> (<code>float</code>, <em>optional</em>, default to 0) &#x2014;
The lowest frequency of interest. The STFT will not be computed for values below this.`,name:"frequency_min"},{anchor:"transformers.ClapFeatureExtractor.frequency_max",description:`<strong>frequency_max</strong> (<code>float</code>, <em>optional</em>, default to 14_000) &#x2014;
The highest frequency of interest. The STFT will not be computed for values above this.`,name:"frequency_max"},{anchor:"transformers.ClapFeatureExtractor.top_db",description:`<strong>top_db</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The highest decibel value used to convert the mel spectrogram to the log scale. For more details see the
<code>audio_utils.power_to_db</code> function`,name:"top_db"},{anchor:"transformers.ClapFeatureExtractor.truncation",description:`<strong>truncation</strong> (<code>str</code>, <em>optional</em>, default to <code>&quot;fusions&quot;</code>) &#x2014;
Truncation pattern for long audio inputs. Two patterns are available:<ul>
<li><code>fusion</code> will use <code>_random_mel_fusion</code>, which stacks 3 random crops from the mel spectrogram and a
downsampled version of the entire mel spectrogram.
If <code>config.fusion</code> is set to True, shorter audios also need to to return 4 mels, which will just be a copy
of the original mel obtained from the padded audio.</li>
<li><code>rand_trunc</code> will select a random crop of the mel spectrogram.</li>
</ul>`,name:"truncation"},{anchor:"transformers.ClapFeatureExtractor.padding",description:`<strong>padding</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;repeatpad&quot;</code>) &#x2014;
Padding pattern for shorter audio inputs. Three patterns were originally implemented:<ul>
<li><code>repeatpad</code>: the audio is repeated, and then padded to fit the <code>max_length</code>.</li>
<li><code>repeat</code>: the audio is repeated and then cut to fit the <code>max_length</code></li>
<li><code>pad</code>: the audio is padded.</li>
</ul>`,name:"padding"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/feature_extraction_clap.py#L33"}}),Xt=new z({props:{name:"to_dict",anchor:"transformers.ClapFeatureExtractor.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/feature_extraction_clap.py#L138",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance, excpet for the
mel filter banks, which do not need to be saved or printed as they are too long.</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),St=new te({}),Dt=new z({props:{name:"class transformers.ClapProcessor",anchor:"transformers.ClapProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.ClapProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a>) &#x2014;
The audio processor is a required input.`,name:"feature_extractor"},{anchor:"transformers.ClapProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaTokenizerFast">RobertaTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/processing_clap.py#L23"}}),Yt=new z({props:{name:"batch_decode",anchor:"transformers.ClapProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/processing_clap.py#L98"}}),Ot=new z({props:{name:"decode",anchor:"transformers.ClapProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/processing_clap.py#L105"}}),Ht=new te({}),Kt=new z({props:{name:"class transformers.ClapModel",anchor:"transformers.ClapModel",parameters:[{name:"config",val:": ClapConfig"}],parametersDescription:[{anchor:"transformers.ClapModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L1938"}}),ao=new z({props:{name:"forward",anchor:"transformers.ClapModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",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.ClapModel.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. Padding will be ignored by default should you provide
it.</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.ClapModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</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.ClapModel.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.ClapModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.ClapModel.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.ClapModel.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.ClapModel.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/clap/modeling_clap.py#L2067",returnDescription:`
<p>A <code>transformers.models.clap.modeling_clap.ClapOutput</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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) \u2014 Contrastive loss for audio-text similarity.</li>
<li><strong>logits_per_audio:(<code>torch.FloatTensor</code></strong> of shape <code>(audio_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>audio_embeds</code> and <code>text_embeds</code>. This represents the audio-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, audio_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeds</code> and <code>audio_embeds</code>. This represents the text-audio
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</li>
<li><strong>audio_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The audio embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</li>
<li><strong>audio_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.clap.modeling_clap.ClapOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),et=new Ca({props:{$$slots:{default:[uu]},$$scope:{ctx:x}}}),tt=new Ie({props:{anchor:"transformers.ClapModel.forward.example",$$slots:{default:[fu]},$$scope:{ctx:x}}}),no=new z({props:{name:"get_text_features",anchor:"transformers.ClapModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",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.ClapModel.get_text_features.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. Padding will be ignored by default should you provide
it.</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.ClapModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</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.ClapModel.get_text_features.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.ClapModel.get_text_features.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.ClapModel.get_text_features.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.ClapModel.get_text_features.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/clap/modeling_clap.py#L1973",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ot=new Ca({props:{$$slots:{default:[mu]},$$scope:{ctx:x}}}),at=new Ie({props:{anchor:"transformers.ClapModel.get_text_features.example",$$slots:{default:[gu]},$$scope:{ctx:x}}}),ro=new z({props:{name:"get_audio_features",anchor:"transformers.ClapModel.get_audio_features",parameters:[{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"is_longer",val:": typing.Optional[torch.Tensor] = None"},{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"}],parametersDescription:[{anchor:"transformers.ClapModel.get_audio_features.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapModel.get_audio_features.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapModel.get_audio_features.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.ClapModel.get_audio_features.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.ClapModel.get_audio_features.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/clap/modeling_clap.py#L2021",returnDescription:`
<p>The audio embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</p>
`,returnType:`
<p>audio_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),nt=new Ca({props:{$$slots:{default:[_u]},$$scope:{ctx:x}}}),rt=new Ie({props:{anchor:"transformers.ClapModel.get_audio_features.example",$$slots:{default:[bu]},$$scope:{ctx:x}}}),so=new te({}),lo=new z({props:{name:"class transformers.ClapTextModel",anchor:"transformers.ClapTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/modeling_clap.py#L1768"}}),po=new z({props:{name:"forward",anchor:"transformers.ClapTextModel.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"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/modeling_clap.py#L1806"}}),fo=new te({}),mo=new z({props:{name:"class transformers.ClapTextModelWithProjection",anchor:"transformers.ClapTextModelWithProjection",parameters:[{name:"config",val:": ClapTextConfig"}],parametersDescription:[{anchor:"transformers.ClapTextModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L2171"}}),vo=new z({props:{name:"forward",anchor:"transformers.ClapTextModelWithProjection.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",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.ClapTextModelWithProjection.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. Padding will be ignored by default should you provide
it.</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.ClapTextModelWithProjection.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</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.ClapTextModelWithProjection.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.ClapTextModelWithProjection.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.ClapTextModelWithProjection.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.ClapTextModelWithProjection.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/clap/modeling_clap.py#L2187",returnDescription:`
<p>A <code>transformers.models.clap.modeling_clap.ClapTextModelOutput</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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<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>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><code>transformers.models.clap.modeling_clap.ClapTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),dt=new Ca({props:{$$slots:{default:[vu]},$$scope:{ctx:x}}}),ct=new Ie({props:{anchor:"transformers.ClapTextModelWithProjection.forward.example",$$slots:{default:[yu]},$$scope:{ctx:x}}}),yo=new te({}),Co=new z({props:{name:"class transformers.ClapAudioModel",anchor:"transformers.ClapAudioModel",parameters:[{name:"config",val:": ClapAudioConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/clap/modeling_clap.py#L1710"}}),wo=new z({props:{name:"forward",anchor:"transformers.ClapAudioModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = 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.ClapAudioModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapAudioModel.forward.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapAudioModel.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.ClapAudioModel.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.ClapAudioModel.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/clap/modeling_clap.py#L1723",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapAudioConfig'&gt;</code>) 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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ht=new Ca({props:{$$slots:{default:[Cu]},$$scope:{ctx:x}}}),ut=new Ie({props:{anchor:"transformers.ClapAudioModel.forward.example",$$slots:{default:[wu]},$$scope:{ctx:x}}}),To=new te({}),Mo=new z({props:{name:"class transformers.ClapAudioModelWithProjection",anchor:"transformers.ClapAudioModelWithProjection",parameters:[{name:"config",val:": ClapAudioConfig"}],parametersDescription:[{anchor:"transformers.ClapAudioModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L2247"}}),ko=new z({props:{name:"forward",anchor:"transformers.ClapAudioModelWithProjection.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = 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.ClapAudioModelWithProjection.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapAudioModelWithProjection.forward.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapAudioModelWithProjection.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.ClapAudioModelWithProjection.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.ClapAudioModelWithProjection.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/clap/modeling_clap.py#L2261",returnDescription:`
<p>A <code>transformers.models.clap.modeling_clap.ClapAudioModelOutput</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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapAudioConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>audio_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 The Audio embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<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>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>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>
</ul>
`,returnType:`
<p><code>transformers.models.clap.modeling_clap.ClapAudioModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mt=new Ca({props:{$$slots:{default:[Tu]},$$scope:{ctx:x}}}),gt=new Ie({props:{anchor:"transformers.ClapAudioModelWithProjection.forward.example",$$slots:{default:[Mu]},$$scope:{ctx:x}}}),{c(){d=r("meta"),v=p(),m=r("h1"),f=r("a"),b=r("span"),y(i.$$.fragment),u=p(),k=r("span"),Qr=a("CLAP"),Yn=p(),he=r("h2"),Ue=r("a"),wa=r("span"),y(xt.$$.fragment),Or=p(),Ta=r("span"),Lr=a("Overview"),Qn=p(),qe=r("p"),Hr=a("The CLAP model was proposed in "),Et=r("a"),Kr=a(`Large Scale Contrastive Language-Audio pretraining with
feature fusion and keyword-to-caption augmentation`),es=a(" by Yusong Wu, Ke Chen, Tianyu Zhang, Yuchen Hui, Taylor Berg-Kirkpatrick, Shlomo Dubnov."),On=p(),Wo=r("p"),ts=a("CLAP (Contrastive Language-Audio Pretraining) is a neural network trained on a variety of (audio, text) pairs. It can be instructed in to predict the most relevant text snippet, given an audio, without directly optimizing for the task. The CLAP model uses a SWINTransformer to get audio features from a log-Mel spectrogram input, and a RoBERTa model to get text features. Both the text and audio features are then projected to a latent space with identical dimension. The dot product between the projected audio and text features is then used as a similar score."),Ln=p(),Fo=r("p"),os=a("The abstract from the paper is the following:"),Hn=p(),Po=r("p"),Ma=r("em"),as=a("Contrastive learning has shown remarkable success in the field of multimodal representation learning. In this paper, we propose a pipeline of contrastive language-audio pretraining to develop an audio representation by combining audio data with natural language descriptions. To accomplish this target, we first release LAION-Audio-630K, a large collection of 633,526 audio-text pairs from different data sources. Second, we construct a contrastive language-audio pretraining model by considering different audio encoders and text encoders. We incorporate the feature fusion mechanism and keyword-to-caption augmentation into the model design to further enable the model to process audio inputs of variable lengths and enhance the performance. Third, we perform comprehensive experiments to evaluate our model across three tasks: text-to-audio retrieval, zero-shot audio classification, and supervised audio classification. The results demonstrate that our model achieves superior performance in text-to-audio retrieval task. In audio classification tasks, the model achieves state-of-the-art performance in the zeroshot setting and is able to obtain performance comparable to models\u2019 results in the non-zero-shot setting. LAION-Audio-6"),Kn=p(),S=r("p"),ns=a("This model was contributed by "),kt=r("a"),rs=a("Younes Belkada"),ss=a(" and "),jt=r("a"),ls=a("Arthur Zucker"),is=a(` .
The original code can be found `),zt=r("a"),ds=a("here"),cs=a("."),er=p(),ue=r("h2"),Be=r("a"),$a=r("span"),y(At.$$.fragment),ps=p(),xa=r("span"),hs=a("ClapConfig"),tr=p(),P=r("div"),y(Jt.$$.fragment),us=p(),ne=r("p"),Io=r("a"),fs=a("ClapConfig"),ms=a(" is the configuration class to store the configuration of a "),Zo=r("a"),gs=a("ClapModel"),_s=a(`. It is used to instantiate
a CLAP model according to the specified arguments, defining the text model and audio model configs. Instantiating a
configuration with the defaults will yield a similar configuration to that of the CLAP
`),Wt=r("a"),bs=a("laion/clap-htsat-fused"),vs=a(" architecture."),ys=p(),fe=r("p"),Cs=a("Configuration objects inherit from "),No=r("a"),ws=a("PretrainedConfig"),Ts=a(` and can be used to control the model outputs. Read the
documentation from `),Uo=r("a"),Ms=a("PretrainedConfig"),$s=a(" for more information."),xs=p(),y(Ge.$$.fragment),Es=p(),Re=r("div"),y(Ft.$$.fragment),ks=p(),Pt=r("p"),js=a("Instantiate a "),qo=r("a"),zs=a("ClapConfig"),As=a(` (or a derived class) from clap text model configuration and clap audio model
configuration.`),or=p(),me=r("h2"),Ve=r("a"),Ea=r("span"),y(It.$$.fragment),Js=p(),ka=r("span"),Ws=a("ClapTextConfig"),ar=p(),R=r("div"),y(Zt.$$.fragment),Fs=p(),ge=r("p"),Ps=a("This is the configuration class to store the configuration of a "),Bo=r("a"),Is=a("ClapTextModel"),Zs=a(`. It is used to instantiate a CLAP
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 CLAP
`),Nt=r("a"),Ns=a("calp-hsat-fused"),Us=a(" architecture."),qs=p(),_e=r("p"),Bs=a("Configuration objects inherit from "),Go=r("a"),Gs=a("PretrainedConfig"),Rs=a(` and can be used to control the model outputs. Read the
documentation from `),Ro=r("a"),Vs=a("PretrainedConfig"),Xs=a(" for more information."),Ss=p(),y(Xe.$$.fragment),nr=p(),be=r("h2"),Se=r("a"),ja=r("span"),y(Ut.$$.fragment),Ds=p(),za=r("span"),Ys=a("ClapAudioConfig"),rr=p(),V=r("div"),y(qt.$$.fragment),Qs=p(),ve=r("p"),Os=a("This is the configuration class to store the configuration of a "),Vo=r("a"),Ls=a("ClapAudioModel"),Hs=a(`. It is used to instantiate a
CLAP audio encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the audio encoder of the CLAP
`),Bt=r("a"),Ks=a("laion/clap-htsat-fused"),el=a(" architecture."),tl=p(),ye=r("p"),ol=a("Configuration objects inherit from "),Xo=r("a"),al=a("PretrainedConfig"),nl=a(` and can be used to control the model outputs. Read the
documentation from `),So=r("a"),rl=a("PretrainedConfig"),sl=a(" for more information."),ll=p(),y(De.$$.fragment),sr=p(),Ce=r("h2"),Ye=r("a"),Aa=r("span"),y(Gt.$$.fragment),il=p(),Ja=r("span"),dl=a("ClapFeatureExtractor"),lr=p(),I=r("div"),y(Rt.$$.fragment),cl=p(),Wa=r("p"),pl=a("Constructs a CLAP feature extractor."),hl=p(),Vt=r("p"),ul=a("This feature extractor inherits from "),Do=r("a"),fl=a("SequenceFeatureExtractor"),ml=a(` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),gl=p(),we=r("p"),_l=a("This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Fa=r("em"),bl=a(`Short Time
Fourier Transform`),vl=a(" (STFT) which should match pytorch\u2019s "),Pa=r("code"),yl=a("torch.stft"),Cl=a(" equivalent."),wl=p(),Qe=r("div"),y(Xt.$$.fragment),Tl=p(),Ia=r("p"),Ml=a("Serializes this instance to a Python dictionary."),ir=p(),Te=r("h2"),Oe=r("a"),Za=r("span"),y(St.$$.fragment),$l=p(),Na=r("span"),xl=a("ClapProcessor"),dr=p(),Z=r("div"),y(Dt.$$.fragment),El=p(),Ua=r("p"),kl=a("Constructs a CLAP processor which wraps a CLAP feature extractor and a RoBerta tokenizer into a single processor."),jl=p(),B=r("p"),Yo=r("a"),zl=a("ClapProcessor"),Al=a(" offers all the functionalities of "),Qo=r("a"),Jl=a("ClapFeatureExtractor"),Wl=a(" and "),Oo=r("a"),Fl=a("RobertaTokenizerFast"),Pl=a(`. See the
`),qa=r("code"),Il=a("__call__()"),Zl=a(" and "),Lo=r("a"),Nl=a("decode()"),Ul=a(" for more information."),ql=p(),Le=r("div"),y(Yt.$$.fragment),Bl=p(),Qt=r("p"),Gl=a("This method forwards all its arguments to RobertaTokenizerFast\u2019s "),Ho=r("a"),Rl=a("batch_decode()"),Vl=a(`. Please
refer to the docstring of this method for more information.`),Xl=p(),He=r("div"),y(Ot.$$.fragment),Sl=p(),Lt=r("p"),Dl=a("This method forwards all its arguments to RobertaTokenizerFast\u2019s "),Ko=r("a"),Yl=a("decode()"),Ql=a(`. Please refer
to the docstring of this method for more information.`),cr=p(),Me=r("h2"),Ke=r("a"),Ba=r("span"),y(Ht.$$.fragment),Ol=p(),Ga=r("span"),Ll=a("ClapModel"),pr=p(),J=r("div"),y(Kt.$$.fragment),Hl=p(),eo=r("p"),Kl=a("This model inherits from "),ea=r("a"),ei=a("PreTrainedModel"),ti=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.)`),oi=p(),to=r("p"),ai=a("This model is also a PyTorch "),oo=r("a"),ni=a("torch.nn.Module"),ri=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),si=p(),D=r("div"),y(ao.$$.fragment),li=p(),$e=r("p"),ii=a("The "),ta=r("a"),di=a("ClapModel"),ci=a(" forward method, overrides the "),Ra=r("code"),pi=a("__call__"),hi=a(" special method."),ui=p(),y(et.$$.fragment),fi=p(),y(tt.$$.fragment),mi=p(),Y=r("div"),y(no.$$.fragment),gi=p(),xe=r("p"),_i=a("The "),oa=r("a"),bi=a("ClapModel"),vi=a(" forward method, overrides the "),Va=r("code"),yi=a("__call__"),Ci=a(" special method."),wi=p(),y(ot.$$.fragment),Ti=p(),y(at.$$.fragment),Mi=p(),Q=r("div"),y(ro.$$.fragment),$i=p(),Ee=r("p"),xi=a("The "),aa=r("a"),Ei=a("ClapModel"),ki=a(" forward method, overrides the "),Xa=r("code"),ji=a("__call__"),zi=a(" special method."),Ai=p(),y(nt.$$.fragment),Ji=p(),y(rt.$$.fragment),hr=p(),ke=r("h2"),st=r("a"),Sa=r("span"),y(so.$$.fragment),Wi=p(),Da=r("span"),Fi=a("ClapTextModel"),ur=p(),N=r("div"),y(lo.$$.fragment),Pi=p(),io=r("p"),Ii=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 `),Ya=r("em"),Zi=a(`Attention is
all you need`),Ni=a(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Ui=p(),W=r("p"),qi=a("To behave as an decoder the model needs to be initialized with the "),Qa=r("code"),Bi=a("is_decoder"),Gi=a(` argument of the configuration set
to `),Oa=r("code"),Ri=a("True"),Vi=a(". To be used in a Seq2Seq model, the model needs to initialized with both "),La=r("code"),Xi=a("is_decoder"),Si=a(` argument and
`),Ha=r("code"),Di=a("add_cross_attention"),Yi=a(" set to "),Ka=r("code"),Qi=a("True"),Oi=a("; an "),en=r("code"),Li=a("encoder_hidden_states"),Hi=a(" is then expected as an input to the forward pass."),Ki=p(),lt=r("p"),ed=a(".. _"),tn=r("em"),td=a("Attention is all you need"),od=a(": "),co=r("a"),ad=a("https://arxiv.org/abs/1706.03762"),nd=p(),O=r("div"),y(po.$$.fragment),rd=p(),A=r("p"),sd=a("encoder_hidden_states  ("),on=r("code"),ld=a("torch.FloatTensor"),id=a(" of shape "),an=r("code"),dd=a("(batch_size, sequence_length, hidden_size)"),cd=a(", "),nn=r("em"),pd=a("optional"),hd=a(`):
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.
encoder_attention_mask (`),rn=r("code"),ud=a("torch.FloatTensor"),fd=a(" of shape "),sn=r("code"),md=a("(batch_size, sequence_length)"),gd=a(", "),ln=r("em"),_d=a("optional"),bd=a(`):
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 `),dn=r("code"),vd=a("[0, 1]"),yd=a(":"),Cd=p(),ho=r("ul"),uo=r("li"),wd=a("1 for tokens that are "),cn=r("strong"),Td=a("not masked"),Md=a(","),$d=p(),X=r("li"),xd=a("0 for tokens that are "),pn=r("strong"),Ed=a("masked"),kd=a(`.
past_key_values (`),hn=r("code"),jd=a("tuple(tuple(torch.FloatTensor))"),zd=a(" of length "),un=r("code"),Ad=a("config.n_layers"),Jd=a(" with each tuple having 4 tensors of shape "),fn=r("code"),Wd=a("(batch_size, num_heads, sequence_length - 1, embed_size_per_head)"),Fd=a(`):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.`),Pd=p(),E=r("p"),Id=a("If "),mn=r("code"),Zd=a("past_key_values"),Nd=a(" are used, the user can optionally input only the last "),gn=r("code"),Ud=a("decoder_input_ids"),qd=a(` (those that
don\u2019t have their past key value states given to this model) of shape `),_n=r("code"),Bd=a("(batch_size, 1)"),Gd=a(` instead of all
`),bn=r("code"),Rd=a("decoder_input_ids"),Vd=a(" of shape "),vn=r("code"),Xd=a("(batch_size, sequence_length)"),Sd=a(`.
use_cache (`),yn=r("code"),Dd=a("bool"),Yd=a(", "),Cn=r("em"),Qd=a("optional"),Od=a(`):
If set to `),wn=r("code"),Ld=a("True"),Hd=a(", "),Tn=r("code"),Kd=a("past_key_values"),ec=a(` key value states are returned and can be used to speed up decoding (see
`),Mn=r("code"),tc=a("past_key_values"),oc=a(")."),fr=p(),je=r("h2"),it=r("a"),$n=r("span"),y(fo.$$.fragment),ac=p(),xn=r("span"),nc=a("ClapTextModelWithProjection"),mr=p(),U=r("div"),y(mo.$$.fragment),rc=p(),En=r("p"),sc=a("CLAP Text Model with a projection layer on top (a linear layer on top of the pooled output)."),lc=p(),go=r("p"),ic=a("This model inherits from "),na=r("a"),dc=a("PreTrainedModel"),cc=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.)`),pc=p(),_o=r("p"),hc=a("This model is also a PyTorch "),bo=r("a"),uc=a("torch.nn.Module"),fc=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),mc=p(),L=r("div"),y(vo.$$.fragment),gc=p(),ze=r("p"),_c=a("The "),ra=r("a"),bc=a("ClapTextModelWithProjection"),vc=a(" forward method, overrides the "),kn=r("code"),yc=a("__call__"),Cc=a(" special method."),wc=p(),y(dt.$$.fragment),Tc=p(),y(ct.$$.fragment),gr=p(),Ae=r("h2"),pt=r("a"),jn=r("span"),y(yo.$$.fragment),Mc=p(),zn=r("span"),$c=a("ClapAudioModel"),_r=p(),Je=r("div"),y(Co.$$.fragment),xc=p(),H=r("div"),y(wo.$$.fragment),Ec=p(),We=r("p"),kc=a("The "),sa=r("a"),jc=a("ClapAudioModel"),zc=a(" forward method, overrides the "),An=r("code"),Ac=a("__call__"),Jc=a(" special method."),Wc=p(),y(ht.$$.fragment),Fc=p(),y(ut.$$.fragment),br=p(),Fe=r("h2"),ft=r("a"),Jn=r("span"),y(To.$$.fragment),Pc=p(),Wn=r("span"),Ic=a("ClapAudioModelWithProjection"),vr=p(),q=r("div"),y(Mo.$$.fragment),Zc=p(),Fn=r("p"),Nc=a("CLAP Audio Model with a projection layer on top (a linear layer on top of the pooled output)."),Uc=p(),$o=r("p"),qc=a("This model inherits from "),la=r("a"),Bc=a("PreTrainedModel"),Gc=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.)`),Rc=p(),xo=r("p"),Vc=a("This model is also a PyTorch "),Eo=r("a"),Xc=a("torch.nn.Module"),Sc=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dc=p(),K=r("div"),y(ko.$$.fragment),Yc=p(),Pe=r("p"),Qc=a("The "),ia=r("a"),Oc=a("ClapAudioModelWithProjection"),Lc=a(" forward method, overrides the "),Pn=r("code"),Hc=a("__call__"),Kc=a(" special method."),ep=p(),y(mt.$$.fragment),tp=p(),y(gt.$$.fragment),this.h()},l(o){const g=iu('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(t),v=h(o),m=s(o,"H1",{class:!0});var jo=l(m);f=s(jo,"A",{id:!0,class:!0,href:!0});var In=l(f);b=s(In,"SPAN",{});var Zn=l(b);C(i.$$.fragment,Zn),Zn.forEach(t),In.forEach(t),u=h(jo),k=s(jo,"SPAN",{});var Nn=l(k);Qr=n(Nn,"CLAP"),Nn.forEach(t),jo.forEach(t),Yn=h(o),he=s(o,"H2",{class:!0});var zo=l(he);Ue=s(zo,"A",{id:!0,class:!0,href:!0});var Un=l(Ue);wa=s(Un,"SPAN",{});var qn=l(wa);C(xt.$$.fragment,qn),qn.forEach(t),Un.forEach(t),Or=h(zo),Ta=s(zo,"SPAN",{});var Bn=l(Ta);Lr=n(Bn,"Overview"),Bn.forEach(t),zo.forEach(t),Qn=h(o),qe=s(o,"P",{});var Ao=l(qe);Hr=n(Ao,"The CLAP model was proposed in "),Et=s(Ao,"A",{href:!0,rel:!0});var Gn=l(Et);Kr=n(Gn,`Large Scale Contrastive Language-Audio pretraining with
feature fusion and keyword-to-caption augmentation`),Gn.forEach(t),es=n(Ao," by Yusong Wu, Ke Chen, Tianyu Zhang, Yuchen Hui, Taylor Berg-Kirkpatrick, Shlomo Dubnov."),Ao.forEach(t),On=h(o),Wo=s(o,"P",{});var Rn=l(Wo);ts=n(Rn,"CLAP (Contrastive Language-Audio Pretraining) is a neural network trained on a variety of (audio, text) pairs. It can be instructed in to predict the most relevant text snippet, given an audio, without directly optimizing for the task. The CLAP model uses a SWINTransformer to get audio features from a log-Mel spectrogram input, and a RoBERTa model to get text features. Both the text and audio features are then projected to a latent space with identical dimension. The dot product between the projected audio and text features is then used as a similar score."),Rn.forEach(t),Ln=h(o),Fo=s(o,"P",{});var Vn=l(Fo);os=n(Vn,"The abstract from the paper is the following:"),Vn.forEach(t),Hn=h(o),Po=s(o,"P",{});var Xn=l(Po);Ma=s(Xn,"EM",{});var Sn=l(Ma);as=n(Sn,"Contrastive learning has shown remarkable success in the field of multimodal representation learning. In this paper, we propose a pipeline of contrastive language-audio pretraining to develop an audio representation by combining audio data with natural language descriptions. To accomplish this target, we first release LAION-Audio-630K, a large collection of 633,526 audio-text pairs from different data sources. Second, we construct a contrastive language-audio pretraining model by considering different audio encoders and text encoders. We incorporate the feature fusion mechanism and keyword-to-caption augmentation into the model design to further enable the model to process audio inputs of variable lengths and enhance the performance. Third, we perform comprehensive experiments to evaluate our model across three tasks: text-to-audio retrieval, zero-shot audio classification, and supervised audio classification. The results demonstrate that our model achieves superior performance in text-to-audio retrieval task. In audio classification tasks, the model achieves state-of-the-art performance in the zeroshot setting and is able to obtain performance comparable to models\u2019 results in the non-zero-shot setting. LAION-Audio-6"),Sn.forEach(t),Xn.forEach(t),Kn=h(o),S=s(o,"P",{});var oe=l(S);ns=n(oe,"This model was contributed by "),kt=s(oe,"A",{href:!0,rel:!0});var op=l(kt);rs=n(op,"Younes Belkada"),op.forEach(t),ss=n(oe," and "),jt=s(oe,"A",{href:!0,rel:!0});var ap=l(jt);ls=n(ap,"Arthur Zucker"),ap.forEach(t),is=n(oe,` .
The original code can be found `),zt=s(oe,"A",{href:!0,rel:!0});var np=l(zt);ds=n(np,"here"),np.forEach(t),cs=n(oe,"."),oe.forEach(t),er=h(o),ue=s(o,"H2",{class:!0});var Cr=l(ue);Be=s(Cr,"A",{id:!0,class:!0,href:!0});var rp=l(Be);$a=s(rp,"SPAN",{});var sp=l($a);C(At.$$.fragment,sp),sp.forEach(t),rp.forEach(t),ps=h(Cr),xa=s(Cr,"SPAN",{});var lp=l(xa);hs=n(lp,"ClapConfig"),lp.forEach(t),Cr.forEach(t),tr=h(o),P=s(o,"DIV",{class:!0});var re=l(P);C(Jt.$$.fragment,re),us=h(re),ne=s(re,"P",{});var Jo=l(ne);Io=s(Jo,"A",{href:!0});var ip=l(Io);fs=n(ip,"ClapConfig"),ip.forEach(t),ms=n(Jo," is the configuration class to store the configuration of a "),Zo=s(Jo,"A",{href:!0});var dp=l(Zo);gs=n(dp,"ClapModel"),dp.forEach(t),_s=n(Jo,`. It is used to instantiate
a CLAP model according to the specified arguments, defining the text model and audio model configs. Instantiating a
configuration with the defaults will yield a similar configuration to that of the CLAP
`),Wt=s(Jo,"A",{href:!0,rel:!0});var cp=l(Wt);bs=n(cp,"laion/clap-htsat-fused"),cp.forEach(t),vs=n(Jo," architecture."),Jo.forEach(t),ys=h(re),fe=s(re,"P",{});var da=l(fe);Cs=n(da,"Configuration objects inherit from "),No=s(da,"A",{href:!0});var pp=l(No);ws=n(pp,"PretrainedConfig"),pp.forEach(t),Ts=n(da,` and can be used to control the model outputs. Read the
documentation from `),Uo=s(da,"A",{href:!0});var hp=l(Uo);Ms=n(hp,"PretrainedConfig"),hp.forEach(t),$s=n(da," for more information."),da.forEach(t),xs=h(re),C(Ge.$$.fragment,re),Es=h(re),Re=s(re,"DIV",{class:!0});var wr=l(Re);C(Ft.$$.fragment,wr),ks=h(wr),Pt=s(wr,"P",{});var Tr=l(Pt);js=n(Tr,"Instantiate a "),qo=s(Tr,"A",{href:!0});var up=l(qo);zs=n(up,"ClapConfig"),up.forEach(t),As=n(Tr,` (or a derived class) from clap text model configuration and clap audio model
configuration.`),Tr.forEach(t),wr.forEach(t),re.forEach(t),or=h(o),me=s(o,"H2",{class:!0});var Mr=l(me);Ve=s(Mr,"A",{id:!0,class:!0,href:!0});var fp=l(Ve);Ea=s(fp,"SPAN",{});var mp=l(Ea);C(It.$$.fragment,mp),mp.forEach(t),fp.forEach(t),Js=h(Mr),ka=s(Mr,"SPAN",{});var gp=l(ka);Ws=n(gp,"ClapTextConfig"),gp.forEach(t),Mr.forEach(t),ar=h(o),R=s(o,"DIV",{class:!0});var _t=l(R);C(Zt.$$.fragment,_t),Fs=h(_t),ge=s(_t,"P",{});var ca=l(ge);Ps=n(ca,"This is the configuration class to store the configuration of a "),Bo=s(ca,"A",{href:!0});var _p=l(Bo);Is=n(_p,"ClapTextModel"),_p.forEach(t),Zs=n(ca,`. It is used to instantiate a CLAP
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 CLAP
`),Nt=s(ca,"A",{href:!0,rel:!0});var bp=l(Nt);Ns=n(bp,"calp-hsat-fused"),bp.forEach(t),Us=n(ca," architecture."),ca.forEach(t),qs=h(_t),_e=s(_t,"P",{});var pa=l(_e);Bs=n(pa,"Configuration objects inherit from "),Go=s(pa,"A",{href:!0});var vp=l(Go);Gs=n(vp,"PretrainedConfig"),vp.forEach(t),Rs=n(pa,` and can be used to control the model outputs. Read the
documentation from `),Ro=s(pa,"A",{href:!0});var yp=l(Ro);Vs=n(yp,"PretrainedConfig"),yp.forEach(t),Xs=n(pa," for more information."),pa.forEach(t),Ss=h(_t),C(Xe.$$.fragment,_t),_t.forEach(t),nr=h(o),be=s(o,"H2",{class:!0});var $r=l(be);Se=s($r,"A",{id:!0,class:!0,href:!0});var Cp=l(Se);ja=s(Cp,"SPAN",{});var wp=l(ja);C(Ut.$$.fragment,wp),wp.forEach(t),Cp.forEach(t),Ds=h($r),za=s($r,"SPAN",{});var Tp=l(za);Ys=n(Tp,"ClapAudioConfig"),Tp.forEach(t),$r.forEach(t),rr=h(o),V=s(o,"DIV",{class:!0});var bt=l(V);C(qt.$$.fragment,bt),Qs=h(bt),ve=s(bt,"P",{});var ha=l(ve);Os=n(ha,"This is the configuration class to store the configuration of a "),Vo=s(ha,"A",{href:!0});var Mp=l(Vo);Ls=n(Mp,"ClapAudioModel"),Mp.forEach(t),Hs=n(ha,`. It is used to instantiate a
CLAP audio encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the audio encoder of the CLAP
`),Bt=s(ha,"A",{href:!0,rel:!0});var $p=l(Bt);Ks=n($p,"laion/clap-htsat-fused"),$p.forEach(t),el=n(ha," architecture."),ha.forEach(t),tl=h(bt),ye=s(bt,"P",{});var ua=l(ye);ol=n(ua,"Configuration objects inherit from "),Xo=s(ua,"A",{href:!0});var xp=l(Xo);al=n(xp,"PretrainedConfig"),xp.forEach(t),nl=n(ua,` and can be used to control the model outputs. Read the
documentation from `),So=s(ua,"A",{href:!0});var Ep=l(So);rl=n(Ep,"PretrainedConfig"),Ep.forEach(t),sl=n(ua," for more information."),ua.forEach(t),ll=h(bt),C(De.$$.fragment,bt),bt.forEach(t),sr=h(o),Ce=s(o,"H2",{class:!0});var xr=l(Ce);Ye=s(xr,"A",{id:!0,class:!0,href:!0});var kp=l(Ye);Aa=s(kp,"SPAN",{});var jp=l(Aa);C(Gt.$$.fragment,jp),jp.forEach(t),kp.forEach(t),il=h(xr),Ja=s(xr,"SPAN",{});var zp=l(Ja);dl=n(zp,"ClapFeatureExtractor"),zp.forEach(t),xr.forEach(t),lr=h(o),I=s(o,"DIV",{class:!0});var se=l(I);C(Rt.$$.fragment,se),cl=h(se),Wa=s(se,"P",{});var Ap=l(Wa);pl=n(Ap,"Constructs a CLAP feature extractor."),Ap.forEach(t),hl=h(se),Vt=s(se,"P",{});var Er=l(Vt);ul=n(Er,"This feature extractor inherits from "),Do=s(Er,"A",{href:!0});var Jp=l(Do);fl=n(Jp,"SequenceFeatureExtractor"),Jp.forEach(t),ml=n(Er,` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),Er.forEach(t),gl=h(se),we=s(se,"P",{});var fa=l(we);_l=n(fa,"This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Fa=s(fa,"EM",{});var Wp=l(Fa);bl=n(Wp,`Short Time
Fourier Transform`),Wp.forEach(t),vl=n(fa," (STFT) which should match pytorch\u2019s "),Pa=s(fa,"CODE",{});var Fp=l(Pa);yl=n(Fp,"torch.stft"),Fp.forEach(t),Cl=n(fa," equivalent."),fa.forEach(t),wl=h(se),Qe=s(se,"DIV",{class:!0});var kr=l(Qe);C(Xt.$$.fragment,kr),Tl=h(kr),Ia=s(kr,"P",{});var Pp=l(Ia);Ml=n(Pp,"Serializes this instance to a Python dictionary."),Pp.forEach(t),kr.forEach(t),se.forEach(t),ir=h(o),Te=s(o,"H2",{class:!0});var jr=l(Te);Oe=s(jr,"A",{id:!0,class:!0,href:!0});var Ip=l(Oe);Za=s(Ip,"SPAN",{});var Zp=l(Za);C(St.$$.fragment,Zp),Zp.forEach(t),Ip.forEach(t),$l=h(jr),Na=s(jr,"SPAN",{});var Np=l(Na);xl=n(Np,"ClapProcessor"),Np.forEach(t),jr.forEach(t),dr=h(o),Z=s(o,"DIV",{class:!0});var le=l(Z);C(Dt.$$.fragment,le),El=h(le),Ua=s(le,"P",{});var Up=l(Ua);kl=n(Up,"Constructs a CLAP processor which wraps a CLAP feature extractor and a RoBerta tokenizer into a single processor."),Up.forEach(t),jl=h(le),B=s(le,"P",{});var ae=l(B);Yo=s(ae,"A",{href:!0});var qp=l(Yo);zl=n(qp,"ClapProcessor"),qp.forEach(t),Al=n(ae," offers all the functionalities of "),Qo=s(ae,"A",{href:!0});var Bp=l(Qo);Jl=n(Bp,"ClapFeatureExtractor"),Bp.forEach(t),Wl=n(ae," and "),Oo=s(ae,"A",{href:!0});var Gp=l(Oo);Fl=n(Gp,"RobertaTokenizerFast"),Gp.forEach(t),Pl=n(ae,`. See the
`),qa=s(ae,"CODE",{});var Rp=l(qa);Il=n(Rp,"__call__()"),Rp.forEach(t),Zl=n(ae," and "),Lo=s(ae,"A",{href:!0});var Vp=l(Lo);Nl=n(Vp,"decode()"),Vp.forEach(t),Ul=n(ae," for more information."),ae.forEach(t),ql=h(le),Le=s(le,"DIV",{class:!0});var zr=l(Le);C(Yt.$$.fragment,zr),Bl=h(zr),Qt=s(zr,"P",{});var Ar=l(Qt);Gl=n(Ar,"This method forwards all its arguments to RobertaTokenizerFast\u2019s "),Ho=s(Ar,"A",{href:!0});var Xp=l(Ho);Rl=n(Xp,"batch_decode()"),Xp.forEach(t),Vl=n(Ar,`. Please
refer to the docstring of this method for more information.`),Ar.forEach(t),zr.forEach(t),Xl=h(le),He=s(le,"DIV",{class:!0});var Jr=l(He);C(Ot.$$.fragment,Jr),Sl=h(Jr),Lt=s(Jr,"P",{});var Wr=l(Lt);Dl=n(Wr,"This method forwards all its arguments to RobertaTokenizerFast\u2019s "),Ko=s(Wr,"A",{href:!0});var Sp=l(Ko);Yl=n(Sp,"decode()"),Sp.forEach(t),Ql=n(Wr,`. Please refer
to the docstring of this method for more information.`),Wr.forEach(t),Jr.forEach(t),le.forEach(t),cr=h(o),Me=s(o,"H2",{class:!0});var Fr=l(Me);Ke=s(Fr,"A",{id:!0,class:!0,href:!0});var Dp=l(Ke);Ba=s(Dp,"SPAN",{});var Yp=l(Ba);C(Ht.$$.fragment,Yp),Yp.forEach(t),Dp.forEach(t),Ol=h(Fr),Ga=s(Fr,"SPAN",{});var Qp=l(Ga);Ll=n(Qp,"ClapModel"),Qp.forEach(t),Fr.forEach(t),pr=h(o),J=s(o,"DIV",{class:!0});var ee=l(J);C(Kt.$$.fragment,ee),Hl=h(ee),eo=s(ee,"P",{});var Pr=l(eo);Kl=n(Pr,"This model inherits from "),ea=s(Pr,"A",{href:!0});var Op=l(ea);ei=n(Op,"PreTrainedModel"),Op.forEach(t),ti=n(Pr,`. 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.)`),Pr.forEach(t),oi=h(ee),to=s(ee,"P",{});var Ir=l(to);ai=n(Ir,"This model is also a PyTorch "),oo=s(Ir,"A",{href:!0,rel:!0});var Lp=l(oo);ni=n(Lp,"torch.nn.Module"),Lp.forEach(t),ri=n(Ir,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ir.forEach(t),si=h(ee),D=s(ee,"DIV",{class:!0});var vt=l(D);C(ao.$$.fragment,vt),li=h(vt),$e=s(vt,"P",{});var ma=l($e);ii=n(ma,"The "),ta=s(ma,"A",{href:!0});var Hp=l(ta);di=n(Hp,"ClapModel"),Hp.forEach(t),ci=n(ma," forward method, overrides the "),Ra=s(ma,"CODE",{});var Kp=l(Ra);pi=n(Kp,"__call__"),Kp.forEach(t),hi=n(ma," special method."),ma.forEach(t),ui=h(vt),C(et.$$.fragment,vt),fi=h(vt),C(tt.$$.fragment,vt),vt.forEach(t),mi=h(ee),Y=s(ee,"DIV",{class:!0});var yt=l(Y);C(no.$$.fragment,yt),gi=h(yt),xe=s(yt,"P",{});var ga=l(xe);_i=n(ga,"The "),oa=s(ga,"A",{href:!0});var eh=l(oa);bi=n(eh,"ClapModel"),eh.forEach(t),vi=n(ga," forward method, overrides the "),Va=s(ga,"CODE",{});var th=l(Va);yi=n(th,"__call__"),th.forEach(t),Ci=n(ga," special method."),ga.forEach(t),wi=h(yt),C(ot.$$.fragment,yt),Ti=h(yt),C(at.$$.fragment,yt),yt.forEach(t),Mi=h(ee),Q=s(ee,"DIV",{class:!0});var Ct=l(Q);C(ro.$$.fragment,Ct),$i=h(Ct),Ee=s(Ct,"P",{});var _a=l(Ee);xi=n(_a,"The "),aa=s(_a,"A",{href:!0});var oh=l(aa);Ei=n(oh,"ClapModel"),oh.forEach(t),ki=n(_a," forward method, overrides the "),Xa=s(_a,"CODE",{});var ah=l(Xa);ji=n(ah,"__call__"),ah.forEach(t),zi=n(_a," special method."),_a.forEach(t),Ai=h(Ct),C(nt.$$.fragment,Ct),Ji=h(Ct),C(rt.$$.fragment,Ct),Ct.forEach(t),ee.forEach(t),hr=h(o),ke=s(o,"H2",{class:!0});var Zr=l(ke);st=s(Zr,"A",{id:!0,class:!0,href:!0});var nh=l(st);Sa=s(nh,"SPAN",{});var rh=l(Sa);C(so.$$.fragment,rh),rh.forEach(t),nh.forEach(t),Wi=h(Zr),Da=s(Zr,"SPAN",{});var sh=l(Da);Fi=n(sh,"ClapTextModel"),sh.forEach(t),Zr.forEach(t),ur=h(o),N=s(o,"DIV",{class:!0});var ie=l(N);C(lo.$$.fragment,ie),Pi=h(ie),io=s(ie,"P",{});var Nr=l(io);Ii=n(Nr,`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 `),Ya=s(Nr,"EM",{});var lh=l(Ya);Zi=n(lh,`Attention is
all you need`),lh.forEach(t),Ni=n(Nr,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Nr.forEach(t),Ui=h(ie),W=s(ie,"P",{});var G=l(W);qi=n(G,"To behave as an decoder the model needs to be initialized with the "),Qa=s(G,"CODE",{});var ih=l(Qa);Bi=n(ih,"is_decoder"),ih.forEach(t),Gi=n(G,` argument of the configuration set
to `),Oa=s(G,"CODE",{});var dh=l(Oa);Ri=n(dh,"True"),dh.forEach(t),Vi=n(G,". To be used in a Seq2Seq model, the model needs to initialized with both "),La=s(G,"CODE",{});var ch=l(La);Xi=n(ch,"is_decoder"),ch.forEach(t),Si=n(G,` argument and
`),Ha=s(G,"CODE",{});var ph=l(Ha);Di=n(ph,"add_cross_attention"),ph.forEach(t),Yi=n(G," set to "),Ka=s(G,"CODE",{});var hh=l(Ka);Qi=n(hh,"True"),hh.forEach(t),Oi=n(G,"; an "),en=s(G,"CODE",{});var uh=l(en);Li=n(uh,"encoder_hidden_states"),uh.forEach(t),Hi=n(G," is then expected as an input to the forward pass."),G.forEach(t),Ki=h(ie),lt=s(ie,"P",{});var Dn=l(lt);ed=n(Dn,".. _"),tn=s(Dn,"EM",{});var fh=l(tn);td=n(fh,"Attention is all you need"),fh.forEach(t),od=n(Dn,": "),co=s(Dn,"A",{href:!0,rel:!0});var mh=l(co);ad=n(mh,"https://arxiv.org/abs/1706.03762"),mh.forEach(t),Dn.forEach(t),nd=h(ie),O=s(ie,"DIV",{class:!0});var wt=l(O);C(po.$$.fragment,wt),rd=h(wt),A=s(wt,"P",{});var F=l(A);sd=n(F,"encoder_hidden_states  ("),on=s(F,"CODE",{});var gh=l(on);ld=n(gh,"torch.FloatTensor"),gh.forEach(t),id=n(F," of shape "),an=s(F,"CODE",{});var _h=l(an);dd=n(_h,"(batch_size, sequence_length, hidden_size)"),_h.forEach(t),cd=n(F,", "),nn=s(F,"EM",{});var bh=l(nn);pd=n(bh,"optional"),bh.forEach(t),hd=n(F,`):
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.
encoder_attention_mask (`),rn=s(F,"CODE",{});var vh=l(rn);ud=n(vh,"torch.FloatTensor"),vh.forEach(t),fd=n(F," of shape "),sn=s(F,"CODE",{});var yh=l(sn);md=n(yh,"(batch_size, sequence_length)"),yh.forEach(t),gd=n(F,", "),ln=s(F,"EM",{});var Ch=l(ln);_d=n(Ch,"optional"),Ch.forEach(t),bd=n(F,`):
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 `),dn=s(F,"CODE",{});var wh=l(dn);vd=n(wh,"[0, 1]"),wh.forEach(t),yd=n(F,":"),F.forEach(t),Cd=h(wt),ho=s(wt,"UL",{});var Ur=l(ho);uo=s(Ur,"LI",{});var qr=l(uo);wd=n(qr,"1 for tokens that are "),cn=s(qr,"STRONG",{});var Th=l(cn);Td=n(Th,"not masked"),Th.forEach(t),Md=n(qr,","),qr.forEach(t),$d=h(Ur),X=s(Ur,"LI",{});var de=l(X);xd=n(de,"0 for tokens that are "),pn=s(de,"STRONG",{});var Mh=l(pn);Ed=n(Mh,"masked"),Mh.forEach(t),kd=n(de,`.
past_key_values (`),hn=s(de,"CODE",{});var $h=l(hn);jd=n($h,"tuple(tuple(torch.FloatTensor))"),$h.forEach(t),zd=n(de," of length "),un=s(de,"CODE",{});var xh=l(un);Ad=n(xh,"config.n_layers"),xh.forEach(t),Jd=n(de," with each tuple having 4 tensors of shape "),fn=s(de,"CODE",{});var Eh=l(fn);Wd=n(Eh,"(batch_size, num_heads, sequence_length - 1, embed_size_per_head)"),Eh.forEach(t),Fd=n(de,`):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.`),de.forEach(t),Ur.forEach(t),Pd=h(wt),E=s(wt,"P",{});var j=l(E);Id=n(j,"If "),mn=s(j,"CODE",{});var kh=l(mn);Zd=n(kh,"past_key_values"),kh.forEach(t),Nd=n(j," are used, the user can optionally input only the last "),gn=s(j,"CODE",{});var jh=l(gn);Ud=n(jh,"decoder_input_ids"),jh.forEach(t),qd=n(j,` (those that
don\u2019t have their past key value states given to this model) of shape `),_n=s(j,"CODE",{});var zh=l(_n);Bd=n(zh,"(batch_size, 1)"),zh.forEach(t),Gd=n(j,` instead of all
`),bn=s(j,"CODE",{});var Ah=l(bn);Rd=n(Ah,"decoder_input_ids"),Ah.forEach(t),Vd=n(j," of shape "),vn=s(j,"CODE",{});var Jh=l(vn);Xd=n(Jh,"(batch_size, sequence_length)"),Jh.forEach(t),Sd=n(j,`.
use_cache (`),yn=s(j,"CODE",{});var Wh=l(yn);Dd=n(Wh,"bool"),Wh.forEach(t),Yd=n(j,", "),Cn=s(j,"EM",{});var Fh=l(Cn);Qd=n(Fh,"optional"),Fh.forEach(t),Od=n(j,`):
If set to `),wn=s(j,"CODE",{});var Ph=l(wn);Ld=n(Ph,"True"),Ph.forEach(t),Hd=n(j,", "),Tn=s(j,"CODE",{});var Ih=l(Tn);Kd=n(Ih,"past_key_values"),Ih.forEach(t),ec=n(j,` key value states are returned and can be used to speed up decoding (see
`),Mn=s(j,"CODE",{});var Zh=l(Mn);tc=n(Zh,"past_key_values"),Zh.forEach(t),oc=n(j,")."),j.forEach(t),wt.forEach(t),ie.forEach(t),fr=h(o),je=s(o,"H2",{class:!0});var Br=l(je);it=s(Br,"A",{id:!0,class:!0,href:!0});var Nh=l(it);$n=s(Nh,"SPAN",{});var Uh=l($n);C(fo.$$.fragment,Uh),Uh.forEach(t),Nh.forEach(t),ac=h(Br),xn=s(Br,"SPAN",{});var qh=l(xn);nc=n(qh,"ClapTextModelWithProjection"),qh.forEach(t),Br.forEach(t),mr=h(o),U=s(o,"DIV",{class:!0});var ce=l(U);C(mo.$$.fragment,ce),rc=h(ce),En=s(ce,"P",{});var Bh=l(En);sc=n(Bh,"CLAP Text Model with a projection layer on top (a linear layer on top of the pooled output)."),Bh.forEach(t),lc=h(ce),go=s(ce,"P",{});var Gr=l(go);ic=n(Gr,"This model inherits from "),na=s(Gr,"A",{href:!0});var Gh=l(na);dc=n(Gh,"PreTrainedModel"),Gh.forEach(t),cc=n(Gr,`. 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.)`),Gr.forEach(t),pc=h(ce),_o=s(ce,"P",{});var Rr=l(_o);hc=n(Rr,"This model is also a PyTorch "),bo=s(Rr,"A",{href:!0,rel:!0});var Rh=l(bo);uc=n(Rh,"torch.nn.Module"),Rh.forEach(t),fc=n(Rr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rr.forEach(t),mc=h(ce),L=s(ce,"DIV",{class:!0});var Tt=l(L);C(vo.$$.fragment,Tt),gc=h(Tt),ze=s(Tt,"P",{});var ba=l(ze);_c=n(ba,"The "),ra=s(ba,"A",{href:!0});var Vh=l(ra);bc=n(Vh,"ClapTextModelWithProjection"),Vh.forEach(t),vc=n(ba," forward method, overrides the "),kn=s(ba,"CODE",{});var Xh=l(kn);yc=n(Xh,"__call__"),Xh.forEach(t),Cc=n(ba," special method."),ba.forEach(t),wc=h(Tt),C(dt.$$.fragment,Tt),Tc=h(Tt),C(ct.$$.fragment,Tt),Tt.forEach(t),ce.forEach(t),gr=h(o),Ae=s(o,"H2",{class:!0});var Vr=l(Ae);pt=s(Vr,"A",{id:!0,class:!0,href:!0});var Sh=l(pt);jn=s(Sh,"SPAN",{});var Dh=l(jn);C(yo.$$.fragment,Dh),Dh.forEach(t),Sh.forEach(t),Mc=h(Vr),zn=s(Vr,"SPAN",{});var Yh=l(zn);$c=n(Yh,"ClapAudioModel"),Yh.forEach(t),Vr.forEach(t),_r=h(o),Je=s(o,"DIV",{class:!0});var Xr=l(Je);C(Co.$$.fragment,Xr),xc=h(Xr),H=s(Xr,"DIV",{class:!0});var Mt=l(H);C(wo.$$.fragment,Mt),Ec=h(Mt),We=s(Mt,"P",{});var va=l(We);kc=n(va,"The "),sa=s(va,"A",{href:!0});var Qh=l(sa);jc=n(Qh,"ClapAudioModel"),Qh.forEach(t),zc=n(va," forward method, overrides the "),An=s(va,"CODE",{});var Oh=l(An);Ac=n(Oh,"__call__"),Oh.forEach(t),Jc=n(va," special method."),va.forEach(t),Wc=h(Mt),C(ht.$$.fragment,Mt),Fc=h(Mt),C(ut.$$.fragment,Mt),Mt.forEach(t),Xr.forEach(t),br=h(o),Fe=s(o,"H2",{class:!0});var Sr=l(Fe);ft=s(Sr,"A",{id:!0,class:!0,href:!0});var Lh=l(ft);Jn=s(Lh,"SPAN",{});var Hh=l(Jn);C(To.$$.fragment,Hh),Hh.forEach(t),Lh.forEach(t),Pc=h(Sr),Wn=s(Sr,"SPAN",{});var Kh=l(Wn);Ic=n(Kh,"ClapAudioModelWithProjection"),Kh.forEach(t),Sr.forEach(t),vr=h(o),q=s(o,"DIV",{class:!0});var pe=l(q);C(Mo.$$.fragment,pe),Zc=h(pe),Fn=s(pe,"P",{});var eu=l(Fn);Nc=n(eu,"CLAP Audio Model with a projection layer on top (a linear layer on top of the pooled output)."),eu.forEach(t),Uc=h(pe),$o=s(pe,"P",{});var Dr=l($o);qc=n(Dr,"This model inherits from "),la=s(Dr,"A",{href:!0});var tu=l(la);Bc=n(tu,"PreTrainedModel"),tu.forEach(t),Gc=n(Dr,`. 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.)`),Dr.forEach(t),Rc=h(pe),xo=s(pe,"P",{});var Yr=l(xo);Vc=n(Yr,"This model is also a PyTorch "),Eo=s(Yr,"A",{href:!0,rel:!0});var ou=l(Eo);Xc=n(ou,"torch.nn.Module"),ou.forEach(t),Sc=n(Yr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yr.forEach(t),Dc=h(pe),K=s(pe,"DIV",{class:!0});var $t=l(K);C(ko.$$.fragment,$t),Yc=h($t),Pe=s($t,"P",{});var ya=l(Pe);Qc=n(ya,"The "),ia=s(ya,"A",{href:!0});var au=l(ia);Oc=n(au,"ClapAudioModelWithProjection"),au.forEach(t),Lc=n(ya," forward method, overrides the "),Pn=s(ya,"CODE",{});var nu=l(Pn);Hc=n(nu,"__call__"),nu.forEach(t),Kc=n(ya," special method."),ya.forEach(t),ep=h($t),C(mt.$$.fragment,$t),tp=h($t),C(gt.$$.fragment,$t),$t.forEach(t),pe.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(xu)),c(f,"id","clap"),c(f,"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"),c(f,"href","#clap"),c(m,"class","relative group"),c(Ue,"id","overview"),c(Ue,"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"),c(Ue,"href","#overview"),c(he,"class","relative group"),c(Et,"href","https://arxiv.org/pdf/2211.06687.pdf"),c(Et,"rel","nofollow"),c(kt,"href","https://huggingface.co/ybelkada"),c(kt,"rel","nofollow"),c(jt,"href","https://huggingface.co/ArtZucker"),c(jt,"rel","nofollow"),c(zt,"href","https://github.com/LAION-AI/Clap"),c(zt,"rel","nofollow"),c(Be,"id","transformers.ClapConfig"),c(Be,"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"),c(Be,"href","#transformers.ClapConfig"),c(ue,"class","relative group"),c(Io,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig"),c(Zo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapModel"),c(Wt,"href","https://huggingface.co/laion/clap-htsat-fused"),c(Wt,"rel","nofollow"),c(No,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Uo,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(qo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapConfig"),c(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ve,"id","transformers.ClapTextConfig"),c(Ve,"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"),c(Ve,"href","#transformers.ClapTextConfig"),c(me,"class","relative group"),c(Bo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModel"),c(Nt,"href","https://huggingface.co/laion/clap-hsat-fused"),c(Nt,"rel","nofollow"),c(Go,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Ro,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Se,"id","transformers.ClapAudioConfig"),c(Se,"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"),c(Se,"href","#transformers.ClapAudioConfig"),c(be,"class","relative group"),c(Vo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModel"),c(Bt,"href","https://huggingface.co/laion/clap-htsat-fused"),c(Bt,"rel","nofollow"),c(Xo,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(So,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ye,"id","transformers.ClapFeatureExtractor"),c(Ye,"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"),c(Ye,"href","#transformers.ClapFeatureExtractor"),c(Ce,"class","relative group"),c(Do,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),c(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Oe,"id","transformers.ClapProcessor"),c(Oe,"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"),c(Oe,"href","#transformers.ClapProcessor"),c(Te,"class","relative group"),c(Yo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapProcessor"),c(Qo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapFeatureExtractor"),c(Oo,"href","/docs/transformers/v4.32.0/en/model_doc/roberta#transformers.RobertaTokenizerFast"),c(Lo,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapProcessor.decode"),c(Ho,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),c(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ko,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),c(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ke,"id","transformers.ClapModel"),c(Ke,"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"),c(Ke,"href","#transformers.ClapModel"),c(Me,"class","relative group"),c(ea,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(oo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(oo,"rel","nofollow"),c(ta,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapModel"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oa,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapModel"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(aa,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapModel"),c(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"id","transformers.ClapTextModel"),c(st,"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"),c(st,"href","#transformers.ClapTextModel"),c(ke,"class","relative group"),c(co,"href","https://arxiv.org/abs/1706.03762"),c(co,"rel","nofollow"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(it,"id","transformers.ClapTextModelWithProjection"),c(it,"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"),c(it,"href","#transformers.ClapTextModelWithProjection"),c(je,"class","relative group"),c(na,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(bo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(bo,"rel","nofollow"),c(ra,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapTextModelWithProjection"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pt,"id","transformers.ClapAudioModel"),c(pt,"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"),c(pt,"href","#transformers.ClapAudioModel"),c(Ae,"class","relative group"),c(sa,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModel"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"id","transformers.ClapAudioModelWithProjection"),c(ft,"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"),c(ft,"href","#transformers.ClapAudioModelWithProjection"),c(Fe,"class","relative group"),c(la,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Eo,"rel","nofollow"),c(ia,"href","/docs/transformers/v4.32.0/en/model_doc/clap#transformers.ClapAudioModelWithProjection"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"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,v,g),_(o,m,g),e(m,f),e(f,b),w(i,b,null),e(m,u),e(m,k),e(k,Qr),_(o,Yn,g),_(o,he,g),e(he,Ue),e(Ue,wa),w(xt,wa,null),e(he,Or),e(he,Ta),e(Ta,Lr),_(o,Qn,g),_(o,qe,g),e(qe,Hr),e(qe,Et),e(Et,Kr),e(qe,es),_(o,On,g),_(o,Wo,g),e(Wo,ts),_(o,Ln,g),_(o,Fo,g),e(Fo,os),_(o,Hn,g),_(o,Po,g),e(Po,Ma),e(Ma,as),_(o,Kn,g),_(o,S,g),e(S,ns),e(S,kt),e(kt,rs),e(S,ss),e(S,jt),e(jt,ls),e(S,is),e(S,zt),e(zt,ds),e(S,cs),_(o,er,g),_(o,ue,g),e(ue,Be),e(Be,$a),w(At,$a,null),e(ue,ps),e(ue,xa),e(xa,hs),_(o,tr,g),_(o,P,g),w(Jt,P,null),e(P,us),e(P,ne),e(ne,Io),e(Io,fs),e(ne,ms),e(ne,Zo),e(Zo,gs),e(ne,_s),e(ne,Wt),e(Wt,bs),e(ne,vs),e(P,ys),e(P,fe),e(fe,Cs),e(fe,No),e(No,ws),e(fe,Ts),e(fe,Uo),e(Uo,Ms),e(fe,$s),e(P,xs),w(Ge,P,null),e(P,Es),e(P,Re),w(Ft,Re,null),e(Re,ks),e(Re,Pt),e(Pt,js),e(Pt,qo),e(qo,zs),e(Pt,As),_(o,or,g),_(o,me,g),e(me,Ve),e(Ve,Ea),w(It,Ea,null),e(me,Js),e(me,ka),e(ka,Ws),_(o,ar,g),_(o,R,g),w(Zt,R,null),e(R,Fs),e(R,ge),e(ge,Ps),e(ge,Bo),e(Bo,Is),e(ge,Zs),e(ge,Nt),e(Nt,Ns),e(ge,Us),e(R,qs),e(R,_e),e(_e,Bs),e(_e,Go),e(Go,Gs),e(_e,Rs),e(_e,Ro),e(Ro,Vs),e(_e,Xs),e(R,Ss),w(Xe,R,null),_(o,nr,g),_(o,be,g),e(be,Se),e(Se,ja),w(Ut,ja,null),e(be,Ds),e(be,za),e(za,Ys),_(o,rr,g),_(o,V,g),w(qt,V,null),e(V,Qs),e(V,ve),e(ve,Os),e(ve,Vo),e(Vo,Ls),e(ve,Hs),e(ve,Bt),e(Bt,Ks),e(ve,el),e(V,tl),e(V,ye),e(ye,ol),e(ye,Xo),e(Xo,al),e(ye,nl),e(ye,So),e(So,rl),e(ye,sl),e(V,ll),w(De,V,null),_(o,sr,g),_(o,Ce,g),e(Ce,Ye),e(Ye,Aa),w(Gt,Aa,null),e(Ce,il),e(Ce,Ja),e(Ja,dl),_(o,lr,g),_(o,I,g),w(Rt,I,null),e(I,cl),e(I,Wa),e(Wa,pl),e(I,hl),e(I,Vt),e(Vt,ul),e(Vt,Do),e(Do,fl),e(Vt,ml),e(I,gl),e(I,we),e(we,_l),e(we,Fa),e(Fa,bl),e(we,vl),e(we,Pa),e(Pa,yl),e(we,Cl),e(I,wl),e(I,Qe),w(Xt,Qe,null),e(Qe,Tl),e(Qe,Ia),e(Ia,Ml),_(o,ir,g),_(o,Te,g),e(Te,Oe),e(Oe,Za),w(St,Za,null),e(Te,$l),e(Te,Na),e(Na,xl),_(o,dr,g),_(o,Z,g),w(Dt,Z,null),e(Z,El),e(Z,Ua),e(Ua,kl),e(Z,jl),e(Z,B),e(B,Yo),e(Yo,zl),e(B,Al),e(B,Qo),e(Qo,Jl),e(B,Wl),e(B,Oo),e(Oo,Fl),e(B,Pl),e(B,qa),e(qa,Il),e(B,Zl),e(B,Lo),e(Lo,Nl),e(B,Ul),e(Z,ql),e(Z,Le),w(Yt,Le,null),e(Le,Bl),e(Le,Qt),e(Qt,Gl),e(Qt,Ho),e(Ho,Rl),e(Qt,Vl),e(Z,Xl),e(Z,He),w(Ot,He,null),e(He,Sl),e(He,Lt),e(Lt,Dl),e(Lt,Ko),e(Ko,Yl),e(Lt,Ql),_(o,cr,g),_(o,Me,g),e(Me,Ke),e(Ke,Ba),w(Ht,Ba,null),e(Me,Ol),e(Me,Ga),e(Ga,Ll),_(o,pr,g),_(o,J,g),w(Kt,J,null),e(J,Hl),e(J,eo),e(eo,Kl),e(eo,ea),e(ea,ei),e(eo,ti),e(J,oi),e(J,to),e(to,ai),e(to,oo),e(oo,ni),e(to,ri),e(J,si),e(J,D),w(ao,D,null),e(D,li),e(D,$e),e($e,ii),e($e,ta),e(ta,di),e($e,ci),e($e,Ra),e(Ra,pi),e($e,hi),e(D,ui),w(et,D,null),e(D,fi),w(tt,D,null),e(J,mi),e(J,Y),w(no,Y,null),e(Y,gi),e(Y,xe),e(xe,_i),e(xe,oa),e(oa,bi),e(xe,vi),e(xe,Va),e(Va,yi),e(xe,Ci),e(Y,wi),w(ot,Y,null),e(Y,Ti),w(at,Y,null),e(J,Mi),e(J,Q),w(ro,Q,null),e(Q,$i),e(Q,Ee),e(Ee,xi),e(Ee,aa),e(aa,Ei),e(Ee,ki),e(Ee,Xa),e(Xa,ji),e(Ee,zi),e(Q,Ai),w(nt,Q,null),e(Q,Ji),w(rt,Q,null),_(o,hr,g),_(o,ke,g),e(ke,st),e(st,Sa),w(so,Sa,null),e(ke,Wi),e(ke,Da),e(Da,Fi),_(o,ur,g),_(o,N,g),w(lo,N,null),e(N,Pi),e(N,io),e(io,Ii),e(io,Ya),e(Ya,Zi),e(io,Ni),e(N,Ui),e(N,W),e(W,qi),e(W,Qa),e(Qa,Bi),e(W,Gi),e(W,Oa),e(Oa,Ri),e(W,Vi),e(W,La),e(La,Xi),e(W,Si),e(W,Ha),e(Ha,Di),e(W,Yi),e(W,Ka),e(Ka,Qi),e(W,Oi),e(W,en),e(en,Li),e(W,Hi),e(N,Ki),e(N,lt),e(lt,ed),e(lt,tn),e(tn,td),e(lt,od),e(lt,co),e(co,ad),e(N,nd),e(N,O),w(po,O,null),e(O,rd),e(O,A),e(A,sd),e(A,on),e(on,ld),e(A,id),e(A,an),e(an,dd),e(A,cd),e(A,nn),e(nn,pd),e(A,hd),e(A,rn),e(rn,ud),e(A,fd),e(A,sn),e(sn,md),e(A,gd),e(A,ln),e(ln,_d),e(A,bd),e(A,dn),e(dn,vd),e(A,yd),e(O,Cd),e(O,ho),e(ho,uo),e(uo,wd),e(uo,cn),e(cn,Td),e(uo,Md),e(ho,$d),e(ho,X),e(X,xd),e(X,pn),e(pn,Ed),e(X,kd),e(X,hn),e(hn,jd),e(X,zd),e(X,un),e(un,Ad),e(X,Jd),e(X,fn),e(fn,Wd),e(X,Fd),e(O,Pd),e(O,E),e(E,Id),e(E,mn),e(mn,Zd),e(E,Nd),e(E,gn),e(gn,Ud),e(E,qd),e(E,_n),e(_n,Bd),e(E,Gd),e(E,bn),e(bn,Rd),e(E,Vd),e(E,vn),e(vn,Xd),e(E,Sd),e(E,yn),e(yn,Dd),e(E,Yd),e(E,Cn),e(Cn,Qd),e(E,Od),e(E,wn),e(wn,Ld),e(E,Hd),e(E,Tn),e(Tn,Kd),e(E,ec),e(E,Mn),e(Mn,tc),e(E,oc),_(o,fr,g),_(o,je,g),e(je,it),e(it,$n),w(fo,$n,null),e(je,ac),e(je,xn),e(xn,nc),_(o,mr,g),_(o,U,g),w(mo,U,null),e(U,rc),e(U,En),e(En,sc),e(U,lc),e(U,go),e(go,ic),e(go,na),e(na,dc),e(go,cc),e(U,pc),e(U,_o),e(_o,hc),e(_o,bo),e(bo,uc),e(_o,fc),e(U,mc),e(U,L),w(vo,L,null),e(L,gc),e(L,ze),e(ze,_c),e(ze,ra),e(ra,bc),e(ze,vc),e(ze,kn),e(kn,yc),e(ze,Cc),e(L,wc),w(dt,L,null),e(L,Tc),w(ct,L,null),_(o,gr,g),_(o,Ae,g),e(Ae,pt),e(pt,jn),w(yo,jn,null),e(Ae,Mc),e(Ae,zn),e(zn,$c),_(o,_r,g),_(o,Je,g),w(Co,Je,null),e(Je,xc),e(Je,H),w(wo,H,null),e(H,Ec),e(H,We),e(We,kc),e(We,sa),e(sa,jc),e(We,zc),e(We,An),e(An,Ac),e(We,Jc),e(H,Wc),w(ht,H,null),e(H,Fc),w(ut,H,null),_(o,br,g),_(o,Fe,g),e(Fe,ft),e(ft,Jn),w(To,Jn,null),e(Fe,Pc),e(Fe,Wn),e(Wn,Ic),_(o,vr,g),_(o,q,g),w(Mo,q,null),e(q,Zc),e(q,Fn),e(Fn,Nc),e(q,Uc),e(q,$o),e($o,qc),e($o,la),e(la,Bc),e($o,Gc),e(q,Rc),e(q,xo),e(xo,Vc),e(xo,Eo),e(Eo,Xc),e(xo,Sc),e(q,Dc),e(q,K),w(ko,K,null),e(K,Yc),e(K,Pe),e(Pe,Qc),e(Pe,ia),e(ia,Oc),e(Pe,Lc),e(Pe,Pn),e(Pn,Hc),e(Pe,Kc),e(K,ep),w(mt,K,null),e(K,tp),w(gt,K,null),yr=!0},p(o,[g]){const jo={};g&2&&(jo.$$scope={dirty:g,ctx:o}),Ge.$set(jo);const In={};g&2&&(In.$$scope={dirty:g,ctx:o}),Xe.$set(In);const Zn={};g&2&&(Zn.$$scope={dirty:g,ctx:o}),De.$set(Zn);const Nn={};g&2&&(Nn.$$scope={dirty:g,ctx:o}),et.$set(Nn);const zo={};g&2&&(zo.$$scope={dirty:g,ctx:o}),tt.$set(zo);const Un={};g&2&&(Un.$$scope={dirty:g,ctx:o}),ot.$set(Un);const qn={};g&2&&(qn.$$scope={dirty:g,ctx:o}),at.$set(qn);const Bn={};g&2&&(Bn.$$scope={dirty:g,ctx:o}),nt.$set(Bn);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),rt.$set(Ao);const Gn={};g&2&&(Gn.$$scope={dirty:g,ctx:o}),dt.$set(Gn);const Rn={};g&2&&(Rn.$$scope={dirty:g,ctx:o}),ct.$set(Rn);const Vn={};g&2&&(Vn.$$scope={dirty:g,ctx:o}),ht.$set(Vn);const Xn={};g&2&&(Xn.$$scope={dirty:g,ctx:o}),ut.$set(Xn);const Sn={};g&2&&(Sn.$$scope={dirty:g,ctx:o}),mt.$set(Sn);const oe={};g&2&&(oe.$$scope={dirty:g,ctx:o}),gt.$set(oe)},i(o){yr||(T(i.$$.fragment,o),T(xt.$$.fragment,o),T(At.$$.fragment,o),T(Jt.$$.fragment,o),T(Ge.$$.fragment,o),T(Ft.$$.fragment,o),T(It.$$.fragment,o),T(Zt.$$.fragment,o),T(Xe.$$.fragment,o),T(Ut.$$.fragment,o),T(qt.$$.fragment,o),T(De.$$.fragment,o),T(Gt.$$.fragment,o),T(Rt.$$.fragment,o),T(Xt.$$.fragment,o),T(St.$$.fragment,o),T(Dt.$$.fragment,o),T(Yt.$$.fragment,o),T(Ot.$$.fragment,o),T(Ht.$$.fragment,o),T(Kt.$$.fragment,o),T(ao.$$.fragment,o),T(et.$$.fragment,o),T(tt.$$.fragment,o),T(no.$$.fragment,o),T(ot.$$.fragment,o),T(at.$$.fragment,o),T(ro.$$.fragment,o),T(nt.$$.fragment,o),T(rt.$$.fragment,o),T(so.$$.fragment,o),T(lo.$$.fragment,o),T(po.$$.fragment,o),T(fo.$$.fragment,o),T(mo.$$.fragment,o),T(vo.$$.fragment,o),T(dt.$$.fragment,o),T(ct.$$.fragment,o),T(yo.$$.fragment,o),T(Co.$$.fragment,o),T(wo.$$.fragment,o),T(ht.$$.fragment,o),T(ut.$$.fragment,o),T(To.$$.fragment,o),T(Mo.$$.fragment,o),T(ko.$$.fragment,o),T(mt.$$.fragment,o),T(gt.$$.fragment,o),yr=!0)},o(o){M(i.$$.fragment,o),M(xt.$$.fragment,o),M(At.$$.fragment,o),M(Jt.$$.fragment,o),M(Ge.$$.fragment,o),M(Ft.$$.fragment,o),M(It.$$.fragment,o),M(Zt.$$.fragment,o),M(Xe.$$.fragment,o),M(Ut.$$.fragment,o),M(qt.$$.fragment,o),M(De.$$.fragment,o),M(Gt.$$.fragment,o),M(Rt.$$.fragment,o),M(Xt.$$.fragment,o),M(St.$$.fragment,o),M(Dt.$$.fragment,o),M(Yt.$$.fragment,o),M(Ot.$$.fragment,o),M(Ht.$$.fragment,o),M(Kt.$$.fragment,o),M(ao.$$.fragment,o),M(et.$$.fragment,o),M(tt.$$.fragment,o),M(no.$$.fragment,o),M(ot.$$.fragment,o),M(at.$$.fragment,o),M(ro.$$.fragment,o),M(nt.$$.fragment,o),M(rt.$$.fragment,o),M(so.$$.fragment,o),M(lo.$$.fragment,o),M(po.$$.fragment,o),M(fo.$$.fragment,o),M(mo.$$.fragment,o),M(vo.$$.fragment,o),M(dt.$$.fragment,o),M(ct.$$.fragment,o),M(yo.$$.fragment,o),M(Co.$$.fragment,o),M(wo.$$.fragment,o),M(ht.$$.fragment,o),M(ut.$$.fragment,o),M(To.$$.fragment,o),M(Mo.$$.fragment,o),M(ko.$$.fragment,o),M(mt.$$.fragment,o),M(gt.$$.fragment,o),yr=!1},d(o){t(d),o&&t(v),o&&t(m),$(i),o&&t(Yn),o&&t(he),$(xt),o&&t(Qn),o&&t(qe),o&&t(On),o&&t(Wo),o&&t(Ln),o&&t(Fo),o&&t(Hn),o&&t(Po),o&&t(Kn),o&&t(S),o&&t(er),o&&t(ue),$(At),o&&t(tr),o&&t(P),$(Jt),$(Ge),$(Ft),o&&t(or),o&&t(me),$(It),o&&t(ar),o&&t(R),$(Zt),$(Xe),o&&t(nr),o&&t(be),$(Ut),o&&t(rr),o&&t(V),$(qt),$(De),o&&t(sr),o&&t(Ce),$(Gt),o&&t(lr),o&&t(I),$(Rt),$(Xt),o&&t(ir),o&&t(Te),$(St),o&&t(dr),o&&t(Z),$(Dt),$(Yt),$(Ot),o&&t(cr),o&&t(Me),$(Ht),o&&t(pr),o&&t(J),$(Kt),$(ao),$(et),$(tt),$(no),$(ot),$(at),$(ro),$(nt),$(rt),o&&t(hr),o&&t(ke),$(so),o&&t(ur),o&&t(N),$(lo),$(po),o&&t(fr),o&&t(je),$(fo),o&&t(mr),o&&t(U),$(mo),$(vo),$(dt),$(ct),o&&t(gr),o&&t(Ae),$(yo),o&&t(_r),o&&t(Je),$(Co),$(wo),$(ht),$(ut),o&&t(br),o&&t(Fe),$(To),o&&t(vr),o&&t(q),$(Mo),$(ko),$(mt),$(gt)}}}const xu={local:"clap",sections:[{local:"overview",title:"Overview"},{local:"transformers.ClapConfig",title:"ClapConfig"},{local:"transformers.ClapTextConfig",title:"ClapTextConfig"},{local:"transformers.ClapAudioConfig",title:"ClapAudioConfig"},{local:"transformers.ClapFeatureExtractor",title:"ClapFeatureExtractor"},{local:"transformers.ClapProcessor",title:"ClapProcessor"},{local:"transformers.ClapModel",title:"ClapModel"},{local:"transformers.ClapTextModel",title:"ClapTextModel"},{local:"transformers.ClapTextModelWithProjection",title:"ClapTextModelWithProjection"},{local:"transformers.ClapAudioModel",title:"ClapAudioModel"},{local:"transformers.ClapAudioModelWithProjection",title:"ClapAudioModelWithProjection"}],title:"CLAP"};function Eu(x){return du(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fu extends ru{constructor(d){super();su(this,d,Eu,$u,lu,{})}}export{Fu as default,xu as metadata};
