import{s as Pt,f as Ct,o as kt,n as rt}from"../chunks/scheduler.25b97de1.js";import{S as Ut,i as jt,g as m,s as a,r as g,A as xt,h as d,f as n,c as o,j as B,u as f,x as y,k as U,y as l,a as s,v as h,d as u,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as Zt}from"../chunks/Tip.baa67368.js";import{D as ye}from"../chunks/Docstring.e257edda.js";import{C as Le}from"../chunks/CodeBlock.e6cd0d95.js";import{E as $t}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as le,E as zt}from"../chunks/EditOnGithub.91d95064.js";function Jt(j){let i,T="Example:",p,c,v;return c=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFBhbGlHZW1tYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyMFBhbGlHZW1tYUNvbmZpZyUyQyUyMFNpZ2xpcFZpc2lvbkNvbmZpZyUyQyUyMEdlbW1hQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNpZ2xpcC1saWtlJTIwdmlzaW9uJTIwY29uZmlnJTBBdmlzaW9uX2NvbmZpZyUyMCUzRCUyMFNpZ2xpcFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFBhbGlHZW1tYSUyMGNvbmZpZyUwQXRleHRfY29uZmlnJTIwJTNEJTIwR2VtbWFDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBQYWxpR2VtbWElMjBwYWxpZ2VtbWEtM2ItMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFBhbGlHZW1tYUNvbmZpZyh2aXNpb25fY29uZmlnJTJDJTIwdGV4dF9jb25maWcpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMHBhbGlnZW1tYS0zYi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFBhbGlHZW1tYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbihjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PaliGemmaForConditionalGeneration, PaliGemmaConfig, SiglipVisionConfig, GemmaConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Siglip-like vision config</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vision_config = SiglipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a PaliGemma config</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text_config = GemmaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a PaliGemma paligemma-3b-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = PaliGemmaConfig(vision_config, text_config)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the paligemma-3b-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PaliGemmaForConditionalGeneration(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(){i=m("p"),i.textContent=T,p=a(),g(c.$$.fragment)},l(r){i=d(r,"P",{"data-svelte-h":!0}),y(i)!=="svelte-11lpom8"&&(i.textContent=T),p=o(r),f(c.$$.fragment,r)},m(r,M){s(r,i,M),s(r,p,M),h(c,r,M),v=!0},p:rt,i(r){v||(u(c.$$.fragment,r),v=!0)},o(r){_(c.$$.fragment,r),v=!1},d(r){r&&(n(i),n(p)),b(c,r)}}}function Ft(j){let i,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=m("p"),i.innerHTML=T},l(p){i=d(p,"P",{"data-svelte-h":!0}),y(i)!=="svelte-fincs2"&&(i.innerHTML=T)},m(p,c){s(p,i,c)},p:rt,d(p){p&&n(i)}}}function Wt(j){let i,T="Example:",p,c,v;return c=new Le({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFBhbGlHZW1tYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwUGFsaUdlbW1hRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZQYWxpR2VtbWEtdGVzdC0yMjRweC1oZiUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZQYWxpR2VtbWEtdGVzdC0yMjRweC1oZiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhbnN3ZXIlMjBlbiUyMFdoZXJlJTIwaXMlMjB0aGUlMjBjb3clMjBzdGFuZGluZyUzRiUyMiUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZndi1oZiUyRlBhbGlHZW1tYS10ZXN0LTIyNHB4LWhmJTJGcmVzb2x2ZSUyRm1haW4lMkZjb3dfYmVhY2hfMS5wbmclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRHByb21wdCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X2xlbmd0aCUzRDMwKSUwQXByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",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, PaliGemmaForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = PaliGemmaForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;google/PaliGemma-test-224px-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/PaliGemma-test-224px-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;answer en Where is the cow standing?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/gv-hf/PaliGemma-test-224px-hf/resolve/main/cow_beach_1.png&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(text=prompt, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(**inputs, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;answer en Where is the cow standing?\\nbeach&quot;</span>`,wrap:!1}}),{c(){i=m("p"),i.textContent=T,p=a(),g(c.$$.fragment)},l(r){i=d(r,"P",{"data-svelte-h":!0}),y(i)!=="svelte-11lpom8"&&(i.textContent=T),p=o(r),f(c.$$.fragment,r)},m(r,M){s(r,i,M),s(r,p,M),h(c,r,M),v=!0},p:rt,i(r){v||(u(c.$$.fragment,r),v=!0)},o(r){_(c.$$.fragment,r),v=!1},d(r){r&&(n(i),n(p)),b(c,r)}}}function It(j){let i,T,p,c,v,r,M,Me,V,it='The PaliGemma model was proposed in <a href="https://huggingface.co/blog/paligemma" rel="nofollow">PaliGemma – Google’s Cutting-Edge Open Vision Language Model</a> by Google. It is a 3B vision-language model composed by a <a href="siglip">SigLIP</a> vision encoder and a <a href="gemma">Gemma</a> language decoder linked by a multimodal linear projection. It cuts an image into a fixed number of VIT tokens and prepends it to an optional prompt. One particularity is that the model uses full block attention on all the image tokens plus the input text tokens. It comes in 3 resolutions, 224x224, 448x448 and 896x896 with 3 base models, with 55 fine-tuned versions for different tasks, and 2 mix models.',Ge,x,lt,we,H,mt='PaliGemma architecture. Taken from the <a href="https://huggingface.co/blog/paligemma">blog post.</a>',Te,N,dt='This model was contributed by <a href="https://huggingface.co/Molbap" rel="nofollow">Molbap</a>.',$e,L,Pe,S,ct="Inference with PaliGemma can be performed as follows:",Ce,X,ke,E,pt="<li>PaliGemma is not meant for conversational use, and it works best when fine-tuning to a specific use case. Some downstream tasks on which PaliGemma can be fine-tuned include image captioning, visual question answering (VQA), object detection, referring expression segmentation and document understanding.</li> <li>One can use <code>PaliGemmaProcessor</code> to prepare images, text and optional labels for the model. When fine-tuning a PaliGemma model, the <code>suffix</code> argument can be passed to the processor which creates the <code>labels</code> for the model:</li>",Ue,Y,je,q,xe,Q,gt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with PaliGemma. If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",Ze,A,ft='<li>A blog post introducing all the features of PaliGemma can be found <a href="https://huggingface.co/blog/paligemma" rel="nofollow">here</a>.</li> <li>Demo notebooks on how to fine-tune PaliGemma for VQA with the Trainer API along with inference can be found <a href="https://github.com/huggingface/notebooks/tree/main/examples/paligemma" rel="nofollow">here</a>.</li> <li>Demo notebooks on how to fine-tune PaliGemma on a custom dataset (receipt image -&gt; JSON) along with inference can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/PaliGemma" rel="nofollow">here</a>. 🌎</li>',ze,D,Je,G,O,Se,me,ht=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaForConditionalGeneration">PaliGemmaForConditionalGeneration</a>. It is used to instantiate an
PaliGemmamodel according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the PaliGemma-2B.`,Xe,de,ut='e.g. <a href="https://huggingface.co/paligemma-hf/paligemma-2b" rel="nofollow">paligemma-hf/paligemma-2b</a>',Ee,ce,_t=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ye,Z,Fe,K,We,w,ee,qe,pe,bt="Constructs a PaliGemma processor which wraps a PaliGemma image processor and a PaliGemma tokenizer into a single processor.",Qe,ge,yt=`<a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaProcessor">PaliGemmaProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a> and <a href="/docs/transformers/main/en/model_doc/llama#transformers.LlamaTokenizerFast">LlamaTokenizerFast</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaProcessor.decode">decode()</a> for more information.`,Ae,z,te,De,fe,vt=`This method forwards all its arguments to GemmaTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Oe,J,ne,Ke,he,Mt=`This method forwards all its arguments to GemmaTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Ie,ae,Re,$,oe,et,ue,Gt=`The PALIGEMMA model which consists of a vision backbone and a language model.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,tt,_e,wt=`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.`,nt,k,se,at,be,Tt='The <a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaForConditionalGeneration">PaliGemmaForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',ot,F,st,W,Be,re,Ve,ve,He;return v=new le({props:{title:"PaliGemma",local:"paligemma",headingTag:"h1"}}),M=new le({props:{title:"Overview",local:"overview",headingTag:"h2"}}),L=new le({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),X=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBQYWxpR2VtbWFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmdvb2dsZSUyRnBhbGlnZW1tYS0zYi1taXgtMjI0JTIyJTBBbW9kZWwlMjAlM0QlMjBQYWxpR2VtbWFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMldoYXQlMjBpcyUyMG9uJTIwdGhlJTIwZmxvd2VyJTNGJTIyJTBBaW1hZ2VfZmlsZSUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmJlZS5qcGclM0Zkb3dubG9hZCUzRHRydWUlMjIlMEFyYXdfaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldChpbWFnZV9maWxlJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihwcm9tcHQlMkMlMjByYXdfaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dCUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QyMCklMEElMEFwcmludChwcm9jZXNzb3IuZGVjb2RlKG91dHB1dCU1QjAlNUQlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUJsZW4ocHJvbXB0KSUzQSU1RCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, PaliGemmaForConditionalGeneration

model_id = <span class="hljs-string">&quot;google/paligemma-3b-mix-224&quot;</span>
model = PaliGemmaForConditionalGeneration.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)

prompt = <span class="hljs-string">&quot;What is on the flower?&quot;</span>
image_file = <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg?download=true&quot;</span>
raw_image = Image.<span class="hljs-built_in">open</span>(requests.get(image_file, stream=<span class="hljs-literal">True</span>).raw)
inputs = processor(prompt, raw_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
output = model.generate(**inputs, max_new_tokens=<span class="hljs-number">20</span>)

<span class="hljs-built_in">print</span>(processor.decode(output[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-built_in">len</span>(prompt):])`,wrap:!1}}),Y=new Le({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyV2hhdCUyMGlzJTIwb24lMjB0aGUlMjBmbG93ZXIlM0YlMjIlMEFhbnN3ZXIlMjAlM0QlMjAlMjJhJTIwYmVlJTIyJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0Rwcm9tcHQlMkMlMjBpbWFnZXMlM0RyYXdfaW1hZ2UlMkMlMjBzdWZmaXglM0RhbnN3ZXIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",highlighted:`prompt = <span class="hljs-string">&quot;What is on the flower?&quot;</span>
answer = <span class="hljs-string">&quot;a bee&quot;</span>
inputs = processor(text=prompt, images=raw_image, suffix=answer, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),q=new le({props:{title:"Resources",local:"resources",headingTag:"h2"}}),D=new le({props:{title:"PaliGemmaConfig",local:"transformers.PaliGemmaConfig",headingTag:"h2"}}),O=new ye({props:{name:"class transformers.PaliGemmaConfig",anchor:"transformers.PaliGemmaConfig",parameters:[{name:"vision_config",val:" = None"},{name:"text_config",val:" = None"},{name:"ignore_index",val:" = -100"},{name:"image_token_index",val:" = 256000"},{name:"vocab_size",val:" = 257152"},{name:"projection_dim",val:" = 2048"},{name:"hidden_size",val:" = 2048"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PaliGemmaConfig.vision_config",description:`<strong>vision_config</strong> (<code>PaliGemmaVisionConfig</code>,  <em>optional</em>) &#x2014;
Custom vision config or dict`,name:"vision_config"},{anchor:"transformers.PaliGemmaConfig.text_config",description:`<strong>text_config</strong> (<code>Union[AutoConfig, dict]</code>, <em>optional</em>) &#x2014;
The config object of the text backbone. Can be any of <code>LlamaConfig</code> or <code>MistralConfig</code>.`,name:"text_config"},{anchor:"transformers.PaliGemmaConfig.ignore_index",description:`<strong>ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The ignore index for the loss function.`,name:"ignore_index"},{anchor:"transformers.PaliGemmaConfig.image_token_index",description:`<strong>image_token_index</strong> (<code>int</code>, <em>optional</em>, defaults to 256000) &#x2014;
The image token index to encode the image prompt.`,name:"image_token_index"},{anchor:"transformers.PaliGemmaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 257152) &#x2014;
Vocabulary size of the PaliGemmamodel. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaForConditionalGeneration">~PaliGemmaForConditionalGeneration</a>`,name:"vocab_size"},{anchor:"transformers.PaliGemmaConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the multimodal projection space.`,name:"projection_dim"},{anchor:"transformers.PaliGemmaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the hidden layer of the Language model.`,name:"hidden_size"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/configuration_paligemma.py#L26"}}),Z=new $t({props:{anchor:"transformers.PaliGemmaConfig.example",$$slots:{default:[Jt]},$$scope:{ctx:j}}}),K=new le({props:{title:"PaliGemmaProcessor",local:"transformers.PaliGemmaProcessor",headingTag:"h2"}}),ee=new ye({props:{name:"class transformers.PaliGemmaProcessor",anchor:"transformers.PaliGemmaProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"chat_template",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PaliGemmaProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a>, <em>optional</em>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.PaliGemmaProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/model_doc/llama#transformers.LlamaTokenizerFast">LlamaTokenizerFast</a>, <em>optional</em>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"},{anchor:"transformers.PaliGemmaProcessor.chat_template",description:`<strong>chat_template</strong> (<code>str</code>, <em>optional</em>) &#x2014; A Jinja template which will be used to convert lists of messages
in a chat into a tokenizable string.`,name:"chat_template"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/processing_paligemma.py#L76"}}),te=new ye({props:{name:"batch_decode",anchor:"transformers.PaliGemmaProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/processing_paligemma.py#L288"}}),ne=new ye({props:{name:"decode",anchor:"transformers.PaliGemmaProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/processing_paligemma.py#L296"}}),ae=new le({props:{title:"PaliGemmaForConditionalGeneration",local:"transformers.PaliGemmaForConditionalGeneration",headingTag:"h2"}}),oe=new ye({props:{name:"class transformers.PaliGemmaForConditionalGeneration",anchor:"transformers.PaliGemmaForConditionalGeneration",parameters:[{name:"config",val:": PaliGemmaConfig"}],parametersDescription:[{anchor:"transformers.PaliGemmaForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/paligemma#transformers.PaliGemmaConfig">PaliGemmaConfig</a> or <code>PaliGemmaVisionConfig</code>) &#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/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/modeling_paligemma.py#L227"}}),se=new ye({props:{name:"forward",anchor:"transformers.PaliGemmaForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"pixel_values",val:": FloatTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"token_type_ids",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.pixel_values",description:'<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)) -- The tensors corresponding to the input images. Pixel values can be obtained using [AutoImageProcessor](/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor). See [SiglipImageProcessor.__call__()](/docs/transformers/main/en/model_doc/levit#transformers.LevitFeatureExtractor.__call__) for details ([]</code>PaliGemmaProcessor`] uses\n<a href="/docs/transformers/main/en/model_doc/siglip#transformers.SiglipImageProcessor">SiglipImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.PaliGemmaForConditionalGeneration.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></p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.PaliGemmaForConditionalGeneration.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.PaliGemmaForConditionalGeneration.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.PaliGemmaForConditionalGeneration.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.PaliGemmaForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/paligemma/modeling_paligemma.py#L359",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.paligemma.modeling_paligemma.PaliGemmaCausalLMOutputWithPast</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/en/model_doc/paligemma#transformers.PaliGemmaConfig"
>PaliGemmaConfig</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) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</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>
<li>
<p><strong>image_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the image embeddings, <code>(batch_size, num_images, sequence_length, hidden_size)</code>.</p>
<p>image_hidden_states of the model produced by the vision encoder, and optionally by the perceiver</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.paligemma.modeling_paligemma.PaliGemmaCausalLMOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),F=new Zt({props:{$$slots:{default:[Ft]},$$scope:{ctx:j}}}),W=new $t({props:{anchor:"transformers.PaliGemmaForConditionalGeneration.forward.example",$$slots:{default:[Wt]},$$scope:{ctx:j}}}),re=new zt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/paligemma.md"}}),{c(){i=m("meta"),T=a(),p=m("p"),c=a(),g(v.$$.fragment),r=a(),g(M.$$.fragment),Me=a(),V=m("p"),V.innerHTML=it,Ge=a(),x=m("img"),we=a(),H=m("small"),H.innerHTML=mt,Te=a(),N=m("p"),N.innerHTML=dt,$e=a(),g(L.$$.fragment),Pe=a(),S=m("p"),S.textContent=ct,Ce=a(),g(X.$$.fragment),ke=a(),E=m("ul"),E.innerHTML=pt,Ue=a(),g(Y.$$.fragment),je=a(),g(q.$$.fragment),xe=a(),Q=m("p"),Q.textContent=gt,Ze=a(),A=m("ul"),A.innerHTML=ft,ze=a(),g(D.$$.fragment),Je=a(),G=m("div"),g(O.$$.fragment),Se=a(),me=m("p"),me.innerHTML=ht,Xe=a(),de=m("p"),de.innerHTML=ut,Ee=a(),ce=m("p"),ce.innerHTML=_t,Ye=a(),g(Z.$$.fragment),Fe=a(),g(K.$$.fragment),We=a(),w=m("div"),g(ee.$$.fragment),qe=a(),pe=m("p"),pe.textContent=bt,Qe=a(),ge=m("p"),ge.innerHTML=yt,Ae=a(),z=m("div"),g(te.$$.fragment),De=a(),fe=m("p"),fe.innerHTML=vt,Oe=a(),J=m("div"),g(ne.$$.fragment),Ke=a(),he=m("p"),he.innerHTML=Mt,Ie=a(),g(ae.$$.fragment),Re=a(),$=m("div"),g(oe.$$.fragment),et=a(),ue=m("p"),ue.innerHTML=Gt,tt=a(),_e=m("p"),_e.innerHTML=wt,nt=a(),k=m("div"),g(se.$$.fragment),at=a(),be=m("p"),be.innerHTML=Tt,ot=a(),g(F.$$.fragment),st=a(),g(W.$$.fragment),Be=a(),g(re.$$.fragment),Ve=a(),ve=m("p"),this.h()},l(e){const t=xt("svelte-u9bgzb",document.head);i=d(t,"META",{name:!0,content:!0}),t.forEach(n),T=o(e),p=d(e,"P",{}),B(p).forEach(n),c=o(e),f(v.$$.fragment,e),r=o(e),f(M.$$.fragment,e),Me=o(e),V=d(e,"P",{"data-svelte-h":!0}),y(V)!=="svelte-1ymlx0s"&&(V.innerHTML=it),Ge=o(e),x=d(e,"IMG",{src:!0,alt:!0,width:!0}),we=o(e),H=d(e,"SMALL",{"data-svelte-h":!0}),y(H)!=="svelte-so6sdv"&&(H.innerHTML=mt),Te=o(e),N=d(e,"P",{"data-svelte-h":!0}),y(N)!=="svelte-1t8caf5"&&(N.innerHTML=dt),$e=o(e),f(L.$$.fragment,e),Pe=o(e),S=d(e,"P",{"data-svelte-h":!0}),y(S)!=="svelte-14a6min"&&(S.textContent=ct),Ce=o(e),f(X.$$.fragment,e),ke=o(e),E=d(e,"UL",{"data-svelte-h":!0}),y(E)!=="svelte-173k966"&&(E.innerHTML=pt),Ue=o(e),f(Y.$$.fragment,e),je=o(e),f(q.$$.fragment,e),xe=o(e),Q=d(e,"P",{"data-svelte-h":!0}),y(Q)!=="svelte-q42lou"&&(Q.textContent=gt),Ze=o(e),A=d(e,"UL",{"data-svelte-h":!0}),y(A)!=="svelte-1508ys2"&&(A.innerHTML=ft),ze=o(e),f(D.$$.fragment,e),Je=o(e),G=d(e,"DIV",{class:!0});var P=B(G);f(O.$$.fragment,P),Se=o(P),me=d(P,"P",{"data-svelte-h":!0}),y(me)!=="svelte-1622r4j"&&(me.innerHTML=ht),Xe=o(P),de=d(P,"P",{"data-svelte-h":!0}),y(de)!=="svelte-4qnv67"&&(de.innerHTML=ut),Ee=o(P),ce=d(P,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-o55m63"&&(ce.innerHTML=_t),Ye=o(P),f(Z.$$.fragment,P),P.forEach(n),Fe=o(e),f(K.$$.fragment,e),We=o(e),w=d(e,"DIV",{class:!0});var C=B(w);f(ee.$$.fragment,C),qe=o(C),pe=d(C,"P",{"data-svelte-h":!0}),y(pe)!=="svelte-8qftvs"&&(pe.textContent=bt),Qe=o(C),ge=d(C,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-1u63b6m"&&(ge.innerHTML=yt),Ae=o(C),z=d(C,"DIV",{class:!0});var ie=B(z);f(te.$$.fragment,ie),De=o(ie),fe=d(ie,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-4dbgxy"&&(fe.innerHTML=vt),ie.forEach(n),Oe=o(C),J=d(C,"DIV",{class:!0});var Ne=B(J);f(ne.$$.fragment,Ne),Ke=o(Ne),he=d(Ne,"P",{"data-svelte-h":!0}),y(he)!=="svelte-1ha4zc4"&&(he.innerHTML=Mt),Ne.forEach(n),C.forEach(n),Ie=o(e),f(ae.$$.fragment,e),Re=o(e),$=d(e,"DIV",{class:!0});var I=B($);f(oe.$$.fragment,I),et=o(I),ue=d(I,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-1u2i5mm"&&(ue.innerHTML=Gt),tt=o(I),_e=d(I,"P",{"data-svelte-h":!0}),y(_e)!=="svelte-hswkmf"&&(_e.innerHTML=wt),nt=o(I),k=d(I,"DIV",{class:!0});var R=B(k);f(se.$$.fragment,R),at=o(R),be=d(R,"P",{"data-svelte-h":!0}),y(be)!=="svelte-1q4duri"&&(be.innerHTML=Tt),ot=o(R),f(F.$$.fragment,R),st=o(R),f(W.$$.fragment,R),R.forEach(n),I.forEach(n),Be=o(e),f(re.$$.fragment,e),Ve=o(e),ve=d(e,"P",{}),B(ve).forEach(n),this.h()},h(){U(i,"name","hf:doc:metadata"),U(i,"content",Rt),Ct(x.src,lt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/paligemma/paligemma_arch.png")||U(x,"src",lt),U(x,"alt","drawing"),U(x,"width","600"),U(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,i),s(e,T,t),s(e,p,t),s(e,c,t),h(v,e,t),s(e,r,t),h(M,e,t),s(e,Me,t),s(e,V,t),s(e,Ge,t),s(e,x,t),s(e,we,t),s(e,H,t),s(e,Te,t),s(e,N,t),s(e,$e,t),h(L,e,t),s(e,Pe,t),s(e,S,t),s(e,Ce,t),h(X,e,t),s(e,ke,t),s(e,E,t),s(e,Ue,t),h(Y,e,t),s(e,je,t),h(q,e,t),s(e,xe,t),s(e,Q,t),s(e,Ze,t),s(e,A,t),s(e,ze,t),h(D,e,t),s(e,Je,t),s(e,G,t),h(O,G,null),l(G,Se),l(G,me),l(G,Xe),l(G,de),l(G,Ee),l(G,ce),l(G,Ye),h(Z,G,null),s(e,Fe,t),h(K,e,t),s(e,We,t),s(e,w,t),h(ee,w,null),l(w,qe),l(w,pe),l(w,Qe),l(w,ge),l(w,Ae),l(w,z),h(te,z,null),l(z,De),l(z,fe),l(w,Oe),l(w,J),h(ne,J,null),l(J,Ke),l(J,he),s(e,Ie,t),h(ae,e,t),s(e,Re,t),s(e,$,t),h(oe,$,null),l($,et),l($,ue),l($,tt),l($,_e),l($,nt),l($,k),h(se,k,null),l(k,at),l(k,be),l(k,ot),h(F,k,null),l(k,st),h(W,k,null),s(e,Be,t),h(re,e,t),s(e,Ve,t),s(e,ve,t),He=!0},p(e,[t]){const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),Z.$set(P);const C={};t&2&&(C.$$scope={dirty:t,ctx:e}),F.$set(C);const ie={};t&2&&(ie.$$scope={dirty:t,ctx:e}),W.$set(ie)},i(e){He||(u(v.$$.fragment,e),u(M.$$.fragment,e),u(L.$$.fragment,e),u(X.$$.fragment,e),u(Y.$$.fragment,e),u(q.$$.fragment,e),u(D.$$.fragment,e),u(O.$$.fragment,e),u(Z.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(ne.$$.fragment,e),u(ae.$$.fragment,e),u(oe.$$.fragment,e),u(se.$$.fragment,e),u(F.$$.fragment,e),u(W.$$.fragment,e),u(re.$$.fragment,e),He=!0)},o(e){_(v.$$.fragment,e),_(M.$$.fragment,e),_(L.$$.fragment,e),_(X.$$.fragment,e),_(Y.$$.fragment,e),_(q.$$.fragment,e),_(D.$$.fragment,e),_(O.$$.fragment,e),_(Z.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(oe.$$.fragment,e),_(se.$$.fragment,e),_(F.$$.fragment,e),_(W.$$.fragment,e),_(re.$$.fragment,e),He=!1},d(e){e&&(n(T),n(p),n(c),n(r),n(Me),n(V),n(Ge),n(x),n(we),n(H),n(Te),n(N),n($e),n(Pe),n(S),n(Ce),n(ke),n(E),n(Ue),n(je),n(xe),n(Q),n(Ze),n(A),n(ze),n(Je),n(G),n(Fe),n(We),n(w),n(Ie),n(Re),n($),n(Be),n(Ve),n(ve)),n(i),b(v,e),b(M,e),b(L,e),b(X,e),b(Y,e),b(q,e),b(D,e),b(O),b(Z),b(K,e),b(ee),b(te),b(ne),b(ae,e),b(oe),b(se),b(F),b(W),b(re,e)}}}const Rt='{"title":"PaliGemma","local":"paligemma","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"PaliGemmaConfig","local":"transformers.PaliGemmaConfig","sections":[],"depth":2},{"title":"PaliGemmaProcessor","local":"transformers.PaliGemmaProcessor","sections":[],"depth":2},{"title":"PaliGemmaForConditionalGeneration","local":"transformers.PaliGemmaForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function Bt(j){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Ut{constructor(i){super(),jt(this,i,Bt,It,Pt,{})}}export{Yt as component};
