import{s as xr,f as Jr,o as Ur,n as W}from"../chunks/scheduler.25b97de1.js";import{S as Sr,i as Ir,g as d,s as n,r as g,A as Cr,h as p,f as s,c as o,j as $,u as h,x as M,k as j,l as zr,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 Es}from"../chunks/Tip.baa67368.js";import{D as k}from"../chunks/Docstring.ffac8efa.js";import{C as B}from"../chunks/CodeBlock.e6cd0d95.js";import{E as re}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as x,E as Zr}from"../chunks/EditOnGithub.91d95064.js";function Wr(v){let r,T="Example:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-11lpom8"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Br(v){let r,T="Example:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-11lpom8"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Gr(v){let r,T="Example:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-11lpom8"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Nr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function Fr(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Vr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function qr(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Pr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function Rr(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Xr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function Hr(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Lr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function Er(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Qr(v){let r,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(){r=d("p"),r.innerHTML=T},l(m){r=p(m,"P",{"data-svelte-h":!0}),M(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(m,c){l(m,r,c)},p:W,d(m){m&&s(r)}}}function Yr(v){let r,T="Examples:",m,c,y;return c=new B({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(){r=d("p"),r.textContent=T,m=n(),g(c.$$.fragment)},l(a){r=p(a,"P",{"data-svelte-h":!0}),M(r)!=="svelte-kvfsh7"&&(r.textContent=T),m=o(a),h(c.$$.fragment,a)},m(a,w){l(a,r,w),l(a,m,w),f(c,a,w),y=!0},p:W,i(a){y||(u(c.$$.fragment,a),y=!0)},o(a){_(c.$$.fragment,a),y=!1},d(a){a&&(s(r),s(m)),b(c,a)}}}function Ar(v){let r,T,m,c,y,a,w,As,Fe,Ta='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.',Ds,Ve,wa="The abstract from the paper is the following:",Os,qe,va="<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>",Ks,Pe,en,Re,ja='<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 supported but does not use <code>torch.distributed</code> utilities which may limit the scalability of batch size. However, DDP and FDSP works on single-node multi-gpu setup.</li> <li>When using the standalone <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a> or <a href="/docs/transformers/pr_29969/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>',tn,ie,$a,sn,Xe,ka='SigLIP evaluation results compared to CLIP. Taken from the <a href="https://arxiv.org/abs/2303.15343">original paper</a>.',nn,He,xa=`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>.`,on,Le,an,Ee,Ja="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.",rn,Qe,ln,Ye,Ua="The pipeline allows to use the model in a few lines of code:",dn,Ae,pn,De,cn,Oe,Sa="If you want to do the pre- and postprocessing yourself, here’s how to do that:",mn,Ke,gn,et,hn,tt,Ia="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with SigLIP.",fn,st,Ca='<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>',un,nt,za="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.",_n,ot,bn,at,Za="First, make sure to install the latest version of Flash Attention 2.",Mn,rt,yn,it,Wa="Make also sure that you have a hardware that is compatible with Flash-Attention 2. Read more about it in the official documentation of flash-attn repository. Make also sure to load your model in half-precision (e.g. `torch.float16“)",Tn,lt,Ba="To load and run a model using Flash Attention 2, refer to the snippet below:",wn,dt,vn,pt,jn,ct,Ga=`PyTorch includes a native scaled dot-product attention (SDPA) operator as part of <code>torch.nn.functional</code>. This function
encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the
<a href="https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow">official documentation</a>
or the <a href="https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention" rel="nofollow">GPU Inference</a>
page for more information.`,$n,mt,Na="You may set <code>attn_implementation=&quot;sdpa&quot;</code> in <code>from_pretrained()</code> to explicitly request SDPA to be used. Make sure you have <code>torch&gt;=2.1.1</code>.",kn,gt,xn,ht,Fa="For the best speedups, we recommend loading the model in half-precision (e.g. <code>torch.float16</code> or <code>torch.bfloat16</code>).",Jn,ft,Un,ut,Va="Below is an expected speedup diagram that compares inference time between the native implementation in transformers using <code>google/siglip-so400m-patch14-384</code> checkpoint in <code>float16</code> precision and the Flash Attention 2 / SDPA version of the model using different batch sizes.",Sn,le,qa='<img src="https://i.imgur.com/cWm4rsn.png"/>',In,_t,Cn,I,bt,oo,is,Pa=`<a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/pr_29969/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.`,ao,ls,Ra=`Configuration objects inherit from <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ro,de,io,pe,Mt,lo,ds,Xa=`Instantiate a <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> (or a derived class) from siglip text model configuration and siglip vision
model configuration.`,zn,yt,Zn,G,Tt,po,ps,Ha=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_29969/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.`,co,cs,La=`Configuration objects inherit from <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,mo,ce,Wn,wt,Bn,N,vt,go,ms,Ea=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_29969/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.`,ho,gs,Qa=`Configuration objects inherit from <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,fo,me,Gn,jt,Nn,J,$t,uo,hs,Ya='Construct a Siglip tokenizer. Based on <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.',_o,fs,Aa=`This tokenizer inherits from <a href="/docs/transformers/pr_29969/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.`,bo,ee,kt,Mo,us,Da=`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:`,yo,_s,Oa="<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>",To,ge,xt,wo,bs,Ka=`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.`,vo,he,Jt,jo,Ms,er=`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.`,$o,ys,Ut,Fn,St,Vn,C,It,ko,Ts,tr=`Construct a “fast” SigLIP tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on
<a href="https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models" rel="nofollow">Unigram</a>.`,xo,ws,sr=`This tokenizer inherits from <a href="/docs/transformers/pr_29969/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Jo,te,Ct,Uo,vs,nr=`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:`,So,js,or="<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>",Io,fe,zt,Co,$s,ar=`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.`,qn,Zt,Pn,D,Wt,zo,ks,rr="Constructs a SigLIP image processor.",Zo,ue,Bt,Wo,xs,ir="Preprocess an image or batch of images.",Rn,Gt,Xn,z,Nt,Bo,Js,lr="Constructs a Siglip processor which wraps a Siglip image processor and a Siglip tokenizer into a single processor.",Go,Us,dr=`<a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipProcessor">SiglipProcessor</a> offers all the functionalities of <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a> and <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipProcessor.decode">decode()</a> for more information.`,No,_e,Ft,Fo,Ss,pr=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Vo,be,Vt,qo,Is,cr=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Hn,qt,Ln,U,Pt,Po,Cs,mr=`This model inherits from <a href="/docs/transformers/pr_29969/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.)`,Ro,zs,gr=`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.`,Xo,X,Rt,Ho,Zs,hr='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',Lo,Me,Eo,ye,Qo,H,Xt,Yo,Ws,fr='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',Ao,Te,Do,we,Oo,L,Ht,Ko,Bs,ur='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',ea,ve,ta,je,En,Lt,Qn,F,Et,sa,Gs,_r=`The text model from SigLIP without any head or projection on top.
This model inherits from <a href="/docs/transformers/pr_29969/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.)`,na,Ns,br=`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.`,oa,E,Qt,aa,Fs,Mr='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipTextModel">SiglipTextModel</a> forward method, overrides the <code>__call__</code> special method.',ra,$e,ia,ke,Yn,Yt,An,V,At,la,Vs,yr=`The vision model from SigLIP without any head or projection on top.
This model inherits from <a href="/docs/transformers/pr_29969/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.)`,da,qs,Tr=`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.`,pa,Q,Dt,ca,Ps,wr='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipVisionModel">SiglipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',ma,xe,ga,Je,Dn,Ot,On,Z,Kt,ha,Rs,vr=`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.`,fa,Xs,jr=`This model inherits from <a href="/docs/transformers/pr_29969/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.)`,ua,Hs,$r=`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.`,_a,Y,es,ba,Ls,kr='The <a href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipForImageClassification">SiglipForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ma,Ue,ya,Se,Kn,ts,eo,Qs,to;return y=new x({props:{title:"SigLIP",local:"siglip",headingTag:"h1"}}),w=new x({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Pe=new x({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),Le=new x({props:{title:"Usage example",local:"usage-example",headingTag:"h2"}}),Qe=new x({props:{title:"Pipeline API",local:"pipeline-api",headingTag:"h3"}}),Ae=new B({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}}),De=new x({props:{title:"Using the model yourself",local:"using-the-model-yourself",headingTag:"h3"}}),Ke=new B({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}}),et=new x({props:{title:"Resources",local:"resources",headingTag:"h2"}}),ot=new x({props:{title:"Combining SigLIP and Flash Attention 2",local:"combining-siglip-and-flash-attention-2",headingTag:"h2"}}),rt=new B({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),dt=new B({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBTaWdsaXBQcm9jZXNzb3IlMkMlMjBTaWdsaXBNb2RlbCUwQWRldmljZSUyMCUzRCUyMCUyMmN1ZGElMjIlMjAlMjMlMjB0aGUlMjBkZXZpY2UlMjB0byUyMGxvYWQlMjB0aGUlMjBtb2RlbCUyMG9udG8lMEElMEFtb2RlbCUyMCUzRCUyMFNpZ2xpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJnb29nbGUlMkZzaWdsaXAtc280MDBtLXBhdGNoMTQtMzg0JTIyJTJDJTBBJTIwJTIwJTIwJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMmZsYXNoX2F0dGVudGlvbl8yJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRGRldmljZSUyQyUwQSklMEFwcm9jZXNzb3IlMjAlM0QlMjBTaWdsaXBQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1zbzQwMG0tcGF0Y2gxNC0zODQlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWNhbmRpZGF0ZV9sYWJlbHMlMjAlM0QlMjAlNUIlMjIyJTIwY2F0cyUyMiUyQyUyMCUyMjIlMjBkb2dzJTIyJTVEJTBBY2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QmYnVGhpcyUyMGlzJTIwYSUyMHBob3RvJTIwb2YlMjAlN0JsYWJlbCU3RC4nJTIwZm9yJTIwbGFiZWwlMjBpbiUyMGNhbmRpZGF0ZV9sYWJlbHMlNUQlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRGNhbmRpZGF0ZV9sYWJlbHMlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHBhZGRpbmclM0QlMjJtYXhfbGVuZ3RoJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFpbnB1dHMudG8oZGV2aWNlKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjB3aXRoJTIwdG9yY2guYXV0b2Nhc3QoZGV2aWNlKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTBBcHJvYnMlMjAlM0QlMjB0b3JjaC5zaWdtb2lkKGxvZ2l0c19wZXJfaW1hZ2UpJTIwJTIzJTIwdGhlc2UlMjBhcmUlMjB0aGUlMjBwcm9iYWJpbGl0aWVzJTBBcHJpbnQoZiUyMiU3QnByb2JzJTVCMCU1RCU1QjAlNUQlM0EuMSUyNSU3RCUyMHRoYXQlMjBpbWFnZSUyMDAlMjBpcyUyMCclN0JjYW5kaWRhdGVfbGFiZWxzJTVCMCU1RCU3RCclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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">from</span> transformers <span class="hljs-keyword">import</span> SiglipProcessor, SiglipModel
<span class="hljs-meta">&gt;&gt;&gt; </span>device = <span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-comment"># the device to load the model onto</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/siglip-so400m-patch14-384&quot;</span>,
<span class="hljs-meta">... </span>    attn_implementation=<span class="hljs-string">&quot;flash_attention_2&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    device_map=device,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = SiglipProcessor.from_pretrained(<span class="hljs-string">&quot;google/siglip-so400m-patch14-384&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-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=candidate_labels, 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>inputs.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> torch.autocast(device):
<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">{candidate_labels[<span class="hljs-number">0</span>]}</span>&#x27;&quot;</span>)
<span class="hljs-number">51.3</span>% that image <span class="hljs-number">0</span> <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;This is a photo of 2 cats.&#x27;</span>`,wrap:!1}}),pt=new x({props:{title:"Using Scaled Dot Product Attention (SDPA)",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h2"}}),gt=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNpZ2xpcE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBTaWdsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZ29vZ2xlJTJGc2lnbGlwLXNvNDAwbS1wYXRjaDE0LTM4NCUyMiUyQyUwQSUyMCUyMCUyMCUyMGF0dG5faW1wbGVtZW50YXRpb24lM0QlMjJzZHBhJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRGRldmljZSUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SiglipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SiglipModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/siglip-so400m-patch14-384&quot;</span>,
<span class="hljs-meta">... </span>    attn_implementation=<span class="hljs-string">&quot;sdpa&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    device_map=device,
<span class="hljs-meta">... </span>)`,wrap:!1}}),ft=new x({props:{title:"Expected speedups",local:"expected-speedups",headingTag:"h2"}}),_t=new x({props:{title:"SiglipConfig",local:"transformers.SiglipConfig",headingTag:"h2"}}),bt=new k({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/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/configuration_siglip.py#L228"}}),de=new re({props:{anchor:"transformers.SiglipConfig.example",$$slots:{default:[Wr]},$$scope:{ctx:v}}}),Mt=new k({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/vr_29969/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/pr_29969/en/model_doc/siglip#transformers.SiglipConfig"
>SiglipConfig</a></p>
`}}),yt=new x({props:{title:"SiglipTextConfig",local:"transformers.SiglipTextConfig",headingTag:"h2"}}),Tt=new k({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/pr_29969/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/vr_29969/src/transformers/models/siglip/configuration_siglip.py#L27"}}),ce=new re({props:{anchor:"transformers.SiglipTextConfig.example",$$slots:{default:[Br]},$$scope:{ctx:v}}}),wt=new x({props:{title:"SiglipVisionConfig",local:"transformers.SiglipVisionConfig",headingTag:"h2"}}),vt=new k({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/vr_29969/src/transformers/models/siglip/configuration_siglip.py#L132"}}),me=new re({props:{anchor:"transformers.SiglipVisionConfig.example",$$slots:{default:[Gr]},$$scope:{ctx:v}}}),jt=new x({props:{title:"SiglipTokenizer",local:"transformers.SiglipTokenizer",headingTag:"h2"}}),$t=new k({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/vr_29969/src/transformers/models/siglip/tokenization_siglip.py#L44"}}),kt=new k({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/vr_29969/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>
`}}),xt=new k({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/vr_29969/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>
`}}),Jt=new k({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/vr_29969/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>
`}}),Ut=new k({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/vr_29969/src/transformers/models/siglip/tokenization_siglip.py#L360"}}),St=new x({props:{title:"SiglipTokenizerFast",local:"transformers.SiglipTokenizerFast",headingTag:"h2"}}),It=new k({props:{name:"class transformers.SiglipTokenizerFast",anchor:"transformers.SiglipTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '</s>'"},{name:"additional_special_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#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.SiglipTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to tokenizer file.`,name:"tokenizer_file"},{anchor:"transformers.SiglipTokenizerFast.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.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.SiglipTokenizerFast.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.SiglipTokenizerFast.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.SiglipTokenizerFast.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"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/tokenization_siglip_fast.py#L36"}}),Ct=new k({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SiglipTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipTokenizerFast.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.SiglipTokenizerFast.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/vr_29969/src/transformers/models/siglip/tokenization_siglip_fast.py#L137",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>
`}}),zt=new k({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SiglipTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SiglipTokenizerFast.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.SiglipTokenizerFast.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/vr_29969/src/transformers/models/siglip/tokenization_siglip_fast.py#L163",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>
`}}),Zt=new x({props:{title:"SiglipImageProcessor",local:"transformers.SiglipImageProcessor",headingTag:"h2"}}),Wt=new k({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/vr_29969/src/transformers/models/siglip/image_processing_siglip.py#L48"}}),Bt=new k({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"}],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/vr_29969/src/transformers/models/siglip/image_processing_siglip.py#L110"}}),Gt=new x({props:{title:"SiglipProcessor",local:"transformers.SiglipProcessor",headingTag:"h2"}}),Nt=new k({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/pr_29969/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/pr_29969/en/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/processing_siglip.py#L28"}}),Ft=new k({props:{name:"batch_decode",anchor:"transformers.SiglipProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/processing_siglip.py#L130"}}),Vt=new k({props:{name:"decode",anchor:"transformers.SiglipProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/processing_siglip.py#L123"}}),qt=new x({props:{title:"SiglipModel",local:"transformers.SiglipModel",headingTag:"h2"}}),Pt=new k({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/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1198"}}),Rt=new k({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/pr_29969/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_29969/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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1335",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</strong> (<code>torch.FloatTensor</code> 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</strong> (<code>torch.FloatTensor</code> 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</strong> (<code>torch.FloatTensor</code> 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/pr_29969/en/model_doc/siglip#transformers.SiglipTextModel"
>SiglipTextModel</a>.</li>
<li><strong>image_embeds</strong> (<code>torch.FloatTensor</code> 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/pr_29969/en/model_doc/siglip#transformers.SiglipVisionModel"
>SiglipVisionModel</a>.</li>
<li><strong>text_model_output</strong> (<code>BaseModelOutputWithPooling</code>) — The output of the <a
  href="/docs/transformers/pr_29969/en/model_doc/siglip#transformers.SiglipTextModel"
>SiglipTextModel</a>.</li>
<li><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) — The output of the <a
  href="/docs/transformers/pr_29969/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>
`}}),Me=new Es({props:{$$slots:{default:[Nr]},$$scope:{ctx:v}}}),ye=new re({props:{anchor:"transformers.SiglipModel.forward.example",$$slots:{default:[Fr]},$$scope:{ctx:v}}}),Xt=new k({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/pr_29969/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1234",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/pr_29969/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>
`}}),Te=new Es({props:{$$slots:{default:[Vr]},$$scope:{ctx:v}}}),we=new re({props:{anchor:"transformers.SiglipModel.get_text_features.example",$$slots:{default:[qr]},$$scope:{ctx:v}}}),Ht=new k({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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1283",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/pr_29969/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>
`}}),ve=new Es({props:{$$slots:{default:[Pr]},$$scope:{ctx:v}}}),je=new re({props:{anchor:"transformers.SiglipModel.get_image_features.example",$$slots:{default:[Rr]},$$scope:{ctx:v}}}),Lt=new x({props:{title:"SiglipTextModel",local:"transformers.SiglipTextModel",headingTag:"h2"}}),Et=new k({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/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L995"}}),Qt=new k({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/pr_29969/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1014",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new Es({props:{$$slots:{default:[Xr]},$$scope:{ctx:v}}}),ke=new re({props:{anchor:"transformers.SiglipTextModel.forward.example",$$slots:{default:[Hr]},$$scope:{ctx:v}}}),Yt=new x({props:{title:"SiglipVisionModel",local:"transformers.SiglipVisionModel",headingTag:"h2"}}),At=new k({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/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1136"}}),Dt=new k({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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1155",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new Es({props:{$$slots:{default:[Lr]},$$scope:{ctx:v}}}),Je=new re({props:{anchor:"transformers.SiglipVisionModel.forward.example",$$slots:{default:[Er]},$$scope:{ctx:v}}}),Ot=new x({props:{title:"SiglipForImageClassification",local:"transformers.SiglipForImageClassification",headingTag:"h2"}}),Kt=new k({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/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1440"}}),es=new k({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/pr_29969/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_29969/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_29969/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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/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/pr_29969/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/vr_29969/src/transformers/models/siglip/modeling_siglip.py#L1470",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_29969/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/pr_29969/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/pr_29969/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ue=new Es({props:{$$slots:{default:[Qr]},$$scope:{ctx:v}}}),Se=new re({props:{anchor:"transformers.SiglipForImageClassification.forward.example",$$slots:{default:[Yr]},$$scope:{ctx:v}}}),ts=new Zr({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/siglip.md"}}),{c(){r=d("meta"),T=n(),m=d("p"),c=n(),g(y.$$.fragment),a=n(),g(w.$$.fragment),As=n(),Fe=d("p"),Fe.innerHTML=Ta,Ds=n(),Ve=d("p"),Ve.textContent=wa,Os=n(),qe=d("p"),qe.innerHTML=va,Ks=n(),g(Pe.$$.fragment),en=n(),Re=d("ul"),Re.innerHTML=ja,tn=n(),ie=d("img"),sn=n(),Xe=d("small"),Xe.innerHTML=ka,nn=n(),He=d("p"),He.innerHTML=xa,on=n(),g(Le.$$.fragment),an=n(),Ee=d("p"),Ee.innerHTML=Ja,rn=n(),g(Qe.$$.fragment),ln=n(),Ye=d("p"),Ye.textContent=Ua,dn=n(),g(Ae.$$.fragment),pn=n(),g(De.$$.fragment),cn=n(),Oe=d("p"),Oe.textContent=Sa,mn=n(),g(Ke.$$.fragment),gn=n(),g(et.$$.fragment),hn=n(),tt=d("p"),tt.textContent=Ia,fn=n(),st=d("ul"),st.innerHTML=Ca,un=n(),nt=d("p"),nt.textContent=za,_n=n(),g(ot.$$.fragment),bn=n(),at=d("p"),at.textContent=Za,Mn=n(),g(rt.$$.fragment),yn=n(),it=d("p"),it.textContent=Wa,Tn=n(),lt=d("p"),lt.textContent=Ba,wn=n(),g(dt.$$.fragment),vn=n(),g(pt.$$.fragment),jn=n(),ct=d("p"),ct.innerHTML=Ga,$n=n(),mt=d("p"),mt.innerHTML=Na,kn=n(),g(gt.$$.fragment),xn=n(),ht=d("p"),ht.innerHTML=Fa,Jn=n(),g(ft.$$.fragment),Un=n(),ut=d("p"),ut.innerHTML=Va,Sn=n(),le=d("div"),le.innerHTML=qa,In=n(),g(_t.$$.fragment),Cn=n(),I=d("div"),g(bt.$$.fragment),oo=n(),is=d("p"),is.innerHTML=Pa,ao=n(),ls=d("p"),ls.innerHTML=Ra,ro=n(),g(de.$$.fragment),io=n(),pe=d("div"),g(Mt.$$.fragment),lo=n(),ds=d("p"),ds.innerHTML=Xa,zn=n(),g(yt.$$.fragment),Zn=n(),G=d("div"),g(Tt.$$.fragment),po=n(),ps=d("p"),ps.innerHTML=Ha,co=n(),cs=d("p"),cs.innerHTML=La,mo=n(),g(ce.$$.fragment),Wn=n(),g(wt.$$.fragment),Bn=n(),N=d("div"),g(vt.$$.fragment),go=n(),ms=d("p"),ms.innerHTML=Ea,ho=n(),gs=d("p"),gs.innerHTML=Qa,fo=n(),g(me.$$.fragment),Gn=n(),g(jt.$$.fragment),Nn=n(),J=d("div"),g($t.$$.fragment),uo=n(),hs=d("p"),hs.innerHTML=Ya,_o=n(),fs=d("p"),fs.innerHTML=Aa,bo=n(),ee=d("div"),g(kt.$$.fragment),Mo=n(),us=d("p"),us.textContent=Da,yo=n(),_s=d("ul"),_s.innerHTML=Oa,To=n(),ge=d("div"),g(xt.$$.fragment),wo=n(),bs=d("p"),bs.innerHTML=Ka,vo=n(),he=d("div"),g(Jt.$$.fragment),jo=n(),Ms=d("p"),Ms.textContent=er,$o=n(),ys=d("div"),g(Ut.$$.fragment),Fn=n(),g(St.$$.fragment),Vn=n(),C=d("div"),g(It.$$.fragment),ko=n(),Ts=d("p"),Ts.innerHTML=tr,xo=n(),ws=d("p"),ws.innerHTML=sr,Jo=n(),te=d("div"),g(Ct.$$.fragment),Uo=n(),vs=d("p"),vs.textContent=nr,So=n(),js=d("ul"),js.innerHTML=or,Io=n(),fe=d("div"),g(zt.$$.fragment),Co=n(),$s=d("p"),$s.textContent=ar,qn=n(),g(Zt.$$.fragment),Pn=n(),D=d("div"),g(Wt.$$.fragment),zo=n(),ks=d("p"),ks.textContent=rr,Zo=n(),ue=d("div"),g(Bt.$$.fragment),Wo=n(),xs=d("p"),xs.textContent=ir,Rn=n(),g(Gt.$$.fragment),Xn=n(),z=d("div"),g(Nt.$$.fragment),Bo=n(),Js=d("p"),Js.textContent=lr,Go=n(),Us=d("p"),Us.innerHTML=dr,No=n(),_e=d("div"),g(Ft.$$.fragment),Fo=n(),Ss=d("p"),Ss.innerHTML=pr,Vo=n(),be=d("div"),g(Vt.$$.fragment),qo=n(),Is=d("p"),Is.innerHTML=cr,Hn=n(),g(qt.$$.fragment),Ln=n(),U=d("div"),g(Pt.$$.fragment),Po=n(),Cs=d("p"),Cs.innerHTML=mr,Ro=n(),zs=d("p"),zs.innerHTML=gr,Xo=n(),X=d("div"),g(Rt.$$.fragment),Ho=n(),Zs=d("p"),Zs.innerHTML=hr,Lo=n(),g(Me.$$.fragment),Eo=n(),g(ye.$$.fragment),Qo=n(),H=d("div"),g(Xt.$$.fragment),Yo=n(),Ws=d("p"),Ws.innerHTML=fr,Ao=n(),g(Te.$$.fragment),Do=n(),g(we.$$.fragment),Oo=n(),L=d("div"),g(Ht.$$.fragment),Ko=n(),Bs=d("p"),Bs.innerHTML=ur,ea=n(),g(ve.$$.fragment),ta=n(),g(je.$$.fragment),En=n(),g(Lt.$$.fragment),Qn=n(),F=d("div"),g(Et.$$.fragment),sa=n(),Gs=d("p"),Gs.innerHTML=_r,na=n(),Ns=d("p"),Ns.innerHTML=br,oa=n(),E=d("div"),g(Qt.$$.fragment),aa=n(),Fs=d("p"),Fs.innerHTML=Mr,ra=n(),g($e.$$.fragment),ia=n(),g(ke.$$.fragment),Yn=n(),g(Yt.$$.fragment),An=n(),V=d("div"),g(At.$$.fragment),la=n(),Vs=d("p"),Vs.innerHTML=yr,da=n(),qs=d("p"),qs.innerHTML=Tr,pa=n(),Q=d("div"),g(Dt.$$.fragment),ca=n(),Ps=d("p"),Ps.innerHTML=wr,ma=n(),g(xe.$$.fragment),ga=n(),g(Je.$$.fragment),Dn=n(),g(Ot.$$.fragment),On=n(),Z=d("div"),g(Kt.$$.fragment),ha=n(),Rs=d("p"),Rs.textContent=vr,fa=n(),Xs=d("p"),Xs.innerHTML=jr,ua=n(),Hs=d("p"),Hs.innerHTML=$r,_a=n(),Y=d("div"),g(es.$$.fragment),ba=n(),Ls=d("p"),Ls.innerHTML=kr,Ma=n(),g(Ue.$$.fragment),ya=n(),g(Se.$$.fragment),Kn=n(),g(ts.$$.fragment),eo=n(),Qs=d("p"),this.h()},l(e){const t=Cr("svelte-u9bgzb",document.head);r=p(t,"META",{name:!0,content:!0}),t.forEach(s),T=o(e),m=p(e,"P",{}),$(m).forEach(s),c=o(e),h(y.$$.fragment,e),a=o(e),h(w.$$.fragment,e),As=o(e),Fe=p(e,"P",{"data-svelte-h":!0}),M(Fe)!=="svelte-q93fk2"&&(Fe.innerHTML=Ta),Ds=o(e),Ve=p(e,"P",{"data-svelte-h":!0}),M(Ve)!=="svelte-vfdo9a"&&(Ve.textContent=wa),Os=o(e),qe=p(e,"P",{"data-svelte-h":!0}),M(qe)!=="svelte-1j0zyq6"&&(qe.innerHTML=va),Ks=o(e),h(Pe.$$.fragment,e),en=o(e),Re=p(e,"UL",{"data-svelte-h":!0}),M(Re)!=="svelte-98ttp7"&&(Re.innerHTML=ja),tn=o(e),ie=p(e,"IMG",{src:!0,alt:!0,width:!0}),sn=o(e),Xe=p(e,"SMALL",{"data-svelte-h":!0}),M(Xe)!=="svelte-dh6egv"&&(Xe.innerHTML=ka),nn=o(e),He=p(e,"P",{"data-svelte-h":!0}),M(He)!=="svelte-1ovki4s"&&(He.innerHTML=xa),on=o(e),h(Le.$$.fragment,e),an=o(e),Ee=p(e,"P",{"data-svelte-h":!0}),M(Ee)!=="svelte-kw3rvz"&&(Ee.innerHTML=Ja),rn=o(e),h(Qe.$$.fragment,e),ln=o(e),Ye=p(e,"P",{"data-svelte-h":!0}),M(Ye)!=="svelte-1yjxirq"&&(Ye.textContent=Ua),dn=o(e),h(Ae.$$.fragment,e),pn=o(e),h(De.$$.fragment,e),cn=o(e),Oe=p(e,"P",{"data-svelte-h":!0}),M(Oe)!=="svelte-eza9ob"&&(Oe.textContent=Sa),mn=o(e),h(Ke.$$.fragment,e),gn=o(e),h(et.$$.fragment,e),hn=o(e),tt=p(e,"P",{"data-svelte-h":!0}),M(tt)!=="svelte-1c7pwwl"&&(tt.textContent=Ia),fn=o(e),st=p(e,"UL",{"data-svelte-h":!0}),M(st)!=="svelte-qvs19v"&&(st.innerHTML=Ca),un=o(e),nt=p(e,"P",{"data-svelte-h":!0}),M(nt)!=="svelte-1xesile"&&(nt.textContent=za),_n=o(e),h(ot.$$.fragment,e),bn=o(e),at=p(e,"P",{"data-svelte-h":!0}),M(at)!=="svelte-uqcw46"&&(at.textContent=Za),Mn=o(e),h(rt.$$.fragment,e),yn=o(e),it=p(e,"P",{"data-svelte-h":!0}),M(it)!=="svelte-enej3y"&&(it.textContent=Wa),Tn=o(e),lt=p(e,"P",{"data-svelte-h":!0}),M(lt)!=="svelte-14hchid"&&(lt.textContent=Ba),wn=o(e),h(dt.$$.fragment,e),vn=o(e),h(pt.$$.fragment,e),jn=o(e),ct=p(e,"P",{"data-svelte-h":!0}),M(ct)!=="svelte-1cid2pe"&&(ct.innerHTML=Ga),$n=o(e),mt=p(e,"P",{"data-svelte-h":!0}),M(mt)!=="svelte-o98pw2"&&(mt.innerHTML=Na),kn=o(e),h(gt.$$.fragment,e),xn=o(e),ht=p(e,"P",{"data-svelte-h":!0}),M(ht)!=="svelte-djb2w0"&&(ht.innerHTML=Fa),Jn=o(e),h(ft.$$.fragment,e),Un=o(e),ut=p(e,"P",{"data-svelte-h":!0}),M(ut)!=="svelte-1gveljk"&&(ut.innerHTML=Va),Sn=o(e),le=p(e,"DIV",{style:!0,"data-svelte-h":!0}),M(le)!=="svelte-16g45j1"&&(le.innerHTML=qa),In=o(e),h(_t.$$.fragment,e),Cn=o(e),I=p(e,"DIV",{class:!0});var q=$(I);h(bt.$$.fragment,q),oo=o(q),is=p(q,"P",{"data-svelte-h":!0}),M(is)!=="svelte-leke55"&&(is.innerHTML=Pa),ao=o(q),ls=p(q,"P",{"data-svelte-h":!0}),M(ls)!=="svelte-1xp2kwr"&&(ls.innerHTML=Ra),ro=o(q),h(de.$$.fragment,q),io=o(q),pe=p(q,"DIV",{class:!0});var ss=$(pe);h(Mt.$$.fragment,ss),lo=o(ss),ds=p(ss,"P",{"data-svelte-h":!0}),M(ds)!=="svelte-1aavb0h"&&(ds.innerHTML=Xa),ss.forEach(s),q.forEach(s),zn=o(e),h(yt.$$.fragment,e),Zn=o(e),G=p(e,"DIV",{class:!0});var O=$(G);h(Tt.$$.fragment,O),po=o(O),ps=p(O,"P",{"data-svelte-h":!0}),M(ps)!=="svelte-16qskvl"&&(ps.innerHTML=Ha),co=o(O),cs=p(O,"P",{"data-svelte-h":!0}),M(cs)!=="svelte-1xp2kwr"&&(cs.innerHTML=La),mo=o(O),h(ce.$$.fragment,O),O.forEach(s),Wn=o(e),h(wt.$$.fragment,e),Bn=o(e),N=p(e,"DIV",{class:!0});var K=$(N);h(vt.$$.fragment,K),go=o(K),ms=p(K,"P",{"data-svelte-h":!0}),M(ms)!=="svelte-13d4dp9"&&(ms.innerHTML=Ea),ho=o(K),gs=p(K,"P",{"data-svelte-h":!0}),M(gs)!=="svelte-1xp2kwr"&&(gs.innerHTML=Qa),fo=o(K),h(me.$$.fragment,K),K.forEach(s),Gn=o(e),h(jt.$$.fragment,e),Nn=o(e),J=p(e,"DIV",{class:!0});var S=$(J);h($t.$$.fragment,S),uo=o(S),hs=p(S,"P",{"data-svelte-h":!0}),M(hs)!=="svelte-xrmnfw"&&(hs.innerHTML=Ya),_o=o(S),fs=p(S,"P",{"data-svelte-h":!0}),M(fs)!=="svelte-2iarov"&&(fs.innerHTML=Aa),bo=o(S),ee=p(S,"DIV",{class:!0});var ne=$(ee);h(kt.$$.fragment,ne),Mo=o(ne),us=p(ne,"P",{"data-svelte-h":!0}),M(us)!=="svelte-1wjq39d"&&(us.textContent=Da),yo=o(ne),_s=p(ne,"UL",{"data-svelte-h":!0}),M(_s)!=="svelte-8gh3n2"&&(_s.innerHTML=Oa),ne.forEach(s),To=o(S),ge=p(S,"DIV",{class:!0});var ns=$(ge);h(xt.$$.fragment,ns),wo=o(ns),bs=p(ns,"P",{"data-svelte-h":!0}),M(bs)!=="svelte-1f4f5kp"&&(bs.innerHTML=Ka),ns.forEach(s),vo=o(S),he=p(S,"DIV",{class:!0});var os=$(he);h(Jt.$$.fragment,os),jo=o(os),Ms=p(os,"P",{"data-svelte-h":!0}),M(Ms)!=="svelte-fl5ab0"&&(Ms.textContent=er),os.forEach(s),$o=o(S),ys=p(S,"DIV",{class:!0});var Ys=$(ys);h(Ut.$$.fragment,Ys),Ys.forEach(s),S.forEach(s),Fn=o(e),h(St.$$.fragment,e),Vn=o(e),C=p(e,"DIV",{class:!0});var P=$(C);h(It.$$.fragment,P),ko=o(P),Ts=p(P,"P",{"data-svelte-h":!0}),M(Ts)!=="svelte-1x2683l"&&(Ts.innerHTML=tr),xo=o(P),ws=p(P,"P",{"data-svelte-h":!0}),M(ws)!=="svelte-10s47aj"&&(ws.innerHTML=sr),Jo=o(P),te=p(P,"DIV",{class:!0});var oe=$(te);h(Ct.$$.fragment,oe),Uo=o(oe),vs=p(oe,"P",{"data-svelte-h":!0}),M(vs)!=="svelte-1wjq39d"&&(vs.textContent=nr),So=o(oe),js=p(oe,"UL",{"data-svelte-h":!0}),M(js)!=="svelte-8gh3n2"&&(js.innerHTML=or),oe.forEach(s),Io=o(P),fe=p(P,"DIV",{class:!0});var as=$(fe);h(zt.$$.fragment,as),Co=o(as),$s=p(as,"P",{"data-svelte-h":!0}),M($s)!=="svelte-fl5ab0"&&($s.textContent=ar),as.forEach(s),P.forEach(s),qn=o(e),h(Zt.$$.fragment,e),Pn=o(e),D=p(e,"DIV",{class:!0});var ae=$(D);h(Wt.$$.fragment,ae),zo=o(ae),ks=p(ae,"P",{"data-svelte-h":!0}),M(ks)!=="svelte-19glyt2"&&(ks.textContent=rr),Zo=o(ae),ue=p(ae,"DIV",{class:!0});var rs=$(ue);h(Bt.$$.fragment,rs),Wo=o(rs),xs=p(rs,"P",{"data-svelte-h":!0}),M(xs)!=="svelte-1x3yxsa"&&(xs.textContent=ir),rs.forEach(s),ae.forEach(s),Rn=o(e),h(Gt.$$.fragment,e),Xn=o(e),z=p(e,"DIV",{class:!0});var R=$(z);h(Nt.$$.fragment,R),Bo=o(R),Js=p(R,"P",{"data-svelte-h":!0}),M(Js)!=="svelte-yt9wur"&&(Js.textContent=lr),Go=o(R),Us=p(R,"P",{"data-svelte-h":!0}),M(Us)!=="svelte-19sz9s4"&&(Us.innerHTML=dr),No=o(R),_e=p(R,"DIV",{class:!0});var so=$(_e);h(Ft.$$.fragment,so),Fo=o(so),Ss=p(so,"P",{"data-svelte-h":!0}),M(Ss)!=="svelte-3s1jc0"&&(Ss.innerHTML=pr),so.forEach(s),Vo=o(R),be=p(R,"DIV",{class:!0});var no=$(be);h(Vt.$$.fragment,no),qo=o(no),Is=p(no,"P",{"data-svelte-h":!0}),M(Is)!=="svelte-4iomb6"&&(Is.innerHTML=cr),no.forEach(s),R.forEach(s),Hn=o(e),h(qt.$$.fragment,e),Ln=o(e),U=p(e,"DIV",{class:!0});var A=$(U);h(Pt.$$.fragment,A),Po=o(A),Cs=p(A,"P",{"data-svelte-h":!0}),M(Cs)!=="svelte-1rh88sx"&&(Cs.innerHTML=mr),Ro=o(A),zs=p(A,"P",{"data-svelte-h":!0}),M(zs)!=="svelte-hswkmf"&&(zs.innerHTML=gr),Xo=o(A),X=p(A,"DIV",{class:!0});var Ie=$(X);h(Rt.$$.fragment,Ie),Ho=o(Ie),Zs=p(Ie,"P",{"data-svelte-h":!0}),M(Zs)!=="svelte-4qa906"&&(Zs.innerHTML=hr),Lo=o(Ie),h(Me.$$.fragment,Ie),Eo=o(Ie),h(ye.$$.fragment,Ie),Ie.forEach(s),Qo=o(A),H=p(A,"DIV",{class:!0});var Ce=$(H);h(Xt.$$.fragment,Ce),Yo=o(Ce),Ws=p(Ce,"P",{"data-svelte-h":!0}),M(Ws)!=="svelte-4qa906"&&(Ws.innerHTML=fr),Ao=o(Ce),h(Te.$$.fragment,Ce),Do=o(Ce),h(we.$$.fragment,Ce),Ce.forEach(s),Oo=o(A),L=p(A,"DIV",{class:!0});var ze=$(L);h(Ht.$$.fragment,ze),Ko=o(ze),Bs=p(ze,"P",{"data-svelte-h":!0}),M(Bs)!=="svelte-4qa906"&&(Bs.innerHTML=ur),ea=o(ze),h(ve.$$.fragment,ze),ta=o(ze),h(je.$$.fragment,ze),ze.forEach(s),A.forEach(s),En=o(e),h(Lt.$$.fragment,e),Qn=o(e),F=p(e,"DIV",{class:!0});var Ze=$(F);h(Et.$$.fragment,Ze),sa=o(Ze),Gs=p(Ze,"P",{"data-svelte-h":!0}),M(Gs)!=="svelte-1v9293u"&&(Gs.innerHTML=_r),na=o(Ze),Ns=p(Ze,"P",{"data-svelte-h":!0}),M(Ns)!=="svelte-hswkmf"&&(Ns.innerHTML=br),oa=o(Ze),E=p(Ze,"DIV",{class:!0});var We=$(E);h(Qt.$$.fragment,We),aa=o(We),Fs=p(We,"P",{"data-svelte-h":!0}),M(Fs)!=="svelte-766ztu"&&(Fs.innerHTML=Mr),ra=o(We),h($e.$$.fragment,We),ia=o(We),h(ke.$$.fragment,We),We.forEach(s),Ze.forEach(s),Yn=o(e),h(Yt.$$.fragment,e),An=o(e),V=p(e,"DIV",{class:!0});var Be=$(V);h(At.$$.fragment,Be),la=o(Be),Vs=p(Be,"P",{"data-svelte-h":!0}),M(Vs)!=="svelte-1jka1oz"&&(Vs.innerHTML=yr),da=o(Be),qs=p(Be,"P",{"data-svelte-h":!0}),M(qs)!=="svelte-hswkmf"&&(qs.innerHTML=Tr),pa=o(Be),Q=p(Be,"DIV",{class:!0});var Ge=$(Q);h(Dt.$$.fragment,Ge),ca=o(Ge),Ps=p(Ge,"P",{"data-svelte-h":!0}),M(Ps)!=="svelte-1w1lv42"&&(Ps.innerHTML=wr),ma=o(Ge),h(xe.$$.fragment,Ge),ga=o(Ge),h(Je.$$.fragment,Ge),Ge.forEach(s),Be.forEach(s),Dn=o(e),h(Ot.$$.fragment,e),On=o(e),Z=p(e,"DIV",{class:!0});var se=$(Z);h(Kt.$$.fragment,se),ha=o(se),Rs=p(se,"P",{"data-svelte-h":!0}),M(Rs)!=="svelte-1dbrqa4"&&(Rs.textContent=vr),fa=o(se),Xs=p(se,"P",{"data-svelte-h":!0}),M(Xs)!=="svelte-1rh88sx"&&(Xs.innerHTML=jr),ua=o(se),Hs=p(se,"P",{"data-svelte-h":!0}),M(Hs)!=="svelte-hswkmf"&&(Hs.innerHTML=$r),_a=o(se),Y=p(se,"DIV",{class:!0});var Ne=$(Y);h(es.$$.fragment,Ne),ba=o(Ne),Ls=p(Ne,"P",{"data-svelte-h":!0}),M(Ls)!=="svelte-n4aen6"&&(Ls.innerHTML=kr),Ma=o(Ne),h(Ue.$$.fragment,Ne),ya=o(Ne),h(Se.$$.fragment,Ne),Ne.forEach(s),se.forEach(s),Kn=o(e),h(ts.$$.fragment,e),eo=o(e),Qs=p(e,"P",{}),$(Qs).forEach(s),this.h()},h(){j(r,"name","hf:doc:metadata"),j(r,"content",Dr),Jr(ie.src,$a="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/siglip_table.jpeg")||j(ie,"src",$a),j(ie,"alt","drawing"),j(ie,"width","600"),zr(le,"text-align","center"),j(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ys,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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,t){i(document.head,r),l(e,T,t),l(e,m,t),l(e,c,t),f(y,e,t),l(e,a,t),f(w,e,t),l(e,As,t),l(e,Fe,t),l(e,Ds,t),l(e,Ve,t),l(e,Os,t),l(e,qe,t),l(e,Ks,t),f(Pe,e,t),l(e,en,t),l(e,Re,t),l(e,tn,t),l(e,ie,t),l(e,sn,t),l(e,Xe,t),l(e,nn,t),l(e,He,t),l(e,on,t),f(Le,e,t),l(e,an,t),l(e,Ee,t),l(e,rn,t),f(Qe,e,t),l(e,ln,t),l(e,Ye,t),l(e,dn,t),f(Ae,e,t),l(e,pn,t),f(De,e,t),l(e,cn,t),l(e,Oe,t),l(e,mn,t),f(Ke,e,t),l(e,gn,t),f(et,e,t),l(e,hn,t),l(e,tt,t),l(e,fn,t),l(e,st,t),l(e,un,t),l(e,nt,t),l(e,_n,t),f(ot,e,t),l(e,bn,t),l(e,at,t),l(e,Mn,t),f(rt,e,t),l(e,yn,t),l(e,it,t),l(e,Tn,t),l(e,lt,t),l(e,wn,t),f(dt,e,t),l(e,vn,t),f(pt,e,t),l(e,jn,t),l(e,ct,t),l(e,$n,t),l(e,mt,t),l(e,kn,t),f(gt,e,t),l(e,xn,t),l(e,ht,t),l(e,Jn,t),f(ft,e,t),l(e,Un,t),l(e,ut,t),l(e,Sn,t),l(e,le,t),l(e,In,t),f(_t,e,t),l(e,Cn,t),l(e,I,t),f(bt,I,null),i(I,oo),i(I,is),i(I,ao),i(I,ls),i(I,ro),f(de,I,null),i(I,io),i(I,pe),f(Mt,pe,null),i(pe,lo),i(pe,ds),l(e,zn,t),f(yt,e,t),l(e,Zn,t),l(e,G,t),f(Tt,G,null),i(G,po),i(G,ps),i(G,co),i(G,cs),i(G,mo),f(ce,G,null),l(e,Wn,t),f(wt,e,t),l(e,Bn,t),l(e,N,t),f(vt,N,null),i(N,go),i(N,ms),i(N,ho),i(N,gs),i(N,fo),f(me,N,null),l(e,Gn,t),f(jt,e,t),l(e,Nn,t),l(e,J,t),f($t,J,null),i(J,uo),i(J,hs),i(J,_o),i(J,fs),i(J,bo),i(J,ee),f(kt,ee,null),i(ee,Mo),i(ee,us),i(ee,yo),i(ee,_s),i(J,To),i(J,ge),f(xt,ge,null),i(ge,wo),i(ge,bs),i(J,vo),i(J,he),f(Jt,he,null),i(he,jo),i(he,Ms),i(J,$o),i(J,ys),f(Ut,ys,null),l(e,Fn,t),f(St,e,t),l(e,Vn,t),l(e,C,t),f(It,C,null),i(C,ko),i(C,Ts),i(C,xo),i(C,ws),i(C,Jo),i(C,te),f(Ct,te,null),i(te,Uo),i(te,vs),i(te,So),i(te,js),i(C,Io),i(C,fe),f(zt,fe,null),i(fe,Co),i(fe,$s),l(e,qn,t),f(Zt,e,t),l(e,Pn,t),l(e,D,t),f(Wt,D,null),i(D,zo),i(D,ks),i(D,Zo),i(D,ue),f(Bt,ue,null),i(ue,Wo),i(ue,xs),l(e,Rn,t),f(Gt,e,t),l(e,Xn,t),l(e,z,t),f(Nt,z,null),i(z,Bo),i(z,Js),i(z,Go),i(z,Us),i(z,No),i(z,_e),f(Ft,_e,null),i(_e,Fo),i(_e,Ss),i(z,Vo),i(z,be),f(Vt,be,null),i(be,qo),i(be,Is),l(e,Hn,t),f(qt,e,t),l(e,Ln,t),l(e,U,t),f(Pt,U,null),i(U,Po),i(U,Cs),i(U,Ro),i(U,zs),i(U,Xo),i(U,X),f(Rt,X,null),i(X,Ho),i(X,Zs),i(X,Lo),f(Me,X,null),i(X,Eo),f(ye,X,null),i(U,Qo),i(U,H),f(Xt,H,null),i(H,Yo),i(H,Ws),i(H,Ao),f(Te,H,null),i(H,Do),f(we,H,null),i(U,Oo),i(U,L),f(Ht,L,null),i(L,Ko),i(L,Bs),i(L,ea),f(ve,L,null),i(L,ta),f(je,L,null),l(e,En,t),f(Lt,e,t),l(e,Qn,t),l(e,F,t),f(Et,F,null),i(F,sa),i(F,Gs),i(F,na),i(F,Ns),i(F,oa),i(F,E),f(Qt,E,null),i(E,aa),i(E,Fs),i(E,ra),f($e,E,null),i(E,ia),f(ke,E,null),l(e,Yn,t),f(Yt,e,t),l(e,An,t),l(e,V,t),f(At,V,null),i(V,la),i(V,Vs),i(V,da),i(V,qs),i(V,pa),i(V,Q),f(Dt,Q,null),i(Q,ca),i(Q,Ps),i(Q,ma),f(xe,Q,null),i(Q,ga),f(Je,Q,null),l(e,Dn,t),f(Ot,e,t),l(e,On,t),l(e,Z,t),f(Kt,Z,null),i(Z,ha),i(Z,Rs),i(Z,fa),i(Z,Xs),i(Z,ua),i(Z,Hs),i(Z,_a),i(Z,Y),f(es,Y,null),i(Y,ba),i(Y,Ls),i(Y,Ma),f(Ue,Y,null),i(Y,ya),f(Se,Y,null),l(e,Kn,t),f(ts,e,t),l(e,eo,t),l(e,Qs,t),to=!0},p(e,[t]){const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),de.$set(q);const ss={};t&2&&(ss.$$scope={dirty:t,ctx:e}),ce.$set(ss);const O={};t&2&&(O.$$scope={dirty:t,ctx:e}),me.$set(O);const K={};t&2&&(K.$$scope={dirty:t,ctx:e}),Me.$set(K);const S={};t&2&&(S.$$scope={dirty:t,ctx:e}),ye.$set(S);const ne={};t&2&&(ne.$$scope={dirty:t,ctx:e}),Te.$set(ne);const ns={};t&2&&(ns.$$scope={dirty:t,ctx:e}),we.$set(ns);const os={};t&2&&(os.$$scope={dirty:t,ctx:e}),ve.$set(os);const Ys={};t&2&&(Ys.$$scope={dirty:t,ctx:e}),je.$set(Ys);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),$e.$set(P);const oe={};t&2&&(oe.$$scope={dirty:t,ctx:e}),ke.$set(oe);const as={};t&2&&(as.$$scope={dirty:t,ctx:e}),xe.$set(as);const ae={};t&2&&(ae.$$scope={dirty:t,ctx:e}),Je.$set(ae);const rs={};t&2&&(rs.$$scope={dirty:t,ctx:e}),Ue.$set(rs);const R={};t&2&&(R.$$scope={dirty:t,ctx:e}),Se.$set(R)},i(e){to||(u(y.$$.fragment,e),u(w.$$.fragment,e),u(Pe.$$.fragment,e),u(Le.$$.fragment,e),u(Qe.$$.fragment,e),u(Ae.$$.fragment,e),u(De.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(ot.$$.fragment,e),u(rt.$$.fragment,e),u(dt.$$.fragment,e),u(pt.$$.fragment,e),u(gt.$$.fragment,e),u(ft.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(de.$$.fragment,e),u(Mt.$$.fragment,e),u(yt.$$.fragment,e),u(Tt.$$.fragment,e),u(ce.$$.fragment,e),u(wt.$$.fragment,e),u(vt.$$.fragment,e),u(me.$$.fragment,e),u(jt.$$.fragment,e),u($t.$$.fragment,e),u(kt.$$.fragment,e),u(xt.$$.fragment,e),u(Jt.$$.fragment,e),u(Ut.$$.fragment,e),u(St.$$.fragment,e),u(It.$$.fragment,e),u(Ct.$$.fragment,e),u(zt.$$.fragment,e),u(Zt.$$.fragment,e),u(Wt.$$.fragment,e),u(Bt.$$.fragment,e),u(Gt.$$.fragment,e),u(Nt.$$.fragment,e),u(Ft.$$.fragment,e),u(Vt.$$.fragment,e),u(qt.$$.fragment,e),u(Pt.$$.fragment,e),u(Rt.$$.fragment,e),u(Me.$$.fragment,e),u(ye.$$.fragment,e),u(Xt.$$.fragment,e),u(Te.$$.fragment,e),u(we.$$.fragment,e),u(Ht.$$.fragment,e),u(ve.$$.fragment,e),u(je.$$.fragment,e),u(Lt.$$.fragment,e),u(Et.$$.fragment,e),u(Qt.$$.fragment,e),u($e.$$.fragment,e),u(ke.$$.fragment,e),u(Yt.$$.fragment,e),u(At.$$.fragment,e),u(Dt.$$.fragment,e),u(xe.$$.fragment,e),u(Je.$$.fragment,e),u(Ot.$$.fragment,e),u(Kt.$$.fragment,e),u(es.$$.fragment,e),u(Ue.$$.fragment,e),u(Se.$$.fragment,e),u(ts.$$.fragment,e),to=!0)},o(e){_(y.$$.fragment,e),_(w.$$.fragment,e),_(Pe.$$.fragment,e),_(Le.$$.fragment,e),_(Qe.$$.fragment,e),_(Ae.$$.fragment,e),_(De.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(ot.$$.fragment,e),_(rt.$$.fragment,e),_(dt.$$.fragment,e),_(pt.$$.fragment,e),_(gt.$$.fragment,e),_(ft.$$.fragment,e),_(_t.$$.fragment,e),_(bt.$$.fragment,e),_(de.$$.fragment,e),_(Mt.$$.fragment,e),_(yt.$$.fragment,e),_(Tt.$$.fragment,e),_(ce.$$.fragment,e),_(wt.$$.fragment,e),_(vt.$$.fragment,e),_(me.$$.fragment,e),_(jt.$$.fragment,e),_($t.$$.fragment,e),_(kt.$$.fragment,e),_(xt.$$.fragment,e),_(Jt.$$.fragment,e),_(Ut.$$.fragment,e),_(St.$$.fragment,e),_(It.$$.fragment,e),_(Ct.$$.fragment,e),_(zt.$$.fragment,e),_(Zt.$$.fragment,e),_(Wt.$$.fragment,e),_(Bt.$$.fragment,e),_(Gt.$$.fragment,e),_(Nt.$$.fragment,e),_(Ft.$$.fragment,e),_(Vt.$$.fragment,e),_(qt.$$.fragment,e),_(Pt.$$.fragment,e),_(Rt.$$.fragment,e),_(Me.$$.fragment,e),_(ye.$$.fragment,e),_(Xt.$$.fragment,e),_(Te.$$.fragment,e),_(we.$$.fragment,e),_(Ht.$$.fragment,e),_(ve.$$.fragment,e),_(je.$$.fragment,e),_(Lt.$$.fragment,e),_(Et.$$.fragment,e),_(Qt.$$.fragment,e),_($e.$$.fragment,e),_(ke.$$.fragment,e),_(Yt.$$.fragment,e),_(At.$$.fragment,e),_(Dt.$$.fragment,e),_(xe.$$.fragment,e),_(Je.$$.fragment,e),_(Ot.$$.fragment,e),_(Kt.$$.fragment,e),_(es.$$.fragment,e),_(Ue.$$.fragment,e),_(Se.$$.fragment,e),_(ts.$$.fragment,e),to=!1},d(e){e&&(s(T),s(m),s(c),s(a),s(As),s(Fe),s(Ds),s(Ve),s(Os),s(qe),s(Ks),s(en),s(Re),s(tn),s(ie),s(sn),s(Xe),s(nn),s(He),s(on),s(an),s(Ee),s(rn),s(ln),s(Ye),s(dn),s(pn),s(cn),s(Oe),s(mn),s(gn),s(hn),s(tt),s(fn),s(st),s(un),s(nt),s(_n),s(bn),s(at),s(Mn),s(yn),s(it),s(Tn),s(lt),s(wn),s(vn),s(jn),s(ct),s($n),s(mt),s(kn),s(xn),s(ht),s(Jn),s(Un),s(ut),s(Sn),s(le),s(In),s(Cn),s(I),s(zn),s(Zn),s(G),s(Wn),s(Bn),s(N),s(Gn),s(Nn),s(J),s(Fn),s(Vn),s(C),s(qn),s(Pn),s(D),s(Rn),s(Xn),s(z),s(Hn),s(Ln),s(U),s(En),s(Qn),s(F),s(Yn),s(An),s(V),s(Dn),s(On),s(Z),s(Kn),s(eo),s(Qs)),s(r),b(y,e),b(w,e),b(Pe,e),b(Le,e),b(Qe,e),b(Ae,e),b(De,e),b(Ke,e),b(et,e),b(ot,e),b(rt,e),b(dt,e),b(pt,e),b(gt,e),b(ft,e),b(_t,e),b(bt),b(de),b(Mt),b(yt,e),b(Tt),b(ce),b(wt,e),b(vt),b(me),b(jt,e),b($t),b(kt),b(xt),b(Jt),b(Ut),b(St,e),b(It),b(Ct),b(zt),b(Zt,e),b(Wt),b(Bt),b(Gt,e),b(Nt),b(Ft),b(Vt),b(qt,e),b(Pt),b(Rt),b(Me),b(ye),b(Xt),b(Te),b(we),b(Ht),b(ve),b(je),b(Lt,e),b(Et),b(Qt),b($e),b(ke),b(Yt,e),b(At),b(Dt),b(xe),b(Je),b(Ot,e),b(Kt),b(es),b(Ue),b(Se),b(ts,e)}}}const Dr='{"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":"Combining SigLIP and Flash Attention 2","local":"combining-siglip-and-flash-attention-2","sections":[],"depth":2},{"title":"Using Scaled Dot Product Attention (SDPA)","local":"using-scaled-dot-product-attention-sdpa","sections":[],"depth":2},{"title":"Expected speedups","local":"expected-speedups","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":"SiglipTokenizerFast","local":"transformers.SiglipTokenizerFast","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 Or(v){return Ur(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ri extends Sr{constructor(r){super(),Ir(this,r,Or,Ar,xr,{})}}export{ri as component};
