import{S as rf,i as sf,s as lf,e as r,k as p,w as C,t as a,M as df,c as s,d as t,m as h,a as i,x as $,h as n,b as c,G as e,g as _,y as w,q as x,o as y,B as T,v as cf,L as De}from"../../chunks/vendor-hf-doc-builder.js";import{T as $a}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ne}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as te}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ie}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function pf(k){let d,b,m,u,v;return u=new Ne({props:{code:`from transformers import ClapConfig, ClapModel

# Initializing a ClapConfig with laion-ai/base style configuration
configuration = ClapConfig()

# Initializing a ClapModel (with random weights) from the laion-ai/base style configuration
model = ClapModel(configuration)

# Accessing the model configuration
configuration = model.config

# We can also initialize a ClapConfig from a ClapTextConfig and a ClapAudioConfig
from transformers import ClapTextConfig, ClapAudioConfig

# Initializing a ClapText and ClapAudioConfig configuration
config_text = ClapTextConfig()
config_audio = ClapAudioConfig()

config = ClapConfig.from_text_audio_configs(config_text, config_audio)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapConfig, ClapModel

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config

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

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

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

# Initializing a CLAP text configuration
configuration = ClapTextConfig()

# Initializing a model (with random weights) from the configuration
model = ClapTextModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapTextConfig, ClapTextModel

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

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

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

# Initializing a ClapAudioConfig with laion/clap-htsat-fused style configuration
configuration = ClapAudioConfig()

# Initializing a ClapAudioModel (with random weights) from the laion/clap-htsat-fused style configuration
model = ClapAudioModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapAudioConfig, ClapAudioModel

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

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

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

dataset = load_dataset("ashraq/esc50")
audio_sample = dataset["train"]["audio"][0]["array"]

model = ClapModel.from_pretrained("laion/clap-htsat-unfused")
processor = AutoProcessor.from_pretrained("laion/clap-htsat-unfused")

input_text = ["Sound of a dog", "Sound of vaccum cleaner"]

inputs = processor(text=input_text, audios=audio_sample, return_tensors="pt", padding=True)

outputs = model(**inputs)
logits_per_audio = outputs.logits_per_audio  # this is the audio-text similarity score
probs = logits_per_audio.softmax(dim=-1)  # we can take the softmax to get the label probabilities`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, ClapModel

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=input_text, audios=audio_sample, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

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

model = ClapModel.from_pretrained("laion/clap-htsat-unfused")
tokenizer = AutoTokenizer.from_pretrained("laion/clap-htsat-unfused")

inputs = tokenizer(["the sound of a cat", "the sound of a dog"], padding=True, return_tensors="pt")
text_features = model.get_text_features(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapModel

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

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

model = ClapModel.from_pretrained("laion/clap-htsat-unfused")
feature_extractor = AutoFeatureExtractor.from_pretrained("laion/clap-htsat-unfused")
random_audio = torch.rand((16_000))
inputs = feature_extractor(random_audio, return_tensors="pt")
audio_features = model.get_audio_features(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, ClapModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

model = ClapTextModelWithProjection.from_pretrained("laion/clap-htsat-unfused")
tokenizer = AutoTokenizer.from_pretrained("laion/clap-htsat-unfused")

inputs = tokenizer(["a sound of a cat", "a sound of a dog"], padding=True, return_tensors="pt")

outputs = model(**inputs)
text_embeds = outputs.text_embeds`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapTextModelWithProjection

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a sound of a cat&quot;</span>, <span class="hljs-string">&quot;a sound of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeds = outputs.text_embeds`}}),{c(){d=r("p"),b=a("Examples:"),m=p(),C(u.$$.fragment)},l(l){d=s(l,"P",{});var f=i(d);b=n(f,"Examples:"),f.forEach(t),m=h(l),$(u.$$.fragment,l)},m(l,f){_(l,d,f),e(d,b),_(l,m,f),w(u,l,f),v=!0},p:De,i(l){v||(x(u.$$.fragment,l),v=!0)},o(l){y(u.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(m),T(u,l)}}}function wf(k){let d,b,m,u,v;return{c(){d=r("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var f=i(d);b=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(f,"CODE",{});var A=i(m);u=n(A,"Module"),A.forEach(t),v=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(l,f){_(l,d,f),e(d,b),e(d,m),e(m,u),e(d,v)},d(l){l&&t(d)}}}function xf(k){let d,b,m,u,v;return u=new Ne({props:{code:`from datasets import load_dataset
from transformers import AutoProcessor, ClapAudioModel

dataset = load_dataset("ashraq/esc50")
audio_sample = dataset["train"]["audio"][0]["array"]

model = ClapAudioModel.from_pretrained("laion/clap-htsat-fused")
processor = AutoProcessor.from_pretrained("laion/clap-htsat-fused")

inputs = processor(audios=audio_sample, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, ClapAudioModel

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

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

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

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

model = ClapAudioModelWithProjection.from_pretrained("laion/clap-htsat-fused")
processor = ClapProcessor.from_pretrained("laion/clap-htsat-fused")

dataset = load_dataset("ashraq/esc50")
audio_sample = dataset["train"]["audio"][0]["array"]

inputs = processor(audios=audio_sample, return_tensors="pt")
outputs = model(**inputs)
audio_embeds = outputs.audio_embeds`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapAudioModelWithProjection, ClapProcessor

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

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

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