import{s as ua,f as _a,o as ba,n as W}from"../chunks/scheduler.25b97de1.js";import{S as Ma,i as ya,g as d,s as a,r as g,A as Ta,h as c,f as n,c as r,j,u as h,x as M,k as $,y as i,a as l,v as f,d as u,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as To}from"../chunks/Tip.baa67368.js";import{D as x}from"../chunks/Docstring.ffac8efa.js";import{C as D}from"../chunks/CodeBlock.e6cd0d95.js";import{E as oe}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as I,E as va}from"../chunks/EditOnGithub.91d95064.js";function wa(w){let o,T="Example:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNpZ2xpcENvbmZpZyUyQyUyMFNpZ2xpcE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNpZ2xpcENvbmZpZyUyMHdpdGglMjBnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTaWdsaXBDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTaWdsaXBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFNpZ2xpcE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZyUwQSUwQSUyMyUyMFdlJTIwY2FuJTIwYWxzbyUyMGluaXRpYWxpemUlMjBhJTIwU2lnbGlwQ29uZmlnJTIwZnJvbSUyMGElMjBTaWdsaXBUZXh0Q29uZmlnJTIwYW5kJTIwYSUyMFNpZ2xpcFZpc2lvbkNvbmZpZyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBTaWdsaXBUZXh0Q29uZmlnJTJDJTIwU2lnbGlwVmlzaW9uQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNpZ2xpcFRleHQlMjBhbmQlMjBTaWdsaXBWaXNpb24lMjBjb25maWd1cmF0aW9uJTBBY29uZmlnX3RleHQlMjAlM0QlMjBTaWdsaXBUZXh0Q29uZmlnKCklMEFjb25maWdfdmlzaW9uJTIwJTNEJTIwU2lnbGlwVmlzaW9uQ29uZmlnKCklMEElMEFjb25maWclMjAlM0QlMjBTaWdsaXBDb25maWcuZnJvbV90ZXh0X3Zpc2lvbl9jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX3Zpc2lvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SiglipConfig, SiglipModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SiglipConfig with google/siglip-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SiglipConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SiglipModel (with random weights) from the google/siglip-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipModel(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 SiglipConfig from a SiglipTextConfig and a SiglipVisionConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SiglipTextConfig, SiglipVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SiglipText and SiglipVision configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = SiglipTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = SiglipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = SiglipConfig.from_text_vision_configs(config_text, config_vision)`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-11lpom8"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function $a(w){let o,T="Example:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNpZ2xpcFRleHRDb25maWclMkMlMjBTaWdsaXBUZXh0TW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwU2lnbGlwVGV4dENvbmZpZyUyMHdpdGglMjBnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTaWdsaXBUZXh0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwU2lnbGlwVGV4dE1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU2lnbGlwVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SiglipTextConfig, SiglipTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SiglipTextConfig with google/siglip-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SiglipTextConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-11lpom8"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function ja(w){let o,T="Example:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNpZ2xpcFZpc2lvbkNvbmZpZyUyQyUyMFNpZ2xpcFZpc2lvbk1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNpZ2xpcFZpc2lvbkNvbmZpZyUyMHdpdGglMjBnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTaWdsaXBWaXNpb25Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTaWdsaXBWaXNpb25Nb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFNpZ2xpcFZpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SiglipVisionConfig, SiglipVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SiglipVisionConfig with google/siglip-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SiglipVisionConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-11lpom8"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function xa(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function ka(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEF0ZXh0cyUyMCUzRCUyMCU1QiUyMmElMjBwaG90byUyMG9mJTIwMiUyMGNhdHMlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMDIlMjBkb2dzJTIyJTVEJTBBJTIzJTIwaW1wb3J0YW50JTNBJTIwd2UlMjBwYXNzJTIwJTYwcGFkZGluZyUzRG1heF9sZW5ndGglNjAlMjBzaW5jZSUyMHRoZSUyMG1vZGVsJTIwd2FzJTIwdHJhaW5lZCUyMHdpdGglMjB0aGlzJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0R0ZXh0cyUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUwQXByb2JzJTIwJTNEJTIwdG9yY2guc2lnbW9pZChsb2dpdHNfcGVyX2ltYWdlKSUyMCUyMyUyMHRoZXNlJTIwYXJlJTIwdGhlJTIwcHJvYmFiaWxpdGllcyUwQXByaW50KGYlMjIlN0Jwcm9icyU1QjAlNUQlNUIwJTVEJTNBLjElMjUlN0QlMjB0aGF0JTIwaW1hZ2UlMjAwJTIwaXMlMjAnJTdCdGV4dHMlNUIwJTVEJTdEJyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;a photo of 2 cats&quot;</span>, <span class="hljs-string">&quot;a photo of 2 dogs&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># important: we pass \`padding=max_length\` since the model was trained with this</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, images=image, padding=<span class="hljs-string">&quot;max_length&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = torch.sigmoid(logits_per_image) <span class="hljs-comment"># these are the probabilities</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;<span class="hljs-subst">{probs[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]:<span class="hljs-number">.1</span>%}</span> that image 0 is &#x27;<span class="hljs-subst">{texts[<span class="hljs-number">0</span>]}</span>&#x27;&quot;</span>)
<span class="hljs-number">31.9</span>% that image <span class="hljs-number">0</span> <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;a photo of 2 cats&#x27;</span>`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Ja(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function Sa(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEElMEElMjMlMjBpbXBvcnRhbnQlM0ElMjBtYWtlJTIwc3VyZSUyMHRvJTIwc2V0JTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMjBhcyUyMHRoYXQncyUyMGhvdyUyMHRoZSUyMG1vZGVsJTIwd2FzJTIwdHJhaW5lZCUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEJTIybWF4X2xlbmd0aCUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMHRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># important: make sure to set padding=&quot;max_length&quot; as that&#x27;s how the model was trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-string">&quot;max_length&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Ia(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function Ca(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Ua(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function za(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBTaWdsaXBUZXh0TW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFNpZ2xpcFRleHRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBJTIzJTIwaW1wb3J0YW50JTNBJTIwbWFrZSUyMHN1cmUlMjB0byUyMHNldCUyMHBhZGRpbmclM0QlMjJtYXhfbGVuZ3RoJTIyJTIwYXMlMjB0aGF0J3MlMjBob3clMjB0aGUlMjBtb2RlbCUyMHdhcyUyMHRyYWluZWQlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwKEVPUyUyMHRva2VuKSUyMHN0YXRlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, SiglipTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipTextModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># important: make sure to set padding=&quot;max_length&quot; as that&#x27;s how the model was trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-string">&quot;max_length&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Za(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function Wa(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFNpZ2xpcFZpc2lvbk1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBTaWdsaXBWaXNpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjBmZWF0dXJlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, SiglipVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipVisionModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled features</span>`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Ba(w){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=d("p"),o.innerHTML=T},l(m){o=c(m,"P",{"data-svelte-h":!0}),M(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(m,p){l(m,o,p)},p:W,d(m){m&&n(o)}}}function Ga(w){let o,T="Examples:",m,p,y;return p=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFNpZ2xpcEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdG9yY2gubWFudWFsX3NlZWQoMyklMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBJTIzJTIwbm90ZSUzQSUyMHdlJTIwYXJlJTIwbG9hZGluZyUyMGElMjAlNjBTaWdsaXBNb2RlbCU2MCUyMGZyb20lMjB0aGUlMjBodWIlMjBoZXJlJTJDJTBBJTIzJTIwc28lMjB0aGUlMjBoZWFkJTIwd2lsbCUyMGJlJTIwcmFuZG9tbHklMjBpbml0aWFsaXplZCUyQyUyMGhlbmNlJTIwdGhlJTIwcHJlZGljdGlvbnMlMjB3aWxsJTIwYmUlMjByYW5kb20lMjBpZiUyMHNlZWQlMjBpcyUyMG5vdCUyMHNldCUyMGFib3ZlLiUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBTaWdsaXBGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMHR3byUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfY2xhc3NfaWR4JTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQoJTIyUHJlZGljdGVkJTIwY2xhc3MlM0ElMjIlMkMlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWR4JTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SiglipForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># note: we are loading a \`SiglipModel\` from the hub here,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so the head will be randomly initialized, hence the predictions will be random if seed is not set above.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the two classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[predicted_class_idx])
Predicted <span class="hljs-keyword">class</span>: LABEL_1`,wrap:!1}}),{c(){o=d("p"),o.textContent=T,m=a(),g(p.$$.fragment)},l(t){o=c(t,"P",{"data-svelte-h":!0}),M(o)!=="svelte-kvfsh7"&&(o.textContent=T),m=r(t),h(p.$$.fragment,t)},m(t,v){l(t,o,v),l(t,m,v),f(p,t,v),y=!0},p:W,i(t){y||(u(p.$$.fragment,t),y=!0)},o(t){_(p.$$.fragment,t),y=!1},d(t){t&&(n(o),n(m)),b(p,t)}}}function Na(w){let o,T,m,p,y,t,v,$o,ze,wn='The SigLIP model was proposed in <a href="https://arxiv.org/abs/2303.15343" rel="nofollow">Sigmoid Loss for Language Image Pre-Training</a> by Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, Lucas Beyer. SigLIP proposes to replace the loss function used in <a href="clip">CLIP</a> by a simple pairwise sigmoid loss. This results in better performance in terms of zero-shot classification accuracy on ImageNet.',jo,Ze,$n="The abstract from the paper is the following:",xo,We,jn="<em>We propose a simple pairwise Sigmoid loss for Language-Image Pre-training (SigLIP). Unlike standard contrastive learning with softmax normalization, the sigmoid loss operates solely on image-text pairs and does not require a global view of the pairwise similarities for normalization. The sigmoid loss simultaneously allows further scaling up the batch size, while also performing better at smaller batch sizes. Combined with Locked-image Tuning, with only four TPUv4 chips, we train a SigLiT model that achieves 84.5% ImageNet zero-shot accuracy in two days. The disentanglement of the batch size from the loss further allows us to study the impact of examples vs pairs and negative to positive ratio. Finally, we push the batch size to the extreme, up to one million, and find that the benefits of growing batch size quickly diminish, with a more reasonable batch size of 32k being sufficient.</em>",ko,Be,Jo,Ge,xn='<li>Usage of SigLIP is similar to <a href="clip">CLIP</a>. The main difference is the training loss, which does not require a global view of all the pairwise similarities of images and texts within a batch. One needs to apply the sigmoid activation function to the logits, rather than the softmax.</li> <li>Training is not yet supported. If you want to fine-tune SigLIP or train from scratch, refer to the loss function from <a href="https://github.com/mlfoundations/open_clip/blob/73ad04ae7fb93ede1c02dc9040a828634cb1edf1/src/open_clip/loss.py#L307" rel="nofollow">OpenCLIP</a>, which leverages various <code>torch.distributed</code> utilities.</li> <li>When using the standalone <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a> or <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipProcessor">SiglipProcessor</a>, make sure to pass <code>padding=&quot;max_length&quot;</code> as that’s how the model was trained.</li> <li>To get the same results as the pipeline, a prompt template of “This is a photo of {label}.” should be used.</li>',So,se,kn,Io,Ne,Jn='SigLIP evaluation results compared to CLIP. Taken from the <a href="https://arxiv.org/abs/2303.15343">original paper</a>.',Co,Fe,Sn=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/google-research/big_vision/tree/main" rel="nofollow">here</a>.`,Uo,Ve,zo,Pe,In="There are 2 main ways to use SigLIP: either using the pipeline API, which abstracts away all the complexity for you, or by using the <code>SiglipModel</code> class yourself.",Zo,Re,Wo,Xe,Cn="The pipeline allows to use the model in a few lines of code:",Bo,qe,Go,He,No,Le,Un="If you want to do the pre- and postprocessing yourself, here’s how to do that:",Fo,Ee,Vo,Ye,Po,Qe,zn="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with SigLIP.",Ro,Ae,Zn='<li><a href="../tasks/zero_shot_image_classification_md">Zero-shot image classification task guide</a></li> <li>Demo notebooks for SigLIP can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SigLIP" rel="nofollow">here</a>. 🌎</li>',Xo,De,Wn="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",qo,Oe,Ho,C,Ke,gs,Ft,Bn=`<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a>. It is used to
instantiate a Siglip model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Siglip
<a href="https://huggingface.co/google/siglip-base-patch16-224" rel="nofollow">google/siglip-base-patch16-224</a> architecture.`,hs,Vt,Gn=`Configuration objects inherit from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,fs,ne,us,ae,et,_s,Pt,Nn=`Instantiate a <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> (or a derived class) from siglip text model configuration and siglip vision
model configuration.`,Lo,tt,Eo,B,ot,bs,Rt,Fn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTextModel">SiglipTextModel</a>. It is used to instantiate a
Siglip text 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 text encoder of the Siglip
<a href="https://huggingface.co/google/siglip-base-patch16-224" rel="nofollow">google/siglip-base-patch16-224</a> architecture.`,Ms,Xt,Vn=`Configuration objects inherit from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ys,re,Yo,st,Qo,G,nt,Ts,qt,Pn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionModel">SiglipVisionModel</a>. It is used to instantiate a
Siglip vision 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 vision encoder of the Siglip
<a href="https://huggingface.co/google/siglip-base-patch16-224" rel="nofollow">google/siglip-base-patch16-224</a> architecture.`,vs,Ht,Rn=`Configuration objects inherit from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.42.4/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ws,ie,Ao,at,Do,k,rt,$s,Lt,Xn='Construct a Siglip tokenizer. Based on <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.',js,Et,qn=`This tokenizer inherits from <a href="/docs/transformers/v4.42.4/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,xs,O,it,ks,Yt,Hn=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A sequence has the following format:`,Js,Qt,Ln="<li>single sequence: <code>X &lt;/s&gt;</code></li> <li>pair of sequences: <code>A &lt;/s&gt; B &lt;/s&gt;</code></li>",Ss,le,lt,Is,At,En=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Cs,de,dt,Us,Dt,Yn=`Create a mask from the two sequences passed to be used in a sequence-pair classification task. T5 does not make
use of token type ids, therefore a list of zeros is returned.`,zs,Ot,ct,Oo,pt,Ko,Y,mt,Zs,Kt,Qn="Constructs a SigLIP image processor.",Ws,ce,gt,Bs,eo,An="Preprocess an image or batch of images.",es,ht,ts,U,ft,Gs,to,Dn="Constructs a Siglip processor which wraps a Siglip image processor and a Siglip tokenizer into a single processor.",Ns,oo,On=`<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipProcessor">SiglipProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a> and <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipProcessor.decode">decode()</a> for more information.`,Fs,pe,ut,Vs,so,Kn=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Ps,me,_t,Rs,no,ea=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,os,bt,ss,J,Mt,Xs,ao,ta=`This model inherits from <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,qs,ro,oa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Hs,R,yt,Ls,io,sa='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',Es,ge,Ys,he,Qs,X,Tt,As,lo,na='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',Ds,fe,Os,ue,Ks,q,vt,en,co,aa='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',tn,_e,on,be,ns,wt,as,N,$t,sn,po,ra=`The text model from SigLIP without any head or projection on top.
This model inherits from <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,nn,mo,ia=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,an,H,jt,rn,go,la='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTextModel">SiglipTextModel</a> forward method, overrides the <code>__call__</code> special method.',ln,Me,dn,ye,rs,xt,is,F,kt,cn,ho,da=`The vision model from SigLIP without any head or projection on top.
This model inherits from <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,pn,fo,ca=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,mn,L,Jt,gn,uo,pa='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionModel">SiglipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',hn,Te,fn,ve,ls,St,ds,z,It,un,_o,ma=`SigLIP vision encoder with an image classification head on top (a linear layer on top of the pooled final hidden states of
the patch tokens) e.g. for ImageNet.`,_n,bo,ga=`This model inherits from <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,bn,Mo,ha=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Mn,E,Ct,yn,yo,fa='The <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipForImageClassification">SiglipForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Tn,we,vn,$e,cs,Ut,ps,vo,ms;return y=new I({props:{title:"SigLIP",local:"siglip",headingTag:"h1"}}),v=new I({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Be=new I({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),Ve=new I({props:{title:"Usage example",local:"usage-example",headingTag:"h2"}}),Re=new I({props:{title:"Pipeline API",local:"pipeline-api",headingTag:"h3"}}),qe=new D({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEElMjMlMjBsb2FkJTIwcGlwZSUwQWltYWdlX2NsYXNzaWZpZXIlMjAlM0QlMjBwaXBlbGluZSh0YXNrJTNEJTIyemVyby1zaG90LWltYWdlLWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJnb29nbGUlMkZzaWdsaXAtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEElMEElMjMlMjBsb2FkJTIwaW1hZ2UlMEF1cmwlMjAlM0QlMjAnaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyclMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEElMjMlMjBpbmZlcmVuY2UlMEFjYW5kaWRhdGVfbGFiZWxzJTIwJTNEJTIwJTVCJTIyMiUyMGNhdHMlMjIlMkMlMjAlMjJhJTIwcGxhbmUlMjIlMkMlMjAlMjJhJTIwcmVtb3RlJTIyJTVEJTBBb3V0cHV0cyUyMCUzRCUyMGltYWdlX2NsYXNzaWZpZXIoaW1hZ2UlMkMlMjBjYW5kaWRhdGVfbGFiZWxzJTNEY2FuZGlkYXRlX2xhYmVscyklMEFvdXRwdXRzJTIwJTNEJTIwJTVCJTdCJTIyc2NvcmUlMjIlM0ElMjByb3VuZChvdXRwdXQlNUIlMjJzY29yZSUyMiU1RCUyQyUyMDQpJTJDJTIwJTIybGFiZWwlMjIlM0ElMjBvdXRwdXQlNUIlMjJsYWJlbCUyMiU1RCUyMCU3RCUyMGZvciUyMG91dHB1dCUyMGluJTIwb3V0cHV0cyU1RCUwQXByaW50KG91dHB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load pipe</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_classifier = pipeline(task=<span class="hljs-string">&quot;zero-shot-image-classification&quot;</span>, model=<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">&quot;2 cats&quot;</span>, <span class="hljs-string">&quot;a plane&quot;</span>, <span class="hljs-string">&quot;a remote&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = image_classifier(image, candidate_labels=candidate_labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = [{<span class="hljs-string">&quot;score&quot;</span>: <span class="hljs-built_in">round</span>(output[<span class="hljs-string">&quot;score&quot;</span>], <span class="hljs-number">4</span>), <span class="hljs-string">&quot;label&quot;</span>: output[<span class="hljs-string">&quot;label&quot;</span>] } <span class="hljs-keyword">for</span> output <span class="hljs-keyword">in</span> outputs]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(outputs)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.1979</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;2 cats&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;a remote&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;a plane&#x27;</span>}]`,wrap:!1}}),He=new I({props:{title:"Using the model yourself",local:"using-the-model-yourself",headingTag:"h3"}}),Ee=new D({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFjYW5kaWRhdGVfbGFiZWxzJTIwJTNEJTIwJTVCJTIyMiUyMGNhdHMlMjIlMkMlMjAlMjIyJTIwZG9ncyUyMiU1RCUwQWNhbmRpZGF0ZV9sYWJlbHMlMjAlM0QlMjAlNUJmJ1RoaXMlMjBpcyUyMGElMjBwaG90byUyMG9mJTIwJTdCbGFiZWwlN0QuJyUyMGZvciUyMGxhYmVsJTIwaW4lMjBjYW5kaWRhdGVfbGFiZWxzJTVEJTBBJTIzJTIwaW1wb3J0YW50JTNBJTIwd2UlMjBwYXNzJTIwJTYwcGFkZGluZyUzRG1heF9sZW5ndGglNjAlMjBzaW5jZSUyMHRoZSUyMG1vZGVsJTIwd2FzJTIwdHJhaW5lZCUyMHdpdGglMjB0aGlzJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0R0ZXh0cyUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUwQXByb2JzJTIwJTNEJTIwdG9yY2guc2lnbW9pZChsb2dpdHNfcGVyX2ltYWdlKSUyMCUyMyUyMHRoZXNlJTIwYXJlJTIwdGhlJTIwcHJvYmFiaWxpdGllcyUwQXByaW50KGYlMjIlN0Jwcm9icyU1QjAlNUQlNUIwJTVEJTNBLjElMjUlN0QlMjB0aGF0JTIwaW1hZ2UlMjAwJTIwaXMlMjAnJTdCdGV4dHMlNUIwJTVEJTdEJyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-base-patch16-224&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">&quot;2 cats&quot;</span>, <span class="hljs-string">&quot;2 dogs&quot;</span>]
<span class="hljs-comment"># follows the pipeline prompt template to get same results</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">f&#x27;This is a photo of <span class="hljs-subst">{label}</span>.&#x27;</span> <span class="hljs-keyword">for</span> label <span class="hljs-keyword">in</span> candidate_labels]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># important: we pass \`padding=max_length\` since the model was trained with this</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, images=image, padding=<span class="hljs-string">&quot;max_length&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = torch.sigmoid(logits_per_image) <span class="hljs-comment"># these are the probabilities</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;<span class="hljs-subst">{probs[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]:<span class="hljs-number">.1</span>%}</span> that image 0 is &#x27;<span class="hljs-subst">{texts[<span class="hljs-number">0</span>]}</span>&#x27;&quot;</span>)
<span class="hljs-number">31.9</span>% that image <span class="hljs-number">0</span> <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;a photo of 2 cats&#x27;</span>`,wrap:!1}}),Ye=new I({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Oe=new I({props:{title:"SiglipConfig",local:"transformers.SiglipConfig",headingTag:"h2"}}),Ke=new x({props:{name:"class transformers.SiglipConfig",anchor:"transformers.SiglipConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipConfig.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.42.4/en/model_doc/siglip#transformers.SiglipTextConfig">SiglipTextConfig</a>.`,name:"text_config"},{anchor:"transformers.SiglipConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionConfig">SiglipVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.SiglipConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/configuration_siglip.py#L228"}}),ne=new oe({props:{anchor:"transformers.SiglipConfig.example",$$slots:{default:[wa]},$$scope:{ctx:w}}}),et=new x({props:{name:"from_text_vision_configs",anchor:"transformers.SiglipConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": SiglipTextConfig"},{name:"vision_config",val:": SiglipVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/configuration_siglip.py#L288",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig"
>SiglipConfig</a></p>
`}}),tt=new I({props:{title:"SiglipTextConfig",local:"transformers.SiglipTextConfig",headingTag:"h2"}}),ot=new x({props:{name:"class transformers.SiglipTextConfig",anchor:"transformers.SiglipTextConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"max_position_embeddings",val:" = 64"},{name:"hidden_act",val:" = 'gelu_pytorch_tanh'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 49406"},{name:"eos_token_id",val:" = 49407"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the Siglip text 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.42.4/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a>.`,name:"vocab_size"},{anchor:"transformers.SiglipTextConfig.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.SiglipTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.SiglipTextConfig.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.SiglipTextConfig.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.SiglipTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#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.SiglipTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_pytorch_tanh&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.SiglipTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SiglipTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.SiglipTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The id of the padding token in the vocabulary.`,name:"pad_token_id"},{anchor:"transformers.SiglipTextConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 49406) &#x2014;
The id of the beginning-of-sequence token in the vocabulary.`,name:"bos_token_id"},{anchor:"transformers.SiglipTextConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 49407) &#x2014;
The id of the end-of-sequence token in the vocabulary.`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/configuration_siglip.py#L27"}}),re=new oe({props:{anchor:"transformers.SiglipTextConfig.example",$$slots:{default:[$a]},$$scope:{ctx:w}}}),st=new I({props:{title:"SiglipVisionConfig",local:"transformers.SiglipVisionConfig",headingTag:"h2"}}),nt=new x({props:{name:"class transformers.SiglipVisionConfig",anchor:"transformers.SiglipVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"hidden_act",val:" = 'gelu_pytorch_tanh'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipVisionConfig.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.SiglipVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.SiglipVisionConfig.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.SiglipVisionConfig.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.SiglipVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of channels in the input images.`,name:"num_channels"},{anchor:"transformers.SiglipVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.SiglipVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.SiglipVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_pytorch_tanh&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.SiglipVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SiglipVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/configuration_siglip.py#L132"}}),ie=new oe({props:{anchor:"transformers.SiglipVisionConfig.example",$$slots:{default:[ja]},$$scope:{ctx:w}}}),at=new I({props:{title:"SiglipTokenizer",local:"transformers.SiglipTokenizer",headingTag:"h2"}}),rt=new x({props:{name:"class transformers.SiglipTokenizer",anchor:"transformers.SiglipTokenizer",parameters:[{name:"vocab_file",val:""},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '</s>'"},{name:"additional_special_tokens",val:" = None"},{name:"sp_model_kwargs",val:": Optional = None"},{name:"model_max_length",val:" = 64"},{name:"do_lower_case",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.SiglipTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.SiglipTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SiglipTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SiglipTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.SiglipTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.SiglipTokenizer.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The maximum length (in number of tokens) for model inputs.`,name:"model_max_length"},{anchor:"transformers.SiglipTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/tokenization_siglip.py#L44"}}),it=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SiglipTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.SiglipTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/tokenization_siglip.py#L226",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),lt=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.SiglipTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SiglipTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.SiglipTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/tokenization_siglip.py#L162",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),dt=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SiglipTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.SiglipTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/tokenization_siglip.py#L203",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),ct=new x({props:{name:"save_vocabulary",anchor:"transformers.SiglipTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/tokenization_siglip.py#L360"}}),pt=new I({props:{title:"SiglipImageProcessor",local:"transformers.SiglipImageProcessor",headingTag:"h2"}}),mt=new x({props:{name:"class transformers.SiglipImageProcessor",anchor:"transformers.SiglipImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.SiglipImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after resizing. Can be overridden by <code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.SiglipImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.SiglipImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.SiglipImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by <code>rescale_factor</code> in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.SiglipImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image by the specified mean and standard deviation. Can be overridden by
<code>do_normalize</code> in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.SiglipImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.5, 0.5, 0.5]</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.SiglipImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>[0.5, 0.5, 0.5]</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.SiglipImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/image_processing_siglip.py#L49"}}),gt=new x({props:{name:"preprocess",anchor:"transformers.SiglipImageProcessor.preprocess",parameters:[{name:"images",val:": Union"},{name:"do_resize",val:": bool = None"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"return_tensors",val:": Union = None"},{name:"data_format",val:": Optional = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.SiglipImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.SiglipImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing.`,name:"size"},{anchor:"transformers.SiglipImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.SiglipImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.SiglipImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.SiglipImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.SiglipImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.SiglipImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.SiglipImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.SiglipImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.SiglipImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.SiglipImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/image_processing_siglip.py#L126"}}),ht=new I({props:{title:"SiglipProcessor",local:"transformers.SiglipProcessor",headingTag:"h2"}}),ft=new x({props:{name:"class transformers.SiglipProcessor",anchor:"transformers.SiglipProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SiglipProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.SiglipProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/processing_siglip.py#L28"}}),ut=new x({props:{name:"batch_decode",anchor:"transformers.SiglipProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/processing_siglip.py#L130"}}),_t=new x({props:{name:"decode",anchor:"transformers.SiglipProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/processing_siglip.py#L123"}}),bt=new I({props:{title:"SiglipModel",local:"transformers.SiglipModel",headingTag:"h2"}}),Mt=new x({props:{name:"class transformers.SiglipModel",anchor:"transformers.SiglipModel",parameters:[{name:"config",val:": SiglipConfig"}],parametersDescription:[{anchor:"transformers.SiglipModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L1022"}}),yt=new x({props:{name:"forward",anchor:"transformers.SiglipModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"pixel_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"return_loss",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipModel.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.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SiglipModel.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.SiglipModel.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.SiglipModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.42.4/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.42.4/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SiglipModel.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.SiglipModel.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.SiglipModel.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.SiglipModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.SiglipModel.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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L1154",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.siglip.modeling_siglip.SiglipOutput</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.siglip.configuration_siglip.SiglipConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>torch.FloatTensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTextModel"
>SiglipTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionModel"
>SiglipVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipTextModel"
>SiglipTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionModel"
>SiglipVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.siglip.modeling_siglip.SiglipOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new To({props:{$$slots:{default:[xa]},$$scope:{ctx:w}}}),he=new oe({props:{anchor:"transformers.SiglipModel.forward.example",$$slots:{default:[ka]},$$scope:{ctx:w}}}),Tt=new x({props:{name:"get_text_features",anchor:"transformers.SiglipModel.get_text_features",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipModel.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.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SiglipModel.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.SiglipModel.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.SiglipModel.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.SiglipModel.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.SiglipModel.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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L1053",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),fe=new To({props:{$$slots:{default:[Ja]},$$scope:{ctx:w}}}),ue=new oe({props:{anchor:"transformers.SiglipModel.get_text_features.example",$$slots:{default:[Sa]},$$scope:{ctx:w}}}),vt=new x({props:{name:"get_image_features",anchor:"transformers.SiglipModel.get_image_features",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.42.4/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.42.4/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SiglipModel.get_image_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.SiglipModel.get_image_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.SiglipModel.get_image_features.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.SiglipModel.get_image_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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L1102",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipVisionModel"
>SiglipVisionModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),_e=new To({props:{$$slots:{default:[Ia]},$$scope:{ctx:w}}}),be=new oe({props:{anchor:"transformers.SiglipModel.get_image_features.example",$$slots:{default:[Ca]},$$scope:{ctx:w}}}),wt=new I({props:{title:"SiglipTextModel",local:"transformers.SiglipTextModel",headingTag:"h2"}}),$t=new x({props:{name:"class transformers.SiglipTextModel",anchor:"transformers.SiglipTextModel",parameters:[{name:"config",val:": SiglipTextConfig"}],parametersDescription:[{anchor:"transformers.SiglipTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L819"}}),jt=new x({props:{name:"forward",anchor:"transformers.SiglipTextModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipTextModel.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.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SiglipTextModel.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.SiglipTextModel.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.SiglipTextModel.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.SiglipTextModel.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.SiglipTextModel.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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L838",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/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.siglip.configuration_siglip.SiglipTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Me=new To({props:{$$slots:{default:[Ua]},$$scope:{ctx:w}}}),ye=new oe({props:{anchor:"transformers.SiglipTextModel.forward.example",$$slots:{default:[za]},$$scope:{ctx:w}}}),xt=new I({props:{title:"SiglipVisionModel",local:"transformers.SiglipVisionModel",headingTag:"h2"}}),kt=new x({props:{name:"class transformers.SiglipVisionModel",anchor:"transformers.SiglipVisionModel",parameters:[{name:"config",val:": SiglipVisionConfig"}],parametersDescription:[{anchor:"transformers.SiglipVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L960"}}),Jt=new x({props:{name:"forward",anchor:"transformers.SiglipVisionModel.forward",parameters:[{name:"pixel_values",val:""},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.42.4/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.42.4/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SiglipVisionModel.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.SiglipVisionModel.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.SiglipVisionModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.SiglipVisionModel.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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L979",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/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.siglip.configuration_siglip.SiglipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new To({props:{$$slots:{default:[Za]},$$scope:{ctx:w}}}),ve=new oe({props:{anchor:"transformers.SiglipVisionModel.forward.example",$$slots:{default:[Wa]},$$scope:{ctx:w}}}),St=new I({props:{title:"SiglipForImageClassification",local:"transformers.SiglipForImageClassification",headingTag:"h2"}}),It=new x({props:{name:"class transformers.SiglipForImageClassification",anchor:"transformers.SiglipForImageClassification",parameters:[{name:"config",val:": SiglipConfig"}],parametersDescription:[{anchor:"transformers.SiglipForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</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.42.4/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.42.4/src/transformers/models/siglip/modeling_siglip.py#L1254"}}),Ct=new x({props:{name:"forward",anchor:"transformers.SiglipForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipForImageClassification.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.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SiglipForImageClassification.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.SiglipForImageClassification.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.SiglipForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.42.4/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.42.4/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SiglipForImageClassification.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.SiglipForImageClassification.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.SiglipForImageClassification.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.SiglipForImageClassification.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.SiglipForImageClassification.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.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SiglipForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/siglip/modeling_siglip.py#L1278",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/en/model_doc/siglip#transformers.SiglipConfig"
>SiglipConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new To({props:{$$slots:{default:[Ba]},$$scope:{ctx:w}}}),$e=new oe({props:{anchor:"transformers.SiglipForImageClassification.forward.example",$$slots:{default:[Ga]},$$scope:{ctx:w}}}),Ut=new va({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/siglip.md"}}),{c(){o=d("meta"),T=a(),m=d("p"),p=a(),g(y.$$.fragment),t=a(),g(v.$$.fragment),$o=a(),ze=d("p"),ze.innerHTML=wn,jo=a(),Ze=d("p"),Ze.textContent=$n,xo=a(),We=d("p"),We.innerHTML=jn,ko=a(),g(Be.$$.fragment),Jo=a(),Ge=d("ul"),Ge.innerHTML=xn,So=a(),se=d("img"),Io=a(),Ne=d("small"),Ne.innerHTML=Jn,Co=a(),Fe=d("p"),Fe.innerHTML=Sn,Uo=a(),g(Ve.$$.fragment),zo=a(),Pe=d("p"),Pe.innerHTML=In,Zo=a(),g(Re.$$.fragment),Wo=a(),Xe=d("p"),Xe.textContent=Cn,Bo=a(),g(qe.$$.fragment),Go=a(),g(He.$$.fragment),No=a(),Le=d("p"),Le.textContent=Un,Fo=a(),g(Ee.$$.fragment),Vo=a(),g(Ye.$$.fragment),Po=a(),Qe=d("p"),Qe.textContent=zn,Ro=a(),Ae=d("ul"),Ae.innerHTML=Zn,Xo=a(),De=d("p"),De.textContent=Wn,qo=a(),g(Oe.$$.fragment),Ho=a(),C=d("div"),g(Ke.$$.fragment),gs=a(),Ft=d("p"),Ft.innerHTML=Bn,hs=a(),Vt=d("p"),Vt.innerHTML=Gn,fs=a(),g(ne.$$.fragment),us=a(),ae=d("div"),g(et.$$.fragment),_s=a(),Pt=d("p"),Pt.innerHTML=Nn,Lo=a(),g(tt.$$.fragment),Eo=a(),B=d("div"),g(ot.$$.fragment),bs=a(),Rt=d("p"),Rt.innerHTML=Fn,Ms=a(),Xt=d("p"),Xt.innerHTML=Vn,ys=a(),g(re.$$.fragment),Yo=a(),g(st.$$.fragment),Qo=a(),G=d("div"),g(nt.$$.fragment),Ts=a(),qt=d("p"),qt.innerHTML=Pn,vs=a(),Ht=d("p"),Ht.innerHTML=Rn,ws=a(),g(ie.$$.fragment),Ao=a(),g(at.$$.fragment),Do=a(),k=d("div"),g(rt.$$.fragment),$s=a(),Lt=d("p"),Lt.innerHTML=Xn,js=a(),Et=d("p"),Et.innerHTML=qn,xs=a(),O=d("div"),g(it.$$.fragment),ks=a(),Yt=d("p"),Yt.textContent=Hn,Js=a(),Qt=d("ul"),Qt.innerHTML=Ln,Ss=a(),le=d("div"),g(lt.$$.fragment),Is=a(),At=d("p"),At.innerHTML=En,Cs=a(),de=d("div"),g(dt.$$.fragment),Us=a(),Dt=d("p"),Dt.textContent=Yn,zs=a(),Ot=d("div"),g(ct.$$.fragment),Oo=a(),g(pt.$$.fragment),Ko=a(),Y=d("div"),g(mt.$$.fragment),Zs=a(),Kt=d("p"),Kt.textContent=Qn,Ws=a(),ce=d("div"),g(gt.$$.fragment),Bs=a(),eo=d("p"),eo.textContent=An,es=a(),g(ht.$$.fragment),ts=a(),U=d("div"),g(ft.$$.fragment),Gs=a(),to=d("p"),to.textContent=Dn,Ns=a(),oo=d("p"),oo.innerHTML=On,Fs=a(),pe=d("div"),g(ut.$$.fragment),Vs=a(),so=d("p"),so.innerHTML=Kn,Ps=a(),me=d("div"),g(_t.$$.fragment),Rs=a(),no=d("p"),no.innerHTML=ea,os=a(),g(bt.$$.fragment),ss=a(),J=d("div"),g(Mt.$$.fragment),Xs=a(),ao=d("p"),ao.innerHTML=ta,qs=a(),ro=d("p"),ro.innerHTML=oa,Hs=a(),R=d("div"),g(yt.$$.fragment),Ls=a(),io=d("p"),io.innerHTML=sa,Es=a(),g(ge.$$.fragment),Ys=a(),g(he.$$.fragment),Qs=a(),X=d("div"),g(Tt.$$.fragment),As=a(),lo=d("p"),lo.innerHTML=na,Ds=a(),g(fe.$$.fragment),Os=a(),g(ue.$$.fragment),Ks=a(),q=d("div"),g(vt.$$.fragment),en=a(),co=d("p"),co.innerHTML=aa,tn=a(),g(_e.$$.fragment),on=a(),g(be.$$.fragment),ns=a(),g(wt.$$.fragment),as=a(),N=d("div"),g($t.$$.fragment),sn=a(),po=d("p"),po.innerHTML=ra,nn=a(),mo=d("p"),mo.innerHTML=ia,an=a(),H=d("div"),g(jt.$$.fragment),rn=a(),go=d("p"),go.innerHTML=la,ln=a(),g(Me.$$.fragment),dn=a(),g(ye.$$.fragment),rs=a(),g(xt.$$.fragment),is=a(),F=d("div"),g(kt.$$.fragment),cn=a(),ho=d("p"),ho.innerHTML=da,pn=a(),fo=d("p"),fo.innerHTML=ca,mn=a(),L=d("div"),g(Jt.$$.fragment),gn=a(),uo=d("p"),uo.innerHTML=pa,hn=a(),g(Te.$$.fragment),fn=a(),g(ve.$$.fragment),ls=a(),g(St.$$.fragment),ds=a(),z=d("div"),g(It.$$.fragment),un=a(),_o=d("p"),_o.textContent=ma,_n=a(),bo=d("p"),bo.innerHTML=ga,bn=a(),Mo=d("p"),Mo.innerHTML=ha,Mn=a(),E=d("div"),g(Ct.$$.fragment),yn=a(),yo=d("p"),yo.innerHTML=fa,Tn=a(),g(we.$$.fragment),vn=a(),g($e.$$.fragment),cs=a(),g(Ut.$$.fragment),ps=a(),vo=d("p"),this.h()},l(e){const s=Ta("svelte-u9bgzb",document.head);o=c(s,"META",{name:!0,content:!0}),s.forEach(n),T=r(e),m=c(e,"P",{}),j(m).forEach(n),p=r(e),h(y.$$.fragment,e),t=r(e),h(v.$$.fragment,e),$o=r(e),ze=c(e,"P",{"data-svelte-h":!0}),M(ze)!=="svelte-q93fk2"&&(ze.innerHTML=wn),jo=r(e),Ze=c(e,"P",{"data-svelte-h":!0}),M(Ze)!=="svelte-vfdo9a"&&(Ze.textContent=$n),xo=r(e),We=c(e,"P",{"data-svelte-h":!0}),M(We)!=="svelte-1j0zyq6"&&(We.innerHTML=jn),ko=r(e),h(Be.$$.fragment,e),Jo=r(e),Ge=c(e,"UL",{"data-svelte-h":!0}),M(Ge)!=="svelte-hk3fuk"&&(Ge.innerHTML=xn),So=r(e),se=c(e,"IMG",{src:!0,alt:!0,width:!0}),Io=r(e),Ne=c(e,"SMALL",{"data-svelte-h":!0}),M(Ne)!=="svelte-dh6egv"&&(Ne.innerHTML=Jn),Co=r(e),Fe=c(e,"P",{"data-svelte-h":!0}),M(Fe)!=="svelte-1ovki4s"&&(Fe.innerHTML=Sn),Uo=r(e),h(Ve.$$.fragment,e),zo=r(e),Pe=c(e,"P",{"data-svelte-h":!0}),M(Pe)!=="svelte-kw3rvz"&&(Pe.innerHTML=In),Zo=r(e),h(Re.$$.fragment,e),Wo=r(e),Xe=c(e,"P",{"data-svelte-h":!0}),M(Xe)!=="svelte-1yjxirq"&&(Xe.textContent=Cn),Bo=r(e),h(qe.$$.fragment,e),Go=r(e),h(He.$$.fragment,e),No=r(e),Le=c(e,"P",{"data-svelte-h":!0}),M(Le)!=="svelte-eza9ob"&&(Le.textContent=Un),Fo=r(e),h(Ee.$$.fragment,e),Vo=r(e),h(Ye.$$.fragment,e),Po=r(e),Qe=c(e,"P",{"data-svelte-h":!0}),M(Qe)!=="svelte-1c7pwwl"&&(Qe.textContent=zn),Ro=r(e),Ae=c(e,"UL",{"data-svelte-h":!0}),M(Ae)!=="svelte-qvs19v"&&(Ae.innerHTML=Zn),Xo=r(e),De=c(e,"P",{"data-svelte-h":!0}),M(De)!=="svelte-1xesile"&&(De.textContent=Wn),qo=r(e),h(Oe.$$.fragment,e),Ho=r(e),C=c(e,"DIV",{class:!0});var V=j(C);h(Ke.$$.fragment,V),gs=r(V),Ft=c(V,"P",{"data-svelte-h":!0}),M(Ft)!=="svelte-qpkio9"&&(Ft.innerHTML=Bn),hs=r(V),Vt=c(V,"P",{"data-svelte-h":!0}),M(Vt)!=="svelte-q5f6v7"&&(Vt.innerHTML=Gn),fs=r(V),h(ne.$$.fragment,V),us=r(V),ae=c(V,"DIV",{class:!0});var zt=j(ae);h(et.$$.fragment,zt),_s=r(zt),Pt=c(zt,"P",{"data-svelte-h":!0}),M(Pt)!=="svelte-10syg2n"&&(Pt.innerHTML=Nn),zt.forEach(n),V.forEach(n),Lo=r(e),h(tt.$$.fragment,e),Eo=r(e),B=c(e,"DIV",{class:!0});var Q=j(B);h(ot.$$.fragment,Q),bs=r(Q),Rt=c(Q,"P",{"data-svelte-h":!0}),M(Rt)!=="svelte-71rjwp"&&(Rt.innerHTML=Fn),Ms=r(Q),Xt=c(Q,"P",{"data-svelte-h":!0}),M(Xt)!=="svelte-q5f6v7"&&(Xt.innerHTML=Vn),ys=r(Q),h(re.$$.fragment,Q),Q.forEach(n),Yo=r(e),h(st.$$.fragment,e),Qo=r(e),G=c(e,"DIV",{class:!0});var A=j(G);h(nt.$$.fragment,A),Ts=r(A),qt=c(A,"P",{"data-svelte-h":!0}),M(qt)!=="svelte-7ioitp"&&(qt.innerHTML=Pn),vs=r(A),Ht=c(A,"P",{"data-svelte-h":!0}),M(Ht)!=="svelte-q5f6v7"&&(Ht.innerHTML=Rn),ws=r(A),h(ie.$$.fragment,A),A.forEach(n),Ao=r(e),h(at.$$.fragment,e),Do=r(e),k=c(e,"DIV",{class:!0});var S=j(k);h(rt.$$.fragment,S),$s=r(S),Lt=c(S,"P",{"data-svelte-h":!0}),M(Lt)!=="svelte-xrmnfw"&&(Lt.innerHTML=Xn),js=r(S),Et=c(S,"P",{"data-svelte-h":!0}),M(Et)!=="svelte-ikivhl"&&(Et.innerHTML=qn),xs=r(S),O=c(S,"DIV",{class:!0});var ee=j(O);h(it.$$.fragment,ee),ks=r(ee),Yt=c(ee,"P",{"data-svelte-h":!0}),M(Yt)!=="svelte-1wjq39d"&&(Yt.textContent=Hn),Js=r(ee),Qt=c(ee,"UL",{"data-svelte-h":!0}),M(Qt)!=="svelte-8gh3n2"&&(Qt.innerHTML=Ln),ee.forEach(n),Ss=r(S),le=c(S,"DIV",{class:!0});var Zt=j(le);h(lt.$$.fragment,Zt),Is=r(Zt),At=c(Zt,"P",{"data-svelte-h":!0}),M(At)!=="svelte-1f4f5kp"&&(At.innerHTML=En),Zt.forEach(n),Cs=r(S),de=c(S,"DIV",{class:!0});var Wt=j(de);h(dt.$$.fragment,Wt),Us=r(Wt),Dt=c(Wt,"P",{"data-svelte-h":!0}),M(Dt)!=="svelte-fl5ab0"&&(Dt.textContent=Yn),Wt.forEach(n),zs=r(S),Ot=c(S,"DIV",{class:!0});var wo=j(Ot);h(ct.$$.fragment,wo),wo.forEach(n),S.forEach(n),Oo=r(e),h(pt.$$.fragment,e),Ko=r(e),Y=c(e,"DIV",{class:!0});var te=j(Y);h(mt.$$.fragment,te),Zs=r(te),Kt=c(te,"P",{"data-svelte-h":!0}),M(Kt)!=="svelte-19glyt2"&&(Kt.textContent=Qn),Ws=r(te),ce=c(te,"DIV",{class:!0});var Bt=j(ce);h(gt.$$.fragment,Bt),Bs=r(Bt),eo=c(Bt,"P",{"data-svelte-h":!0}),M(eo)!=="svelte-1x3yxsa"&&(eo.textContent=An),Bt.forEach(n),te.forEach(n),es=r(e),h(ht.$$.fragment,e),ts=r(e),U=c(e,"DIV",{class:!0});var P=j(U);h(ft.$$.fragment,P),Gs=r(P),to=c(P,"P",{"data-svelte-h":!0}),M(to)!=="svelte-yt9wur"&&(to.textContent=Dn),Ns=r(P),oo=c(P,"P",{"data-svelte-h":!0}),M(oo)!=="svelte-69e648"&&(oo.innerHTML=On),Fs=r(P),pe=c(P,"DIV",{class:!0});var Gt=j(pe);h(ut.$$.fragment,Gt),Vs=r(Gt),so=c(Gt,"P",{"data-svelte-h":!0}),M(so)!=="svelte-9mnzsi"&&(so.innerHTML=Kn),Gt.forEach(n),Ps=r(P),me=c(P,"DIV",{class:!0});var Nt=j(me);h(_t.$$.fragment,Nt),Rs=r(Nt),no=c(Nt,"P",{"data-svelte-h":!0}),M(no)!=="svelte-1eig2uw"&&(no.innerHTML=ea),Nt.forEach(n),P.forEach(n),os=r(e),h(bt.$$.fragment,e),ss=r(e),J=c(e,"DIV",{class:!0});var Z=j(J);h(Mt.$$.fragment,Z),Xs=r(Z),ao=c(Z,"P",{"data-svelte-h":!0}),M(ao)!=="svelte-mhvelr"&&(ao.innerHTML=ta),qs=r(Z),ro=c(Z,"P",{"data-svelte-h":!0}),M(ro)!=="svelte-hswkmf"&&(ro.innerHTML=oa),Hs=r(Z),R=c(Z,"DIV",{class:!0});var je=j(R);h(yt.$$.fragment,je),Ls=r(je),io=c(je,"P",{"data-svelte-h":!0}),M(io)!=="svelte-mmugri"&&(io.innerHTML=sa),Es=r(je),h(ge.$$.fragment,je),Ys=r(je),h(he.$$.fragment,je),je.forEach(n),Qs=r(Z),X=c(Z,"DIV",{class:!0});var xe=j(X);h(Tt.$$.fragment,xe),As=r(xe),lo=c(xe,"P",{"data-svelte-h":!0}),M(lo)!=="svelte-mmugri"&&(lo.innerHTML=na),Ds=r(xe),h(fe.$$.fragment,xe),Os=r(xe),h(ue.$$.fragment,xe),xe.forEach(n),Ks=r(Z),q=c(Z,"DIV",{class:!0});var ke=j(q);h(vt.$$.fragment,ke),en=r(ke),co=c(ke,"P",{"data-svelte-h":!0}),M(co)!=="svelte-mmugri"&&(co.innerHTML=aa),tn=r(ke),h(_e.$$.fragment,ke),on=r(ke),h(be.$$.fragment,ke),ke.forEach(n),Z.forEach(n),ns=r(e),h(wt.$$.fragment,e),as=r(e),N=c(e,"DIV",{class:!0});var Je=j(N);h($t.$$.fragment,Je),sn=r(Je),po=c(Je,"P",{"data-svelte-h":!0}),M(po)!=="svelte-1afqsqo"&&(po.innerHTML=ra),nn=r(Je),mo=c(Je,"P",{"data-svelte-h":!0}),M(mo)!=="svelte-hswkmf"&&(mo.innerHTML=ia),an=r(Je),H=c(Je,"DIV",{class:!0});var Se=j(H);h(jt.$$.fragment,Se),rn=r(Se),go=c(Se,"P",{"data-svelte-h":!0}),M(go)!=="svelte-1lftkpe"&&(go.innerHTML=la),ln=r(Se),h(Me.$$.fragment,Se),dn=r(Se),h(ye.$$.fragment,Se),Se.forEach(n),Je.forEach(n),rs=r(e),h(xt.$$.fragment,e),is=r(e),F=c(e,"DIV",{class:!0});var Ie=j(F);h(kt.$$.fragment,Ie),cn=r(Ie),ho=c(Ie,"P",{"data-svelte-h":!0}),M(ho)!=="svelte-1yydds9"&&(ho.innerHTML=da),pn=r(Ie),fo=c(Ie,"P",{"data-svelte-h":!0}),M(fo)!=="svelte-hswkmf"&&(fo.innerHTML=ca),mn=r(Ie),L=c(Ie,"DIV",{class:!0});var Ce=j(L);h(Jt.$$.fragment,Ce),gn=r(Ce),uo=c(Ce,"P",{"data-svelte-h":!0}),M(uo)!=="svelte-kb2d9u"&&(uo.innerHTML=pa),hn=r(Ce),h(Te.$$.fragment,Ce),fn=r(Ce),h(ve.$$.fragment,Ce),Ce.forEach(n),Ie.forEach(n),ls=r(e),h(St.$$.fragment,e),ds=r(e),z=c(e,"DIV",{class:!0});var K=j(z);h(It.$$.fragment,K),un=r(K),_o=c(K,"P",{"data-svelte-h":!0}),M(_o)!=="svelte-1dbrqa4"&&(_o.textContent=ma),_n=r(K),bo=c(K,"P",{"data-svelte-h":!0}),M(bo)!=="svelte-mhvelr"&&(bo.innerHTML=ga),bn=r(K),Mo=c(K,"P",{"data-svelte-h":!0}),M(Mo)!=="svelte-hswkmf"&&(Mo.innerHTML=ha),Mn=r(K),E=c(K,"DIV",{class:!0});var Ue=j(E);h(Ct.$$.fragment,Ue),yn=r(Ue),yo=c(Ue,"P",{"data-svelte-h":!0}),M(yo)!=="svelte-l6agr6"&&(yo.innerHTML=fa),Tn=r(Ue),h(we.$$.fragment,Ue),vn=r(Ue),h($e.$$.fragment,Ue),Ue.forEach(n),K.forEach(n),cs=r(e),h(Ut.$$.fragment,e),ps=r(e),vo=c(e,"P",{}),j(vo).forEach(n),this.h()},h(){$(o,"name","hf:doc:metadata"),$(o,"content",Fa),_a(se.src,kn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/siglip_table.jpeg")||$(se,"src",kn),$(se,"alt","drawing"),$(se,"width","600"),$(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){i(document.head,o),l(e,T,s),l(e,m,s),l(e,p,s),f(y,e,s),l(e,t,s),f(v,e,s),l(e,$o,s),l(e,ze,s),l(e,jo,s),l(e,Ze,s),l(e,xo,s),l(e,We,s),l(e,ko,s),f(Be,e,s),l(e,Jo,s),l(e,Ge,s),l(e,So,s),l(e,se,s),l(e,Io,s),l(e,Ne,s),l(e,Co,s),l(e,Fe,s),l(e,Uo,s),f(Ve,e,s),l(e,zo,s),l(e,Pe,s),l(e,Zo,s),f(Re,e,s),l(e,Wo,s),l(e,Xe,s),l(e,Bo,s),f(qe,e,s),l(e,Go,s),f(He,e,s),l(e,No,s),l(e,Le,s),l(e,Fo,s),f(Ee,e,s),l(e,Vo,s),f(Ye,e,s),l(e,Po,s),l(e,Qe,s),l(e,Ro,s),l(e,Ae,s),l(e,Xo,s),l(e,De,s),l(e,qo,s),f(Oe,e,s),l(e,Ho,s),l(e,C,s),f(Ke,C,null),i(C,gs),i(C,Ft),i(C,hs),i(C,Vt),i(C,fs),f(ne,C,null),i(C,us),i(C,ae),f(et,ae,null),i(ae,_s),i(ae,Pt),l(e,Lo,s),f(tt,e,s),l(e,Eo,s),l(e,B,s),f(ot,B,null),i(B,bs),i(B,Rt),i(B,Ms),i(B,Xt),i(B,ys),f(re,B,null),l(e,Yo,s),f(st,e,s),l(e,Qo,s),l(e,G,s),f(nt,G,null),i(G,Ts),i(G,qt),i(G,vs),i(G,Ht),i(G,ws),f(ie,G,null),l(e,Ao,s),f(at,e,s),l(e,Do,s),l(e,k,s),f(rt,k,null),i(k,$s),i(k,Lt),i(k,js),i(k,Et),i(k,xs),i(k,O),f(it,O,null),i(O,ks),i(O,Yt),i(O,Js),i(O,Qt),i(k,Ss),i(k,le),f(lt,le,null),i(le,Is),i(le,At),i(k,Cs),i(k,de),f(dt,de,null),i(de,Us),i(de,Dt),i(k,zs),i(k,Ot),f(ct,Ot,null),l(e,Oo,s),f(pt,e,s),l(e,Ko,s),l(e,Y,s),f(mt,Y,null),i(Y,Zs),i(Y,Kt),i(Y,Ws),i(Y,ce),f(gt,ce,null),i(ce,Bs),i(ce,eo),l(e,es,s),f(ht,e,s),l(e,ts,s),l(e,U,s),f(ft,U,null),i(U,Gs),i(U,to),i(U,Ns),i(U,oo),i(U,Fs),i(U,pe),f(ut,pe,null),i(pe,Vs),i(pe,so),i(U,Ps),i(U,me),f(_t,me,null),i(me,Rs),i(me,no),l(e,os,s),f(bt,e,s),l(e,ss,s),l(e,J,s),f(Mt,J,null),i(J,Xs),i(J,ao),i(J,qs),i(J,ro),i(J,Hs),i(J,R),f(yt,R,null),i(R,Ls),i(R,io),i(R,Es),f(ge,R,null),i(R,Ys),f(he,R,null),i(J,Qs),i(J,X),f(Tt,X,null),i(X,As),i(X,lo),i(X,Ds),f(fe,X,null),i(X,Os),f(ue,X,null),i(J,Ks),i(J,q),f(vt,q,null),i(q,en),i(q,co),i(q,tn),f(_e,q,null),i(q,on),f(be,q,null),l(e,ns,s),f(wt,e,s),l(e,as,s),l(e,N,s),f($t,N,null),i(N,sn),i(N,po),i(N,nn),i(N,mo),i(N,an),i(N,H),f(jt,H,null),i(H,rn),i(H,go),i(H,ln),f(Me,H,null),i(H,dn),f(ye,H,null),l(e,rs,s),f(xt,e,s),l(e,is,s),l(e,F,s),f(kt,F,null),i(F,cn),i(F,ho),i(F,pn),i(F,fo),i(F,mn),i(F,L),f(Jt,L,null),i(L,gn),i(L,uo),i(L,hn),f(Te,L,null),i(L,fn),f(ve,L,null),l(e,ls,s),f(St,e,s),l(e,ds,s),l(e,z,s),f(It,z,null),i(z,un),i(z,_o),i(z,_n),i(z,bo),i(z,bn),i(z,Mo),i(z,Mn),i(z,E),f(Ct,E,null),i(E,yn),i(E,yo),i(E,Tn),f(we,E,null),i(E,vn),f($e,E,null),l(e,cs,s),f(Ut,e,s),l(e,ps,s),l(e,vo,s),ms=!0},p(e,[s]){const V={};s&2&&(V.$$scope={dirty:s,ctx:e}),ne.$set(V);const zt={};s&2&&(zt.$$scope={dirty:s,ctx:e}),re.$set(zt);const Q={};s&2&&(Q.$$scope={dirty:s,ctx:e}),ie.$set(Q);const A={};s&2&&(A.$$scope={dirty:s,ctx:e}),ge.$set(A);const S={};s&2&&(S.$$scope={dirty:s,ctx:e}),he.$set(S);const ee={};s&2&&(ee.$$scope={dirty:s,ctx:e}),fe.$set(ee);const Zt={};s&2&&(Zt.$$scope={dirty:s,ctx:e}),ue.$set(Zt);const Wt={};s&2&&(Wt.$$scope={dirty:s,ctx:e}),_e.$set(Wt);const wo={};s&2&&(wo.$$scope={dirty:s,ctx:e}),be.$set(wo);const te={};s&2&&(te.$$scope={dirty:s,ctx:e}),Me.$set(te);const Bt={};s&2&&(Bt.$$scope={dirty:s,ctx:e}),ye.$set(Bt);const P={};s&2&&(P.$$scope={dirty:s,ctx:e}),Te.$set(P);const Gt={};s&2&&(Gt.$$scope={dirty:s,ctx:e}),ve.$set(Gt);const Nt={};s&2&&(Nt.$$scope={dirty:s,ctx:e}),we.$set(Nt);const Z={};s&2&&(Z.$$scope={dirty:s,ctx:e}),$e.$set(Z)},i(e){ms||(u(y.$$.fragment,e),u(v.$$.fragment,e),u(Be.$$.fragment,e),u(Ve.$$.fragment,e),u(Re.$$.fragment,e),u(qe.$$.fragment,e),u(He.$$.fragment,e),u(Ee.$$.fragment,e),u(Ye.$$.fragment,e),u(Oe.$$.fragment,e),u(Ke.$$.fragment,e),u(ne.$$.fragment,e),u(et.$$.fragment,e),u(tt.$$.fragment,e),u(ot.$$.fragment,e),u(re.$$.fragment,e),u(st.$$.fragment,e),u(nt.$$.fragment,e),u(ie.$$.fragment,e),u(at.$$.fragment,e),u(rt.$$.fragment,e),u(it.$$.fragment,e),u(lt.$$.fragment,e),u(dt.$$.fragment,e),u(ct.$$.fragment,e),u(pt.$$.fragment,e),u(mt.$$.fragment,e),u(gt.$$.fragment,e),u(ht.$$.fragment,e),u(ft.$$.fragment,e),u(ut.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(Mt.$$.fragment,e),u(yt.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(Tt.$$.fragment,e),u(fe.$$.fragment,e),u(ue.$$.fragment,e),u(vt.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(wt.$$.fragment,e),u($t.$$.fragment,e),u(jt.$$.fragment,e),u(Me.$$.fragment,e),u(ye.$$.fragment,e),u(xt.$$.fragment,e),u(kt.$$.fragment,e),u(Jt.$$.fragment,e),u(Te.$$.fragment,e),u(ve.$$.fragment,e),u(St.$$.fragment,e),u(It.$$.fragment,e),u(Ct.$$.fragment,e),u(we.$$.fragment,e),u($e.$$.fragment,e),u(Ut.$$.fragment,e),ms=!0)},o(e){_(y.$$.fragment,e),_(v.$$.fragment,e),_(Be.$$.fragment,e),_(Ve.$$.fragment,e),_(Re.$$.fragment,e),_(qe.$$.fragment,e),_(He.$$.fragment,e),_(Ee.$$.fragment,e),_(Ye.$$.fragment,e),_(Oe.$$.fragment,e),_(Ke.$$.fragment,e),_(ne.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(re.$$.fragment,e),_(st.$$.fragment,e),_(nt.$$.fragment,e),_(ie.$$.fragment,e),_(at.$$.fragment,e),_(rt.$$.fragment,e),_(it.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),_(ct.$$.fragment,e),_(pt.$$.fragment,e),_(mt.$$.fragment,e),_(gt.$$.fragment,e),_(ht.$$.fragment,e),_(ft.$$.fragment,e),_(ut.$$.fragment,e),_(_t.$$.fragment,e),_(bt.$$.fragment,e),_(Mt.$$.fragment,e),_(yt.$$.fragment,e),_(ge.$$.fragment,e),_(he.$$.fragment,e),_(Tt.$$.fragment,e),_(fe.$$.fragment,e),_(ue.$$.fragment,e),_(vt.$$.fragment,e),_(_e.$$.fragment,e),_(be.$$.fragment,e),_(wt.$$.fragment,e),_($t.$$.fragment,e),_(jt.$$.fragment,e),_(Me.$$.fragment,e),_(ye.$$.fragment,e),_(xt.$$.fragment,e),_(kt.$$.fragment,e),_(Jt.$$.fragment,e),_(Te.$$.fragment,e),_(ve.$$.fragment,e),_(St.$$.fragment,e),_(It.$$.fragment,e),_(Ct.$$.fragment,e),_(we.$$.fragment,e),_($e.$$.fragment,e),_(Ut.$$.fragment,e),ms=!1},d(e){e&&(n(T),n(m),n(p),n(t),n($o),n(ze),n(jo),n(Ze),n(xo),n(We),n(ko),n(Jo),n(Ge),n(So),n(se),n(Io),n(Ne),n(Co),n(Fe),n(Uo),n(zo),n(Pe),n(Zo),n(Wo),n(Xe),n(Bo),n(Go),n(No),n(Le),n(Fo),n(Vo),n(Po),n(Qe),n(Ro),n(Ae),n(Xo),n(De),n(qo),n(Ho),n(C),n(Lo),n(Eo),n(B),n(Yo),n(Qo),n(G),n(Ao),n(Do),n(k),n(Oo),n(Ko),n(Y),n(es),n(ts),n(U),n(os),n(ss),n(J),n(ns),n(as),n(N),n(rs),n(is),n(F),n(ls),n(ds),n(z),n(cs),n(ps),n(vo)),n(o),b(y,e),b(v,e),b(Be,e),b(Ve,e),b(Re,e),b(qe,e),b(He,e),b(Ee,e),b(Ye,e),b(Oe,e),b(Ke),b(ne),b(et),b(tt,e),b(ot),b(re),b(st,e),b(nt),b(ie),b(at,e),b(rt),b(it),b(lt),b(dt),b(ct),b(pt,e),b(mt),b(gt),b(ht,e),b(ft),b(ut),b(_t),b(bt,e),b(Mt),b(yt),b(ge),b(he),b(Tt),b(fe),b(ue),b(vt),b(_e),b(be),b(wt,e),b($t),b(jt),b(Me),b(ye),b(xt,e),b(kt),b(Jt),b(Te),b(ve),b(St,e),b(It),b(Ct),b(we),b($e),b(Ut,e)}}}const Fa='{"title":"SigLIP","local":"siglip","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Usage example","local":"usage-example","sections":[{"title":"Pipeline API","local":"pipeline-api","sections":[],"depth":3},{"title":"Using the model yourself","local":"using-the-model-yourself","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"SiglipConfig","local":"transformers.SiglipConfig","sections":[],"depth":2},{"title":"SiglipTextConfig","local":"transformers.SiglipTextConfig","sections":[],"depth":2},{"title":"SiglipVisionConfig","local":"transformers.SiglipVisionConfig","sections":[],"depth":2},{"title":"SiglipTokenizer","local":"transformers.SiglipTokenizer","sections":[],"depth":2},{"title":"SiglipImageProcessor","local":"transformers.SiglipImageProcessor","sections":[],"depth":2},{"title":"SiglipProcessor","local":"transformers.SiglipProcessor","sections":[],"depth":2},{"title":"SiglipModel","local":"transformers.SiglipModel","sections":[],"depth":2},{"title":"SiglipTextModel","local":"transformers.SiglipTextModel","sections":[],"depth":2},{"title":"SiglipVisionModel","local":"transformers.SiglipVisionModel","sections":[],"depth":2},{"title":"SiglipForImageClassification","local":"transformers.SiglipForImageClassification","sections":[],"depth":2}],"depth":1}';function Va(w){return ba(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ya extends Ma{constructor(o){super(),ya(this,o,Va,Na,ua,{})}}export{Ya as component};
