import{s as tn,f as nn,o as an,n as kt}from"../chunks/scheduler.25b97de1.js";import{S as on,i as sn,g as r,s as o,r as p,A as rn,h as l,f as n,c as s,j as G,u as f,x as m,k as J,y as c,a,v as g,d as h,t as u,w as _}from"../chunks/index.d9030fc9.js";import{T as ln}from"../chunks/Tip.baa67368.js";import{D as ze}from"../chunks/Docstring.e257edda.js";import{C as Ue}from"../chunks/CodeBlock.e6cd0d95.js";import{E as en}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as dn}from"../chunks/PipelineTag.5f100392.js";import{H as V,E as cn}from"../chunks/EditOnGithub.91d95064.js";function mn(z){let d,M="Example:",T,v,b;return v=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMExsYXZhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTJDJTIwTGxhdmFDb25maWclMkMlMjBDTElQVmlzaW9uQ29uZmlnJTJDJTIwTGxhbWFDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUC12aXNpb24lMjBjb25maWclMEF2aXNpb25fY29uZmlnJTIwJTNEJTIwQ0xJUFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMExsYW1hJTIwY29uZmlnJTBBdGV4dF9jb25maWclMjAlM0QlMjBMbGFtYUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMExsYXZhJTIwbGxhdmEtMS41LTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMExsYXZhQ29uZmlnKHZpc2lvbl9jb25maWclMkMlMjB0ZXh0X2NvbmZpZyklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwbGxhdmEtMS41LTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBMbGF2YUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbihjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlavaForConditionalGeneration, LlavaConfig, 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 Llava llava-1.5-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = LlavaConfig(vision_config, text_config)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the llava-1.5-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LlavaForConditionalGeneration(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(){d=r("p"),d.textContent=M,T=o(),p(v.$$.fragment)},l(i){d=l(i,"P",{"data-svelte-h":!0}),m(d)!=="svelte-11lpom8"&&(d.textContent=M),T=s(i),f(v.$$.fragment,i)},m(i,y){a(i,d,y),a(i,T,y),g(v,i,y),b=!0},p:kt,i(i){b||(h(v.$$.fragment,i),b=!0)},o(i){u(v.$$.fragment,i),b=!1},d(i){i&&(n(d),n(T)),_(v,i)}}}function pn(z){let d,M=`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(){d=r("p"),d.innerHTML=M},l(T){d=l(T,"P",{"data-svelte-h":!0}),m(d)!=="svelte-fincs2"&&(d.innerHTML=M)},m(T,v){a(T,d,v)},p:kt,d(T){T&&n(d)}}}function fn(z){let d,M="Example:",T,v,b;return v=new Ue({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMExsYXZhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBMbGF2YUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybGxhdmEtaGYlMkZsbGF2YS0xLjUtN2ItaGYlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGxhdmEtaGYlMkZsbGF2YS0xLjUtN2ItaGYlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyVVNFUiUzQSUyMCUzQ2ltYWdlJTNFJTVDbldoYXQncyUyMHRoZSUyMGNvbnRlbnQlMjBvZiUyMHRoZSUyMGltYWdlJTNGJTIwQVNTSVNUQU5UJTNBJTIyJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZ3d3cuaWxhbmtlbG1hbi5vcmclMkZzdG9wc2lnbnMlMkZhdXN0cmFsaWEuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0Rwcm9tcHQlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwR2VuZXJhdGUlMEFnZW5lcmF0ZV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMTUpJTBBcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVE",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, LlavaForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = LlavaForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;llava-hf/llava-1.5-7b-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;llava-hf/llava-1.5-7b-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;USER: &lt;image&gt;\\nWhat&#x27;s the content of the image? ASSISTANT:&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://www.ilankelman.org/stopsigns/australia.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(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_new_tokens=<span class="hljs-number">15</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;USER:  \\nWhat&#x27;s the content of the image? ASSISTANT: The image features a busy city street with a stop sign prominently displayed&quot;</span>`,wrap:!1}}),{c(){d=r("p"),d.textContent=M,T=o(),p(v.$$.fragment)},l(i){d=l(i,"P",{"data-svelte-h":!0}),m(d)!=="svelte-11lpom8"&&(d.textContent=M),T=s(i),f(v.$$.fragment,i)},m(i,y){a(i,d,y),a(i,T,y),g(v,i,y),b=!0},p:kt,i(i){b||(h(v.$$.fragment,i),b=!0)},o(i){u(v.$$.fragment,i),b=!1},d(i){i&&(n(d),n(T)),_(v,i)}}}function gn(z){let d,M,T,v,b,i,y,Fe,Z,Jt="LLaVa is an open-source chatbot trained by fine-tuning LlamA/Vicuna on GPT-generated multimodal instruction-following data. It is an auto-regressive language model, based on the transformer architecture. In other words, it is an multi-modal version of LLMs fine-tuned for chat / instructions.",je,S,zt='The LLaVa model was proposed in <a href="https://arxiv.org/abs/2304.08485" rel="nofollow">Visual Instruction Tuning</a> and improved in <a href="https://arxiv.org/pdf/2310.03744" rel="nofollow">Improved Baselines with Visual Instruction Tuning</a> by Haotian Liu, Chunyuan Li, Yuheng Li and Yong Jae Lee.',Ne,H,Ut="The abstract from the paper is the following:",Pe,q,It="<em>Large multimodal models (LMM) have recently shown encouraging progress with visual instruction tuning. In this note, we show that the fully-connected vision-language cross-modal connector in LLaVA is surprisingly powerful and data-efficient. With simple modifications to LLaVA, namely, using CLIP-ViT-L-336px with an MLP projection and adding academic-task-oriented VQA data with simple response formatting prompts, we establish stronger baselines that achieve state-of-the-art across 11 benchmarks. Our final 13B checkpoint uses merely 1.2M publicly available data, and finishes full training in ∼1 day on a single 8-A100 node. We hope this can make state-of-the-art LMM research more accessible. Code and model will be publicly available</em>",We,U,Ft,Be,Q,jt='LLaVa architecture. Taken from the <a href="https://arxiv.org/abs/2304.08485">original paper.</a>',Ge,E,Nt=`This model was contributed by <a href="https://huggingface.co/ArthurZ" rel="nofollow">ArthurZ</a> and <a href="https://huggingface.co/ybelkada" rel="nofollow">ybelkada</a>.
The original code can be found <a href="https://github.com/haotian-liu/LLaVA/tree/main/llava" rel="nofollow">here</a>.`,Ve,R,Ze,A,Pt="<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> <li><p>For better results, we recommend users to prompt the model with the correct prompt format. Below is a list of prompt formats accepted by each llava checkpoint:</p></li>",Se,X,Wt='<a href="https://huggingface.co/collections/llava-hf/llava-interleave-668e19a97da0036aad4a2f19" rel="nofollow">llava-interleave models</a> requires the following format:',He,Y,qe,D,Bt="For multiple turns conversation:",Qe,O,Ee,K,Gt='<a href="https://huggingface.co/collections/llava-hf/llava-15-65f762d5b6941db5c2ba07e0" rel="nofollow">llava-1.5 models</a> requires the following format:',Re,ee,Ae,te,Vt="For multiple turns conversation:",Xe,ne,Ye,ae,De,oe,Zt='Flash Attention 2 is an even faster, optimized version of the previous optimization, please refer to the <a href="https://huggingface.co/docs/transformers/perf_infer_gpu_one" rel="nofollow">Flash Attention 2 section of performance docs</a>.',Oe,se,Ke,re,St="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BEiT.",et,le,tt,ie,Ht='<li>A <a href="https://colab.research.google.com/drive/1qsl6cd2c8gGtEW1xV5io7S8NHh-Cp1TV?usp=sharing" rel="nofollow">Google Colab demo</a> on how to run Llava on a free-tier Google colab instance leveraging 4-bit inference.</li> <li>A <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LLaVa/Inference_with_LLaVa_for_multimodal_generation.ipynb" rel="nofollow">similar notebook</a> showcasing batched inference. 🌎</li>',nt,de,at,$,ce,pt,be,qt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/llava#transformers.LlavaForConditionalGeneration">LlavaForConditionalGeneration</a>. It is used to instantiate an
Llava 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 Llava-9B.`,ft,ye,Qt='e.g. <a href="https://huggingface.co/llava-hf/llava-9b" rel="nofollow">llava-hf/llava-9b</a>',gt,$e,Et=`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.`,ht,I,ot,me,st,w,pe,ut,we,Rt="Constructs a Llava processor which wraps a Llava image processor and a Llava tokenizer into a single processor.",_t,Me,At=`<a href="/docs/transformers/main/en/model_doc/llava#transformers.LlavaProcessor">LlavaProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</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/llava#transformers.LlavaProcessor.decode">decode()</a> for more information.`,vt,F,fe,Tt,Le,Xt=`This method forwards all its arguments to LlamaTokenizerFast’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.`,bt,j,ge,yt,xe,Yt=`This method forwards all its arguments to LlamaTokenizerFast’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.`,rt,he,lt,L,ue,$t,Ce,Dt=`The LLAVA 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.)`,wt,ke,Ot=`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.`,Mt,k,_e,Lt,Je,Kt='The <a href="/docs/transformers/main/en/model_doc/llava#transformers.LlavaForConditionalGeneration">LlavaForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',xt,N,Ct,P,it,ve,dt,Ie,ct;return b=new V({props:{title:"LLaVa",local:"llava",headingTag:"h1"}}),y=new V({props:{title:"Overview",local:"overview",headingTag:"h2"}}),R=new V({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),Y=new Ue({props:{code:"JTIyJTNDJTdDaW1fc3RhcnQlN0MlM0V1c2VyJTIwJTNDaW1hZ2UlM0UlNUNuV2hhdCUyMGlzJTIwc2hvd24lMjBpbiUyMHRoaXMlMjBpbWFnZSUzRiUzQyU3Q2ltX2VuZCU3QyUzRSUzQyU3Q2ltX3N0YXJ0JTdDJTNFYXNzaXN0YW50JTIy",highlighted:'<span class="hljs-string">&quot;&lt;|im_start|&gt;user &lt;image&gt;\\nWhat is shown in this image?&lt;|im_end|&gt;&lt;|im_start|&gt;assistant&quot;</span>',wrap:!1}}),O=new Ue({props:{code:"JTIyJTNDJTdDaW1fc3RhcnQlN0MlM0V1c2VyJTIwJTNDaW1hZ2UlM0UlNUNuJTNDcHJvbXB0MSUzRSUzQyU3Q2ltX2VuZCU3QyUzRSUzQyU3Q2ltX3N0YXJ0JTdDJTNFYXNzaXN0YW50JTIwJTNDYW5zd2VyMSUzRSUzQyU3Q2ltX2VuZCU3QyUzRSUzQyU3Q2ltX3N0YXJ0JTdDJTNFdXNlciUyMCUzQ2ltYWdlJTNFJTVDbiUzQ3Byb21wdDElM0UlM0MlN0NpbV9lbmQlN0MlM0UlM0MlN0NpbV9zdGFydCU3QyUzRWFzc2lzdGFudCUyMCUyMg==",highlighted:'<span class="hljs-string">&quot;&lt;|im_start|&gt;user &lt;image&gt;\\n&lt;prompt1&gt;&lt;|im_end|&gt;&lt;|im_start|&gt;assistant &lt;answer1&gt;&lt;|im_end|&gt;&lt;|im_start|&gt;user &lt;image&gt;\\n&lt;prompt1&gt;&lt;|im_end|&gt;&lt;|im_start|&gt;assistant &quot;</span>',wrap:!1}}),ee=new Ue({props:{code:"JTIyVVNFUiUzQSUyMCUzQ2ltYWdlJTNFJTVDbiUzQ3Byb21wdCUzRSUyMEFTU0lTVEFOVCUzQSUyMg==",highlighted:'<span class="hljs-string">&quot;USER: &lt;image&gt;\\n&lt;prompt&gt; ASSISTANT:&quot;</span>',wrap:!1}}),ne=new Ue({props:{code:"JTIyVVNFUiUzQSUyMCUzQ2ltYWdlJTNFJTVDbiUzQ3Byb21wdDElM0UlMjBBU1NJU1RBTlQlM0ElMjAlM0NhbnN3ZXIxJTNFJTNDJTJGcyUzRVVTRVIlM0ElMjAlM0Nwcm9tcHQyJTNFJTIwQVNTSVNUQU5UJTNBJTIwJTNDYW5zd2VyMiUzRSUzQyUyRnMlM0VVU0VSJTNBJTIwJTNDcHJvbXB0MyUzRSUyMEFTU0lTVEFOVCUzQSUyMg==",highlighted:'<span class="hljs-string">&quot;USER: &lt;image&gt;\\n&lt;prompt1&gt; ASSISTANT: &lt;answer1&gt;&lt;/s&gt;USER: &lt;prompt2&gt; ASSISTANT: &lt;answer2&gt;&lt;/s&gt;USER: &lt;prompt3&gt; ASSISTANT:&quot;</span>',wrap:!1}}),ae=new V({props:{title:"Using Flash Attention 2",local:"using-flash-attention-2",headingTag:"h3"}}),se=new V({props:{title:"Resources",local:"resources",headingTag:"h2"}}),le=new dn({props:{pipeline:"image-to-text"}}),de=new V({props:{title:"LlavaConfig",local:"transformers.LlavaConfig",headingTag:"h2"}}),ce=new ze({props:{name:"class transformers.LlavaConfig",anchor:"transformers.LlavaConfig",parameters:[{name:"vision_config",val:" = None"},{name:"text_config",val:" = None"},{name:"ignore_index",val:" = -100"},{name:"image_token_index",val:" = 32000"},{name:"projector_hidden_act",val:" = 'gelu'"},{name:"vision_feature_select_strategy",val:" = 'default'"},{name:"vision_feature_layer",val:" = -2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LlavaConfig.vision_config",description:`<strong>vision_config</strong> (<code>Union[AutoConfig, dict]</code>,  <em>optional</em>, defaults to <code>CLIPVisionConfig</code>) &#x2014;
The config object or dictionary of the vision backbone.`,name:"vision_config"},{anchor:"transformers.LlavaConfig.text_config",description:`<strong>text_config</strong> (<code>Union[AutoConfig, dict]</code>, <em>optional</em>, defaults to <code>LlamaConfig</code>) &#x2014;
The config object or dictionary of the text backbone.`,name:"text_config"},{anchor:"transformers.LlavaConfig.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.LlavaConfig.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.LlavaConfig.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.LlavaConfig.vision_feature_select_strategy",description:`<strong>vision_feature_select_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The feature selection strategy used to select the vision feature from the vision backbone.
Can be one of <code>&quot;default&quot;</code> or <code>&quot;full&quot;</code>.`,name:"vision_feature_select_strategy"},{anchor:"transformers.LlavaConfig.vision_feature_layer",description:`<strong>vision_feature_layer</strong> (<code>int</code>, <em>optional</em>, defaults to -2) &#x2014;
The index of the layer to select the vision feature.`,name:"vision_feature_layer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/llava/configuration_llava.py#L24"}}),I=new en({props:{anchor:"transformers.LlavaConfig.example",$$slots:{default:[mn]},$$scope:{ctx:z}}}),me=new V({props:{title:"LlavaProcessor",local:"transformers.LlavaProcessor",headingTag:"h2"}}),pe=new ze({props:{name:"class transformers.LlavaProcessor",anchor:"transformers.LlavaProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"chat_template",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LlavaProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>, <em>optional</em>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.LlavaProcessor.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.LlavaProcessor.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/llava/processing_llava.py#L28"}}),fe=new ze({props:{name:"batch_decode",anchor:"transformers.LlavaProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/llava/processing_llava.py#L117"}}),ge=new ze({props:{name:"decode",anchor:"transformers.LlavaProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/llava/processing_llava.py#L125"}}),he=new V({props:{title:"LlavaForConditionalGeneration",local:"transformers.LlavaForConditionalGeneration",headingTag:"h2"}}),ue=new ze({props:{name:"class transformers.LlavaForConditionalGeneration",anchor:"transformers.LlavaForConditionalGeneration",parameters:[{name:"config",val:": LlavaConfig"}],parametersDescription:[{anchor:"transformers.LlavaForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/llava#transformers.LlavaConfig">LlavaConfig</a> or <code>LlavaVisionConfig</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/llava/modeling_llava.py#L232"}}),_e=new ze({props:{name:"forward",anchor:"transformers.LlavaForConditionalGeneration.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:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"vision_feature_layer",val:": Optional = None"},{name:"vision_feature_select_strategy",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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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/levit#transformers.LevitFeatureExtractor.__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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.forward.vision_feature_layer",description:`<strong>vision_feature_layer</strong> (<code>int</code>, <em>optional</em>, defaults to -2) &#x2014;
The index of the layer to select the vision feature.`,name:"vision_feature_layer"},{anchor:"transformers.LlavaForConditionalGeneration.forward.vision_feature_select_strategy",description:`<strong>vision_feature_select_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The feature selection strategy used to select the vision feature from the vision backbone.
Can be one of <code>&quot;default&quot;</code> or <code>&quot;full&quot;</code>.`,name:"vision_feature_select_strategy"},{anchor:"transformers.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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.LlavaForConditionalGeneration.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/llava/modeling_llava.py#L355",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.llava.modeling_llava.LlavaCausalLMOutputWithPast</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/llava#transformers.LlavaConfig"
>LlavaConfig</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.llava.modeling_llava.LlavaCausalLMOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),N=new ln({props:{$$slots:{default:[pn]},$$scope:{ctx:z}}}),P=new en({props:{anchor:"transformers.LlavaForConditionalGeneration.forward.example",$$slots:{default:[fn]},$$scope:{ctx:z}}}),ve=new cn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/llava.md"}}),{c(){d=r("meta"),M=o(),T=r("p"),v=o(),p(b.$$.fragment),i=o(),p(y.$$.fragment),Fe=o(),Z=r("p"),Z.textContent=Jt,je=o(),S=r("p"),S.innerHTML=zt,Ne=o(),H=r("p"),H.textContent=Ut,Pe=o(),q=r("p"),q.innerHTML=It,We=o(),U=r("img"),Be=o(),Q=r("small"),Q.innerHTML=jt,Ge=o(),E=r("p"),E.innerHTML=Nt,Ve=o(),p(R.$$.fragment),Ze=o(),A=r("ul"),A.innerHTML=Pt,Se=o(),X=r("p"),X.innerHTML=Wt,He=o(),p(Y.$$.fragment),qe=o(),D=r("p"),D.textContent=Bt,Qe=o(),p(O.$$.fragment),Ee=o(),K=r("p"),K.innerHTML=Gt,Re=o(),p(ee.$$.fragment),Ae=o(),te=r("p"),te.textContent=Vt,Xe=o(),p(ne.$$.fragment),Ye=o(),p(ae.$$.fragment),De=o(),oe=r("p"),oe.innerHTML=Zt,Oe=o(),p(se.$$.fragment),Ke=o(),re=r("p"),re.textContent=St,et=o(),p(le.$$.fragment),tt=o(),ie=r("ul"),ie.innerHTML=Ht,nt=o(),p(de.$$.fragment),at=o(),$=r("div"),p(ce.$$.fragment),pt=o(),be=r("p"),be.innerHTML=qt,ft=o(),ye=r("p"),ye.innerHTML=Qt,gt=o(),$e=r("p"),$e.innerHTML=Et,ht=o(),p(I.$$.fragment),ot=o(),p(me.$$.fragment),st=o(),w=r("div"),p(pe.$$.fragment),ut=o(),we=r("p"),we.textContent=Rt,_t=o(),Me=r("p"),Me.innerHTML=At,vt=o(),F=r("div"),p(fe.$$.fragment),Tt=o(),Le=r("p"),Le.innerHTML=Xt,bt=o(),j=r("div"),p(ge.$$.fragment),yt=o(),xe=r("p"),xe.innerHTML=Yt,rt=o(),p(he.$$.fragment),lt=o(),L=r("div"),p(ue.$$.fragment),$t=o(),Ce=r("p"),Ce.innerHTML=Dt,wt=o(),ke=r("p"),ke.innerHTML=Ot,Mt=o(),k=r("div"),p(_e.$$.fragment),Lt=o(),Je=r("p"),Je.innerHTML=Kt,xt=o(),p(N.$$.fragment),Ct=o(),p(P.$$.fragment),it=o(),p(ve.$$.fragment),dt=o(),Ie=r("p"),this.h()},l(e){const t=rn("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(n),M=s(e),T=l(e,"P",{}),G(T).forEach(n),v=s(e),f(b.$$.fragment,e),i=s(e),f(y.$$.fragment,e),Fe=s(e),Z=l(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-xhhjdz"&&(Z.textContent=Jt),je=s(e),S=l(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-iilyg8"&&(S.innerHTML=zt),Ne=s(e),H=l(e,"P",{"data-svelte-h":!0}),m(H)!=="svelte-vfdo9a"&&(H.textContent=Ut),Pe=s(e),q=l(e,"P",{"data-svelte-h":!0}),m(q)!=="svelte-a2g4ox"&&(q.innerHTML=It),We=s(e),U=l(e,"IMG",{src:!0,alt:!0,width:!0}),Be=s(e),Q=l(e,"SMALL",{"data-svelte-h":!0}),m(Q)!=="svelte-16ml59q"&&(Q.innerHTML=jt),Ge=s(e),E=l(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-3u37is"&&(E.innerHTML=Nt),Ve=s(e),f(R.$$.fragment,e),Ze=s(e),A=l(e,"UL",{"data-svelte-h":!0}),m(A)!=="svelte-1n3z4xa"&&(A.innerHTML=Pt),Se=s(e),X=l(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1qk1eny"&&(X.innerHTML=Wt),He=s(e),f(Y.$$.fragment,e),qe=s(e),D=l(e,"P",{"data-svelte-h":!0}),m(D)!=="svelte-mnlzle"&&(D.textContent=Bt),Qe=s(e),f(O.$$.fragment,e),Ee=s(e),K=l(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-uxk0fh"&&(K.innerHTML=Gt),Re=s(e),f(ee.$$.fragment,e),Ae=s(e),te=l(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-mnlzle"&&(te.textContent=Vt),Xe=s(e),f(ne.$$.fragment,e),Ye=s(e),f(ae.$$.fragment,e),De=s(e),oe=l(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-15nzlnu"&&(oe.innerHTML=Zt),Oe=s(e),f(se.$$.fragment,e),Ke=s(e),re=l(e,"P",{"data-svelte-h":!0}),m(re)!=="svelte-1bkfbxv"&&(re.textContent=St),et=s(e),f(le.$$.fragment,e),tt=s(e),ie=l(e,"UL",{"data-svelte-h":!0}),m(ie)!=="svelte-qnejrc"&&(ie.innerHTML=Ht),nt=s(e),f(de.$$.fragment,e),at=s(e),$=l(e,"DIV",{class:!0});var x=G($);f(ce.$$.fragment,x),pt=s(x),be=l(x,"P",{"data-svelte-h":!0}),m(be)!=="svelte-1r3a7z"&&(be.innerHTML=qt),ft=s(x),ye=l(x,"P",{"data-svelte-h":!0}),m(ye)!=="svelte-d825u1"&&(ye.innerHTML=Qt),gt=s(x),$e=l(x,"P",{"data-svelte-h":!0}),m($e)!=="svelte-o55m63"&&($e.innerHTML=Et),ht=s(x),f(I.$$.fragment,x),x.forEach(n),ot=s(e),f(me.$$.fragment,e),st=s(e),w=l(e,"DIV",{class:!0});var C=G(w);f(pe.$$.fragment,C),ut=s(C),we=l(C,"P",{"data-svelte-h":!0}),m(we)!=="svelte-api29h"&&(we.textContent=Rt),_t=s(C),Me=l(C,"P",{"data-svelte-h":!0}),m(Me)!=="svelte-1wyzur5"&&(Me.innerHTML=At),vt=s(C),F=l(C,"DIV",{class:!0});var Te=G(F);f(fe.$$.fragment,Te),Tt=s(Te),Le=l(Te,"P",{"data-svelte-h":!0}),m(Le)!=="svelte-1o9eza"&&(Le.innerHTML=Xt),Te.forEach(n),bt=s(C),j=l(C,"DIV",{class:!0});var mt=G(j);f(ge.$$.fragment,mt),yt=s(mt),xe=l(mt,"P",{"data-svelte-h":!0}),m(xe)!=="svelte-kk16qw"&&(xe.innerHTML=Yt),mt.forEach(n),C.forEach(n),rt=s(e),f(he.$$.fragment,e),lt=s(e),L=l(e,"DIV",{class:!0});var W=G(L);f(ue.$$.fragment,W),$t=s(W),Ce=l(W,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-1ox7dlx"&&(Ce.innerHTML=Dt),wt=s(W),ke=l(W,"P",{"data-svelte-h":!0}),m(ke)!=="svelte-hswkmf"&&(ke.innerHTML=Ot),Mt=s(W),k=l(W,"DIV",{class:!0});var B=G(k);f(_e.$$.fragment,B),Lt=s(B),Je=l(B,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-1n3tg9h"&&(Je.innerHTML=Kt),xt=s(B),f(N.$$.fragment,B),Ct=s(B),f(P.$$.fragment,B),B.forEach(n),W.forEach(n),it=s(e),f(ve.$$.fragment,e),dt=s(e),Ie=l(e,"P",{}),G(Ie).forEach(n),this.h()},h(){J(d,"name","hf:doc:metadata"),J(d,"content",hn),nn(U.src,Ft="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/llava_architecture.jpg")||J(U,"src",Ft),J(U,"alt","drawing"),J(U,"width","600"),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(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(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(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(k,"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")},m(e,t){c(document.head,d),a(e,M,t),a(e,T,t),a(e,v,t),g(b,e,t),a(e,i,t),g(y,e,t),a(e,Fe,t),a(e,Z,t),a(e,je,t),a(e,S,t),a(e,Ne,t),a(e,H,t),a(e,Pe,t),a(e,q,t),a(e,We,t),a(e,U,t),a(e,Be,t),a(e,Q,t),a(e,Ge,t),a(e,E,t),a(e,Ve,t),g(R,e,t),a(e,Ze,t),a(e,A,t),a(e,Se,t),a(e,X,t),a(e,He,t),g(Y,e,t),a(e,qe,t),a(e,D,t),a(e,Qe,t),g(O,e,t),a(e,Ee,t),a(e,K,t),a(e,Re,t),g(ee,e,t),a(e,Ae,t),a(e,te,t),a(e,Xe,t),g(ne,e,t),a(e,Ye,t),g(ae,e,t),a(e,De,t),a(e,oe,t),a(e,Oe,t),g(se,e,t),a(e,Ke,t),a(e,re,t),a(e,et,t),g(le,e,t),a(e,tt,t),a(e,ie,t),a(e,nt,t),g(de,e,t),a(e,at,t),a(e,$,t),g(ce,$,null),c($,pt),c($,be),c($,ft),c($,ye),c($,gt),c($,$e),c($,ht),g(I,$,null),a(e,ot,t),g(me,e,t),a(e,st,t),a(e,w,t),g(pe,w,null),c(w,ut),c(w,we),c(w,_t),c(w,Me),c(w,vt),c(w,F),g(fe,F,null),c(F,Tt),c(F,Le),c(w,bt),c(w,j),g(ge,j,null),c(j,yt),c(j,xe),a(e,rt,t),g(he,e,t),a(e,lt,t),a(e,L,t),g(ue,L,null),c(L,$t),c(L,Ce),c(L,wt),c(L,ke),c(L,Mt),c(L,k),g(_e,k,null),c(k,Lt),c(k,Je),c(k,xt),g(N,k,null),c(k,Ct),g(P,k,null),a(e,it,t),g(ve,e,t),a(e,dt,t),a(e,Ie,t),ct=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),I.$set(x);const C={};t&2&&(C.$$scope={dirty:t,ctx:e}),N.$set(C);const Te={};t&2&&(Te.$$scope={dirty:t,ctx:e}),P.$set(Te)},i(e){ct||(h(b.$$.fragment,e),h(y.$$.fragment,e),h(R.$$.fragment,e),h(Y.$$.fragment,e),h(O.$$.fragment,e),h(ee.$$.fragment,e),h(ne.$$.fragment,e),h(ae.$$.fragment,e),h(se.$$.fragment,e),h(le.$$.fragment,e),h(de.$$.fragment,e),h(ce.$$.fragment,e),h(I.$$.fragment,e),h(me.$$.fragment,e),h(pe.$$.fragment,e),h(fe.$$.fragment,e),h(ge.$$.fragment,e),h(he.$$.fragment,e),h(ue.$$.fragment,e),h(_e.$$.fragment,e),h(N.$$.fragment,e),h(P.$$.fragment,e),h(ve.$$.fragment,e),ct=!0)},o(e){u(b.$$.fragment,e),u(y.$$.fragment,e),u(R.$$.fragment,e),u(Y.$$.fragment,e),u(O.$$.fragment,e),u(ee.$$.fragment,e),u(ne.$$.fragment,e),u(ae.$$.fragment,e),u(se.$$.fragment,e),u(le.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(I.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(fe.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(ue.$$.fragment,e),u(_e.$$.fragment,e),u(N.$$.fragment,e),u(P.$$.fragment,e),u(ve.$$.fragment,e),ct=!1},d(e){e&&(n(M),n(T),n(v),n(i),n(Fe),n(Z),n(je),n(S),n(Ne),n(H),n(Pe),n(q),n(We),n(U),n(Be),n(Q),n(Ge),n(E),n(Ve),n(Ze),n(A),n(Se),n(X),n(He),n(qe),n(D),n(Qe),n(Ee),n(K),n(Re),n(Ae),n(te),n(Xe),n(Ye),n(De),n(oe),n(Oe),n(Ke),n(re),n(et),n(tt),n(ie),n(nt),n(at),n($),n(ot),n(st),n(w),n(rt),n(lt),n(L),n(it),n(dt),n(Ie)),n(d),_(b,e),_(y,e),_(R,e),_(Y,e),_(O,e),_(ee,e),_(ne,e),_(ae,e),_(se,e),_(le,e),_(de,e),_(ce),_(I),_(me,e),_(pe),_(fe),_(ge),_(he,e),_(ue),_(_e),_(N),_(P),_(ve,e)}}}const hn='{"title":"LLaVa","local":"llava","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[{"title":"Using Flash Attention 2","local":"using-flash-attention-2","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"LlavaConfig","local":"transformers.LlavaConfig","sections":[],"depth":2},{"title":"LlavaProcessor","local":"transformers.LlavaProcessor","sections":[],"depth":2},{"title":"LlavaForConditionalGeneration","local":"transformers.LlavaForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function un(z){return an(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ln extends on{constructor(d){super(),sn(this,d,un,gn,tn,{})}}export{Ln as component};
