import{s as yr,f as Tr,o as Mr,n as q}from"../chunks/scheduler.bdbef820.js";import{S as wr,i as jr,g as c,s as n,r as m,A as vr,h as d,f as s,c as a,j as $,u as g,x as y,k as j,l as $r,y as r,a as i,v as h,d as f,t as u,w as _}from"../chunks/index.33f81d56.js";import{T as Ko}from"../chunks/Tip.34194030.js";import{D as x}from"../chunks/Docstring.b9574034.js";import{C as F}from"../chunks/CodeBlock.3bad7fc9.js";import{E as ne}from"../chunks/ExampleCodeBlock.633185da.js";import{H as U,E as xr}from"../chunks/index.9edc4842.js";function Ur(v){let l,w="Example:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Jr(v){let l,w="Example:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Ir(v){let l,w="Example:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function kr(v){let l,w=`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(){l=c("p"),l.innerHTML=w},l(b){l=d(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=w)},m(b,p){i(b,l,p)},p:q,d(b){b&&s(l)}}}function Sr(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Cr(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function zr(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Zr(v){let l,w=`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(){l=c("p"),l.innerHTML=w},l(b){l=d(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=w)},m(b,p){i(b,l,p)},p:q,d(b){b&&s(l)}}}function Br(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Wr(v){let l,w=`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(){l=c("p"),l.innerHTML=w},l(b){l=d(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=w)},m(b,p){i(b,l,p)},p:q,d(b){b&&s(l)}}}function Rr(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Fr(v){let l,w=`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(){l=c("p"),l.innerHTML=w},l(b){l=d(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=w)},m(b,p){i(b,l,p)},p:q,d(b){b&&s(l)}}}function Nr(v){let l,w="Examples:",b,p,T;return p=new F({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(){l=c("p"),l.textContent=w,b=n(),m(p.$$.fragment)},l(o){l=d(o,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=w),b=a(o),g(p.$$.fragment,o)},m(o,M){i(o,l,M),i(o,b,M),h(p,o,M),T=!0},p:q,i(o){T||(f(p.$$.fragment,o),T=!0)},o(o){u(p.$$.fragment,o),T=!1},d(o){o&&(s(l),s(b)),_(p,o)}}}function Gr(v){let l,w,b,p,T,o,M,ga='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="FlashAttention" src="https://img.shields.io/badge/%E2%9A%A1%EF%B8%8E%20FlashAttention-eae0c8?style=flat"/> <img alt="SDPA" src="https://img.shields.io/badge/SDPA-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',Vs,Ce,qs,ze,ha='SigLIP 모델은 Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, Lucas Beyer의 <a href="https://arxiv.org/abs/2303.15343" rel="nofollow">Sigmoid Loss for Language Image Pre-Training</a> 논문에서 제안되었습니다. SigLIP은 <a href="clip">CLIP</a>에서 사용된 손실 함수를 간단한 쌍별 시그모이드 손실(pairwise sigmoid loss)로 대체할 것을 제안합니다. 이는 ImageNet에서 제로샷 분류 정확도 측면에서 더 나은 성능을 보입니다.',Qs,Ze,fa="논문의 초록은 다음과 같습니다:",Xs,Be,ua="<em>우리는 언어-이미지 사전 학습(Language-Image Pre-training, SigLIP)을 위한 간단한 쌍별 시그모이드 손실을 제안합니다. 소프트맥스 정규화를 사용하는 표준 대조 학습과 달리, 시그모이드 손실은 이미지-텍스트 쌍에만 작용하며 정규화를 위해 쌍별 유사성의 전역적 관점을 필요로 하지 않습니다. 시그모이드 손실은 배치 크기를 더욱 확장할 수 있게 하는 동시에 작은 배치 크기에서도 더 나은 성능을 보입니다. Locked-image Tuning과 결합하여, 단 4개의 TPUv4 칩만으로 이틀 만에 84.5%의 ImageNet 제로샷 정확도를 달성하는 SigLiT 모델을 학습했습니다. 손실 함수에서 배치 크기를 분리함으로써 예제 대 쌍의 영향과 Negative 대 Positive 비율을 연구할 수 있게 되었습니다. 마지막으로, 우리는 배치 크기를 100만 개까지 극단적으로 늘려보았고, 배치 크기 증가의 이점이 빠르게 감소하며 32k의 더 합리적인 배치 크기로도 충분하다는 것을 발견했습니다.</em>",Es,We,Hs,Re,_a='<li>SigLIP의 사용법은 <a href="clip">CLIP</a>과 유사합니다. 주요 차이점은 학습 손실 함수로, 배치 내 모든 이미지와 텍스트 간의 쌍별 유사성에 대한 전역적 관점이 필요하지 않습니다. 소프트맥스 대신 로짓에 시그모이드 활성화 함수를 적용해야 합니다.</li> <li>학습은 지원되지만 <code>torch.distributed</code> 유틸리티를 사용하지 않아 배치 크기의 확장성이 제한될 수 있습니다. 그러나 단일 노드 다중 GPU 설정에서는 DDP와 FDSP가 작동합니다.</li> <li>독립형 <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a> 또는 <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipProcessor">SiglipProcessor</a>를 사용할 때는 모델이 그렇게 학습되었으므로 <code>padding=&quot;max_length&quot;</code>를 전달해야 합니다.</li> <li>파이프라인과 동일한 결과를 얻으려면 “This is a photo of {label}.”의 프롬프트 템플릿을 사용해야 합니다.</li>',Ls,ae,ba,Ds,Fe,ya='CLIP과 비교한 SigLIP 평가 결과. <a href="https://arxiv.org/abs/2303.15343">원본 논문</a>에서 발췌.',As,Ne,Ta=`이 모델은 <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>가 기여했습니다.
원본 코드는 <a href="https://github.com/google-research/big_vision/tree/main" rel="nofollow">여기</a>에서 찾을 수 있습니다.`,Ys,Ge,Os,Pe,Ma="SigLIP을 사용하는 방법에는 두 가지 주요 방법이 있습니다: 모든 복잡성을 추상화하는 파이프라인 API를 사용하거나, 직접 <code>SiglipModel</code> 클래스를 사용하는 방법입니다.",Ks,Ve,eo,qe,wa="파이프라인을 사용하면 몇 줄의 코드로 모델을 사용할 수 있습니다:",to,Qe,so,Xe,oo,Ee,ja="전처리와 후처리를 직접 수행하려면 다음과 같이 하면 됩니다:",no,He,ao,Le,ro,De,va="SigLIP을 시작하는 데 도움이 되는 공식 Hugging Face 및 커뮤니티(🌎로 표시) 리소스 목록입니다.",io,Ae,$a='<li><a href="../tasks/zero_shot_image_classification">제로샷 이미지 분류 작업 가이드</a></li> <li>SigLIP에 대한 데모 노트북은 <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SigLIP" rel="nofollow">여기</a>에서 찾을 수 있습니다. 🌎</li>',lo,Ye,xa="여기에 포함될 리소스를 제출하는 데 관심이 있으시면 Pull Request를 열어주시면 검토하겠습니다! 리소스는 이상적으로 기존 리소스를 복제하는 대신 새로운 것을 보여주어야 합니다.",co,Oe,po,Ke,Ua="먼저 Flash Attention 2의 최신 버전을 설치해야 합니다.",mo,et,go,tt,Ja="또한 Flash-Attention 2와 호환되는 하드웨어가 있는지 확인하세요. flash-attn 저장소의 공식 문서에서 자세히 알아보세요. 또한 모델을 반정밀도(예: <code>torch.float16</code>)로 로드해야 합니다.",ho,st,Ia="Flash Attention 2를 사용하여 모델을 로드하고 실행하려면 아래 코드를 참조하세요:",fo,ot,uo,nt,_o,at,ka=`PyTorch는 <code>torch.nn.functional</code>의 일부로 스케일된 점곱 어텐션(SDPA) 연산자를 포함합니다. 이 함수는
입력과 사용 중인 하드웨어에 따라 적용할 수 있는 여러 구현을 포함합니다. 자세한 내용은
<a href="https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow">공식 문서</a>
또는 <a href="https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention" rel="nofollow">GPU 추론</a>
페이지를 참조하세요.`,bo,rt,Sa="<code>from_pretrained()</code>에서 <code>attn_implementation=&quot;sdpa&quot;</code>를 설정하여 SDPA를 명시적으로 요청할 수 있습니다. <code>torch&gt;=2.1.1</code>이 설치되어 있는지 확인하세요.",yo,it,To,lt,Ca="최상의 속도 향상을 위해 모델을 반정밀도(예: <code>torch.float16</code> 또는 <code>torch.bfloat16</code>)로 로드하는 것이 좋습니다.",Mo,ct,wo,dt,za="아래는 <code>google/siglip-so400m-patch14-384</code> 체크포인트를 <code>float16</code> 정밀도로 사용하는 transformers의 네이티브 구현과 Flash Attention 2 / SDPA 버전의 모델을 다양한 배치 크기로 비교한 추론 시간의 예상 속도 향상 다이어그램입니다.",jo,re,Za='<img src="https://i.imgur.com/cWm4rsn.png"/>',vo,pt,$o,S,mt,en,Kt,Ba=`<a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/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.`,tn,es,Wa=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,sn,ie,on,le,gt,nn,ts,Ra=`Instantiate a <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipConfig">SiglipConfig</a> (or a derived class) from siglip text model configuration and siglip vision
model configuration.`,xo,ht,Uo,N,ft,an,ss,Fa=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/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.`,rn,os,Na=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ln,ce,Jo,ut,Io,G,_t,cn,ns,Ga=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/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.`,dn,as,Pa=`Configuration objects inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,pn,de,ko,bt,So,J,yt,mn,rs,Va='Construct a Siglip tokenizer. Based on <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.',gn,is,qa=`This tokenizer inherits from <code>PreTrainedTokenizer</code> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,hn,Y,Tt,fn,ls,Qa=`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:`,un,cs,Xa="<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>",_n,pe,Mt,bn,ds,Ea=`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.`,yn,me,wt,Tn,ps,Ha=`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.`,Mn,ms,jt,Co,vt,zo,L,$t,wn,gs,La="Constructs a SigLIP image processor.",jn,ge,xt,vn,hs,Da="Preprocess an image or batch of images.",Zo,Ut,Bo,C,Jt,$n,fs,Aa="Constructs a fast Siglip image processor.",xn,us,Ya=`data_format (<code>~image_utils.ChannelDimension</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>):
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.
input_data_format (<code>Union[~image_utils.ChannelDimension, str, NoneType]</code>, defaults to <code>None</code>):
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:`,Un,_s,Oa=`<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.
device (<code>torch.device</code>, <em>optional</em>, defaults to <code>None</code>):
The device to process the images on. If unset, the device is inferred from the input images.</li>`,Jn,bs,It,Wo,kt,Ro,z,St,In,ys,Ka="Constructs a Siglip processor which wraps a Siglip image processor and a Siglip tokenizer into a single processor.",kn,Ts,er=`<a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipProcessor">SiglipProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a> and <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipProcessor.decode">decode()</a> for more information.`,Sn,he,Ct,Cn,Ms,tr=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,zn,fe,zt,Zn,ws,sr=`This method forwards all its arguments to SiglipTokenizer’s <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Fo,Zt,No,I,Bt,Bn,js,or="The bare Siglip Model outputting raw hidden-states without any specific head on top.",Wn,vs,nr=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,Rn,$s,ar=`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.`,Fn,Q,Wt,Nn,xs,rr='The <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipModel">SiglipModel</a> forward method, overrides the <code>__call__</code> special method.',Gn,ue,Pn,_e,Vn,be,Rt,qn,ye,Qn,Te,Ft,Xn,Me,Go,Nt,Po,Z,Gt,En,Us,ir="The text model from SigLIP without any head or projection on top.",Hn,Js,lr=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,Ln,Is,cr=`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.`,Dn,X,Pt,An,ks,dr='The <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipTextModel">SiglipTextModel</a> forward method, overrides the <code>__call__</code> special method.',Yn,we,On,je,Vo,Vt,qo,B,qt,Kn,Ss,pr="The vision model from SigLIP without any head or projection on top.",ea,Cs,mr=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,ta,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.`,sa,E,Qt,oa,Zs,hr='The <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipVisionModel">SiglipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',na,ve,aa,$e,Qo,Xt,Xo,W,Et,ra,Bs,fr=`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.`,ia,Ws,ur=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,la,Rs,_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.`,ca,H,Ht,da,Fs,br='The <a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipForImageClassification">SiglipForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',pa,xe,ma,Ue,Eo,Lt,Ho,Ns,Lo;return T=new U({props:{title:"SigLIP",local:"siglip",headingTag:"h1"}}),Ce=new U({props:{title:"개요",local:"overview",headingTag:"h2"}}),We=new U({props:{title:"사용 팁",local:"usage-tips",headingTag:"h2"}}),Ge=new U({props:{title:"사용 예시",local:"usage-example",headingTag:"h2"}}),Ve=new U({props:{title:"파이프라인 API",local:"pipeline-API",headingTag:"h3"}}),Qe=new F({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEElMjMlMjAlRUQlOEMlOEMlRUMlOUQlQjQlRUQlOTQlODQlRUIlOUQlQkMlRUMlOUQlQjglMjAlRUIlQTElOUMlRUIlOTMlOUMlMEFpbWFnZV9jbGFzc2lmaWVyJTIwJTNEJTIwcGlwZWxpbmUodGFzayUzRCUyMnplcm8tc2hvdC1pbWFnZS1jbGFzc2lmaWNhdGlvbiUyMiUyQyUyMG1vZGVsJTNEJTIyZ29vZ2xlJTJGc2lnbGlwLWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBJTIzJTIwJUVDJTlEJUI0JUVCJUFGJUI4JUVDJUE3JTgwJTIwJUVCJUExJTlDJUVCJTkzJTlDJTBBdXJsJTIwJTNEJTIwJ2h0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGcnJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBJTIzJTIwJUVDJUI2JTk0JUVCJUExJUEwJTBBY2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMjIlMjBjYXRzJTIyJTJDJTIwJTIyYSUyMHBsYW5lJTIyJTJDJTIwJTIyYSUyMHJlbW90ZSUyMiU1RCUwQW91dHB1dHMlMjAlM0QlMjBpbWFnZV9jbGFzc2lmaWVyKGltYWdlJTJDJTIwY2FuZGlkYXRlX2xhYmVscyUzRGNhbmRpZGF0ZV9sYWJlbHMpJTBBb3V0cHV0cyUyMCUzRCUyMCU1QiU3QiUyMnNjb3JlJTIyJTNBJTIwcm91bmQob3V0cHV0JTVCJTIyc2NvcmUlMjIlNUQlMkMlMjA0KSUyQyUyMCUyMmxhYmVsJTIyJTNBJTIwb3V0cHV0JTVCJTIybGFiZWwlMjIlNUQlMjAlN0QlMjBmb3IlMjBvdXRwdXQlMjBpbiUyMG91dHB1dHMlNUQlMEFwcmludChvdXRwdXRzKQ==",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"># 파이프라인 로드</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"># 이미지 로드</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"># 추론</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}}),Xe=new U({props:{title:"직접 모델 사용하기",local:"using-the-model-yourself",headingTag:"h3"}}),He=new F({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFjYW5kaWRhdGVfbGFiZWxzJTIwJTNEJTIwJTVCJTIyMiUyMGNhdHMlMjIlMkMlMjAlMjIyJTIwZG9ncyUyMiU1RCUwQXRleHRzJTIwJTNEJTIwJTVCZidUaGlzJTIwaXMlMjBhJTIwcGhvdG8lMjBvZiUyMCU3QmxhYmVsJTdELiclMjBmb3IlMjBsYWJlbCUyMGluJTIwY2FuZGlkYXRlX2xhYmVscyU1RCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEdGV4dHMlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHBhZGRpbmclM0QlMjJtYXhfbGVuZ3RoJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMEFwcm9icyUyMCUzRCUyMHRvcmNoLnNpZ21vaWQobG9naXRzX3Blcl9pbWFnZSklMjAlMjMlMjAlRUMlOEIlOUMlRUElQjclQjglRUIlQUElQTglRUMlOUQlQjQlRUIlOTMlOUMlMjAlRUQlOTklOUMlRUMlODQlQjElRUQlOTklOTQlMjAlRUQlOTUlQTglRUMlODglOTglRUIlQTUlQkMlMjAlRUMlQTAlODElRUMlOUElQTklRUQlOTUlOUMlMjAlRUQlOTklOTUlRUIlQTUlQTAlRUMlOUUlODUlRUIlOEIlODglRUIlOEIlQTQlMEFwcmludChmJTIyJTdCcHJvYnMlNUIwJTVEJTVCMCU1RCUzQS4xJTI1JTdEJTIwdGhhdCUyMGltYWdlJTIwMCUyMGlzJTIwJyU3QmNhbmRpZGF0ZV9sYWJlbHMlNUIwJTVEJTdEJyUyMik=",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"># 파이프라인 프롬프트 템플릿을 따라 동일한 결과를 얻습니다</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<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"># 중요: 모델이 이렇게 학습되었으므로 \`padding=max_length\`를 전달합니다</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"># 시그모이드 활성화 함수를 적용한 확률입니다</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">19.8</span>% that image <span class="hljs-number">0</span> <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;2 cats&#x27;</span>`,wrap:!1}}),Le=new U({props:{title:"리소스",local:"resources",headingTag:"h2"}}),Oe=new U({props:{title:"SigLIP과 Flash Attention 2 결합하기",local:"combining-siglip-with-flash-attention-2",headingTag:"h2"}}),et=new F({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),ot=new F({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBTaWdsaXBQcm9jZXNzb3IlMkMlMjBTaWdsaXBNb2RlbCUwQWRldmljZSUyMCUzRCUyMCUyMmN1ZGElMjIlMjAlMjMlMjAlRUIlQUElQTglRUIlOEQlQjglRUMlOUQlODQlMjAlRUIlQTElOUMlRUIlOTMlOUMlRUQlOTUlQTAlMjAlRUMlOUUlQTUlRUMlQjklOTglMEElMEFtb2RlbCUyMCUzRCUyMFNpZ2xpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJnb29nbGUlMkZzaWdsaXAtc280MDBtLXBhdGNoMTQtMzg0JTIyJTJDJTBBJTIwJTIwJTIwJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMmZsYXNoX2F0dGVudGlvbl8yJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRGRldmljZSUyQyUwQSklMEFwcm9jZXNzb3IlMjAlM0QlMjBTaWdsaXBQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnNpZ2xpcC1zbzQwMG0tcGF0Y2gxNC0zODQlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWNhbmRpZGF0ZV9sYWJlbHMlMjAlM0QlMjAlNUIlMjIyJTIwY2F0cyUyMiUyQyUyMCUyMjIlMjBkb2dzJTIyJTVEJTBBdGV4dHMlMjAlM0QlMjAlNUJmJ1RoaXMlMjBpcyUyMGElMjBwaG90byUyMG9mJTIwJTdCbGFiZWwlN0QuJyUyMGZvciUyMGxhYmVsJTIwaW4lMjBjYW5kaWRhdGVfbGFiZWxzJTVEJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0R0ZXh0cyUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcGFkZGluZyUzRCUyMm1heF9sZW5ndGglMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50byhkZXZpY2UpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMHdpdGglMjB0b3JjaC5hdXRvY2FzdChkZXZpY2UpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMEFwcm9icyUyMCUzRCUyMHRvcmNoLnNpZ21vaWQobG9naXRzX3Blcl9pbWFnZSklMjAlMjMlMjAlRUMlOEIlOUMlRUElQjclQjglRUIlQUElQTglRUMlOUQlQjQlRUIlOTMlOUMlMjAlRUQlOTklOUMlRUMlODQlQjElRUQlOTklOTQlMjAlRUQlOTUlQTglRUMlODglOTglRUIlQTUlQkMlMjAlRUMlQTAlODElRUMlOUElQTklRUQlOTUlOUMlMjAlRUQlOTklOTUlRUIlQTUlQTAlRUMlOUUlODUlRUIlOEIlODglRUIlOEIlQTQlMEFwcmludChmJTIyJTdCcHJvYnMlNUIwJTVEJTVCMCU1RCUzQS4xJTI1JTdEJTIwdGhhdCUyMGltYWdlJTIwMCUyMGlzJTIwJyU3QmNhbmRpZGF0ZV9sYWJlbHMlNUIwJTVEJTdEJyUyMik=",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"># 모델을 로드할 장치</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"># 파이프라인 프롬프트 템플릿을 따라 동일한 결과를 얻습니다</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<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"># 중요: 모델이 이렇게 학습되었으므로 \`padding=max_length\`를 전달합니다</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>).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"># 시그모이드 활성화 함수를 적용한 확률입니다</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">19.8</span>% that image <span class="hljs-number">0</span> <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;2 cats&#x27;</span>`,wrap:!1}}),nt=new U({props:{title:"Scaled Dot Product Attention(SDPA) 사용하기 using-scaled-dot-product-attention(SDPA) ]",local:"scaled-dot-product-attentionsdpa-사용하기-using-scaled-dot-product-attentionsdpa-",headingTag:"h2"}}),it=new F({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}}),ct=new U({props:{title:"예상 속도 향상",local:"expected-speedups",headingTag:"h2"}}),pt=new U({props:{title:"SiglipConfig",local:"transformers.SiglipConfig",headingTag:"h2"}}),mt=new x({props:{name:"class transformers.SiglipConfig",anchor:"transformers.SiglipConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/ko/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/main/ko/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/main/src/transformers/models/siglip/configuration_siglip.py#L195"}}),ie=new ne({props:{anchor:"transformers.SiglipConfig.example",$$slots:{default:[Ur]},$$scope:{ctx:v}}}),gt=new x({props:{name:"from_text_vision_configs",anchor:"transformers.SiglipConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": SiglipTextConfig"},{name:"vision_config",val:": SiglipVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/configuration_siglip.py#L256",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipConfig"
>SiglipConfig</a></p>
`}}),ht=new U({props:{title:"SiglipTextConfig",local:"transformers.SiglipTextConfig",headingTag:"h2"}}),ft=new x({props:{name:"class transformers.SiglipTextConfig",anchor:"transformers.SiglipTextConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"max_position_embeddings",val:" = 64"},{name:"hidden_act",val:" = 'gelu_pytorch_tanh'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 49406"},{name:"eos_token_id",val:" = 49407"},{name:"projection_size",val:" = None"},{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/main/ko/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"},{anchor:"transformers.SiglipTextConfig.projection_size",description:`<strong>projection_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>hidden_size</code>) &#x2014;
The size of the projection head.`,name:"projection_size"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/configuration_siglip.py#L24"}}),ce=new ne({props:{anchor:"transformers.SiglipTextConfig.example",$$slots:{default:[Jr]},$$scope:{ctx:v}}}),ut=new U({props:{title:"SiglipVisionConfig",local:"transformers.SiglipVisionConfig",headingTag:"h2"}}),_t=new x({props:{name:"class transformers.SiglipVisionConfig",anchor:"transformers.SiglipVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"hidden_act",val:" = 'gelu_pytorch_tanh'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SiglipVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.SiglipVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.SiglipVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.SiglipVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.SiglipVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of channels in the input images.`,name:"num_channels"},{anchor:"transformers.SiglipVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.SiglipVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.SiglipVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_pytorch_tanh&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> <code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.SiglipVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SiglipVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/configuration_siglip.py#L116"}}),de=new ne({props:{anchor:"transformers.SiglipVisionConfig.example",$$slots:{default:[Ir]},$$scope:{ctx:v}}}),bt=new U({props:{title:"SiglipTokenizer",local:"transformers.SiglipTokenizer",headingTag:"h2"}}),yt=new x({props:{name:"class transformers.SiglipTokenizer",anchor:"transformers.SiglipTokenizer",parameters:[{name:"vocab_file",val:""},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '</s>'"},{name:"additional_special_tokens",val:" = None"},{name:"sp_model_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = 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/main/src/transformers/models/siglip/tokenization_siglip.py#L45"}}),Tt=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.SiglipTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = 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/main/src/transformers/models/siglip/tokenization_siglip.py#L228",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>
`}}),Mt=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.SiglipTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = 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/main/src/transformers/models/siglip/tokenization_siglip.py#L164",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>
`}}),wt=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.SiglipTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = 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/main/src/transformers/models/siglip/tokenization_siglip.py#L205",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>
`}}),jt=new x({props:{name:"save_vocabulary",anchor:"transformers.SiglipTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/tokenization_siglip.py#L362"}}),vt=new U({props:{title:"SiglipImageProcessor",local:"transformers.SiglipImageProcessor",headingTag:"h2"}}),$t=new x({props:{name:"class transformers.SiglipImageProcessor",anchor:"transformers.SiglipImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": typing.Optional[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/main/src/transformers/models/siglip/image_processing_siglip.py#L48"}}),xt=new x({props:{name:"preprocess",anchor:"transformers.SiglipImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor']]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"do_convert_rgb",val:": typing.Optional[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/main/src/transformers/models/siglip/image_processing_siglip.py#L110"}}),Ut=new U({props:{title:"SiglipImageProcessorFast",local:"transformers.SiglipImageProcessorFast",headingTag:"h2"}}),Jt=new x({props:{name:"class transformers.SiglipImageProcessorFast",anchor:"transformers.SiglipImageProcessorFast",parameters:[{name:"**kwargs",val:": typing_extensions.Unpack[transformers.image_processing_utils_fast.DefaultFastImageProcessorKwargs]"}],parametersDescription:[{anchor:"transformers.SiglipImageProcessorFast.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.SiglipImageProcessorFast.size",description:`<strong>size</strong> (<code>dict[str, int]</code>, <em>optional</em>, defaults to <code>{&apos;height&apos; -- 224, &apos;width&apos;: 224}</code>):
Describes the maximum input dimensions to the model.`,name:"size"},{anchor:"transformers.SiglipImageProcessorFast.default_to_square",description:`<strong>default_to_square</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to default to a square image when resizing, if size is an int.`,name:"default_to_square"},{anchor:"transformers.SiglipImageProcessorFast.resample",description:`<strong>resample</strong> (<code>Union[PILImageResampling, F.InterpolationMode, NoneType]</code>, defaults to <code>Resampling.BICUBIC</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.SiglipImageProcessorFast.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.SiglipImageProcessorFast.crop_size",description:`<strong>crop_size</strong> (<code>dict[str, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Size of the output image after applying <code>center_crop</code>.`,name:"crop_size"},{anchor:"transformers.SiglipImageProcessorFast.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.SiglipImageProcessorFast.rescale_factor",description:`<strong>rescale_factor</strong> (<code>Union[int, float, NoneType]</code>, defaults to <code>0.00392156862745098</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.SiglipImageProcessorFast.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.SiglipImageProcessorFast.image_mean",description:`<strong>image_mean</strong> (<code>Union[float, list[float], NoneType]</code>, defaults to <code>[0.5, 0.5, 0.5]</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.SiglipImageProcessorFast.image_std",description:`<strong>image_std</strong> (<code>Union[float, list[float], NoneType]</code>, defaults to <code>[0.5, 0.5, 0.5]</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.SiglipImageProcessorFast.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.SiglipImageProcessorFast.return_tensors",description:"<strong>return_tensors</strong> (<code>Union[str, ~utils.generic.TensorType, NoneType]</code>, defaults to <code>None</code>) &#x2014;\nReturns stacked tensors if set to `pt, otherwise returns a list of tensors.",name:"return_tensors"},{anchor:"transformers.SiglipImageProcessorFast.data_format",description:`<strong>data_format</strong> (<code>~image_utils.ChannelDimension</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.`,name:"data_format"},{anchor:"transformers.SiglipImageProcessorFast.input_data_format",description:`<strong>input_data_format</strong> (<code>Union[~image_utils.ChannelDimension, str, NoneType]</code>, defaults to <code>None</code>) &#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.SiglipImageProcessorFast.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.
Returns stacked tensors if set to \`pt, otherwise returns a list of tensors.`,name:"device"},{anchor:"transformers.SiglipImageProcessorFast.data_format",description:`<strong>data_format</strong> (<code>~image_utils.ChannelDimension</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.`,name:"data_format"},{anchor:"transformers.SiglipImageProcessorFast.input_data_format",description:`<strong>input_data_format</strong> (<code>Union[~image_utils.ChannelDimension, str, NoneType]</code>, defaults to <code>None</code>) &#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.SiglipImageProcessorFast.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.`,name:"device"},{anchor:"transformers.SiglipImageProcessorFast.Returns",description:"<strong>Returns</strong> stacked tensors if set to `pt, otherwise returns a list of tensors. &#x2014;",name:"Returns"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/image_processing_siglip_fast.py#L26"}}),It=new x({props:{name:"preprocess",anchor:"transformers.SiglipImageProcessorFast.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor']]"},{name:"*args",val:""},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.image_processing_utils_fast.DefaultFastImageProcessorKwargs]"}],parametersDescription:[{anchor:"transformers.SiglipImageProcessorFast.preprocess.images",description:`<strong>images</strong> (<code>Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, list[&apos;PIL.Image.Image&apos;], list[numpy.ndarray], list[&apos;torch.Tensor&apos;]]</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.SiglipImageProcessorFast.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.size",description:`<strong>size</strong> (<code>dict[str, int]</code>, <em>optional</em>) &#x2014;
Describes the maximum input dimensions to the model.`,name:"size"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.default_to_square",description:`<strong>default_to_square</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to default to a square image when resizing, if size is an int.`,name:"default_to_square"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.resample",description:`<strong>resample</strong> (<code>Union[PILImageResampling, F.InterpolationMode, NoneType]</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.SiglipImageProcessorFast.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>dict[str, int]</code>, <em>optional</em>) &#x2014;
Size of the output image after applying <code>center_crop</code>.`,name:"crop_size"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>Union[int, float, NoneType]</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.SiglipImageProcessorFast.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>Union[float, list[float], NoneType]</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.SiglipImageProcessorFast.preprocess.image_std",description:`<strong>image_std</strong> (<code>Union[float, list[float], NoneType]</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.SiglipImageProcessorFast.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.return_tensors",description:"<strong>return_tensors</strong> (<code>Union[str, ~utils.generic.TensorType, NoneType]</code>) &#x2014;\nReturns stacked tensors if set to `pt, otherwise returns a list of tensors.",name:"return_tensors"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.data_format",description:`<strong>data_format</strong> (<code>~image_utils.ChannelDimension</code>, <em>optional</em>) &#x2014;
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.`,name:"data_format"},{anchor:"transformers.SiglipImageProcessorFast.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>Union[~image_utils.ChannelDimension, str, NoneType]</code>) &#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.SiglipImageProcessorFast.preprocess.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.`,name:"device"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils_fast.py#L571",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><strong>data</strong> (<code>dict</code>) — Dictionary of lists/arrays/tensors returned by the <strong>call</strong> method (‘pixel_values’, etc.).</li>
<li><strong>tensor_type</strong> (<code>Union[None, str, TensorType]</code>, <em>optional</em>) — You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>&lt;class 'transformers.image_processing_base.BatchFeature'&gt;</code></p>
`}}),kt=new U({props:{title:"SiglipProcessor",local:"transformers.SiglipProcessor",headingTag:"h2"}}),St=new x({props:{name:"class transformers.SiglipProcessor",anchor:"transformers.SiglipProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SiglipProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/ko/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/main/ko/model_doc/siglip#transformers.SiglipTokenizer">SiglipTokenizer</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/processing_siglip.py#L28"}}),Ct=new x({props:{name:"batch_decode",anchor:"transformers.SiglipProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/processing_siglip.py#L130"}}),zt=new x({props:{name:"decode",anchor:"transformers.SiglipProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/processing_siglip.py#L123"}}),Zt=new U({props:{title:"SiglipModel",local:"transformers.SiglipModel",headingTag:"h2"}}),Bt=new x({props:{name:"class transformers.SiglipModel",anchor:"transformers.SiglipModel",parameters:[{name:"config",val:": SiglipConfig"}],parametersDescription:[{anchor:"transformers.SiglipModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/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/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L898"}}),Wt=new x({props:{name:"forward",anchor:"transformers.SiglipModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"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>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/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.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{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.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{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>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L1029",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 (<a
  href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipConfig"
>SiglipConfig</a>) 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/main/ko/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/main/ko/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/main/ko/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/main/ko/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>
`}}),ue=new Ko({props:{$$slots:{default:[kr]},$$scope:{ctx:v}}}),_e=new ne({props:{anchor:"transformers.SiglipModel.forward.example",$$slots:{default:[Sr]},$$scope:{ctx:v}}}),Rt=new x({props:{name:"get_text_features",anchor:"transformers.SiglipModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SiglipModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/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.Tensor</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.n_positions - 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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L934",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/ko/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>
`}}),ye=new ne({props:{anchor:"transformers.SiglipModel.get_text_features.example",$$slots:{default:[Cr]},$$scope:{ctx:v}}}),Ft=new x({props:{name:"get_image_features",anchor:"transformers.SiglipModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = 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, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,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>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L980",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/main/ko/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>
`}}),Me=new ne({props:{anchor:"transformers.SiglipModel.get_image_features.example",$$slots:{default:[zr]},$$scope:{ctx:v}}}),Nt=new U({props:{title:"SiglipTextModel",local:"transformers.SiglipTextModel",headingTag:"h2"}}),Gt=new x({props:{name:"class transformers.SiglipTextModel",anchor:"transformers.SiglipTextModel",parameters:[{name:"config",val:": SiglipTextConfig"}],parametersDescription:[{anchor:"transformers.SiglipTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipTextConfig">SiglipTextConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L712"}}),Pt=new x({props:{name:"forward",anchor:"transformers.SiglipTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SiglipTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/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.Tensor</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.n_positions - 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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L732",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new Ko({props:{$$slots:{default:[Zr]},$$scope:{ctx:v}}}),je=new ne({props:{anchor:"transformers.SiglipTextModel.forward.example",$$slots:{default:[Br]},$$scope:{ctx:v}}}),Vt=new U({props:{title:"SiglipVisionModel",local:"transformers.SiglipVisionModel",headingTag:"h2"}}),qt=new x({props:{name:"class transformers.SiglipVisionModel",anchor:"transformers.SiglipVisionModel",parameters:[{name:"config",val:": SiglipVisionConfig"}],parametersDescription:[{anchor:"transformers.SiglipVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/siglip#transformers.SiglipVisionConfig">SiglipVisionConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L840"}}),Qt=new x({props:{name:"forward",anchor:"transformers.SiglipVisionModel.forward",parameters:[{name:"pixel_values",val:""},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipVisionModel.forward.pixel_values",description:"<strong>pixel_values</strong> (`<code>of shape</code>(batch_size, num_channels, image_size, image_size)<code>) -- The tensors corresponding to the input images. Pixel values can be obtained using </code>{image_processor_class}<code>. See </code>{image_processor_class}.<strong>call</strong><code> for details (</code>{processor_class}<code>uses</code>{image_processor_class}` for processing images).",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>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L860",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new Ko({props:{$$slots:{default:[Wr]},$$scope:{ctx:v}}}),$e=new ne({props:{anchor:"transformers.SiglipVisionModel.forward.example",$$slots:{default:[Rr]},$$scope:{ctx:v}}}),Xt=new U({props:{title:"SiglipForImageClassification",local:"transformers.SiglipForImageClassification",headingTag:"h2"}}),Et=new x({props:{name:"class transformers.SiglipForImageClassification",anchor:"transformers.SiglipForImageClassification",parameters:[{name:"config",val:": SiglipConfig"}],parametersDescription:[{anchor:"transformers.SiglipForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/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/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L1128"}}),Ht=new x({props:{name:"forward",anchor:"transformers.SiglipForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SiglipForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.SiglipForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</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"},{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>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/siglip/modeling_siglip.py#L1155",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/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/main/ko/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/main/ko/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new Ko({props:{$$slots:{default:[Fr]},$$scope:{ctx:v}}}),Ue=new ne({props:{anchor:"transformers.SiglipForImageClassification.forward.example",$$slots:{default:[Nr]},$$scope:{ctx:v}}}),Lt=new xr({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/siglip.md"}}),{c(){l=c("meta"),w=n(),b=c("p"),p=n(),m(T.$$.fragment),o=n(),M=c("div"),M.innerHTML=ga,Vs=n(),m(Ce.$$.fragment),qs=n(),ze=c("p"),ze.innerHTML=ha,Qs=n(),Ze=c("p"),Ze.textContent=fa,Xs=n(),Be=c("p"),Be.innerHTML=ua,Es=n(),m(We.$$.fragment),Hs=n(),Re=c("ul"),Re.innerHTML=_a,Ls=n(),ae=c("img"),Ds=n(),Fe=c("small"),Fe.innerHTML=ya,As=n(),Ne=c("p"),Ne.innerHTML=Ta,Ys=n(),m(Ge.$$.fragment),Os=n(),Pe=c("p"),Pe.innerHTML=Ma,Ks=n(),m(Ve.$$.fragment),eo=n(),qe=c("p"),qe.textContent=wa,to=n(),m(Qe.$$.fragment),so=n(),m(Xe.$$.fragment),oo=n(),Ee=c("p"),Ee.textContent=ja,no=n(),m(He.$$.fragment),ao=n(),m(Le.$$.fragment),ro=n(),De=c("p"),De.textContent=va,io=n(),Ae=c("ul"),Ae.innerHTML=$a,lo=n(),Ye=c("p"),Ye.textContent=xa,co=n(),m(Oe.$$.fragment),po=n(),Ke=c("p"),Ke.textContent=Ua,mo=n(),m(et.$$.fragment),go=n(),tt=c("p"),tt.innerHTML=Ja,ho=n(),st=c("p"),st.textContent=Ia,fo=n(),m(ot.$$.fragment),uo=n(),m(nt.$$.fragment),_o=n(),at=c("p"),at.innerHTML=ka,bo=n(),rt=c("p"),rt.innerHTML=Sa,yo=n(),m(it.$$.fragment),To=n(),lt=c("p"),lt.innerHTML=Ca,Mo=n(),m(ct.$$.fragment),wo=n(),dt=c("p"),dt.innerHTML=za,jo=n(),re=c("div"),re.innerHTML=Za,vo=n(),m(pt.$$.fragment),$o=n(),S=c("div"),m(mt.$$.fragment),en=n(),Kt=c("p"),Kt.innerHTML=Ba,tn=n(),es=c("p"),es.innerHTML=Wa,sn=n(),m(ie.$$.fragment),on=n(),le=c("div"),m(gt.$$.fragment),nn=n(),ts=c("p"),ts.innerHTML=Ra,xo=n(),m(ht.$$.fragment),Uo=n(),N=c("div"),m(ft.$$.fragment),an=n(),ss=c("p"),ss.innerHTML=Fa,rn=n(),os=c("p"),os.innerHTML=Na,ln=n(),m(ce.$$.fragment),Jo=n(),m(ut.$$.fragment),Io=n(),G=c("div"),m(_t.$$.fragment),cn=n(),ns=c("p"),ns.innerHTML=Ga,dn=n(),as=c("p"),as.innerHTML=Pa,pn=n(),m(de.$$.fragment),ko=n(),m(bt.$$.fragment),So=n(),J=c("div"),m(yt.$$.fragment),mn=n(),rs=c("p"),rs.innerHTML=Va,gn=n(),is=c("p"),is.innerHTML=qa,hn=n(),Y=c("div"),m(Tt.$$.fragment),fn=n(),ls=c("p"),ls.textContent=Qa,un=n(),cs=c("ul"),cs.innerHTML=Xa,_n=n(),pe=c("div"),m(Mt.$$.fragment),bn=n(),ds=c("p"),ds.innerHTML=Ea,yn=n(),me=c("div"),m(wt.$$.fragment),Tn=n(),ps=c("p"),ps.textContent=Ha,Mn=n(),ms=c("div"),m(jt.$$.fragment),Co=n(),m(vt.$$.fragment),zo=n(),L=c("div"),m($t.$$.fragment),wn=n(),gs=c("p"),gs.textContent=La,jn=n(),ge=c("div"),m(xt.$$.fragment),vn=n(),hs=c("p"),hs.textContent=Da,Zo=n(),m(Ut.$$.fragment),Bo=n(),C=c("div"),m(Jt.$$.fragment),$n=n(),fs=c("p"),fs.textContent=Aa,xn=n(),us=c("p"),us.innerHTML=Ya,Un=n(),_s=c("ul"),_s.innerHTML=Oa,Jn=n(),bs=c("div"),m(It.$$.fragment),Wo=n(),m(kt.$$.fragment),Ro=n(),z=c("div"),m(St.$$.fragment),In=n(),ys=c("p"),ys.textContent=Ka,kn=n(),Ts=c("p"),Ts.innerHTML=er,Sn=n(),he=c("div"),m(Ct.$$.fragment),Cn=n(),Ms=c("p"),Ms.innerHTML=tr,zn=n(),fe=c("div"),m(zt.$$.fragment),Zn=n(),ws=c("p"),ws.innerHTML=sr,Fo=n(),m(Zt.$$.fragment),No=n(),I=c("div"),m(Bt.$$.fragment),Bn=n(),js=c("p"),js.textContent=or,Wn=n(),vs=c("p"),vs.innerHTML=nr,Rn=n(),$s=c("p"),$s.innerHTML=ar,Fn=n(),Q=c("div"),m(Wt.$$.fragment),Nn=n(),xs=c("p"),xs.innerHTML=rr,Gn=n(),m(ue.$$.fragment),Pn=n(),m(_e.$$.fragment),Vn=n(),be=c("div"),m(Rt.$$.fragment),qn=n(),m(ye.$$.fragment),Qn=n(),Te=c("div"),m(Ft.$$.fragment),Xn=n(),m(Me.$$.fragment),Go=n(),m(Nt.$$.fragment),Po=n(),Z=c("div"),m(Gt.$$.fragment),En=n(),Us=c("p"),Us.textContent=ir,Hn=n(),Js=c("p"),Js.innerHTML=lr,Ln=n(),Is=c("p"),Is.innerHTML=cr,Dn=n(),X=c("div"),m(Pt.$$.fragment),An=n(),ks=c("p"),ks.innerHTML=dr,Yn=n(),m(we.$$.fragment),On=n(),m(je.$$.fragment),Vo=n(),m(Vt.$$.fragment),qo=n(),B=c("div"),m(qt.$$.fragment),Kn=n(),Ss=c("p"),Ss.textContent=pr,ea=n(),Cs=c("p"),Cs.innerHTML=mr,ta=n(),zs=c("p"),zs.innerHTML=gr,sa=n(),E=c("div"),m(Qt.$$.fragment),oa=n(),Zs=c("p"),Zs.innerHTML=hr,na=n(),m(ve.$$.fragment),aa=n(),m($e.$$.fragment),Qo=n(),m(Xt.$$.fragment),Xo=n(),W=c("div"),m(Et.$$.fragment),ra=n(),Bs=c("p"),Bs.textContent=fr,ia=n(),Ws=c("p"),Ws.innerHTML=ur,la=n(),Rs=c("p"),Rs.innerHTML=_r,ca=n(),H=c("div"),m(Ht.$$.fragment),da=n(),Fs=c("p"),Fs.innerHTML=br,pa=n(),m(xe.$$.fragment),ma=n(),m(Ue.$$.fragment),Eo=n(),m(Lt.$$.fragment),Ho=n(),Ns=c("p"),this.h()},l(e){const t=vr("svelte-u9bgzb",document.head);l=d(t,"META",{name:!0,content:!0}),t.forEach(s),w=a(e),b=d(e,"P",{}),$(b).forEach(s),p=a(e),g(T.$$.fragment,e),o=a(e),M=d(e,"DIV",{class:!0,"data-svelte-h":!0}),y(M)!=="svelte-b95w5j"&&(M.innerHTML=ga),Vs=a(e),g(Ce.$$.fragment,e),qs=a(e),ze=d(e,"P",{"data-svelte-h":!0}),y(ze)!=="svelte-1d4jzbf"&&(ze.innerHTML=ha),Qs=a(e),Ze=d(e,"P",{"data-svelte-h":!0}),y(Ze)!=="svelte-e5r8wp"&&(Ze.textContent=fa),Xs=a(e),Be=d(e,"P",{"data-svelte-h":!0}),y(Be)!=="svelte-3uzawc"&&(Be.innerHTML=ua),Es=a(e),g(We.$$.fragment,e),Hs=a(e),Re=d(e,"UL",{"data-svelte-h":!0}),y(Re)!=="svelte-bvxnes"&&(Re.innerHTML=_a),Ls=a(e),ae=d(e,"IMG",{src:!0,alt:!0,width:!0}),Ds=a(e),Fe=d(e,"SMALL",{"data-svelte-h":!0}),y(Fe)!=="svelte-1vzmuff"&&(Fe.innerHTML=ya),As=a(e),Ne=d(e,"P",{"data-svelte-h":!0}),y(Ne)!=="svelte-adla5g"&&(Ne.innerHTML=Ta),Ys=a(e),g(Ge.$$.fragment,e),Os=a(e),Pe=d(e,"P",{"data-svelte-h":!0}),y(Pe)!=="svelte-uqx19x"&&(Pe.innerHTML=Ma),Ks=a(e),g(Ve.$$.fragment,e),eo=a(e),qe=d(e,"P",{"data-svelte-h":!0}),y(qe)!=="svelte-1sv1oug"&&(qe.textContent=wa),to=a(e),g(Qe.$$.fragment,e),so=a(e),g(Xe.$$.fragment,e),oo=a(e),Ee=d(e,"P",{"data-svelte-h":!0}),y(Ee)!=="svelte-sdxsav"&&(Ee.textContent=ja),no=a(e),g(He.$$.fragment,e),ao=a(e),g(Le.$$.fragment,e),ro=a(e),De=d(e,"P",{"data-svelte-h":!0}),y(De)!=="svelte-1c6e92m"&&(De.textContent=va),io=a(e),Ae=d(e,"UL",{"data-svelte-h":!0}),y(Ae)!=="svelte-1eea5bw"&&(Ae.innerHTML=$a),lo=a(e),Ye=d(e,"P",{"data-svelte-h":!0}),y(Ye)!=="svelte-1ka0gc5"&&(Ye.textContent=xa),co=a(e),g(Oe.$$.fragment,e),po=a(e),Ke=d(e,"P",{"data-svelte-h":!0}),y(Ke)!=="svelte-1aubt4f"&&(Ke.textContent=Ua),mo=a(e),g(et.$$.fragment,e),go=a(e),tt=d(e,"P",{"data-svelte-h":!0}),y(tt)!=="svelte-1oi8fwa"&&(tt.innerHTML=Ja),ho=a(e),st=d(e,"P",{"data-svelte-h":!0}),y(st)!=="svelte-199psak"&&(st.textContent=Ia),fo=a(e),g(ot.$$.fragment,e),uo=a(e),g(nt.$$.fragment,e),_o=a(e),at=d(e,"P",{"data-svelte-h":!0}),y(at)!=="svelte-ikvnml"&&(at.innerHTML=ka),bo=a(e),rt=d(e,"P",{"data-svelte-h":!0}),y(rt)!=="svelte-nylozx"&&(rt.innerHTML=Sa),yo=a(e),g(it.$$.fragment,e),To=a(e),lt=d(e,"P",{"data-svelte-h":!0}),y(lt)!=="svelte-1eqmoin"&&(lt.innerHTML=Ca),Mo=a(e),g(ct.$$.fragment,e),wo=a(e),dt=d(e,"P",{"data-svelte-h":!0}),y(dt)!=="svelte-1j3wyjw"&&(dt.innerHTML=za),jo=a(e),re=d(e,"DIV",{style:!0,"data-svelte-h":!0}),y(re)!=="svelte-16g45j1"&&(re.innerHTML=Za),vo=a(e),g(pt.$$.fragment,e),$o=a(e),S=d(e,"DIV",{class:!0});var P=$(S);g(mt.$$.fragment,P),en=a(P),Kt=d(P,"P",{"data-svelte-h":!0}),y(Kt)!=="svelte-exjdtx"&&(Kt.innerHTML=Ba),tn=a(P),es=d(P,"P",{"data-svelte-h":!0}),y(es)!=="svelte-qr3t5r"&&(es.innerHTML=Wa),sn=a(P),g(ie.$$.fragment,P),on=a(P),le=d(P,"DIV",{class:!0});var Dt=$(le);g(gt.$$.fragment,Dt),nn=a(Dt),ts=d(Dt,"P",{"data-svelte-h":!0}),y(ts)!=="svelte-1kmyva3"&&(ts.innerHTML=Ra),Dt.forEach(s),P.forEach(s),xo=a(e),g(ht.$$.fragment,e),Uo=a(e),N=d(e,"DIV",{class:!0});var D=$(N);g(ft.$$.fragment,D),an=a(D),ss=d(D,"P",{"data-svelte-h":!0}),y(ss)!=="svelte-1s8l5bz"&&(ss.innerHTML=Fa),rn=a(D),os=d(D,"P",{"data-svelte-h":!0}),y(os)!=="svelte-qr3t5r"&&(os.innerHTML=Na),ln=a(D),g(ce.$$.fragment,D),D.forEach(s),Jo=a(e),g(ut.$$.fragment,e),Io=a(e),G=d(e,"DIV",{class:!0});var A=$(G);g(_t.$$.fragment,A),cn=a(A),ns=d(A,"P",{"data-svelte-h":!0}),y(ns)!=="svelte-20eurn"&&(ns.innerHTML=Ga),dn=a(A),as=d(A,"P",{"data-svelte-h":!0}),y(as)!=="svelte-qr3t5r"&&(as.innerHTML=Pa),pn=a(A),g(de.$$.fragment,A),A.forEach(s),ko=a(e),g(bt.$$.fragment,e),So=a(e),J=d(e,"DIV",{class:!0});var k=$(J);g(yt.$$.fragment,k),mn=a(k),rs=d(k,"P",{"data-svelte-h":!0}),y(rs)!=="svelte-xrmnfw"&&(rs.innerHTML=Va),gn=a(k),is=d(k,"P",{"data-svelte-h":!0}),y(is)!=="svelte-1urdkfw"&&(is.innerHTML=qa),hn=a(k),Y=d(k,"DIV",{class:!0});var se=$(Y);g(Tt.$$.fragment,se),fn=a(se),ls=d(se,"P",{"data-svelte-h":!0}),y(ls)!=="svelte-1wjq39d"&&(ls.textContent=Qa),un=a(se),cs=d(se,"UL",{"data-svelte-h":!0}),y(cs)!=="svelte-8gh3n2"&&(cs.innerHTML=Xa),se.forEach(s),_n=a(k),pe=d(k,"DIV",{class:!0});var At=$(pe);g(Mt.$$.fragment,At),bn=a(At),ds=d(At,"P",{"data-svelte-h":!0}),y(ds)!=="svelte-1f4f5kp"&&(ds.innerHTML=Ea),At.forEach(s),yn=a(k),me=d(k,"DIV",{class:!0});var Yt=$(me);g(wt.$$.fragment,Yt),Tn=a(Yt),ps=d(Yt,"P",{"data-svelte-h":!0}),y(ps)!=="svelte-fl5ab0"&&(ps.textContent=Ha),Yt.forEach(s),Mn=a(k),ms=d(k,"DIV",{class:!0});var Gs=$(ms);g(jt.$$.fragment,Gs),Gs.forEach(s),k.forEach(s),Co=a(e),g(vt.$$.fragment,e),zo=a(e),L=d(e,"DIV",{class:!0});var oe=$(L);g($t.$$.fragment,oe),wn=a(oe),gs=d(oe,"P",{"data-svelte-h":!0}),y(gs)!=="svelte-19glyt2"&&(gs.textContent=La),jn=a(oe),ge=d(oe,"DIV",{class:!0});var Ot=$(ge);g(xt.$$.fragment,Ot),vn=a(Ot),hs=d(Ot,"P",{"data-svelte-h":!0}),y(hs)!=="svelte-1x3yxsa"&&(hs.textContent=Da),Ot.forEach(s),oe.forEach(s),Zo=a(e),g(Ut.$$.fragment,e),Bo=a(e),C=d(e,"DIV",{class:!0});var V=$(C);g(Jt.$$.fragment,V),$n=a(V),fs=d(V,"P",{"data-svelte-h":!0}),y(fs)!=="svelte-14zno7e"&&(fs.textContent=Aa),xn=a(V),us=d(V,"P",{"data-svelte-h":!0}),y(us)!=="svelte-7883m0"&&(us.innerHTML=Ya),Un=a(V),_s=d(V,"UL",{"data-svelte-h":!0}),y(_s)!=="svelte-1qslv4f"&&(_s.innerHTML=Oa),Jn=a(V),bs=d(V,"DIV",{class:!0});var Ps=$(bs);g(It.$$.fragment,Ps),Ps.forEach(s),V.forEach(s),Wo=a(e),g(kt.$$.fragment,e),Ro=a(e),z=d(e,"DIV",{class:!0});var O=$(z);g(St.$$.fragment,O),In=a(O),ys=d(O,"P",{"data-svelte-h":!0}),y(ys)!=="svelte-yt9wur"&&(ys.textContent=Ka),kn=a(O),Ts=d(O,"P",{"data-svelte-h":!0}),y(Ts)!=="svelte-crj05o"&&(Ts.innerHTML=er),Sn=a(O),he=d(O,"DIV",{class:!0});var Do=$(he);g(Ct.$$.fragment,Do),Cn=a(Do),Ms=d(Do,"P",{"data-svelte-h":!0}),y(Ms)!=="svelte-1xoa0ta"&&(Ms.innerHTML=tr),Do.forEach(s),zn=a(O),fe=d(O,"DIV",{class:!0});var Ao=$(fe);g(zt.$$.fragment,Ao),Zn=a(Ao),ws=d(Ao,"P",{"data-svelte-h":!0}),y(ws)!=="svelte-1e0nqog"&&(ws.innerHTML=sr),Ao.forEach(s),O.forEach(s),Fo=a(e),g(Zt.$$.fragment,e),No=a(e),I=d(e,"DIV",{class:!0});var R=$(I);g(Bt.$$.fragment,R),Bn=a(R),js=d(R,"P",{"data-svelte-h":!0}),y(js)!=="svelte-1rfoftu"&&(js.textContent=or),Wn=a(R),vs=d(R,"P",{"data-svelte-h":!0}),y(vs)!=="svelte-u3dlub"&&(vs.innerHTML=nr),Rn=a(R),$s=d(R,"P",{"data-svelte-h":!0}),y($s)!=="svelte-hswkmf"&&($s.innerHTML=ar),Fn=a(R),Q=d(R,"DIV",{class:!0});var Je=$(Q);g(Wt.$$.fragment,Je),Nn=a(Je),xs=d(Je,"P",{"data-svelte-h":!0}),y(xs)!=="svelte-1qpkiw8"&&(xs.innerHTML=rr),Gn=a(Je),g(ue.$$.fragment,Je),Pn=a(Je),g(_e.$$.fragment,Je),Je.forEach(s),Vn=a(R),be=d(R,"DIV",{class:!0});var Yo=$(be);g(Rt.$$.fragment,Yo),qn=a(Yo),g(ye.$$.fragment,Yo),Yo.forEach(s),Qn=a(R),Te=d(R,"DIV",{class:!0});var Oo=$(Te);g(Ft.$$.fragment,Oo),Xn=a(Oo),g(Me.$$.fragment,Oo),Oo.forEach(s),R.forEach(s),Go=a(e),g(Nt.$$.fragment,e),Po=a(e),Z=d(e,"DIV",{class:!0});var K=$(Z);g(Gt.$$.fragment,K),En=a(K),Us=d(K,"P",{"data-svelte-h":!0}),y(Us)!=="svelte-zak2l1"&&(Us.textContent=ir),Hn=a(K),Js=d(K,"P",{"data-svelte-h":!0}),y(Js)!=="svelte-u3dlub"&&(Js.innerHTML=lr),Ln=a(K),Is=d(K,"P",{"data-svelte-h":!0}),y(Is)!=="svelte-hswkmf"&&(Is.innerHTML=cr),Dn=a(K),X=d(K,"DIV",{class:!0});var Ie=$(X);g(Pt.$$.fragment,Ie),An=a(Ie),ks=d(Ie,"P",{"data-svelte-h":!0}),y(ks)!=="svelte-83mjh8"&&(ks.innerHTML=dr),Yn=a(Ie),g(we.$$.fragment,Ie),On=a(Ie),g(je.$$.fragment,Ie),Ie.forEach(s),K.forEach(s),Vo=a(e),g(Vt.$$.fragment,e),qo=a(e),B=d(e,"DIV",{class:!0});var ee=$(B);g(qt.$$.fragment,ee),Kn=a(ee),Ss=d(ee,"P",{"data-svelte-h":!0}),y(Ss)!=="svelte-1xlcslk"&&(Ss.textContent=pr),ea=a(ee),Cs=d(ee,"P",{"data-svelte-h":!0}),y(Cs)!=="svelte-u3dlub"&&(Cs.innerHTML=mr),ta=a(ee),zs=d(ee,"P",{"data-svelte-h":!0}),y(zs)!=="svelte-hswkmf"&&(zs.innerHTML=gr),sa=a(ee),E=d(ee,"DIV",{class:!0});var ke=$(E);g(Qt.$$.fragment,ke),oa=a(ke),Zs=d(ke,"P",{"data-svelte-h":!0}),y(Zs)!=="svelte-1rw4o1o"&&(Zs.innerHTML=hr),na=a(ke),g(ve.$$.fragment,ke),aa=a(ke),g($e.$$.fragment,ke),ke.forEach(s),ee.forEach(s),Qo=a(e),g(Xt.$$.fragment,e),Xo=a(e),W=d(e,"DIV",{class:!0});var te=$(W);g(Et.$$.fragment,te),ra=a(te),Bs=d(te,"P",{"data-svelte-h":!0}),y(Bs)!=="svelte-1dbrqa4"&&(Bs.textContent=fr),ia=a(te),Ws=d(te,"P",{"data-svelte-h":!0}),y(Ws)!=="svelte-u3dlub"&&(Ws.innerHTML=ur),la=a(te),Rs=d(te,"P",{"data-svelte-h":!0}),y(Rs)!=="svelte-hswkmf"&&(Rs.innerHTML=_r),ca=a(te),H=d(te,"DIV",{class:!0});var Se=$(H);g(Ht.$$.fragment,Se),da=a(Se),Fs=d(Se,"P",{"data-svelte-h":!0}),y(Fs)!=="svelte-10b1e8s"&&(Fs.innerHTML=br),pa=a(Se),g(xe.$$.fragment,Se),ma=a(Se),g(Ue.$$.fragment,Se),Se.forEach(s),te.forEach(s),Eo=a(e),g(Lt.$$.fragment,e),Ho=a(e),Ns=d(e,"P",{}),$(Ns).forEach(s),this.h()},h(){j(l,"name","hf:doc:metadata"),j(l,"content",Pr),j(M,"class","flex flex-wrap space-x-1"),Tr(ae.src,ba="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/siglip_table.jpeg")||j(ae,"src",ba),j(ae,"alt","drawing"),j(ae,"width","600"),$r(re,"text-align","center"),j(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(S,"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(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(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(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(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ms,"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(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(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(bs,"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(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(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(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(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(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(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(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(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(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(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(B,"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(W,"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){r(document.head,l),i(e,w,t),i(e,b,t),i(e,p,t),h(T,e,t),i(e,o,t),i(e,M,t),i(e,Vs,t),h(Ce,e,t),i(e,qs,t),i(e,ze,t),i(e,Qs,t),i(e,Ze,t),i(e,Xs,t),i(e,Be,t),i(e,Es,t),h(We,e,t),i(e,Hs,t),i(e,Re,t),i(e,Ls,t),i(e,ae,t),i(e,Ds,t),i(e,Fe,t),i(e,As,t),i(e,Ne,t),i(e,Ys,t),h(Ge,e,t),i(e,Os,t),i(e,Pe,t),i(e,Ks,t),h(Ve,e,t),i(e,eo,t),i(e,qe,t),i(e,to,t),h(Qe,e,t),i(e,so,t),h(Xe,e,t),i(e,oo,t),i(e,Ee,t),i(e,no,t),h(He,e,t),i(e,ao,t),h(Le,e,t),i(e,ro,t),i(e,De,t),i(e,io,t),i(e,Ae,t),i(e,lo,t),i(e,Ye,t),i(e,co,t),h(Oe,e,t),i(e,po,t),i(e,Ke,t),i(e,mo,t),h(et,e,t),i(e,go,t),i(e,tt,t),i(e,ho,t),i(e,st,t),i(e,fo,t),h(ot,e,t),i(e,uo,t),h(nt,e,t),i(e,_o,t),i(e,at,t),i(e,bo,t),i(e,rt,t),i(e,yo,t),h(it,e,t),i(e,To,t),i(e,lt,t),i(e,Mo,t),h(ct,e,t),i(e,wo,t),i(e,dt,t),i(e,jo,t),i(e,re,t),i(e,vo,t),h(pt,e,t),i(e,$o,t),i(e,S,t),h(mt,S,null),r(S,en),r(S,Kt),r(S,tn),r(S,es),r(S,sn),h(ie,S,null),r(S,on),r(S,le),h(gt,le,null),r(le,nn),r(le,ts),i(e,xo,t),h(ht,e,t),i(e,Uo,t),i(e,N,t),h(ft,N,null),r(N,an),r(N,ss),r(N,rn),r(N,os),r(N,ln),h(ce,N,null),i(e,Jo,t),h(ut,e,t),i(e,Io,t),i(e,G,t),h(_t,G,null),r(G,cn),r(G,ns),r(G,dn),r(G,as),r(G,pn),h(de,G,null),i(e,ko,t),h(bt,e,t),i(e,So,t),i(e,J,t),h(yt,J,null),r(J,mn),r(J,rs),r(J,gn),r(J,is),r(J,hn),r(J,Y),h(Tt,Y,null),r(Y,fn),r(Y,ls),r(Y,un),r(Y,cs),r(J,_n),r(J,pe),h(Mt,pe,null),r(pe,bn),r(pe,ds),r(J,yn),r(J,me),h(wt,me,null),r(me,Tn),r(me,ps),r(J,Mn),r(J,ms),h(jt,ms,null),i(e,Co,t),h(vt,e,t),i(e,zo,t),i(e,L,t),h($t,L,null),r(L,wn),r(L,gs),r(L,jn),r(L,ge),h(xt,ge,null),r(ge,vn),r(ge,hs),i(e,Zo,t),h(Ut,e,t),i(e,Bo,t),i(e,C,t),h(Jt,C,null),r(C,$n),r(C,fs),r(C,xn),r(C,us),r(C,Un),r(C,_s),r(C,Jn),r(C,bs),h(It,bs,null),i(e,Wo,t),h(kt,e,t),i(e,Ro,t),i(e,z,t),h(St,z,null),r(z,In),r(z,ys),r(z,kn),r(z,Ts),r(z,Sn),r(z,he),h(Ct,he,null),r(he,Cn),r(he,Ms),r(z,zn),r(z,fe),h(zt,fe,null),r(fe,Zn),r(fe,ws),i(e,Fo,t),h(Zt,e,t),i(e,No,t),i(e,I,t),h(Bt,I,null),r(I,Bn),r(I,js),r(I,Wn),r(I,vs),r(I,Rn),r(I,$s),r(I,Fn),r(I,Q),h(Wt,Q,null),r(Q,Nn),r(Q,xs),r(Q,Gn),h(ue,Q,null),r(Q,Pn),h(_e,Q,null),r(I,Vn),r(I,be),h(Rt,be,null),r(be,qn),h(ye,be,null),r(I,Qn),r(I,Te),h(Ft,Te,null),r(Te,Xn),h(Me,Te,null),i(e,Go,t),h(Nt,e,t),i(e,Po,t),i(e,Z,t),h(Gt,Z,null),r(Z,En),r(Z,Us),r(Z,Hn),r(Z,Js),r(Z,Ln),r(Z,Is),r(Z,Dn),r(Z,X),h(Pt,X,null),r(X,An),r(X,ks),r(X,Yn),h(we,X,null),r(X,On),h(je,X,null),i(e,Vo,t),h(Vt,e,t),i(e,qo,t),i(e,B,t),h(qt,B,null),r(B,Kn),r(B,Ss),r(B,ea),r(B,Cs),r(B,ta),r(B,zs),r(B,sa),r(B,E),h(Qt,E,null),r(E,oa),r(E,Zs),r(E,na),h(ve,E,null),r(E,aa),h($e,E,null),i(e,Qo,t),h(Xt,e,t),i(e,Xo,t),i(e,W,t),h(Et,W,null),r(W,ra),r(W,Bs),r(W,ia),r(W,Ws),r(W,la),r(W,Rs),r(W,ca),r(W,H),h(Ht,H,null),r(H,da),r(H,Fs),r(H,pa),h(xe,H,null),r(H,ma),h(Ue,H,null),i(e,Eo,t),h(Lt,e,t),i(e,Ho,t),i(e,Ns,t),Lo=!0},p(e,[t]){const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),ie.$set(P);const Dt={};t&2&&(Dt.$$scope={dirty:t,ctx:e}),ce.$set(Dt);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),de.$set(D);const A={};t&2&&(A.$$scope={dirty:t,ctx:e}),ue.$set(A);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),_e.$set(k);const se={};t&2&&(se.$$scope={dirty:t,ctx:e}),ye.$set(se);const At={};t&2&&(At.$$scope={dirty:t,ctx:e}),Me.$set(At);const Yt={};t&2&&(Yt.$$scope={dirty:t,ctx:e}),we.$set(Yt);const Gs={};t&2&&(Gs.$$scope={dirty:t,ctx:e}),je.$set(Gs);const oe={};t&2&&(oe.$$scope={dirty:t,ctx:e}),ve.$set(oe);const Ot={};t&2&&(Ot.$$scope={dirty:t,ctx:e}),$e.$set(Ot);const V={};t&2&&(V.$$scope={dirty:t,ctx:e}),xe.$set(V);const Ps={};t&2&&(Ps.$$scope={dirty:t,ctx:e}),Ue.$set(Ps)},i(e){Lo||(f(T.$$.fragment,e),f(Ce.$$.fragment,e),f(We.$$.fragment,e),f(Ge.$$.fragment,e),f(Ve.$$.fragment,e),f(Qe.$$.fragment,e),f(Xe.$$.fragment,e),f(He.$$.fragment,e),f(Le.$$.fragment,e),f(Oe.$$.fragment,e),f(et.$$.fragment,e),f(ot.$$.fragment,e),f(nt.$$.fragment,e),f(it.$$.fragment,e),f(ct.$$.fragment,e),f(pt.$$.fragment,e),f(mt.$$.fragment,e),f(ie.$$.fragment,e),f(gt.$$.fragment,e),f(ht.$$.fragment,e),f(ft.$$.fragment,e),f(ce.$$.fragment,e),f(ut.$$.fragment,e),f(_t.$$.fragment,e),f(de.$$.fragment,e),f(bt.$$.fragment,e),f(yt.$$.fragment,e),f(Tt.$$.fragment,e),f(Mt.$$.fragment,e),f(wt.$$.fragment,e),f(jt.$$.fragment,e),f(vt.$$.fragment,e),f($t.$$.fragment,e),f(xt.$$.fragment,e),f(Ut.$$.fragment,e),f(Jt.$$.fragment,e),f(It.$$.fragment,e),f(kt.$$.fragment,e),f(St.$$.fragment,e),f(Ct.$$.fragment,e),f(zt.$$.fragment,e),f(Zt.$$.fragment,e),f(Bt.$$.fragment,e),f(Wt.$$.fragment,e),f(ue.$$.fragment,e),f(_e.$$.fragment,e),f(Rt.$$.fragment,e),f(ye.$$.fragment,e),f(Ft.$$.fragment,e),f(Me.$$.fragment,e),f(Nt.$$.fragment,e),f(Gt.$$.fragment,e),f(Pt.$$.fragment,e),f(we.$$.fragment,e),f(je.$$.fragment,e),f(Vt.$$.fragment,e),f(qt.$$.fragment,e),f(Qt.$$.fragment,e),f(ve.$$.fragment,e),f($e.$$.fragment,e),f(Xt.$$.fragment,e),f(Et.$$.fragment,e),f(Ht.$$.fragment,e),f(xe.$$.fragment,e),f(Ue.$$.fragment,e),f(Lt.$$.fragment,e),Lo=!0)},o(e){u(T.$$.fragment,e),u(Ce.$$.fragment,e),u(We.$$.fragment,e),u(Ge.$$.fragment,e),u(Ve.$$.fragment,e),u(Qe.$$.fragment,e),u(Xe.$$.fragment,e),u(He.$$.fragment,e),u(Le.$$.fragment,e),u(Oe.$$.fragment,e),u(et.$$.fragment,e),u(ot.$$.fragment,e),u(nt.$$.fragment,e),u(it.$$.fragment,e),u(ct.$$.fragment,e),u(pt.$$.fragment,e),u(mt.$$.fragment,e),u(ie.$$.fragment,e),u(gt.$$.fragment,e),u(ht.$$.fragment,e),u(ft.$$.fragment,e),u(ce.$$.fragment,e),u(ut.$$.fragment,e),u(_t.$$.fragment,e),u(de.$$.fragment,e),u(bt.$$.fragment,e),u(yt.$$.fragment,e),u(Tt.$$.fragment,e),u(Mt.$$.fragment,e),u(wt.$$.fragment,e),u(jt.$$.fragment,e),u(vt.$$.fragment,e),u($t.$$.fragment,e),u(xt.$$.fragment,e),u(Ut.$$.fragment,e),u(Jt.$$.fragment,e),u(It.$$.fragment,e),u(kt.$$.fragment,e),u(St.$$.fragment,e),u(Ct.$$.fragment,e),u(zt.$$.fragment,e),u(Zt.$$.fragment,e),u(Bt.$$.fragment,e),u(Wt.$$.fragment,e),u(ue.$$.fragment,e),u(_e.$$.fragment,e),u(Rt.$$.fragment,e),u(ye.$$.fragment,e),u(Ft.$$.fragment,e),u(Me.$$.fragment,e),u(Nt.$$.fragment,e),u(Gt.$$.fragment,e),u(Pt.$$.fragment,e),u(we.$$.fragment,e),u(je.$$.fragment,e),u(Vt.$$.fragment,e),u(qt.$$.fragment,e),u(Qt.$$.fragment,e),u(ve.$$.fragment,e),u($e.$$.fragment,e),u(Xt.$$.fragment,e),u(Et.$$.fragment,e),u(Ht.$$.fragment,e),u(xe.$$.fragment,e),u(Ue.$$.fragment,e),u(Lt.$$.fragment,e),Lo=!1},d(e){e&&(s(w),s(b),s(p),s(o),s(M),s(Vs),s(qs),s(ze),s(Qs),s(Ze),s(Xs),s(Be),s(Es),s(Hs),s(Re),s(Ls),s(ae),s(Ds),s(Fe),s(As),s(Ne),s(Ys),s(Os),s(Pe),s(Ks),s(eo),s(qe),s(to),s(so),s(oo),s(Ee),s(no),s(ao),s(ro),s(De),s(io),s(Ae),s(lo),s(Ye),s(co),s(po),s(Ke),s(mo),s(go),s(tt),s(ho),s(st),s(fo),s(uo),s(_o),s(at),s(bo),s(rt),s(yo),s(To),s(lt),s(Mo),s(wo),s(dt),s(jo),s(re),s(vo),s($o),s(S),s(xo),s(Uo),s(N),s(Jo),s(Io),s(G),s(ko),s(So),s(J),s(Co),s(zo),s(L),s(Zo),s(Bo),s(C),s(Wo),s(Ro),s(z),s(Fo),s(No),s(I),s(Go),s(Po),s(Z),s(Vo),s(qo),s(B),s(Qo),s(Xo),s(W),s(Eo),s(Ho),s(Ns)),s(l),_(T,e),_(Ce,e),_(We,e),_(Ge,e),_(Ve,e),_(Qe,e),_(Xe,e),_(He,e),_(Le,e),_(Oe,e),_(et,e),_(ot,e),_(nt,e),_(it,e),_(ct,e),_(pt,e),_(mt),_(ie),_(gt),_(ht,e),_(ft),_(ce),_(ut,e),_(_t),_(de),_(bt,e),_(yt),_(Tt),_(Mt),_(wt),_(jt),_(vt,e),_($t),_(xt),_(Ut,e),_(Jt),_(It),_(kt,e),_(St),_(Ct),_(zt),_(Zt,e),_(Bt),_(Wt),_(ue),_(_e),_(Rt),_(ye),_(Ft),_(Me),_(Nt,e),_(Gt),_(Pt),_(we),_(je),_(Vt,e),_(qt),_(Qt),_(ve),_($e),_(Xt,e),_(Et),_(Ht),_(xe),_(Ue),_(Lt,e)}}}const Pr='{"title":"SigLIP","local":"siglip","sections":[{"title":"개요","local":"overview","sections":[],"depth":2},{"title":"사용 팁","local":"usage-tips","sections":[],"depth":2},{"title":"사용 예시","local":"usage-example","sections":[{"title":"파이프라인 API","local":"pipeline-API","sections":[],"depth":3},{"title":"직접 모델 사용하기","local":"using-the-model-yourself","sections":[],"depth":3}],"depth":2},{"title":"리소스","local":"resources","sections":[],"depth":2},{"title":"SigLIP과 Flash Attention 2 결합하기","local":"combining-siglip-with-flash-attention-2","sections":[],"depth":2},{"title":"Scaled Dot Product Attention(SDPA) 사용하기 using-scaled-dot-product-attention(SDPA) ]","local":"scaled-dot-product-attentionsdpa-사용하기-using-scaled-dot-product-attentionsdpa-","sections":[],"depth":2},{"title":"예상 속도 향상","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":"SiglipImageProcessor","local":"transformers.SiglipImageProcessor","sections":[],"depth":2},{"title":"SiglipImageProcessorFast","local":"transformers.SiglipImageProcessorFast","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 Vr(v){return Mr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ar extends wr{constructor(l){super(),jr(this,l,Vr,Gr,yr,{})}}export{Ar as component};
