import{s as mt,o as ht,n as Xe}from"../chunks/scheduler.01eeda35.js";import{S as ut,i as gt,g as r,s as a,r as g,A as ft,h as c,f as n,c as s,j as ce,u as f,x as m,k as le,y as h,a as o,v as _,d as v,t as b,w as y}from"../chunks/index.6dd51b66.js";import{T as _t}from"../chunks/Tip.de9bae2b.js";import{D as Re}from"../chunks/Docstring.76e6b3cf.js";import{C as pe}from"../chunks/CodeBlock.864da1b0.js";import{E as pt}from"../chunks/ExampleCodeBlock.6a36fb6b.js";import{H as de,E as vt}from"../chunks/EditOnGithub.7faefd25.js";function bt($){let l,w="Example:",p,d,u;return d=new pe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpcExsYXZhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwVmlwTGxhdmFDb25maWclMkMlMjBDTElQVmlzaW9uQ29uZmlnJTJDJTIwTGxhbWFDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUC12aXNpb24lMjBjb25maWclMEF2aXNpb25fY29uZmlnJTIwJTNEJTIwQ0xJUFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMExsYW1hJTIwY29uZmlnJTBBdGV4dF9jb25maWclMjAlM0QlMjBMbGFtYUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpcExsYXZhJTIwdmlwbGxhdmEtN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwVmlwTGxhdmFDb25maWcodmlzaW9uX2NvbmZpZyUyQyUyMHRleHRfY29uZmlnKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjB2aXBsbGF2YS03YiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwVmlwTGxhdmFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24oY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VipLlavaForConditionalGeneration, VipLlavaConfig, CLIPVisionConfig, LlamaConfig

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a VipLlava vipllava-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VipLlavaConfig(vision_config, text_config)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the vipllava-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VipLlavaForConditionalGeneration(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=r("p"),l.textContent=w,p=a(),g(d.$$.fragment)},l(i){l=c(i,"P",{"data-svelte-h":!0}),m(l)!=="svelte-11lpom8"&&(l.textContent=w),p=s(i),f(d.$$.fragment,i)},m(i,M){o(i,l,M),o(i,p,M),_(d,i,M),u=!0},p:Xe,i(i){u||(v(d.$$.fragment,i),u=!0)},o(i){b(d.$$.fragment,i),u=!1},d(i){i&&(n(l),n(p)),y(d,i)}}}function yt($){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=r("p"),l.innerHTML=w},l(p){l=c(p,"P",{"data-svelte-h":!0}),m(l)!=="svelte-fincs2"&&(l.innerHTML=w)},m(p,d){o(p,l,d)},p:Xe,d(p){p&&n(l)}}}function Mt($){let l,w="Example:",p,d,u;return d=new pe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvUHJvY2Vzc29yJTJDJTIwVmlwTGxhdmFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMFZpcExsYXZhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJsbGF2YS1oZiUyRnZpcC1sbGF2YS03Yi1oZiUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmxsYXZhLWhmJTJGdmlwLWxsYXZhLTdiLWhmJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBjaGF0JTIwYmV0d2VlbiUyMGElMjBjdXJpb3VzJTIwaHVtYW4lMjBhbmQlMjBhbiUyMGFydGlmaWNpYWwlMjBpbnRlbGxpZ2VuY2UlMjBhc3Npc3RhbnQuJTIwVGhlJTIwYXNzaXN0YW50JTIwZ2l2ZXMlMjBoZWxwZnVsJTJDJTIwZGV0YWlsZWQlMkMlMjBhbmQlMjBwb2xpdGUlMjBhbnN3ZXJzJTIwdG8lMjB0aGUlMjBodW1hbidzJTIwcXVlc3Rpb25zLiUyMyUyMyUyM0h1bWFuJTNBJTIwJTNDaW1hZ2UlM0UlNUNuJTdCJTdEJTIzJTIzJTIzQXNzaXN0YW50JTNBJTIyJTBBcXVlc3Rpb24lMjAlM0QlMjAlMjJDYW4lMjB5b3UlMjBwbGVhc2UlMjBkZXNjcmliZSUyMHRoaXMlMjBpbWFnZSUzRiUyMiUwQXByb21wdCUyMCUzRCUyMHByb21wdC5mb3JtYXQocXVlc3Rpb24pJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGY29tcGVsLW5lZy5wbmclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRHRleHQlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKDAlMkMlMjB0b3JjaC5mbG9hdDE2KSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBtYXhfbmV3X3Rva2VucyUzRDIwKSUwQXByb2Nlc3Nvci5kZWNvZGUoZ2VuZXJhdGVfaWRzJTVCMCU1RCU1QmxlbihpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQlNUIwJTVEKSUzQSU1RCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKQ==",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">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, VipLlavaForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = VipLlavaForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;llava-hf/vip-llava-7b-hf&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;llava-hf/vip-llava-7b-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human&#x27;s questions.###Human: &lt;image&gt;\\n{}###Assistant:&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;Can you please describe this image?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = prompt.<span class="hljs-built_in">format</span>(question)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/compel-neg.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=text, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-number">0</span>, torch.float16)

<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_new_tokens=<span class="hljs-number">20</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.decode(generate_ids[<span class="hljs-number">0</span>][<span class="hljs-built_in">len</span>(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>][<span class="hljs-number">0</span>]):], skip_special_tokens=<span class="hljs-literal">True</span>)
The image features a brown <span class="hljs-keyword">and</span> white cat sitting on a green surface, <span class="hljs-keyword">with</span> a red ball <span class="hljs-keyword">in</span> its`,wrap:!1}}),{c(){l=r("p"),l.textContent=w,p=a(),g(d.$$.fragment)},l(i){l=c(i,"P",{"data-svelte-h":!0}),m(l)!=="svelte-11lpom8"&&(l.textContent=w),p=s(i),f(d.$$.fragment,i)},m(i,M){o(i,l,M),o(i,p,M),_(d,i,M),u=!0},p:Xe,i(i){u||(v(d.$$.fragment,i),u=!0)},o(i){b(d.$$.fragment,i),u=!1},d(i){i&&(n(l),n(p)),y(d,i)}}}function Tt($){let l,w,p,d,u,i,M,Se='<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"/>',me,G,he,z,Ye='The VipLlava model was proposed in <a href="https://arxiv.org/abs/2312.00784" rel="nofollow">Making Large Multimodal Models Understand Arbitrary Visual Prompts</a> by Mu Cai, Haotian Liu, Siva Karthik Mustikovela, Gregory P. Meyer, Yuning Chai, Dennis Park, Yong Jae Lee.',ue,F,Qe="VipLlava enhances the training protocol of Llava by marking images and interact with the model using natural cues like a “red bounding box” or “pointed arrow” during training.",ge,I,Ae="The abstract from the paper is the following:",fe,Z,De="<em>While existing large vision-language multimodal models focus on whole image understanding, there is a prominent gap in achieving region-specific comprehension. Current approaches that use textual coordinates or spatial encodings often fail to provide a user-friendly interface for visual prompting. To address this challenge, we introduce a novel multimodal model capable of decoding arbitrary visual prompts. This allows users to intuitively mark images and interact with the model using natural cues like a “red bounding box” or “pointed arrow”. Our simple design directly overlays visual markers onto the RGB image, eliminating the need for complex region encodings, yet achieves state-of-the-art performance on region-understanding tasks like Visual7W, PointQA, and Visual Commonsense Reasoning benchmark. Furthermore, we present ViP-Bench, a comprehensive benchmark to assess the capability of models in understanding visual prompts across multiple dimensions, enabling future research in this domain. Code, data, and model are publicly available.</em>",_e,B,Oe='The original code can be found <a href="https://github.com/mu-cai/ViP-LLaVA" rel="nofollow">here</a>.',ve,W,Ke='This model was contributed by <a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a>',be,q,ye,N,et="<li><p>The architecture is similar than llava architecture except that the multi-modal projector takes a set of concatenated vision hidden states and has an additional layernorm layer on that module.</p></li> <li><p>We advise users to use <code>padding_side=&quot;left&quot;</code> when computing batched generation as it leads to more accurate results. Simply make sure to call <code>processor.tokenizer.padding_side = &quot;left&quot;</code> before generating.</p></li> <li><p>Note the model has not been explicitly trained to process multiple images in the same prompt, although this is technically possible, you may experience inaccurate results.</p></li>",Me,H,tt="<p>[!NOTE]\nLLaVA models after release v4.46 will raise warnings about adding <code>processor.patch_size = {{patch_size}}</code>, <code>processor.num_additional_image_tokens = {{num_additional_image_tokens}}</code> and processor.vision_feature_select_strategy = {{vision_feature_select_strategy}}<code>. It is strongly recommended to add the attributes to the processor if you own the model checkpoint, or open a PR if it is not owned by you. Adding these attributes means that LLaVA will try to infer the number of image tokens required per image and expand the text with as many </code>&lt;image&gt;<code>placeholders as there will be tokens. Usually it is around 500 tokens per image, so make sure that the text is not truncated as otherwise there will be failure when merging the embeddings. The attributes can be obtained from model config, as</code>model.config.vision_config.patch_size<code>or</code>model.config.vision_feature_select_strategy<code>. The </code>num_additional_image_tokens<code>should be</code>1<code>if the vision backbone adds a CLS token or</code>0` if nothing extra is added to the vision patches.</p>",Te,E,nt="<li>For better results, we recommend users to use the processor’s <code>apply_chat_template()</code> method to format your prompt correctly. For that you need to construct a conversation history, passing in a plain string will not format your prompt. Each message in the conversation history for chat templates is a dictionary with keys “role” and “content”. The “content” should be a list of dictionaries, for “text” and “image” modalities, as follows:</li>",we,P,je,R,ot="<li>If you want to construct a chat prompt yourself, below is a list of prompt formats accepted by VipLLaVa checkpoints:</li>",ke,X,Ue,S,at="For multiple turns conversation:",Ce,Y,Je,Q,$e,T,A,Fe,te,st=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/vipllava#transformers.VipLlavaForConditionalGeneration">VipLlavaForConditionalGeneration</a>. It is used to instantiate an
VipLlava model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the VipLlava-9B.`,Ie,ne,it='e.g. <a href="https://huggingface.co/ybelkada/vip-llava-7b-hf" rel="nofollow">ybelkada/vip-llava-7b-hf</a>',Ze,oe,lt=`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.`,Be,x,xe,D,Le,j,O,We,ae,rt=`The VIPLLAVA 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.)`,qe,se,ct=`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.`,Ne,U,K,He,ie,dt='The <a href="/docs/transformers/main/en/model_doc/vipllava#transformers.VipLlavaForConditionalGeneration">VipLlavaForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Ee,L,Pe,V,Ve,ee,Ge,re,ze;return u=new de({props:{title:"VipLlava",local:"vipllava",headingTag:"h1"}}),G=new de({props:{title:"Overview",local:"overview",headingTag:"h2"}}),q=new de({props:{title:"Usage tips:",local:"usage-tips",headingTag:"h2"}}),P=new pe({props:{code:"JTBBJTBBJTBBJTBBJTBBJTIyJTIzJTIzJTIzSHVtYW4lM0ElMjAlM0NpbWFnZSUzRSU1Q25XaGF0JUUyJTgwJTk5cyUyMHNob3duJTIwaW4lMjB0aGlzJTIwaW1hZ2UlM0YlMjMlMjMlMjNBc3Npc3RhbnQlM0ElMjBUaGlzJTIwaW1hZ2UlMjBzaG93cyUyMGElMjByZWQlMjBzdG9wJTIwc2lnbi4lMjMlMjMlMjNIdW1hbiUzQSUyMERlc2NyaWJlJTIwdGhlJTIwaW1hZ2UlMjBpbiUyMG1vcmUlMjBkZXRhaWxzLiUyMyUyMyUyM0Fzc2lzdGFudCUzQSUyMg==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;llava-hf/vip-llava-7b-hf&quot;</span>)

conversation = [
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: [
            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>},
            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;What’s shown in this image?&quot;</span>},
        ],
    },
    {
        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: [{<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;This image shows a red stop sign.&quot;</span>},]
    },
    {

        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
        <span class="hljs-string">&quot;content&quot;</span>: [
            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Describe the image in more details.&quot;</span>},
        ],
    },
]

text_prompt = processor.apply_chat_template(conversation, add_generation_prompt=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Note that the template simply formats your prompt, you still have to tokenize it and obtain pixel values for your images</span>
<span class="hljs-built_in">print</span>(text_prompt)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-string">&quot;###Human: &lt;image&gt;\\nWhat’s shown in this image?###Assistant: This image shows a red stop sign.###Human: Describe the image in more details.###Assistant:&quot;</span>`,wrap:!1}}),X=new pe({props:{code:"QSUyMGNoYXQlMjBiZXR3ZWVuJTIwYSUyMGN1cmlvdXMlMjBodW1hbiUyMGFuZCUyMGFuJTIwYXJ0aWZpY2lhbCUyMGludGVsbGlnZW5jZSUyMGFzc2lzdGFudC4lMjBUaGUlMjBhc3Npc3RhbnQlMjBnaXZlcyUyMGhlbHBmdWwlMkMlMjBkZXRhaWxlZCUyQyUyMGFuZCUyMHBvbGl0ZSUyMGFuc3dlcnMlMjB0byUyMHRoZSUyMGh1bWFuJ3MlMjBxdWVzdGlvbnMuJTIzJTIzJTIzSHVtYW4lM0ElMjAlM0NpbWFnZSUzRSU1Q24lM0Nwcm9tcHQlM0UlMjMlMjMlMjNBc3Npc3RhbnQlM0E=",highlighted:'A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human<span class="hljs-string">&#x27;s questions.###Human: &lt;image&gt;\\n&lt;prompt&gt;###Assistant:</span>',wrap:!1}}),Y=new pe({props:{code:"QSUyMGNoYXQlMjBiZXR3ZWVuJTIwYSUyMGN1cmlvdXMlMjBodW1hbiUyMGFuZCUyMGFuJTIwYXJ0aWZpY2lhbCUyMGludGVsbGlnZW5jZSUyMGFzc2lzdGFudC4lMjBUaGUlMjBhc3Npc3RhbnQlMjBnaXZlcyUyMGhlbHBmdWwlMkMlMjBkZXRhaWxlZCUyQyUyMGFuZCUyMHBvbGl0ZSUyMGFuc3dlcnMlMjB0byUyMHRoZSUyMGh1bWFuJ3MlMjBxdWVzdGlvbnMuJTIzJTIzJTIzSHVtYW4lM0ElMjAlM0NpbWFnZSUzRSU1Q24lM0Nwcm9tcHQxJTNFJTIzJTIzJTIzQXNzaXN0YW50JTNBJTIwJTNDYW5zd2VyMSUzRSUyMyUyMyUyM0h1bWFuJTNBJTIwJTNDcHJvbXB0MiUzRSUyMyUyMyUyM0Fzc2lzdGFudCUzQQ==",highlighted:'A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human<span class="hljs-string">&#x27;s questions.###Human: &lt;image&gt;\\n&lt;prompt1&gt;###Assistant: &lt;answer1&gt;###Human: &lt;prompt2&gt;###Assistant:</span>',wrap:!1}}),Q=new de({props:{title:"VipLlavaConfig",local:"transformers.VipLlavaConfig",headingTag:"h2"}}),A=new Re({props:{name:"class transformers.VipLlavaConfig",anchor:"transformers.VipLlavaConfig",parameters:[{name:"vision_config",val:" = None"},{name:"text_config",val:" = None"},{name:"image_token_index",val:" = 32000"},{name:"projector_hidden_act",val:" = 'gelu'"},{name:"projector_layernorm_eps",val:" = 1e-05"},{name:"vision_feature_layers",val:" = [-2, -5, -8, -11, 6]"},{name:"image_seq_length",val:" = 576"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VipLlavaConfig.vision_config",description:`<strong>vision_config</strong> (<code>VipLlavaVisionConfig</code>,  <em>optional</em>) &#x2014;
Custom vision config or dict`,name:"vision_config"},{anchor:"transformers.VipLlavaConfig.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.VipLlavaConfig.image_token_index",description:`<strong>image_token_index</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
The image token index to encode the image prompt.`,name:"image_token_index"},{anchor:"transformers.VipLlavaConfig.projector_hidden_act",description:`<strong>projector_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The activation function used by the multimodal projector.`,name:"projector_hidden_act"},{anchor:"transformers.VipLlavaConfig.projector_layernorm_eps",description:`<strong>projector_layernorm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The layer norm epsilon of the projector layernorm`,name:"projector_layernorm_eps"},{anchor:"transformers.VipLlavaConfig.vision_feature_layers",description:`<strong>vision_feature_layers</strong> (<code>Union[int, List[int]]</code>, <em>optional</em>, defaults to <code>[-2, -5, -8, -11, 6]</code>) &#x2014;
The vision feature layer, or list of layers to select the vision features from.`,name:"vision_feature_layers"},{anchor:"transformers.VipLlavaConfig.image_seq_length",description:`<strong>image_seq_length</strong> (<code>int</code>, <em>optional</em>, defaults to 576) &#x2014;
Sequence length of one image embedding.`,name:"image_seq_length"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vipllava/configuration_vipllava.py#L24"}}),x=new pt({props:{anchor:"transformers.VipLlavaConfig.example",$$slots:{default:[bt]},$$scope:{ctx:$}}}),D=new de({props:{title:"VipLlavaForConditionalGeneration",local:"transformers.VipLlavaForConditionalGeneration",headingTag:"h2"}}),O=new Re({props:{name:"class transformers.VipLlavaForConditionalGeneration",anchor:"transformers.VipLlavaForConditionalGeneration",parameters:[{name:"config",val:": VipLlavaConfig"}],parametersDescription:[{anchor:"transformers.VipLlavaForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/vipllava#transformers.VipLlavaConfig">VipLlavaConfig</a> or <code>VipLlavaVisionConfig</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/vipllava/modeling_vipllava.py#L237"}}),K=new Re({props:{name:"forward",anchor:"transformers.VipLlavaForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"pixel_values",val:": FloatTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"vision_feature_layers",val:": typing.Union[int, typing.List[int], NoneType] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"logits_to_keep",val:": typing.Union[int, torch.Tensor] = 0"},{name:"**lm_kwargs",val:""}],parametersDescription:[{anchor:"transformers.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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 [CLIPImageProcessor.__call__()](/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__) for details ([]</code>LlavaProcessor`] uses\n<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.VipLlavaForConditionalGeneration.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.`,name:"return_dict"},{anchor:"transformers.VipLlavaForConditionalGeneration.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.VipLlavaForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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:"labels"},{anchor:"transformers.VipLlavaForConditionalGeneration.forward.logits_to_keep",description:`<strong>logits_to_keep</strong> (<code>int</code> or <code>torch.Tensor</code>, <em>optional</em>) &#x2014;
If an <code>int</code>, compute logits for the last <code>logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
If a <code>torch.Tensor</code>, must be 1D corresponding to the indices to keep in the sequence length dimension.
This is useful when using packed tensor format (single dimension for batch and sequence length).`,name:"logits_to_keep"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vipllava/modeling_vipllava.py#L303",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.vipllava.modeling_vipllava.VipLlavaCausalLMOutputWithPast</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/vipllava#transformers.VipLlavaConfig"
>VipLlavaConfig</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>torch.FloatTensor</code>, <em>optional</em>) — A <code>torch.FloatTensor</code> of size (batch_size, num_images, sequence_length, hidden_size)\`.
image_hidden_states of the model produced by the vision encoder and after projecting the last hidden state.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vipllava.modeling_vipllava.VipLlavaCausalLMOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),L=new _t({props:{$$slots:{default:[yt]},$$scope:{ctx:$}}}),V=new pt({props:{anchor:"transformers.VipLlavaForConditionalGeneration.forward.example",$$slots:{default:[Mt]},$$scope:{ctx:$}}}),ee=new vt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vipllava.md"}}),{c(){l=r("meta"),w=a(),p=r("p"),d=a(),g(u.$$.fragment),i=a(),M=r("div"),M.innerHTML=Se,me=a(),g(G.$$.fragment),he=a(),z=r("p"),z.innerHTML=Ye,ue=a(),F=r("p"),F.textContent=Qe,ge=a(),I=r("p"),I.textContent=Ae,fe=a(),Z=r("p"),Z.innerHTML=De,_e=a(),B=r("p"),B.innerHTML=Oe,ve=a(),W=r("p"),W.innerHTML=Ke,be=a(),g(q.$$.fragment),ye=a(),N=r("ul"),N.innerHTML=et,Me=a(),H=r("blockquote"),H.innerHTML=tt,Te=a(),E=r("ul"),E.innerHTML=nt,we=a(),g(P.$$.fragment),je=a(),R=r("ul"),R.innerHTML=ot,ke=a(),g(X.$$.fragment),Ue=a(),S=r("p"),S.textContent=at,Ce=a(),g(Y.$$.fragment),Je=a(),g(Q.$$.fragment),$e=a(),T=r("div"),g(A.$$.fragment),Fe=a(),te=r("p"),te.innerHTML=st,Ie=a(),ne=r("p"),ne.innerHTML=it,Ze=a(),oe=r("p"),oe.innerHTML=lt,Be=a(),g(x.$$.fragment),xe=a(),g(D.$$.fragment),Le=a(),j=r("div"),g(O.$$.fragment),We=a(),ae=r("p"),ae.innerHTML=rt,qe=a(),se=r("p"),se.innerHTML=ct,Ne=a(),U=r("div"),g(K.$$.fragment),He=a(),ie=r("p"),ie.innerHTML=dt,Ee=a(),g(L.$$.fragment),Pe=a(),g(V.$$.fragment),Ve=a(),g(ee.$$.fragment),Ge=a(),re=r("p"),this.h()},l(e){const t=ft("svelte-u9bgzb",document.head);l=c(t,"META",{name:!0,content:!0}),t.forEach(n),w=s(e),p=c(e,"P",{}),ce(p).forEach(n),d=s(e),f(u.$$.fragment,e),i=s(e),M=c(e,"DIV",{class:!0,"data-svelte-h":!0}),m(M)!=="svelte-b95w5j"&&(M.innerHTML=Se),me=s(e),f(G.$$.fragment,e),he=s(e),z=c(e,"P",{"data-svelte-h":!0}),m(z)!=="svelte-7p4sji"&&(z.innerHTML=Ye),ue=s(e),F=c(e,"P",{"data-svelte-h":!0}),m(F)!=="svelte-9bd7s8"&&(F.textContent=Qe),ge=s(e),I=c(e,"P",{"data-svelte-h":!0}),m(I)!=="svelte-vfdo9a"&&(I.textContent=Ae),fe=s(e),Z=c(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-ym7i2j"&&(Z.innerHTML=De),_e=s(e),B=c(e,"P",{"data-svelte-h":!0}),m(B)!=="svelte-14nivh0"&&(B.innerHTML=Oe),ve=s(e),W=c(e,"P",{"data-svelte-h":!0}),m(W)!=="svelte-1q33811"&&(W.innerHTML=Ke),be=s(e),f(q.$$.fragment,e),ye=s(e),N=c(e,"UL",{"data-svelte-h":!0}),m(N)!=="svelte-1d63r4x"&&(N.innerHTML=et),Me=s(e),H=c(e,"BLOCKQUOTE",{"data-svelte-h":!0}),m(H)!=="svelte-nygwxc"&&(H.innerHTML=tt),Te=s(e),E=c(e,"UL",{"data-svelte-h":!0}),m(E)!=="svelte-s1gcn8"&&(E.innerHTML=nt),we=s(e),f(P.$$.fragment,e),je=s(e),R=c(e,"UL",{"data-svelte-h":!0}),m(R)!=="svelte-c2nvp2"&&(R.innerHTML=ot),ke=s(e),f(X.$$.fragment,e),Ue=s(e),S=c(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-mnlzle"&&(S.textContent=at),Ce=s(e),f(Y.$$.fragment,e),Je=s(e),f(Q.$$.fragment,e),$e=s(e),T=c(e,"DIV",{class:!0});var k=ce(T);f(A.$$.fragment,k),Fe=s(k),te=c(k,"P",{"data-svelte-h":!0}),m(te)!=="svelte-1pwp6tq"&&(te.innerHTML=st),Ie=s(k),ne=c(k,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-1cp2sn1"&&(ne.innerHTML=it),Ze=s(k),oe=c(k,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-o55m63"&&(oe.innerHTML=lt),Be=s(k),f(x.$$.fragment,k),k.forEach(n),xe=s(e),f(D.$$.fragment,e),Le=s(e),j=c(e,"DIV",{class:!0});var C=ce(j);f(O.$$.fragment,C),We=s(C),ae=c(C,"P",{"data-svelte-h":!0}),m(ae)!=="svelte-krvgje"&&(ae.innerHTML=rt),qe=s(C),se=c(C,"P",{"data-svelte-h":!0}),m(se)!=="svelte-hswkmf"&&(se.innerHTML=ct),Ne=s(C),U=c(C,"DIV",{class:!0});var J=ce(U);f(K.$$.fragment,J),He=s(J),ie=c(J,"P",{"data-svelte-h":!0}),m(ie)!=="svelte-1e08quq"&&(ie.innerHTML=dt),Ee=s(J),f(L.$$.fragment,J),Pe=s(J),f(V.$$.fragment,J),J.forEach(n),C.forEach(n),Ve=s(e),f(ee.$$.fragment,e),Ge=s(e),re=c(e,"P",{}),ce(re).forEach(n),this.h()},h(){le(l,"name","hf:doc:metadata"),le(l,"content",wt),le(M,"class","flex flex-wrap space-x-1"),le(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),le(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),le(j,"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){h(document.head,l),o(e,w,t),o(e,p,t),o(e,d,t),_(u,e,t),o(e,i,t),o(e,M,t),o(e,me,t),_(G,e,t),o(e,he,t),o(e,z,t),o(e,ue,t),o(e,F,t),o(e,ge,t),o(e,I,t),o(e,fe,t),o(e,Z,t),o(e,_e,t),o(e,B,t),o(e,ve,t),o(e,W,t),o(e,be,t),_(q,e,t),o(e,ye,t),o(e,N,t),o(e,Me,t),o(e,H,t),o(e,Te,t),o(e,E,t),o(e,we,t),_(P,e,t),o(e,je,t),o(e,R,t),o(e,ke,t),_(X,e,t),o(e,Ue,t),o(e,S,t),o(e,Ce,t),_(Y,e,t),o(e,Je,t),_(Q,e,t),o(e,$e,t),o(e,T,t),_(A,T,null),h(T,Fe),h(T,te),h(T,Ie),h(T,ne),h(T,Ze),h(T,oe),h(T,Be),_(x,T,null),o(e,xe,t),_(D,e,t),o(e,Le,t),o(e,j,t),_(O,j,null),h(j,We),h(j,ae),h(j,qe),h(j,se),h(j,Ne),h(j,U),_(K,U,null),h(U,He),h(U,ie),h(U,Ee),_(L,U,null),h(U,Pe),_(V,U,null),o(e,Ve,t),_(ee,e,t),o(e,Ge,t),o(e,re,t),ze=!0},p(e,[t]){const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),x.$set(k);const C={};t&2&&(C.$$scope={dirty:t,ctx:e}),L.$set(C);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),V.$set(J)},i(e){ze||(v(u.$$.fragment,e),v(G.$$.fragment,e),v(q.$$.fragment,e),v(P.$$.fragment,e),v(X.$$.fragment,e),v(Y.$$.fragment,e),v(Q.$$.fragment,e),v(A.$$.fragment,e),v(x.$$.fragment,e),v(D.$$.fragment,e),v(O.$$.fragment,e),v(K.$$.fragment,e),v(L.$$.fragment,e),v(V.$$.fragment,e),v(ee.$$.fragment,e),ze=!0)},o(e){b(u.$$.fragment,e),b(G.$$.fragment,e),b(q.$$.fragment,e),b(P.$$.fragment,e),b(X.$$.fragment,e),b(Y.$$.fragment,e),b(Q.$$.fragment,e),b(A.$$.fragment,e),b(x.$$.fragment,e),b(D.$$.fragment,e),b(O.$$.fragment,e),b(K.$$.fragment,e),b(L.$$.fragment,e),b(V.$$.fragment,e),b(ee.$$.fragment,e),ze=!1},d(e){e&&(n(w),n(p),n(d),n(i),n(M),n(me),n(he),n(z),n(ue),n(F),n(ge),n(I),n(fe),n(Z),n(_e),n(B),n(ve),n(W),n(be),n(ye),n(N),n(Me),n(H),n(Te),n(E),n(we),n(je),n(R),n(ke),n(Ue),n(S),n(Ce),n(Je),n($e),n(T),n(xe),n(Le),n(j),n(Ve),n(Ge),n(re)),n(l),y(u,e),y(G,e),y(q,e),y(P,e),y(X,e),y(Y,e),y(Q,e),y(A),y(x),y(D,e),y(O),y(K),y(L),y(V),y(ee,e)}}}const wt='{"title":"VipLlava","local":"vipllava","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips:","local":"usage-tips","sections":[],"depth":2},{"title":"VipLlavaConfig","local":"transformers.VipLlavaConfig","sections":[],"depth":2},{"title":"VipLlavaForConditionalGeneration","local":"transformers.VipLlavaForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function jt($){return ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vt extends ut{constructor(l){super(),gt(this,l,jt,Tt,mt,{})}}export{Vt as component};
