import{s as Ta,o as ya,n as I}from"../chunks/scheduler.9bc65507.js";import{S as va,i as $a,g as c,s as a,r as u,A as wa,h as p,f as s,c as r,j as $,u as f,x as C,k as w,y as n,a as m,v as h,d as g,t as _,w as b}from"../chunks/index.707bf1b6.js";import{T as St}from"../chunks/Tip.c2ecdbf4.js";import{D as x}from"../chunks/Docstring.17db21ae.js";import{C as se}from"../chunks/CodeBlock.54a9f38d.js";import{E as re}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as Y}from"../chunks/Heading.342b1fa6.js";function xa(v){let o,T="Example:",d,i,M;return i=new se({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)`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-11lpom8"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function ja(v){let o,T="Examples:",d,i,M;return i=new se({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`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function ka(v){let o,T="Example:",d,i,M;return i=new se({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`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-11lpom8"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Wa(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function za(v){let o,T="Examples:",d,i,M;return i=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBDbGFwTW9kZWwlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZhc2hyYXEtZXNjNTAtMS1kb2ctZXhhbXBsZSUyMiklMEFhdWRpb19zYW1wbGUlMjAlM0QlMjBkYXRhc2V0JTVCJTIydHJhaW4lMjIlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QjAlNUQlNUIlMjJhcnJheSUyMiU1RCUwQSUwQW1vZGVsJTIwJTNEJTIwQ2xhcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtdW5mdXNlZCUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtdW5mdXNlZCUyMiklMEElMEFpbnB1dF90ZXh0JTIwJTNEJTIwJTVCJTIyU291bmQlMjBvZiUyMGElMjBkb2clMjIlMkMlMjAlMjJTb3VuZCUyMG9mJTIwdmFjY3VtJTIwY2xlYW5lciUyMiU1RCUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEaW5wdXRfdGV4dCUyQyUyMGF1ZGlvcyUzRGF1ZGlvX3NhbXBsZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzX3Blcl9hdWRpbyUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9hdWRpbyUyMCUyMCUyMyUyMHRoaXMlMjBpcyUyMHRoZSUyMGF1ZGlvLXRleHQlMjBzaW1pbGFyaXR5JTIwc2NvcmUlMEFwcm9icyUyMCUzRCUyMGxvZ2l0c19wZXJfYXVkaW8uc29mdG1heChkaW0lM0QtMSklMjAlMjAlMjMlMjB3ZSUyMGNhbiUyMHRha2UlMjB0aGUlMjBzb2Z0bWF4JTIwdG8lMjBnZXQlMjB0aGUlMjBsYWJlbCUyMHByb2JhYmlsaXRpZXM=",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;hf-internal-testing/ashraq-esc50-1-dog-example&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>`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Ja(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function Fa(v){let o,T="Examples:",d,i,M;return i=new se({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)`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Za(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function Ua(v){let o,T="Examples:",d,i,M;return i=new se({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)`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Ia(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function Ea(v){let o,T="Examples:",d,i,M;return i=new se({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`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function qa(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function Ba(v){let o,T="Examples:",d,i,M;return i=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBDbGFwQXVkaW9Nb2RlbCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmFzaHJhcS1lc2M1MC0xLWRvZy1leGFtcGxlJTIyKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0cmFpbiUyMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCMCU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBbW9kZWwlMjAlM0QlMjBDbGFwQXVkaW9Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmxhaW9uJTJGY2xhcC1odHNhdC1mdXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXVkaW9zJTNEYXVkaW9fc2FtcGxlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",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;hf-internal-testing/ashraq-esc50-1-dog-example&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`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Ga(v){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),C(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(d,i){m(d,o,i)},p:I,d(d){d&&s(o)}}}function Aa(v){let o,T="Examples:",d,i,M;return i=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBBdWRpb01vZGVsV2l0aFByb2plY3Rpb24lMkMlMjBDbGFwUHJvY2Vzc29yJTBBJTBBbW9kZWwlMjAlM0QlMjBDbGFwQXVkaW9Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ2xhcFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmFzaHJhcS1lc2M1MC0xLWRvZy1leGFtcGxlJTIyKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0cmFpbiUyMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCMCU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGF1ZGlvcyUzRGF1ZGlvX3NhbXBsZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWF1ZGlvX2VtYmVkcyUyMCUzRCUyMG91dHB1dHMuYXVkaW9fZW1iZWRz",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;hf-internal-testing/ashraq-esc50-1-dog-example&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`,wrap:!1}}),{c(){o=c("p"),o.textContent=T,d=a(),u(i.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),C(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=r(t),f(i.$$.fragment,t)},m(t,y){m(t,o,y),m(t,d,y),h(i,t,y),M=!0},p:I,i(t){M||(g(i.$$.fragment,t),M=!0)},o(t){_(i.$$.fragment,t),M=!1},d(t){t&&(s(o),s(d)),b(i,t)}}}function Pa(v){let o,T,d,i,M,t,y,Ot,We,In=`CLAP モデルは、<a href="https://arxiv.org/pdf/2211.06687.pdf" rel="nofollow">Large Scale Contrastive Language-Audio pretraining with
feature fusion and keyword-to-caption augmentation</a>、Yusong Wu、Ke Chen、Tianyu Zhang、Yuchen Hui、Taylor Berg-Kirkpatrick、Shlomo Dubnov 著。`,Kt,ze,En="CLAP (Contrastive Language-Audio Pretraining) は、さまざまな (音声、テキスト) ペアでトレーニングされたニューラル ネットワークです。タスクに合わせて直接最適化することなく、音声が与えられた場合に最も関連性の高いテキスト スニペットを予測するように指示できます。 CLAP モデルは、SWINTransformer を使用して log-Mel スペクトログラム入力からオーディオ特徴を取得し、RoBERTa モデルを使用してテキスト特徴を取得します。次に、テキストとオーディオの両方の特徴が、同じ次元の潜在空間に投影されます。投影されたオーディオとテキストの特徴の間のドット積が、同様のスコアとして使用されます。",eo,Je,qn="論文の要約は次のとおりです。",to,Fe,Bn="<em>対照学習は、マルチモーダル表現学習の分野で目覚ましい成功を収めています。この論文では、音声データと自然言語記述を組み合わせて音声表現を開発する、対照的な言語音声事前トレーニングのパイプラインを提案します。この目標を達成するために、私たちはまず、さまざまなデータ ソースからの 633,526 個の音声とテキストのペアの大規模なコレクションである LAION-Audio-630K をリリースします。次に、さまざまなオーディオ エンコーダとテキスト エンコーダを考慮して、対照的な言語とオーディオの事前トレーニング モデルを構築します。機能融合メカニズムとキーワードからキャプションへの拡張をモデル設計に組み込んで、モデルが可変長の音声入力を処理できるようにし、パフォーマンスを向上させます。 3 番目に、包括的な実験を実行して、テキストから音声への取得、ゼロショット音声分類、教師付き音声分類の 3 つのタスクにわたってモデルを評価します。結果は、私たちのモデルがテキストから音声への検索タスクにおいて優れたパフォーマンスを達成していることを示しています。オーディオ分類タスクでは、モデルはゼロショット設定で最先端のパフォーマンスを達成し、非ゼロショット設定でもモデルの結果に匹敵するパフォーマンスを得ることができます。 LAION-オーディオ-6</em>",oo,Ze,Gn=`このモデルは、<a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a> および <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a> によって提供されました。
元のコードは <a href="https://github.com/LAION-AI/Clap" rel="nofollow">こちら</a> にあります。`,no,Ue,ao,k,Ie,jo,ht,An=`<a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapConfig">ClapConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapModel">ClapModel</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
<a href="https://huggingface.co/laion/clap-htsat-fused" rel="nofollow">laion/clap-htsat-fused</a> architecture.`,ko,gt,Pn=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Wo,le,zo,ie,Ee,Jo,_t,Rn=`Instantiate a <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapConfig">ClapConfig</a> (or a derived class) from clap text model configuration and clap audio model
configuration.`,ro,qe,so,E,Be,Fo,bt,Xn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapTextModel">ClapTextModel</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
<a href="https://huggingface.co/laion/clap-hsat-fused" rel="nofollow">calp-hsat-fused</a> architecture.`,Zo,Ct,Nn=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Uo,de,lo,Ge,io,q,Ae,Io,Mt,Hn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapAudioModel">ClapAudioModel</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
<a href="https://huggingface.co/laion/clap-htsat-fused" rel="nofollow">laion/clap-htsat-fused</a> architecture.`,Eo,Tt,Ln=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,qo,ce,co,Pe,po,W,Re,Bo,yt,Vn="Constructs a CLAP feature extractor.",Go,vt,Qn=`This feature extractor inherits from <a href="/docs/transformers/main/ja/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`,Ao,$t,Yn=`This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the <em>Short Time
Fourier Transform</em> (STFT) which should match pytorch’s <code>torch.stft</code> equivalent.`,Po,pe,Xe,Ro,wt,Sn="Serializes this instance to a Python dictionary.",mo,Ne,uo,z,He,Xo,xt,Dn="Constructs a CLAP processor which wraps a CLAP feature extractor and a RoBerta tokenizer into a single processor.",No,jt,On=`<a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapProcessor">ClapProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> and <code>RobertaTokenizerFast</code>. See the
<code>__call__()</code> and <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapProcessor.decode">decode()</a> for more information.`,Ho,me,Le,Lo,kt,Kn=`This method forwards all its arguments to RobertaTokenizerFast’s <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Vo,ue,Ve,Qo,Wt,ea=`This method forwards all its arguments to RobertaTokenizerFast’s <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer
to the docstring of this method for more information.`,fo,Qe,ho,j,Ye,Yo,zt,ta=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,So,Jt,oa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Do,R,Se,Oo,Ft,na='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',Ko,fe,en,he,tn,X,De,on,Zt,aa='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',nn,ge,an,_e,rn,N,Oe,sn,Ut,ra='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',ln,be,dn,Ce,go,Ke,_o,J,et,cn,It,sa=`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 <em>Attention is
all you need</em>_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`,pn,Et,la=`To behave as an decoder the model needs to be initialized with the <code>is_decoder</code> argument of the configuration set
to <code>True</code>. To be used in a Seq2Seq model, the model needs to initialized with both <code>is_decoder</code> argument and
<code>add_cross_attention</code> set to <code>True</code>; an <code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,mn,qt,ia='.. _<em>Attention is all you need</em>: <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">https://arxiv.org/abs/1706.03762</a>',un,H,tt,fn,Bt,da=`encoder_hidden_states  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>):
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 (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,hn,Gt,ca=`<li>1 for tokens that are <strong>not masked</strong>,</li> <li>0 for tokens that are <strong>masked</strong>.
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</li>`,gn,At,pa=`If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don’t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.
use_cache (<code>bool</code>, <em>optional</em>):
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,bo,ot,Co,F,nt,_n,Pt,ma="CLAP Text Model with a projection layer on top (a linear layer on top of the pooled output).",bn,Rt,ua=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,Cn,Xt,fa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Mn,L,at,Tn,Nt,ha='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapTextModelWithProjection">ClapTextModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',yn,Me,vn,Te,Mo,rt,To,ae,st,$n,V,lt,wn,Ht,ga='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapAudioModel">ClapAudioModel</a> forward method, overrides the <code>__call__</code> special method.',xn,ye,jn,ve,yo,it,vo,Z,dt,kn,Lt,_a="CLAP Audio Model with a projection layer on top (a linear layer on top of the pooled output).",Wn,Vt,ba=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,zn,Qt,Ca=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Jn,Q,ct,Fn,Yt,Ma='The <a href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapAudioModelWithProjection">ClapAudioModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',Zn,$e,Un,we,$o,Dt,wo;return M=new Y({props:{title:"CLAP",local:"clap",headingTag:"h1"}}),y=new Y({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ue=new Y({props:{title:"ClapConfig",local:"transformers.ClapConfig",headingTag:"h2"}}),Ie=new x({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/main/ja/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/main/ja/model_doc/clap#transformers.ClapAudioConfig">ClapAudioConfig</a>.`,name:"audio_config"},{anchor:"transformers.ClapConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 14.29) &#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_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.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/main/src/transformers/models/clap/configuration_clap.py#L329"}}),le=new re({props:{anchor:"transformers.ClapConfig.example",$$slots:{default:[xa]},$$scope:{ctx:v}}}),Ee=new x({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/main/src/transformers/models/clap/configuration_clap.py#L417",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>An instance of a configuration object</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapConfig"
>ClapConfig</a></p>
`}}),qe=new Y({props:{title:"ClapTextConfig",local:"transformers.ClapTextConfig",headingTag:"h2"}}),Be=new x({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/main/ja/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/main/ja/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/main/src/transformers/models/clap/configuration_clap.py#L27"}}),de=new re({props:{anchor:"transformers.ClapTextConfig.example",$$slots:{default:[ja]},$$scope:{ctx:v}}}),Ge=new Y({props:{title:"ClapAudioConfig",local:"transformers.ClapAudioConfig",headingTag:"h2"}}),Ae=new x({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 probability 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 1e-05) &#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/main/src/transformers/models/clap/configuration_clap.py#L159"}}),ce=new re({props:{anchor:"transformers.ClapAudioConfig.example",$$slots:{default:[ka]},$$scope:{ctx:v}}}),Pe=new Y({props:{title:"ClapFeatureExtractor",local:"transformers.ClapFeatureExtractor",headingTag:"h2"}}),Re=new x({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>, <em>optional</em>, 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>, <em>optional</em>, defaults to 48000) &#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>,<em>optional</em>, 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>, <em>optional</em>, defaults to 10) &#x2014;
The maximum input length 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>, <em>optional</em>, 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>, defaults 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>, defaults to 14000) &#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>, defaults to <code>&quot;fusion&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/main/src/transformers/models/clap/feature_extraction_clap.py#L33"}}),Xe=new x({props:{name:"to_dict",anchor:"transformers.ClapFeatureExtractor.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/feature_extraction_clap.py#L138",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),Ne=new Y({props:{title:"ClapProcessor",local:"transformers.ClapProcessor",headingTag:"h2"}}),He=new x({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/main/ja/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> (<code>RobertaTokenizerFast</code>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L23"}}),Le=new x({props:{name:"batch_decode",anchor:"transformers.ClapProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L99"}}),Ve=new x({props:{name:"decode",anchor:"transformers.ClapProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L106"}}),Qe=new Y({props:{title:"ClapModel",local:"transformers.ClapModel",headingTag:"h2"}}),Ye=new x({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/main/ja/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/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1917"}}),Se=new x({props:{name:"forward",anchor:"transformers.ClapModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"input_features",val:": Optional = None"},{name:"is_longer",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"return_loss",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/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/main/ja/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2047",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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>) — 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>) — 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>) — 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>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ja/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>) — The audio embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ja/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/main/ja/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/main/ja/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new St({props:{$$slots:{default:[Wa]},$$scope:{ctx:v}}}),he=new re({props:{anchor:"transformers.ClapModel.forward.example",$$slots:{default:[za]},$$scope:{ctx:v}}}),De=new x({props:{name:"get_text_features",anchor:"transformers.ClapModel.get_text_features",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1953",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ge=new St({props:{$$slots:{default:[Ja]},$$scope:{ctx:v}}}),_e=new re({props:{anchor:"transformers.ClapModel.get_text_features.example",$$slots:{default:[Fa]},$$scope:{ctx:v}}}),Oe=new x({props:{name:"get_audio_features",anchor:"transformers.ClapModel.get_audio_features",parameters:[{name:"input_features",val:": Optional = None"},{name:"is_longer",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2001",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The audio embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ja/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>audio_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),be=new St({props:{$$slots:{default:[Za]},$$scope:{ctx:v}}}),Ce=new re({props:{anchor:"transformers.ClapModel.get_audio_features.example",$$slots:{default:[Ua]},$$scope:{ctx:v}}}),Ke=new Y({props:{title:"ClapTextModel",local:"transformers.ClapTextModel",headingTag:"h2"}}),et=new x({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/main/src/transformers/models/clap/modeling_clap.py#L1748"}}),tt=new x({props:{name:"forward",anchor:"transformers.ClapTextModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1786"}}),ot=new Y({props:{title:"ClapTextModelWithProjection",local:"transformers.ClapTextModelWithProjection",headingTag:"h2"}}),nt=new x({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/main/ja/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/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2145"}}),at=new x({props:{name:"forward",anchor:"transformers.ClapTextModelWithProjection.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2167",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Me=new St({props:{$$slots:{default:[Ia]},$$scope:{ctx:v}}}),Te=new re({props:{anchor:"transformers.ClapTextModelWithProjection.forward.example",$$slots:{default:[Ea]},$$scope:{ctx:v}}}),rt=new Y({props:{title:"ClapAudioModel",local:"transformers.ClapAudioModel",headingTag:"h2"}}),st=new x({props:{name:"class transformers.ClapAudioModel",anchor:"transformers.ClapAudioModel",parameters:[{name:"config",val:": ClapAudioConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1690"}}),lt=new x({props:{name:"forward",anchor:"transformers.ClapAudioModel.forward",parameters:[{name:"input_features",val:": Optional = None"},{name:"is_longer",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1703",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new St({props:{$$slots:{default:[qa]},$$scope:{ctx:v}}}),ve=new re({props:{anchor:"transformers.ClapAudioModel.forward.example",$$slots:{default:[Ba]},$$scope:{ctx:v}}}),it=new Y({props:{title:"ClapAudioModelWithProjection",local:"transformers.ClapAudioModelWithProjection",headingTag:"h2"}}),dt=new x({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/main/ja/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/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2221"}}),ct=new x({props:{name:"forward",anchor:"transformers.ClapAudioModelWithProjection.forward",parameters:[{name:"input_features",val:": Optional = None"},{name:"is_longer",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/ja/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/ja/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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L2241",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapAudioModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new St({props:{$$slots:{default:[Ga]},$$scope:{ctx:v}}}),we=new re({props:{anchor:"transformers.ClapAudioModelWithProjection.forward.example",$$slots:{default:[Aa]},$$scope:{ctx:v}}}),{c(){o=c("meta"),T=a(),d=c("p"),i=a(),u(M.$$.fragment),t=a(),u(y.$$.fragment),Ot=a(),We=c("p"),We.innerHTML=In,Kt=a(),ze=c("p"),ze.textContent=En,eo=a(),Je=c("p"),Je.textContent=qn,to=a(),Fe=c("p"),Fe.innerHTML=Bn,oo=a(),Ze=c("p"),Ze.innerHTML=Gn,no=a(),u(Ue.$$.fragment),ao=a(),k=c("div"),u(Ie.$$.fragment),jo=a(),ht=c("p"),ht.innerHTML=An,ko=a(),gt=c("p"),gt.innerHTML=Pn,Wo=a(),u(le.$$.fragment),zo=a(),ie=c("div"),u(Ee.$$.fragment),Jo=a(),_t=c("p"),_t.innerHTML=Rn,ro=a(),u(qe.$$.fragment),so=a(),E=c("div"),u(Be.$$.fragment),Fo=a(),bt=c("p"),bt.innerHTML=Xn,Zo=a(),Ct=c("p"),Ct.innerHTML=Nn,Uo=a(),u(de.$$.fragment),lo=a(),u(Ge.$$.fragment),io=a(),q=c("div"),u(Ae.$$.fragment),Io=a(),Mt=c("p"),Mt.innerHTML=Hn,Eo=a(),Tt=c("p"),Tt.innerHTML=Ln,qo=a(),u(ce.$$.fragment),co=a(),u(Pe.$$.fragment),po=a(),W=c("div"),u(Re.$$.fragment),Bo=a(),yt=c("p"),yt.textContent=Vn,Go=a(),vt=c("p"),vt.innerHTML=Qn,Ao=a(),$t=c("p"),$t.innerHTML=Yn,Po=a(),pe=c("div"),u(Xe.$$.fragment),Ro=a(),wt=c("p"),wt.textContent=Sn,mo=a(),u(Ne.$$.fragment),uo=a(),z=c("div"),u(He.$$.fragment),Xo=a(),xt=c("p"),xt.textContent=Dn,No=a(),jt=c("p"),jt.innerHTML=On,Ho=a(),me=c("div"),u(Le.$$.fragment),Lo=a(),kt=c("p"),kt.innerHTML=Kn,Vo=a(),ue=c("div"),u(Ve.$$.fragment),Qo=a(),Wt=c("p"),Wt.innerHTML=ea,fo=a(),u(Qe.$$.fragment),ho=a(),j=c("div"),u(Ye.$$.fragment),Yo=a(),zt=c("p"),zt.innerHTML=ta,So=a(),Jt=c("p"),Jt.innerHTML=oa,Do=a(),R=c("div"),u(Se.$$.fragment),Oo=a(),Ft=c("p"),Ft.innerHTML=na,Ko=a(),u(fe.$$.fragment),en=a(),u(he.$$.fragment),tn=a(),X=c("div"),u(De.$$.fragment),on=a(),Zt=c("p"),Zt.innerHTML=aa,nn=a(),u(ge.$$.fragment),an=a(),u(_e.$$.fragment),rn=a(),N=c("div"),u(Oe.$$.fragment),sn=a(),Ut=c("p"),Ut.innerHTML=ra,ln=a(),u(be.$$.fragment),dn=a(),u(Ce.$$.fragment),go=a(),u(Ke.$$.fragment),_o=a(),J=c("div"),u(et.$$.fragment),cn=a(),It=c("p"),It.innerHTML=sa,pn=a(),Et=c("p"),Et.innerHTML=la,mn=a(),qt=c("p"),qt.innerHTML=ia,un=a(),H=c("div"),u(tt.$$.fragment),fn=a(),Bt=c("p"),Bt.innerHTML=da,hn=a(),Gt=c("ul"),Gt.innerHTML=ca,gn=a(),At=c("p"),At.innerHTML=pa,bo=a(),u(ot.$$.fragment),Co=a(),F=c("div"),u(nt.$$.fragment),_n=a(),Pt=c("p"),Pt.textContent=ma,bn=a(),Rt=c("p"),Rt.innerHTML=ua,Cn=a(),Xt=c("p"),Xt.innerHTML=fa,Mn=a(),L=c("div"),u(at.$$.fragment),Tn=a(),Nt=c("p"),Nt.innerHTML=ha,yn=a(),u(Me.$$.fragment),vn=a(),u(Te.$$.fragment),Mo=a(),u(rt.$$.fragment),To=a(),ae=c("div"),u(st.$$.fragment),$n=a(),V=c("div"),u(lt.$$.fragment),wn=a(),Ht=c("p"),Ht.innerHTML=ga,xn=a(),u(ye.$$.fragment),jn=a(),u(ve.$$.fragment),yo=a(),u(it.$$.fragment),vo=a(),Z=c("div"),u(dt.$$.fragment),kn=a(),Lt=c("p"),Lt.textContent=_a,Wn=a(),Vt=c("p"),Vt.innerHTML=ba,zn=a(),Qt=c("p"),Qt.innerHTML=Ca,Jn=a(),Q=c("div"),u(ct.$$.fragment),Fn=a(),Yt=c("p"),Yt.innerHTML=Ma,Zn=a(),u($e.$$.fragment),Un=a(),u(we.$$.fragment),$o=a(),Dt=c("p"),this.h()},l(e){const l=wa("svelte-u9bgzb",document.head);o=p(l,"META",{name:!0,content:!0}),l.forEach(s),T=r(e),d=p(e,"P",{}),$(d).forEach(s),i=r(e),f(M.$$.fragment,e),t=r(e),f(y.$$.fragment,e),Ot=r(e),We=p(e,"P",{"data-svelte-h":!0}),C(We)!=="svelte-1c9a0du"&&(We.innerHTML=In),Kt=r(e),ze=p(e,"P",{"data-svelte-h":!0}),C(ze)!=="svelte-1t5202e"&&(ze.textContent=En),eo=r(e),Je=p(e,"P",{"data-svelte-h":!0}),C(Je)!=="svelte-1cv3nri"&&(Je.textContent=qn),to=r(e),Fe=p(e,"P",{"data-svelte-h":!0}),C(Fe)!=="svelte-1swpcls"&&(Fe.innerHTML=Bn),oo=r(e),Ze=p(e,"P",{"data-svelte-h":!0}),C(Ze)!=="svelte-12mu65"&&(Ze.innerHTML=Gn),no=r(e),f(Ue.$$.fragment,e),ao=r(e),k=p(e,"DIV",{class:!0});var B=$(k);f(Ie.$$.fragment,B),jo=r(B),ht=p(B,"P",{"data-svelte-h":!0}),C(ht)!=="svelte-d6oi6p"&&(ht.innerHTML=An),ko=r(B),gt=p(B,"P",{"data-svelte-h":!0}),C(gt)!=="svelte-1s6wgpv"&&(gt.innerHTML=Pn),Wo=r(B),f(le.$$.fragment,B),zo=r(B),ie=p(B,"DIV",{class:!0});var pt=$(ie);f(Ee.$$.fragment,pt),Jo=r(pt),_t=p(pt,"P",{"data-svelte-h":!0}),C(_t)!=="svelte-1tiyuv4"&&(_t.innerHTML=Rn),pt.forEach(s),B.forEach(s),ro=r(e),f(qe.$$.fragment,e),so=r(e),E=p(e,"DIV",{class:!0});var S=$(E);f(Be.$$.fragment,S),Fo=r(S),bt=p(S,"P",{"data-svelte-h":!0}),C(bt)!=="svelte-p70aw9"&&(bt.innerHTML=Xn),Zo=r(S),Ct=p(S,"P",{"data-svelte-h":!0}),C(Ct)!=="svelte-1s6wgpv"&&(Ct.innerHTML=Nn),Uo=r(S),f(de.$$.fragment,S),S.forEach(s),lo=r(e),f(Ge.$$.fragment,e),io=r(e),q=p(e,"DIV",{class:!0});var D=$(q);f(Ae.$$.fragment,D),Io=r(D),Mt=p(D,"P",{"data-svelte-h":!0}),C(Mt)!=="svelte-1cv55vs"&&(Mt.innerHTML=Hn),Eo=r(D),Tt=p(D,"P",{"data-svelte-h":!0}),C(Tt)!=="svelte-1s6wgpv"&&(Tt.innerHTML=Ln),qo=r(D),f(ce.$$.fragment,D),D.forEach(s),co=r(e),f(Pe.$$.fragment,e),po=r(e),W=p(e,"DIV",{class:!0});var G=$(W);f(Re.$$.fragment,G),Bo=r(G),yt=p(G,"P",{"data-svelte-h":!0}),C(yt)!=="svelte-2rs2ud"&&(yt.textContent=Vn),Go=r(G),vt=p(G,"P",{"data-svelte-h":!0}),C(vt)!=="svelte-fxahc3"&&(vt.innerHTML=Qn),Ao=r(G),$t=p(G,"P",{"data-svelte-h":!0}),C($t)!=="svelte-5gq0sj"&&($t.innerHTML=Yn),Po=r(G),pe=p(G,"DIV",{class:!0});var mt=$(pe);f(Xe.$$.fragment,mt),Ro=r(mt),wt=p(mt,"P",{"data-svelte-h":!0}),C(wt)!=="svelte-1ww3wqq"&&(wt.textContent=Sn),mt.forEach(s),G.forEach(s),mo=r(e),f(Ne.$$.fragment,e),uo=r(e),z=p(e,"DIV",{class:!0});var A=$(z);f(He.$$.fragment,A),Xo=r(A),xt=p(A,"P",{"data-svelte-h":!0}),C(xt)!=="svelte-l868x"&&(xt.textContent=Dn),No=r(A),jt=p(A,"P",{"data-svelte-h":!0}),C(jt)!=="svelte-36c5o4"&&(jt.innerHTML=On),Ho=r(A),me=p(A,"DIV",{class:!0});var ut=$(me);f(Le.$$.fragment,ut),Lo=r(ut),kt=p(ut,"P",{"data-svelte-h":!0}),C(kt)!=="svelte-1btfeu"&&(kt.innerHTML=Kn),ut.forEach(s),Vo=r(A),ue=p(A,"DIV",{class:!0});var ft=$(ue);f(Ve.$$.fragment,ft),Qo=r(ft),Wt=p(ft,"P",{"data-svelte-h":!0}),C(Wt)!=="svelte-2mog3g"&&(Wt.innerHTML=ea),ft.forEach(s),A.forEach(s),fo=r(e),f(Qe.$$.fragment,e),ho=r(e),j=p(e,"DIV",{class:!0});var U=$(j);f(Ye.$$.fragment,U),Yo=r(U),zt=p(U,"P",{"data-svelte-h":!0}),C(zt)!=="svelte-eisylu"&&(zt.innerHTML=ta),So=r(U),Jt=p(U,"P",{"data-svelte-h":!0}),C(Jt)!=="svelte-hswkmf"&&(Jt.innerHTML=oa),Do=r(U),R=p(U,"DIV",{class:!0});var O=$(R);f(Se.$$.fragment,O),Oo=r(O),Ft=p(O,"P",{"data-svelte-h":!0}),C(Ft)!=="svelte-7j9v8v"&&(Ft.innerHTML=na),Ko=r(O),f(fe.$$.fragment,O),en=r(O),f(he.$$.fragment,O),O.forEach(s),tn=r(U),X=p(U,"DIV",{class:!0});var K=$(X);f(De.$$.fragment,K),on=r(K),Zt=p(K,"P",{"data-svelte-h":!0}),C(Zt)!=="svelte-7j9v8v"&&(Zt.innerHTML=aa),nn=r(K),f(ge.$$.fragment,K),an=r(K),f(_e.$$.fragment,K),K.forEach(s),rn=r(U),N=p(U,"DIV",{class:!0});var ee=$(N);f(Oe.$$.fragment,ee),sn=r(ee),Ut=p(ee,"P",{"data-svelte-h":!0}),C(Ut)!=="svelte-7j9v8v"&&(Ut.innerHTML=ra),ln=r(ee),f(be.$$.fragment,ee),dn=r(ee),f(Ce.$$.fragment,ee),ee.forEach(s),U.forEach(s),go=r(e),f(Ke.$$.fragment,e),_o=r(e),J=p(e,"DIV",{class:!0});var P=$(J);f(et.$$.fragment,P),cn=r(P),It=p(P,"P",{"data-svelte-h":!0}),C(It)!=="svelte-rehfhh"&&(It.innerHTML=sa),pn=r(P),Et=p(P,"P",{"data-svelte-h":!0}),C(Et)!=="svelte-174erte"&&(Et.innerHTML=la),mn=r(P),qt=p(P,"P",{"data-svelte-h":!0}),C(qt)!=="svelte-p9qvd1"&&(qt.innerHTML=ia),un=r(P),H=p(P,"DIV",{class:!0});var te=$(H);f(tt.$$.fragment,te),fn=r(te),Bt=p(te,"P",{"data-svelte-h":!0}),C(Bt)!=="svelte-1h74cdd"&&(Bt.innerHTML=da),hn=r(te),Gt=p(te,"UL",{"data-svelte-h":!0}),C(Gt)!=="svelte-1ouiqrx"&&(Gt.innerHTML=ca),gn=r(te),At=p(te,"P",{"data-svelte-h":!0}),C(At)!=="svelte-hzr4zl"&&(At.innerHTML=pa),te.forEach(s),P.forEach(s),bo=r(e),f(ot.$$.fragment,e),Co=r(e),F=p(e,"DIV",{class:!0});var oe=$(F);f(nt.$$.fragment,oe),_n=r(oe),Pt=p(oe,"P",{"data-svelte-h":!0}),C(Pt)!=="svelte-1kjof0d"&&(Pt.textContent=ma),bn=r(oe),Rt=p(oe,"P",{"data-svelte-h":!0}),C(Rt)!=="svelte-eisylu"&&(Rt.innerHTML=ua),Cn=r(oe),Xt=p(oe,"P",{"data-svelte-h":!0}),C(Xt)!=="svelte-hswkmf"&&(Xt.innerHTML=fa),Mn=r(oe),L=p(oe,"DIV",{class:!0});var xe=$(L);f(at.$$.fragment,xe),Tn=r(xe),Nt=p(xe,"P",{"data-svelte-h":!0}),C(Nt)!=="svelte-ilhgj7"&&(Nt.innerHTML=ha),yn=r(xe),f(Me.$$.fragment,xe),vn=r(xe),f(Te.$$.fragment,xe),xe.forEach(s),oe.forEach(s),Mo=r(e),f(rt.$$.fragment,e),To=r(e),ae=p(e,"DIV",{class:!0});var xo=$(ae);f(st.$$.fragment,xo),$n=r(xo),V=p(xo,"DIV",{class:!0});var je=$(V);f(lt.$$.fragment,je),wn=r(je),Ht=p(je,"P",{"data-svelte-h":!0}),C(Ht)!=="svelte-13umm31"&&(Ht.innerHTML=ga),xn=r(je),f(ye.$$.fragment,je),jn=r(je),f(ve.$$.fragment,je),je.forEach(s),xo.forEach(s),yo=r(e),f(it.$$.fragment,e),vo=r(e),Z=p(e,"DIV",{class:!0});var ne=$(Z);f(dt.$$.fragment,ne),kn=r(ne),Lt=p(ne,"P",{"data-svelte-h":!0}),C(Lt)!=="svelte-vug57w"&&(Lt.textContent=_a),Wn=r(ne),Vt=p(ne,"P",{"data-svelte-h":!0}),C(Vt)!=="svelte-eisylu"&&(Vt.innerHTML=ba),zn=r(ne),Qt=p(ne,"P",{"data-svelte-h":!0}),C(Qt)!=="svelte-hswkmf"&&(Qt.innerHTML=Ca),Jn=r(ne),Q=p(ne,"DIV",{class:!0});var ke=$(Q);f(ct.$$.fragment,ke),Fn=r(ke),Yt=p(ke,"P",{"data-svelte-h":!0}),C(Yt)!=="svelte-10uk4fn"&&(Yt.innerHTML=Ma),Zn=r(ke),f($e.$$.fragment,ke),Un=r(ke),f(we.$$.fragment,ke),ke.forEach(s),ne.forEach(s),$o=r(e),Dt=p(e,"P",{}),$(Dt).forEach(s),this.h()},h(){w(o,"name","hf:doc:metadata"),w(o,"content",Ra),w(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){n(document.head,o),m(e,T,l),m(e,d,l),m(e,i,l),h(M,e,l),m(e,t,l),h(y,e,l),m(e,Ot,l),m(e,We,l),m(e,Kt,l),m(e,ze,l),m(e,eo,l),m(e,Je,l),m(e,to,l),m(e,Fe,l),m(e,oo,l),m(e,Ze,l),m(e,no,l),h(Ue,e,l),m(e,ao,l),m(e,k,l),h(Ie,k,null),n(k,jo),n(k,ht),n(k,ko),n(k,gt),n(k,Wo),h(le,k,null),n(k,zo),n(k,ie),h(Ee,ie,null),n(ie,Jo),n(ie,_t),m(e,ro,l),h(qe,e,l),m(e,so,l),m(e,E,l),h(Be,E,null),n(E,Fo),n(E,bt),n(E,Zo),n(E,Ct),n(E,Uo),h(de,E,null),m(e,lo,l),h(Ge,e,l),m(e,io,l),m(e,q,l),h(Ae,q,null),n(q,Io),n(q,Mt),n(q,Eo),n(q,Tt),n(q,qo),h(ce,q,null),m(e,co,l),h(Pe,e,l),m(e,po,l),m(e,W,l),h(Re,W,null),n(W,Bo),n(W,yt),n(W,Go),n(W,vt),n(W,Ao),n(W,$t),n(W,Po),n(W,pe),h(Xe,pe,null),n(pe,Ro),n(pe,wt),m(e,mo,l),h(Ne,e,l),m(e,uo,l),m(e,z,l),h(He,z,null),n(z,Xo),n(z,xt),n(z,No),n(z,jt),n(z,Ho),n(z,me),h(Le,me,null),n(me,Lo),n(me,kt),n(z,Vo),n(z,ue),h(Ve,ue,null),n(ue,Qo),n(ue,Wt),m(e,fo,l),h(Qe,e,l),m(e,ho,l),m(e,j,l),h(Ye,j,null),n(j,Yo),n(j,zt),n(j,So),n(j,Jt),n(j,Do),n(j,R),h(Se,R,null),n(R,Oo),n(R,Ft),n(R,Ko),h(fe,R,null),n(R,en),h(he,R,null),n(j,tn),n(j,X),h(De,X,null),n(X,on),n(X,Zt),n(X,nn),h(ge,X,null),n(X,an),h(_e,X,null),n(j,rn),n(j,N),h(Oe,N,null),n(N,sn),n(N,Ut),n(N,ln),h(be,N,null),n(N,dn),h(Ce,N,null),m(e,go,l),h(Ke,e,l),m(e,_o,l),m(e,J,l),h(et,J,null),n(J,cn),n(J,It),n(J,pn),n(J,Et),n(J,mn),n(J,qt),n(J,un),n(J,H),h(tt,H,null),n(H,fn),n(H,Bt),n(H,hn),n(H,Gt),n(H,gn),n(H,At),m(e,bo,l),h(ot,e,l),m(e,Co,l),m(e,F,l),h(nt,F,null),n(F,_n),n(F,Pt),n(F,bn),n(F,Rt),n(F,Cn),n(F,Xt),n(F,Mn),n(F,L),h(at,L,null),n(L,Tn),n(L,Nt),n(L,yn),h(Me,L,null),n(L,vn),h(Te,L,null),m(e,Mo,l),h(rt,e,l),m(e,To,l),m(e,ae,l),h(st,ae,null),n(ae,$n),n(ae,V),h(lt,V,null),n(V,wn),n(V,Ht),n(V,xn),h(ye,V,null),n(V,jn),h(ve,V,null),m(e,yo,l),h(it,e,l),m(e,vo,l),m(e,Z,l),h(dt,Z,null),n(Z,kn),n(Z,Lt),n(Z,Wn),n(Z,Vt),n(Z,zn),n(Z,Qt),n(Z,Jn),n(Z,Q),h(ct,Q,null),n(Q,Fn),n(Q,Yt),n(Q,Zn),h($e,Q,null),n(Q,Un),h(we,Q,null),m(e,$o,l),m(e,Dt,l),wo=!0},p(e,[l]){const B={};l&2&&(B.$$scope={dirty:l,ctx:e}),le.$set(B);const pt={};l&2&&(pt.$$scope={dirty:l,ctx:e}),de.$set(pt);const S={};l&2&&(S.$$scope={dirty:l,ctx:e}),ce.$set(S);const D={};l&2&&(D.$$scope={dirty:l,ctx:e}),fe.$set(D);const G={};l&2&&(G.$$scope={dirty:l,ctx:e}),he.$set(G);const mt={};l&2&&(mt.$$scope={dirty:l,ctx:e}),ge.$set(mt);const A={};l&2&&(A.$$scope={dirty:l,ctx:e}),_e.$set(A);const ut={};l&2&&(ut.$$scope={dirty:l,ctx:e}),be.$set(ut);const ft={};l&2&&(ft.$$scope={dirty:l,ctx:e}),Ce.$set(ft);const U={};l&2&&(U.$$scope={dirty:l,ctx:e}),Me.$set(U);const O={};l&2&&(O.$$scope={dirty:l,ctx:e}),Te.$set(O);const K={};l&2&&(K.$$scope={dirty:l,ctx:e}),ye.$set(K);const ee={};l&2&&(ee.$$scope={dirty:l,ctx:e}),ve.$set(ee);const P={};l&2&&(P.$$scope={dirty:l,ctx:e}),$e.$set(P);const te={};l&2&&(te.$$scope={dirty:l,ctx:e}),we.$set(te)},i(e){wo||(g(M.$$.fragment,e),g(y.$$.fragment,e),g(Ue.$$.fragment,e),g(Ie.$$.fragment,e),g(le.$$.fragment,e),g(Ee.$$.fragment,e),g(qe.$$.fragment,e),g(Be.$$.fragment,e),g(de.$$.fragment,e),g(Ge.$$.fragment,e),g(Ae.$$.fragment,e),g(ce.$$.fragment,e),g(Pe.$$.fragment,e),g(Re.$$.fragment,e),g(Xe.$$.fragment,e),g(Ne.$$.fragment,e),g(He.$$.fragment,e),g(Le.$$.fragment,e),g(Ve.$$.fragment,e),g(Qe.$$.fragment,e),g(Ye.$$.fragment,e),g(Se.$$.fragment,e),g(fe.$$.fragment,e),g(he.$$.fragment,e),g(De.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(Oe.$$.fragment,e),g(be.$$.fragment,e),g(Ce.$$.fragment,e),g(Ke.$$.fragment,e),g(et.$$.fragment,e),g(tt.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(at.$$.fragment,e),g(Me.$$.fragment,e),g(Te.$$.fragment,e),g(rt.$$.fragment,e),g(st.$$.fragment,e),g(lt.$$.fragment,e),g(ye.$$.fragment,e),g(ve.$$.fragment,e),g(it.$$.fragment,e),g(dt.$$.fragment,e),g(ct.$$.fragment,e),g($e.$$.fragment,e),g(we.$$.fragment,e),wo=!0)},o(e){_(M.$$.fragment,e),_(y.$$.fragment,e),_(Ue.$$.fragment,e),_(Ie.$$.fragment,e),_(le.$$.fragment,e),_(Ee.$$.fragment,e),_(qe.$$.fragment,e),_(Be.$$.fragment,e),_(de.$$.fragment,e),_(Ge.$$.fragment,e),_(Ae.$$.fragment,e),_(ce.$$.fragment,e),_(Pe.$$.fragment,e),_(Re.$$.fragment,e),_(Xe.$$.fragment,e),_(Ne.$$.fragment,e),_(He.$$.fragment,e),_(Le.$$.fragment,e),_(Ve.$$.fragment,e),_(Qe.$$.fragment,e),_(Ye.$$.fragment,e),_(Se.$$.fragment,e),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(De.$$.fragment,e),_(ge.$$.fragment,e),_(_e.$$.fragment,e),_(Oe.$$.fragment,e),_(be.$$.fragment,e),_(Ce.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(nt.$$.fragment,e),_(at.$$.fragment,e),_(Me.$$.fragment,e),_(Te.$$.fragment,e),_(rt.$$.fragment,e),_(st.$$.fragment,e),_(lt.$$.fragment,e),_(ye.$$.fragment,e),_(ve.$$.fragment,e),_(it.$$.fragment,e),_(dt.$$.fragment,e),_(ct.$$.fragment,e),_($e.$$.fragment,e),_(we.$$.fragment,e),wo=!1},d(e){e&&(s(T),s(d),s(i),s(t),s(Ot),s(We),s(Kt),s(ze),s(eo),s(Je),s(to),s(Fe),s(oo),s(Ze),s(no),s(ao),s(k),s(ro),s(so),s(E),s(lo),s(io),s(q),s(co),s(po),s(W),s(mo),s(uo),s(z),s(fo),s(ho),s(j),s(go),s(_o),s(J),s(bo),s(Co),s(F),s(Mo),s(To),s(ae),s(yo),s(vo),s(Z),s($o),s(Dt)),s(o),b(M,e),b(y,e),b(Ue,e),b(Ie),b(le),b(Ee),b(qe,e),b(Be),b(de),b(Ge,e),b(Ae),b(ce),b(Pe,e),b(Re),b(Xe),b(Ne,e),b(He),b(Le),b(Ve),b(Qe,e),b(Ye),b(Se),b(fe),b(he),b(De),b(ge),b(_e),b(Oe),b(be),b(Ce),b(Ke,e),b(et),b(tt),b(ot,e),b(nt),b(at),b(Me),b(Te),b(rt,e),b(st),b(lt),b(ye),b(ve),b(it,e),b(dt),b(ct),b($e),b(we)}}}const Ra='{"title":"CLAP","local":"clap","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"ClapConfig","local":"transformers.ClapConfig","sections":[],"depth":2},{"title":"ClapTextConfig","local":"transformers.ClapTextConfig","sections":[],"depth":2},{"title":"ClapAudioConfig","local":"transformers.ClapAudioConfig","sections":[],"depth":2},{"title":"ClapFeatureExtractor","local":"transformers.ClapFeatureExtractor","sections":[],"depth":2},{"title":"ClapProcessor","local":"transformers.ClapProcessor","sections":[],"depth":2},{"title":"ClapModel","local":"transformers.ClapModel","sections":[],"depth":2},{"title":"ClapTextModel","local":"transformers.ClapTextModel","sections":[],"depth":2},{"title":"ClapTextModelWithProjection","local":"transformers.ClapTextModelWithProjection","sections":[],"depth":2},{"title":"ClapAudioModel","local":"transformers.ClapAudioModel","sections":[],"depth":2},{"title":"ClapAudioModelWithProjection","local":"transformers.ClapAudioModelWithProjection","sections":[],"depth":2}],"depth":1}';function Xa(v){return ya(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Da extends va{constructor(o){super(),$a(this,o,Xa,Pa,Ta,{})}}export{Da as component};
