import{s as dn,f as cn,o as mn,n as mt}from"../chunks/scheduler.25b97de1.js";import{S as pn,i as un,g as d,s as n,r as p,A as fn,h as c,f as t,c as s,j as B,u,x as v,k as T,y as r,a as l,v as f,d as g,t as h,w as _}from"../chunks/index.d9030fc9.js";import{T as ln}from"../chunks/Tip.baa67368.js";import{D as V}from"../chunks/Docstring.e257edda.js";import{C as St}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Lt}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as U,E as gn}from"../chunks/EditOnGithub.91d95064.js";function hn(C){let i,M="Example:",b,m,y;return m=new St({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBJbnN0cnVjdEJsaXBWaWRlb1Zpc2lvbkNvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZyUyQyUwQSUyMCUyMCUyMCUyME9QVENvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMEEpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnJTIwd2l0aCUyMFNhbGVzZm9yY2UlMkZpbnN0cnVjdC1ibGlwLWZsYW4tdDUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb0ZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24oY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb0NvbmZpZyUyMGZyb20lMjBhJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Db25maWclMkMlMjBJbnN0cnVjdEJsaXBWaWRlb1FGb3JtZXJDb25maWclMjBhbmQlMjBhbnklMjBQcmV0cmFpbmVkQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwSW5zdHJ1Y3RibGlwdmlkZW8lMjB2aXNpb24lMkMlMjBJbnN0cnVjdGJsaXB2aWRlbyUyMFEtRm9ybWVyJTIwYW5kJTIwbGFuZ3VhZ2UlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb25zJTBBdmlzaW9uX2NvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnKCklMEFxZm9ybWVyX2NvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZygpJTBBdGV4dF9jb25maWclMjAlM0QlMjBPUFRDb25maWcoKSUwQSUwQWNvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnLmZyb21fdGV4dF92aXNpb25fY29uZmlncyh2aXNpb25fY29uZmlnJTJDJTIwcWZvcm1lcl9jb25maWclMkMlMjB0ZXh0X2NvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    InstructBlipVideoVisionConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoQFormerConfig,
<span class="hljs-meta">... </span>    OPTConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoForConditionalGeneration,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoConfig with Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoForConditionalGeneration (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoForConditionalGeneration(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a InstructBlipVideoConfig from a InstructBlipVideoVisionConfig, InstructBlipVideoQFormerConfig and any PretrainedConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing Instructblipvideo vision, Instructblipvideo Q-Former and language model configurations</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vision_config = InstructBlipVideoVisionConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>qformer_config = InstructBlipVideoQFormerConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>text_config = OPTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = InstructBlipVideoConfig.from_text_vision_configs(vision_config, qformer_config, text_config)`,wrap:!1}}),{c(){i=d("p"),i.textContent=M,b=n(),p(m.$$.fragment)},l(a){i=c(a,"P",{"data-svelte-h":!0}),v(i)!=="svelte-11lpom8"&&(i.textContent=M),b=s(a),u(m.$$.fragment,a)},m(a,I){l(a,i,I),l(a,b,I),f(m,a,I),y=!0},p:mt,i(a){y||(g(m.$$.fragment,a),y=!0)},o(a){h(m.$$.fragment,a),y=!1},d(a){a&&(t(i),t(b)),_(m,a)}}}function _n(C){let i,M="Example:",b,m,y;return m=new St({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnJTJDJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb1Zpc2lvbkNvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGaW5zdHJ1Y3QtYmxpcC1mbGFuLXQ1JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoVisionConfig, InstructBlipVideoVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoVisionConfig with Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoVisionModel (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoVisionModel(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=d("p"),i.textContent=M,b=n(),p(m.$$.fragment)},l(a){i=c(a,"P",{"data-svelte-h":!0}),v(i)!=="svelte-11lpom8"&&(i.textContent=M),b=s(a),u(m.$$.fragment,a)},m(a,I){l(a,i,I),l(a,b,I),f(m,a,I),y=!0},p:mt,i(a){y||(g(m.$$.fragment,a),y=!0)},o(a){h(m.$$.fragment,a),y=!1},d(a){a&&(t(i),t(b)),_(m,a)}}}function bn(C){let i,M="Examples:",b,m,y;return m=new St({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZyUyQyUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lck1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEluc3RydWN0YmxpcHZpZGVvJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb1FGb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9RRm9ybWVyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoQFormerConfig, InstructBlipVideoQFormerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Instructblipvideo Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoQFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoQFormerModel(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=d("p"),i.textContent=M,b=n(),p(m.$$.fragment)},l(a){i=c(a,"P",{"data-svelte-h":!0}),v(i)!=="svelte-kvfsh7"&&(i.textContent=M),b=s(a),u(m.$$.fragment,a)},m(a,I){l(a,i,I),l(a,b,I),f(m,a,I),y=!0},p:mt,i(a){y||(g(m.$$.fragment,a),y=!0)},o(a){h(m.$$.fragment,a),y=!1},d(a){a&&(t(i),t(b)),_(m,a)}}}function vn(C){let i,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(){i=d("p"),i.innerHTML=M},l(b){i=c(b,"P",{"data-svelte-h":!0}),v(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(b,m){l(b,i,m)},p:mt,d(b){b&&t(i)}}}function yn(C){let i,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(){i=d("p"),i.innerHTML=M},l(b){i=c(b,"P",{"data-svelte-h":!0}),v(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(b,m){l(b,i,m)},p:mt,d(b){b&&t(i)}}}function In(C){let i,M="Examples:",b,m,y;return m=new St({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvUHJvY2Vzc29yJTJDJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBoZl9odWJfZG93bmxvYWQlMEFpbXBvcnQlMjBhdiUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQSUwQWRlZiUyMHJlYWRfdmlkZW9fcHlhdihjb250YWluZXIlMkMlMjBpbmRpY2VzKSUzQSUwQSUyMCUyMCUyMCUyMCcnJyUwQSUyMCUyMCUyMCUyMERlY29kZSUyMHRoZSUyMHZpZGVvJTIwd2l0aCUyMFB5QVYlMjBkZWNvZGVyLiUwQSUyMCUyMCUyMCUyMEFyZ3MlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjb250YWluZXIlMjAoJTYwYXYuY29udGFpbmVyLmlucHV0LklucHV0Q29udGFpbmVyJTYwKSUzQSUyMFB5QVYlMjBjb250YWluZXIuJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaW5kaWNlcyUyMCglNjBMaXN0JTVCaW50JTVEJTYwKSUzQSUyMExpc3QlMjBvZiUyMGZyYW1lJTIwaW5kaWNlcyUyMHRvJTIwZGVjb2RlLiUwQSUyMCUyMCUyMCUyMFJldHVybnMlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXN1bHQlMjAobnAubmRhcnJheSklM0ElMjBucCUyMGFycmF5JTIwb2YlMjBkZWNvZGVkJTIwZnJhbWVzJTIwb2YlMjBzaGFwZSUyMChudW1fZnJhbWVzJTJDJTIwaGVpZ2h0JTJDJTIwd2lkdGglMkMlMjAzKS4lMEElMjAlMjAlMjAlMjAnJyclMEElMjAlMjAlMjAlMjBmcmFtZXMlMjAlM0QlMjAlNUIlNUQlMEElMjAlMjAlMjAlMjBjb250YWluZXIuc2VlaygwKSUwQSUyMCUyMCUyMCUyMHN0YXJ0X2luZGV4JTIwJTNEJTIwaW5kaWNlcyU1QjAlNUQlMEElMjAlMjAlMjAlMjBlbmRfaW5kZXglMjAlM0QlMjBpbmRpY2VzJTVCLTElNUQlMEElMjAlMjAlMjAlMjBmb3IlMjBpJTJDJTIwZnJhbWUlMjBpbiUyMGVudW1lcmF0ZShjb250YWluZXIuZGVjb2RlKHZpZGVvJTNEMCkpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaWYlMjBpJTIwJTNFJTIwZW5kX2luZGV4JTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYnJlYWslMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpZiUyMGklMjAlM0UlM0QlMjBzdGFydF9pbmRleCUyMGFuZCUyMGklMjBpbiUyMGluZGljZXMlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmcmFtZXMuYXBwZW5kKGZyYW1lKSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMG5wLnN0YWNrKCU1QngudG9fbmRhcnJheShmb3JtYXQlM0QlMjJyZ2IyNCUyMiklMjBmb3IlMjB4JTIwaW4lMjBmcmFtZXMlNUQpJTBBJTBBbW9kZWwlMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb0ZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmluc3RydWN0YmxpcC12aWN1bmEtN2IlMjIlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmluc3RydWN0YmxpcC12aWN1bmEtN2IlMjIpJTBBJTBBZmlsZV9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJuaWVsc3IlMkZ2aWRlby1kZW1vJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJlYXRpbmdfc3BhZ2hldHRpLm1wNCUyMiUyQyUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIlMEEpJTBBY29udGFpbmVyJTIwJTNEJTIwYXYub3BlbihmaWxlX3BhdGgpJTBBJTBBJTIzJTIwc2FtcGxlJTIwdW5pZm9ybWx5JTIwNCUyMGZyYW1lcyUyMGZyb20lMjB0aGUlMjB2aWRlV2h5JTIwaXMlMjB0aGlzJTIwdmlkZW8lMjBmdW5ueSUzRm8lMEF0b3RhbF9mcmFtZXMlMjAlM0QlMjBjb250YWluZXIuc3RyZWFtcy52aWRlbyU1QjAlNUQuZnJhbWVzJTBBaW5kaWNlcyUyMCUzRCUyMG5wLmFyYW5nZSgwJTJDJTIwdG90YWxfZnJhbWVzJTJDJTIwdG90YWxfZnJhbWVzJTIwJTJGJTIwNCkuYXN0eXBlKGludCklMEFjbGlwJTIwJTNEJTIwcmVhZF92aWRlb19weWF2KGNvbnRhaW5lciUyQyUyMGluZGljZXMpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyV2hhdCUyMGlzJTIwaGFwcGVuaW5nJTIwaW4lMjB0aGUlMjB2aWRlbyUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEcHJvbXB0JTJDJTIwaW1hZ2VzJTNEY2xpcCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKG1vZGVsLmRldmljZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwKippbnB1dHMlMkMlMEElMjAlMjAlMjAlMjBkb19zYW1wbGUlM0RGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMG51bV9iZWFtcyUzRDUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNEMjU2JTJDJTBBJTIwJTIwJTIwJTIwcmVwZXRpdGlvbl9wZW5hbHR5JTNEMS41JTJDJTBBJTIwJTIwJTIwJTIwbGVuZ3RoX3BlbmFsdHklM0QxLjAlMkMlMEEpJTBBZ2VuZXJhdGVkX3RleHQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVELnN0cmlwKCklMEFwcmludChnZW5lcmF0ZWRfdGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoProcessor, InstructBlipVideoForConditionalGeneration
<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> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])

<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/instructblip-vicuna-7b&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = InstructBlipVideoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/instructblip-vicuna-7b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>      repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample uniformly 4 frames from the videWhy is this video funny?o</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>total_frames = container.streams.video[<span class="hljs-number">0</span>].frames
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = np.arange(<span class="hljs-number">0</span>, total_frames, total_frames / <span class="hljs-number">4</span>).astype(<span class="hljs-built_in">int</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>clip = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;What is happening in the video?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=prompt, images=clip, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(
<span class="hljs-meta">... </span>    **inputs,
<span class="hljs-meta">... </span>    do_sample=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    num_beams=<span class="hljs-number">5</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">256</span>,
<span class="hljs-meta">... </span>    repetition_penalty=<span class="hljs-number">1.5</span>,
<span class="hljs-meta">... </span>    length_penalty=<span class="hljs-number">1.0</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>].strip()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text)
<span class="hljs-string">&quot;A person is eating a bowl of pasta, and they are using a fork to eat it. The person is sitting at a table, and the plate of pasta is on the table in front&quot;</span>`,wrap:!1}}),{c(){i=d("p"),i.textContent=M,b=n(),p(m.$$.fragment)},l(a){i=c(a,"P",{"data-svelte-h":!0}),v(i)!=="svelte-kvfsh7"&&(i.textContent=M),b=s(a),u(m.$$.fragment,a)},m(a,I){l(a,i,I),l(a,b,I),f(m,a,I),y=!0},p:mt,i(a){y||(g(m.$$.fragment,a),y=!0)},o(a){h(m.$$.fragment,a),y=!1},d(a){a&&(t(i),t(b)),_(m,a)}}}function Mn(C){let i,M,b,m,y,a,I,ut,ne,ft,se,xo=`The InstructBLIPVideo is an extension of the models proposed in <a href="https://arxiv.org/abs/2305.06500" rel="nofollow">InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning</a> by Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, Steven Hoi.
InstructBLIPVideo uses the same architecture as <a href="instructblip">InstructBLIP</a> and works with the same checkpoints as <a href="instructblip">InstructBLIP</a>. The only difference is the ability to process videos.`,gt,re,ko="The abstract from the paper is the following:",ht,ae,Wo="<em>General-purpose language models that can solve various language-domain tasks have emerged driven by the pre-training and instruction-tuning pipeline. However, building general-purpose vision-language models is challenging due to the increased task discrepancy introduced by the additional visual input. Although vision-language pre-training has been widely studied, vision-language instruction tuning remains relatively less explored. In this paper, we conduct a systematic and comprehensive study on vision-language instruction tuning based on the pre-trained BLIP-2 models. We gather a wide variety of 26 publicly available datasets, transform them into instruction tuning format and categorize them into two clusters for held-in instruction tuning and held-out zero-shot evaluation. Additionally, we introduce instruction-aware visual feature extraction, a crucial method that enables the model to extract informative features tailored to the given instruction. The resulting InstructBLIP models achieve state-of-the-art zero-shot performance across all 13 held-out datasets, substantially outperforming BLIP-2 and the larger Flamingo. Our models also lead to state-of-the-art performance when finetuned on individual downstream tasks (e.g., 90.7% accuracy on ScienceQA IMG). Furthermore, we qualitatively demonstrate the advantages of InstructBLIP over concurrent multimodal models.</em>",_t,E,Zo,bt,ie,zo='InstructBLIPVideo architecture. Taken from the <a href="https://arxiv.org/abs/2305.06500">original paper.</a>',vt,le,Uo=`This model was contributed by <a href="https://huggingface.co/RaushanTurganbay" rel="nofollow">RaushanTurganbay</a>.
The original code can be found <a href="https://github.com/salesforce/LAVIS/tree/main/projects/instructblip" rel="nofollow">here</a>.`,yt,de,It,ce,Fo="<li>The model was trained by sampling 4 frames per video, so it’s recommended to sample 4 frames</li>",Mt,me,Tt,j,pe,At,Ne,No=`<a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</a> is the configuration class to store the configuration of a
<a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoForConditionalGeneration">InstructBlipVideoForConditionalGeneration</a>. It is used to instantiate a Instructblipvideo model according to the specified
arguments, defining the vision model, Q-Former model and language model configs. Instantiating a configuration with
the defaults will yield a similar configuration to that of the Instructblipvideo
<a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a> architecture.`,Xt,Ge,Go=`Configuration objects inherit from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ht,L,Yt,S,ue,Dt,Pe,Po=`Instantiate a <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</a> (or a derived class) from a Instructblipvideo vision model, Q-Former and
language model configurations.`,wt,fe,Bt,x,ge,Ot,qe,qo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionModel">InstructBlipVideoVisionModel</a>. It is used to
instantiate a Instructblipvideo vision encoder according to the specified arguments, defining the model architecture.
Instantiating a configuration defaults will yield a similar configuration to that of the Instructblipvideo
<a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a> architecture.`,Kt,Re,Ro=`Configuration objects inherit from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,eo,A,Vt,he,jt,k,_e,to,Qe,Qo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerModel">InstructBlipVideoQFormerModel</a>. It is used to
instantiate a Instructblipvideo Querying Transformer (Q-Former) 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 Instructblipvideo <a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a>
architecture. Configuration objects inherit from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs.
Read the documentation from <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,oo,Ee,Eo='Note that <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerModel">InstructBlipVideoQFormerModel</a> is very similar to <a href="/docs/transformers/pr_30079/en/model_doc/bert#transformers.BertLMHeadModel">BertLMHeadModel</a> with interleaved cross-attention.',no,X,$t,be,Ct,$,ve,so,Le,Lo=`Constructs an InstructBLIPVideo processor which wraps a InstructBLIP image processor and a LLaMa/T5 tokenizer into a single
processor.`,ro,Se,So=`<a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a> offers all the functionalities of <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoImageProcessor">InstructBlipVideoImageProcessor</a> and <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See the
docstring of <code>__call__()</code> and <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor.decode">decode()</a> for more information.`,ao,H,ye,io,Ae,Ao=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,lo,Y,Ie,co,Xe,Xo=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Jt,Me,xt,F,Te,mo,He,Ho="Constructs a InstructBLIPVideo image processor.",po,D,we,uo,Ye,Yo="Preprocess a video or batch of images/videos.",kt,Be,Wt,Q,Ve,fo,q,je,go,De,Do='The <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionModel">InstructBlipVideoVisionModel</a> forward method, overrides the <code>__call__</code> special method.',ho,O,Zt,$e,zt,N,Ce,_o,Oe,Oo=`Querying Transformer (Q-Former), used in Instructblipvideo. Slightly modified from BLIP-2 as it also takes the
instruction as input.`,bo,R,Je,vo,Ke,Ko=`encoder_hidden_states  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,yo,et,en=`<li>1 for tokens that are <strong>not masked</strong>,</li> <li>0 for tokens that are <strong>masked</strong>.
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of:
shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>): Contains precomputed key and
value hidden states of the attention blocks. Can be used to speed up decoding. If <code>past_key_values</code> are
used, the user can optionally input only the last <code>decoder_input_ids</code> (those that don’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>.
use_cache (<code>bool</code>, <em>optional</em>):
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>).</li>`,Ut,xe,Ft,w,ke,Io,tt,tn=`Instructblipvideo Model for generating text given an image and an optional text prompt. The model consists of a vision
encoder, Querying Transformer (Q-Former) and a language model.`,Mo,ot,on=`One can optionally pass <code>input_ids</code> to the model, which serve as a text prompt, to make the language model continue
the prompt. Otherwise, the language model starts generating text from the [BOS] (beginning-of-sequence) token.`,To,nt,nn=`This model inherits from <a href="/docs/transformers/pr_30079/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.)`,wo,st,sn=`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.`,Bo,z,We,Vo,rt,rn='The <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoForConditionalGeneration">InstructBlipVideoForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',jo,K,$o,ee,Co,te,Ze,Jo,at,an="Overrides <code>generate</code> function to be able to use the model as a conditional generator.",Nt,ze,Gt,pt,Pt;return y=new U({props:{title:"InstructBlipVideo",local:"instructblipvideo",headingTag:"h1"}}),I=new U({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ne=new U({props:{title:"Overview",local:"overview",headingTag:"h2"}}),de=new U({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),me=new U({props:{title:"InstructBlipVideoConfig",local:"transformers.InstructBlipVideoConfig",headingTag:"h2"}}),pe=new V({props:{name:"class transformers.InstructBlipVideoConfig",anchor:"transformers.InstructBlipVideoConfig",parameters:[{name:"vision_config",val:" = None"},{name:"qformer_config",val:" = None"},{name:"text_config",val:" = None"},{name:"num_query_tokens",val:" = 32"},{name:"video_token_index",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionConfig">InstructBlipVideoVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.InstructBlipVideoConfig.qformer_config",description:`<strong>qformer_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerConfig">InstructBlipVideoQFormerConfig</a>.`,name:"qformer_config"},{anchor:"transformers.InstructBlipVideoConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize any <a href="/docs/transformers/pr_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.`,name:"text_config"},{anchor:"transformers.InstructBlipVideoConfig.num_query_tokens",description:`<strong>num_query_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of query tokens passed through the Transformer.`,name:"num_query_tokens"},{anchor:"transformers.InstructBlipVideoConfig.video_token_index",description:`<strong>video_token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Token index of special video token.`,name:"video_token_index"},{anchor:"transformers.InstructBlipVideoConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L258"}}),L=new Lt({props:{anchor:"transformers.InstructBlipVideoConfig.example",$$slots:{default:[hn]},$$scope:{ctx:C}}}),ue=new V({props:{name:"from_vision_qformer_text_configs",anchor:"transformers.InstructBlipVideoConfig.from_vision_qformer_text_configs",parameters:[{name:"vision_config",val:": InstructBlipVideoVisionConfig"},{name:"qformer_config",val:": InstructBlipVideoQFormerConfig"},{name:"text_config",val:": PretrainedConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L354",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig"
>InstructBlipVideoConfig</a></p>
`}}),fe=new U({props:{title:"InstructBlipVideoVisionConfig",local:"transformers.InstructBlipVideoVisionConfig",headingTag:"h2"}}),ge=new V({props:{name:"class transformers.InstructBlipVideoVisionConfig",anchor:"transformers.InstructBlipVideoVisionConfig",parameters:[{name:"hidden_size",val:" = 1408"},{name:"intermediate_size",val:" = 6144"},{name:"num_hidden_layers",val:" = 39"},{name:"num_attention_heads",val:" = 16"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 14"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 1e-10"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1408) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 39) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.InstructBlipVideoVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.InstructBlipVideoVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 14) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;gelu&quot;</code> are supported. to 1e-5): The epsilon used by the layer
normalization layers.`,name:"hidden_act"},{anchor:"transformers.InstructBlipVideoVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.InstructBlipVideoVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.InstructBlipVideoVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-10) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.InstructBlipVideoVisionConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries and values in the self-attention layers.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L36"}}),A=new Lt({props:{anchor:"transformers.InstructBlipVideoVisionConfig.example",$$slots:{default:[_n]},$$scope:{ctx:C}}}),he=new U({props:{title:"InstructBlipVideoQFormerConfig",local:"transformers.InstructBlipVideoQFormerConfig",headingTag:"h2"}}),_e=new V({props:{name:"class transformers.InstructBlipVideoQFormerConfig",anchor:"transformers.InstructBlipVideoQFormerConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"cross_attention_frequency",val:" = 2"},{name:"encoder_hidden_size",val:" = 1408"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoQFormerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Q-Former model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling the model.`,name:"vocab_size"},{anchor:"transformers.InstructBlipVideoQFormerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.InstructBlipVideoQFormerConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.InstructBlipVideoQFormerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.InstructBlipVideoQFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.InstructBlipVideoQFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.InstructBlipVideoQFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.InstructBlipVideoQFormerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.InstructBlipVideoQFormerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.InstructBlipVideoQFormerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.InstructBlipVideoQFormerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.InstructBlipVideoQFormerConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Token id used for padding sequences.`,name:"pad_token_id"},{anchor:"transformers.InstructBlipVideoQFormerConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.InstructBlipVideoQFormerConfig.cross_attention_frequency",description:`<strong>cross_attention_frequency</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The frequency of adding cross-attention to the Transformer layers.`,name:"cross_attention_frequency"},{anchor:"transformers.InstructBlipVideoQFormerConfig.encoder_hidden_size",description:`<strong>encoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1408) &#x2014;
The hidden size of the hidden states for cross-attention.`,name:"encoder_hidden_size"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L137"}}),X=new Lt({props:{anchor:"transformers.InstructBlipVideoQFormerConfig.example",$$slots:{default:[bn]},$$scope:{ctx:C}}}),be=new U({props:{title:"InstructBlipVideoProcessor",local:"transformers.InstructBlipVideoProcessor",headingTag:"h2"}}),ve=new V({props:{name:"class transformers.InstructBlipVideoProcessor",anchor:"transformers.InstructBlipVideoProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""},{name:"qformer_tokenizer",val:""},{name:"num_query_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoProcessor.image_processor",description:`<strong>image_processor</strong> (<code>InstructBlipVideoImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoImageProcessor">InstructBlipVideoImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.InstructBlipVideoProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;\nAn instance of [&#x2018;PreTrainedTokenizer`]. The tokenizer is a required input.",name:"tokenizer"},{anchor:"transformers.InstructBlipVideoProcessor.qformer_tokenizer",description:"<strong>qformer_tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;\nAn instance of [&#x2018;PreTrainedTokenizer`]. The Q-Former tokenizer is a required input.",name:"qformer_tokenizer"},{anchor:"transformers.InstructBlipVideoProcessor.num_query_tokens",description:`<strong>num_query_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of tokens used by the Qformer as queries, should be same as in model&#x2019;s config.`,name:"num_query_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L40"}}),ye=new V({props:{name:"batch_decode",anchor:"transformers.InstructBlipVideoProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L180"}}),Ie=new V({props:{name:"decode",anchor:"transformers.InstructBlipVideoProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L188"}}),Me=new U({props:{title:"InstructBlipVideoImageProcessor",local:"transformers.InstructBlipVideoImageProcessor",headingTag:"h2"}}),Te=new V({props:{name:"class transformers.InstructBlipVideoImageProcessor",anchor:"transformers.InstructBlipVideoImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.InstructBlipVideoImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 384, &quot;width&quot;: 384}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.InstructBlipVideoImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can be
overridden by the <code>resample</code> parameter in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.InstructBlipVideoImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the
<code>do_rescale</code> parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.InstructBlipVideoImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>. Can be
overridden by the <code>rescale_factor</code> parameter in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.InstructBlipVideoImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.InstructBlipVideoImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method. Can be
overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.InstructBlipVideoImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.InstructBlipVideoImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/image_processing_instructblipvideo.py#L67"}}),we=new V({props:{name:"preprocess",anchor:"transformers.InstructBlipVideoImageProcessor.preprocess",parameters:[{name:"images",val:": Union = None"},{name:"do_resize",val:": Optional = None"},{name:"size",val:": Optional = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": Optional = None"},{name:"rescale_factor",val:": Optional = None"},{name:"do_normalize",val:": Optional = None"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"return_tensors",val:": Union = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = None"}],parametersDescription:[{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.videos",description:`<strong>videos</strong> (<code>VideoInput</code>) &#x2014;
Video frames to preprocess. Expects a single or batch of videos as a list of frames with pixel values
ranging from 0 to 255. If passing in video with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"videos"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the video.`,name:"do_resize"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Controls the size of the video after <code>resize</code>. The shortest edge of the image is resized to
<code>size[&quot;shortest_edge&quot;]</code> whilst preserving the aspect ratio. If the longest edge of this resized image
is &gt; <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>, then the image is resized again to make the longest
edge equal to <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>.`,name:"size"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the video. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the video values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the video by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the video.`,name:"do_normalize"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to normalize the video by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to normalize the video by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.InstructBlipVideoImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/image_processing_instructblipvideo.py#L182"}}),Be=new U({props:{title:"InstructBlipVideoVisionModel",local:"transformers.InstructBlipVideoVisionModel",headingTag:"h2"}}),Ve=new V({props:{name:"class transformers.InstructBlipVideoVisionModel",anchor:"transformers.InstructBlipVideoVisionModel",parameters:[{name:"config",val:": InstructBlipVideoVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L543"}}),je=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoVisionModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.InstructBlipVideoVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See
<code>InstructBlipVideoProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.InstructBlipVideoVisionModel.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.InstructBlipVideoVisionModel.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.InstructBlipVideoVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.InstructBlipVideoVisionModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L558",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><a
  href="/docs/transformers/pr_30079/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),O=new ln({props:{$$slots:{default:[vn]},$$scope:{ctx:C}}}),$e=new U({props:{title:"InstructBlipVideoQFormerModel",local:"transformers.InstructBlipVideoQFormerModel",headingTag:"h2"}}),Ce=new V({props:{name:"class transformers.InstructBlipVideoQFormerModel",anchor:"transformers.InstructBlipVideoQFormerModel",parameters:[{name:"config",val:": InstructBlipVideoQFormerConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1089"}}),Je=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoQFormerModel.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"query_embeds",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",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"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1162"}}),xe=new U({props:{title:"InstructBlipVideoForConditionalGeneration",local:"transformers.InstructBlipVideoForConditionalGeneration",headingTag:"h2"}}),ke=new V({props:{name:"class transformers.InstructBlipVideoForConditionalGeneration",anchor:"transformers.InstructBlipVideoForConditionalGeneration",parameters:[{name:"config",val:": InstructBlipVideoConfig"}],parametersDescription:[{anchor:"transformers.InstructBlipVideoForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_30079/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1285"}}),We=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"qformer_input_ids",val:": FloatTensor"},{name:"qformer_attention_mask",val:": Optional = None"},{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See
<code>InstructBlipVideoProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.qformer_input_ids",description:`<strong>qformer_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary of the Q-Former. Input tokens can optionally be provided
to serve as text prompt, which the Q-Former model will encode.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See <code>InstructBlipVideoProcessor.__call__()</code> for
details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"qformer_input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.qformer_attention_mask",description:`<strong>qformer_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"qformer_attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary of the language model. Input tokens can optionally be
provided to serve as text prompt, which the language model can continue.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See <code>InstructBlipVideoProcessor.__call__()</code> for
details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of the language model. Only relevant in case an
encoder-decoder language model (like T5) is used.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#decoder-input-ids">What are decoder input IDs?</a>`,name:"decoder_input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>Only relevant in case an encoder-decoder language model (like T5) is used.`,name:"decoder_attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.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.InstructBlipVideoForConditionalGeneration.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.InstructBlipVideoForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size - 1]</code>. All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1372",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.instructblipvideo.modeling_instructblipvideo.InstructBlipVideoForConditionalGenerationModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.instructblipvideo.configuration_instructblipvideo.InstructBlipVideoVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) — Language modeling loss from the language model.</li>
<li><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 of the language model.</li>
<li><strong>vision_outputs</strong> (<code>BaseModelOutputWithPooling</code>) — Outputs of the vision encoder.</li>
<li><strong>qformer_outputs</strong> (<code>BaseModelOutputWithPoolingAndCrossAttentions</code>) — Outputs of the Q-Former (Querying Transformer).</li>
<li><strong>language_model_outputs</strong> (<code>CausalLMOutputWithPast</code> or <code>Seq2SeqLMOutput</code>) — Outputs of the language model.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.instructblipvideo.modeling_instructblipvideo.InstructBlipVideoForConditionalGenerationModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),K=new ln({props:{$$slots:{default:[yn]},$$scope:{ctx:C}}}),ee=new Lt({props:{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.example",$$slots:{default:[In]},$$scope:{ctx:C}}}),Ze=new V({props:{name:"generate",anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"qformer_input_ids",val:": Optional = None"},{name:"qformer_attention_mask",val:": Optional = None"},{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"},{name:"**generate_kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape (batch_size, num_channels, height, width) or &#x2014;
(batch_size, num_frames, num_channels, height, width)): Input images or videos to be processed.
qformer_input_ids (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>):
The sequence used as a prompt to be fed to the Q-Former module.
qformer_attention_mask (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>):
Mask to avoid performing attention on padding token indices.
input_ids (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>):
The sequence used as a prompt for the generation.
attention_mask (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>):
Mask to avoid performing attention on padding token indices.
interpolate_pos_encoding (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to interpolate the positional encoding of the image embeddings.`,name:"pixel_values"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1575",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of strings of length batch_size * num_captions.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>captions (list)</p>
`}}),ze=new gn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/instructblipvideo.md"}}),{c(){i=d("meta"),M=n(),b=d("p"),m=n(),p(y.$$.fragment),a=n(),p(I.$$.fragment),ut=n(),p(ne.$$.fragment),ft=n(),se=d("p"),se.innerHTML=xo,gt=n(),re=d("p"),re.textContent=ko,ht=n(),ae=d("p"),ae.innerHTML=Wo,_t=n(),E=d("img"),bt=n(),ie=d("small"),ie.innerHTML=zo,vt=n(),le=d("p"),le.innerHTML=Uo,yt=n(),p(de.$$.fragment),It=n(),ce=d("ul"),ce.innerHTML=Fo,Mt=n(),p(me.$$.fragment),Tt=n(),j=d("div"),p(pe.$$.fragment),At=n(),Ne=d("p"),Ne.innerHTML=No,Xt=n(),Ge=d("p"),Ge.innerHTML=Go,Ht=n(),p(L.$$.fragment),Yt=n(),S=d("div"),p(ue.$$.fragment),Dt=n(),Pe=d("p"),Pe.innerHTML=Po,wt=n(),p(fe.$$.fragment),Bt=n(),x=d("div"),p(ge.$$.fragment),Ot=n(),qe=d("p"),qe.innerHTML=qo,Kt=n(),Re=d("p"),Re.innerHTML=Ro,eo=n(),p(A.$$.fragment),Vt=n(),p(he.$$.fragment),jt=n(),k=d("div"),p(_e.$$.fragment),to=n(),Qe=d("p"),Qe.innerHTML=Qo,oo=n(),Ee=d("p"),Ee.innerHTML=Eo,no=n(),p(X.$$.fragment),$t=n(),p(be.$$.fragment),Ct=n(),$=d("div"),p(ve.$$.fragment),so=n(),Le=d("p"),Le.textContent=Lo,ro=n(),Se=d("p"),Se.innerHTML=So,ao=n(),H=d("div"),p(ye.$$.fragment),io=n(),Ae=d("p"),Ae.innerHTML=Ao,lo=n(),Y=d("div"),p(Ie.$$.fragment),co=n(),Xe=d("p"),Xe.innerHTML=Xo,Jt=n(),p(Me.$$.fragment),xt=n(),F=d("div"),p(Te.$$.fragment),mo=n(),He=d("p"),He.textContent=Ho,po=n(),D=d("div"),p(we.$$.fragment),uo=n(),Ye=d("p"),Ye.textContent=Yo,kt=n(),p(Be.$$.fragment),Wt=n(),Q=d("div"),p(Ve.$$.fragment),fo=n(),q=d("div"),p(je.$$.fragment),go=n(),De=d("p"),De.innerHTML=Do,ho=n(),p(O.$$.fragment),Zt=n(),p($e.$$.fragment),zt=n(),N=d("div"),p(Ce.$$.fragment),_o=n(),Oe=d("p"),Oe.textContent=Oo,bo=n(),R=d("div"),p(Je.$$.fragment),vo=n(),Ke=d("p"),Ke.innerHTML=Ko,yo=n(),et=d("ul"),et.innerHTML=en,Ut=n(),p(xe.$$.fragment),Ft=n(),w=d("div"),p(ke.$$.fragment),Io=n(),tt=d("p"),tt.textContent=tn,Mo=n(),ot=d("p"),ot.innerHTML=on,To=n(),nt=d("p"),nt.innerHTML=nn,wo=n(),st=d("p"),st.innerHTML=sn,Bo=n(),z=d("div"),p(We.$$.fragment),Vo=n(),rt=d("p"),rt.innerHTML=rn,jo=n(),p(K.$$.fragment),$o=n(),p(ee.$$.fragment),Co=n(),te=d("div"),p(Ze.$$.fragment),Jo=n(),at=d("p"),at.innerHTML=an,Nt=n(),p(ze.$$.fragment),Gt=n(),pt=d("p"),this.h()},l(e){const o=fn("svelte-u9bgzb",document.head);i=c(o,"META",{name:!0,content:!0}),o.forEach(t),M=s(e),b=c(e,"P",{}),B(b).forEach(t),m=s(e),u(y.$$.fragment,e),a=s(e),u(I.$$.fragment,e),ut=s(e),u(ne.$$.fragment,e),ft=s(e),se=c(e,"P",{"data-svelte-h":!0}),v(se)!=="svelte-1yas5ek"&&(se.innerHTML=xo),gt=s(e),re=c(e,"P",{"data-svelte-h":!0}),v(re)!=="svelte-vfdo9a"&&(re.textContent=ko),ht=s(e),ae=c(e,"P",{"data-svelte-h":!0}),v(ae)!=="svelte-g3w4hv"&&(ae.innerHTML=Wo),_t=s(e),E=c(e,"IMG",{src:!0,alt:!0,width:!0}),bt=s(e),ie=c(e,"SMALL",{"data-svelte-h":!0}),v(ie)!=="svelte-1odm781"&&(ie.innerHTML=zo),vt=s(e),le=c(e,"P",{"data-svelte-h":!0}),v(le)!=="svelte-1plrd7p"&&(le.innerHTML=Uo),yt=s(e),u(de.$$.fragment,e),It=s(e),ce=c(e,"UL",{"data-svelte-h":!0}),v(ce)!=="svelte-l3xryg"&&(ce.innerHTML=Fo),Mt=s(e),u(me.$$.fragment,e),Tt=s(e),j=c(e,"DIV",{class:!0});var W=B(j);u(pe.$$.fragment,W),At=s(W),Ne=c(W,"P",{"data-svelte-h":!0}),v(Ne)!=="svelte-g46iym"&&(Ne.innerHTML=No),Xt=s(W),Ge=c(W,"P",{"data-svelte-h":!0}),v(Ge)!=="svelte-1sp6tj7"&&(Ge.innerHTML=Go),Ht=s(W),u(L.$$.fragment,W),Yt=s(W),S=c(W,"DIV",{class:!0});var Ue=B(S);u(ue.$$.fragment,Ue),Dt=s(Ue),Pe=c(Ue,"P",{"data-svelte-h":!0}),v(Pe)!=="svelte-8150cn"&&(Pe.innerHTML=Po),Ue.forEach(t),W.forEach(t),wt=s(e),u(fe.$$.fragment,e),Bt=s(e),x=c(e,"DIV",{class:!0});var G=B(x);u(ge.$$.fragment,G),Ot=s(G),qe=c(G,"P",{"data-svelte-h":!0}),v(qe)!=="svelte-r8da96"&&(qe.innerHTML=qo),Kt=s(G),Re=c(G,"P",{"data-svelte-h":!0}),v(Re)!=="svelte-1sp6tj7"&&(Re.innerHTML=Ro),eo=s(G),u(A.$$.fragment,G),G.forEach(t),Vt=s(e),u(he.$$.fragment,e),jt=s(e),k=c(e,"DIV",{class:!0});var P=B(k);u(_e.$$.fragment,P),to=s(P),Qe=c(P,"P",{"data-svelte-h":!0}),v(Qe)!=="svelte-g7ho4a"&&(Qe.innerHTML=Qo),oo=s(P),Ee=c(P,"P",{"data-svelte-h":!0}),v(Ee)!=="svelte-1dmaala"&&(Ee.innerHTML=Eo),no=s(P),u(X.$$.fragment,P),P.forEach(t),$t=s(e),u(be.$$.fragment,e),Ct=s(e),$=c(e,"DIV",{class:!0});var Z=B($);u(ve.$$.fragment,Z),so=s(Z),Le=c(Z,"P",{"data-svelte-h":!0}),v(Le)!=="svelte-vkjqyr"&&(Le.textContent=Lo),ro=s(Z),Se=c(Z,"P",{"data-svelte-h":!0}),v(Se)!=="svelte-1y8u3l5"&&(Se.innerHTML=So),ao=s(Z),H=c(Z,"DIV",{class:!0});var Fe=B(H);u(ye.$$.fragment,Fe),io=s(Fe),Ae=c(Fe,"P",{"data-svelte-h":!0}),v(Ae)!=="svelte-1cqy99i"&&(Ae.innerHTML=Ao),Fe.forEach(t),lo=s(Z),Y=c(Z,"DIV",{class:!0});var qt=B(Y);u(Ie.$$.fragment,qt),co=s(qt),Xe=c(qt,"P",{"data-svelte-h":!0}),v(Xe)!=="svelte-13xze0c"&&(Xe.innerHTML=Xo),qt.forEach(t),Z.forEach(t),Jt=s(e),u(Me.$$.fragment,e),xt=s(e),F=c(e,"DIV",{class:!0});var it=B(F);u(Te.$$.fragment,it),mo=s(it),He=c(it,"P",{"data-svelte-h":!0}),v(He)!=="svelte-7qjslq"&&(He.textContent=Ho),po=s(it),D=c(it,"DIV",{class:!0});var Rt=B(D);u(we.$$.fragment,Rt),uo=s(Rt),Ye=c(Rt,"P",{"data-svelte-h":!0}),v(Ye)!=="svelte-llto5r"&&(Ye.textContent=Yo),Rt.forEach(t),it.forEach(t),kt=s(e),u(Be.$$.fragment,e),Wt=s(e),Q=c(e,"DIV",{class:!0});var Qt=B(Q);u(Ve.$$.fragment,Qt),fo=s(Qt),q=c(Qt,"DIV",{class:!0});var lt=B(q);u(je.$$.fragment,lt),go=s(lt),De=c(lt,"P",{"data-svelte-h":!0}),v(De)!=="svelte-y3vlqy"&&(De.innerHTML=Do),ho=s(lt),u(O.$$.fragment,lt),lt.forEach(t),Qt.forEach(t),Zt=s(e),u($e.$$.fragment,e),zt=s(e),N=c(e,"DIV",{class:!0});var dt=B(N);u(Ce.$$.fragment,dt),_o=s(dt),Oe=c(dt,"P",{"data-svelte-h":!0}),v(Oe)!=="svelte-1d58c7r"&&(Oe.textContent=Oo),bo=s(dt),R=c(dt,"DIV",{class:!0});var ct=B(R);u(Je.$$.fragment,ct),vo=s(ct),Ke=c(ct,"P",{"data-svelte-h":!0}),v(Ke)!=="svelte-1h74cdd"&&(Ke.innerHTML=Ko),yo=s(ct),et=c(ct,"UL",{"data-svelte-h":!0}),v(et)!=="svelte-1yyv1jy"&&(et.innerHTML=en),ct.forEach(t),dt.forEach(t),Ut=s(e),u(xe.$$.fragment,e),Ft=s(e),w=c(e,"DIV",{class:!0});var J=B(w);u(ke.$$.fragment,J),Io=s(J),tt=c(J,"P",{"data-svelte-h":!0}),v(tt)!=="svelte-hrl25d"&&(tt.textContent=tn),Mo=s(J),ot=c(J,"P",{"data-svelte-h":!0}),v(ot)!=="svelte-1ks26sg"&&(ot.innerHTML=on),To=s(J),nt=c(J,"P",{"data-svelte-h":!0}),v(nt)!=="svelte-1vfgzs5"&&(nt.innerHTML=nn),wo=s(J),st=c(J,"P",{"data-svelte-h":!0}),v(st)!=="svelte-hswkmf"&&(st.innerHTML=sn),Bo=s(J),z=c(J,"DIV",{class:!0});var oe=B(z);u(We.$$.fragment,oe),Vo=s(oe),rt=c(oe,"P",{"data-svelte-h":!0}),v(rt)!=="svelte-aadzak"&&(rt.innerHTML=rn),jo=s(oe),u(K.$$.fragment,oe),$o=s(oe),u(ee.$$.fragment,oe),oe.forEach(t),Co=s(J),te=c(J,"DIV",{class:!0});var Et=B(te);u(Ze.$$.fragment,Et),Jo=s(Et),at=c(Et,"P",{"data-svelte-h":!0}),v(at)!=="svelte-eq620n"&&(at.innerHTML=an),Et.forEach(t),J.forEach(t),Nt=s(e),u(ze.$$.fragment,e),Gt=s(e),pt=c(e,"P",{}),B(pt).forEach(t),this.h()},h(){T(i,"name","hf:doc:metadata"),T(i,"content",Tn),cn(E.src,Zo="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/instructblip_architecture.jpg")||T(E,"src",Zo),T(E,"alt","drawing"),T(E,"width","600"),T(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){r(document.head,i),l(e,M,o),l(e,b,o),l(e,m,o),f(y,e,o),l(e,a,o),f(I,e,o),l(e,ut,o),f(ne,e,o),l(e,ft,o),l(e,se,o),l(e,gt,o),l(e,re,o),l(e,ht,o),l(e,ae,o),l(e,_t,o),l(e,E,o),l(e,bt,o),l(e,ie,o),l(e,vt,o),l(e,le,o),l(e,yt,o),f(de,e,o),l(e,It,o),l(e,ce,o),l(e,Mt,o),f(me,e,o),l(e,Tt,o),l(e,j,o),f(pe,j,null),r(j,At),r(j,Ne),r(j,Xt),r(j,Ge),r(j,Ht),f(L,j,null),r(j,Yt),r(j,S),f(ue,S,null),r(S,Dt),r(S,Pe),l(e,wt,o),f(fe,e,o),l(e,Bt,o),l(e,x,o),f(ge,x,null),r(x,Ot),r(x,qe),r(x,Kt),r(x,Re),r(x,eo),f(A,x,null),l(e,Vt,o),f(he,e,o),l(e,jt,o),l(e,k,o),f(_e,k,null),r(k,to),r(k,Qe),r(k,oo),r(k,Ee),r(k,no),f(X,k,null),l(e,$t,o),f(be,e,o),l(e,Ct,o),l(e,$,o),f(ve,$,null),r($,so),r($,Le),r($,ro),r($,Se),r($,ao),r($,H),f(ye,H,null),r(H,io),r(H,Ae),r($,lo),r($,Y),f(Ie,Y,null),r(Y,co),r(Y,Xe),l(e,Jt,o),f(Me,e,o),l(e,xt,o),l(e,F,o),f(Te,F,null),r(F,mo),r(F,He),r(F,po),r(F,D),f(we,D,null),r(D,uo),r(D,Ye),l(e,kt,o),f(Be,e,o),l(e,Wt,o),l(e,Q,o),f(Ve,Q,null),r(Q,fo),r(Q,q),f(je,q,null),r(q,go),r(q,De),r(q,ho),f(O,q,null),l(e,Zt,o),f($e,e,o),l(e,zt,o),l(e,N,o),f(Ce,N,null),r(N,_o),r(N,Oe),r(N,bo),r(N,R),f(Je,R,null),r(R,vo),r(R,Ke),r(R,yo),r(R,et),l(e,Ut,o),f(xe,e,o),l(e,Ft,o),l(e,w,o),f(ke,w,null),r(w,Io),r(w,tt),r(w,Mo),r(w,ot),r(w,To),r(w,nt),r(w,wo),r(w,st),r(w,Bo),r(w,z),f(We,z,null),r(z,Vo),r(z,rt),r(z,jo),f(K,z,null),r(z,$o),f(ee,z,null),r(w,Co),r(w,te),f(Ze,te,null),r(te,Jo),r(te,at),l(e,Nt,o),f(ze,e,o),l(e,Gt,o),l(e,pt,o),Pt=!0},p(e,[o]){const W={};o&2&&(W.$$scope={dirty:o,ctx:e}),L.$set(W);const Ue={};o&2&&(Ue.$$scope={dirty:o,ctx:e}),A.$set(Ue);const G={};o&2&&(G.$$scope={dirty:o,ctx:e}),X.$set(G);const P={};o&2&&(P.$$scope={dirty:o,ctx:e}),O.$set(P);const Z={};o&2&&(Z.$$scope={dirty:o,ctx:e}),K.$set(Z);const Fe={};o&2&&(Fe.$$scope={dirty:o,ctx:e}),ee.$set(Fe)},i(e){Pt||(g(y.$$.fragment,e),g(I.$$.fragment,e),g(ne.$$.fragment,e),g(de.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),g(L.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(A.$$.fragment,e),g(he.$$.fragment,e),g(_e.$$.fragment,e),g(X.$$.fragment,e),g(be.$$.fragment,e),g(ve.$$.fragment,e),g(ye.$$.fragment,e),g(Ie.$$.fragment,e),g(Me.$$.fragment,e),g(Te.$$.fragment,e),g(we.$$.fragment,e),g(Be.$$.fragment,e),g(Ve.$$.fragment,e),g(je.$$.fragment,e),g(O.$$.fragment,e),g($e.$$.fragment,e),g(Ce.$$.fragment,e),g(Je.$$.fragment,e),g(xe.$$.fragment,e),g(ke.$$.fragment,e),g(We.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(Ze.$$.fragment,e),g(ze.$$.fragment,e),Pt=!0)},o(e){h(y.$$.fragment,e),h(I.$$.fragment,e),h(ne.$$.fragment,e),h(de.$$.fragment,e),h(me.$$.fragment,e),h(pe.$$.fragment,e),h(L.$$.fragment,e),h(ue.$$.fragment,e),h(fe.$$.fragment,e),h(ge.$$.fragment,e),h(A.$$.fragment,e),h(he.$$.fragment,e),h(_e.$$.fragment,e),h(X.$$.fragment,e),h(be.$$.fragment,e),h(ve.$$.fragment,e),h(ye.$$.fragment,e),h(Ie.$$.fragment,e),h(Me.$$.fragment,e),h(Te.$$.fragment,e),h(we.$$.fragment,e),h(Be.$$.fragment,e),h(Ve.$$.fragment,e),h(je.$$.fragment,e),h(O.$$.fragment,e),h($e.$$.fragment,e),h(Ce.$$.fragment,e),h(Je.$$.fragment,e),h(xe.$$.fragment,e),h(ke.$$.fragment,e),h(We.$$.fragment,e),h(K.$$.fragment,e),h(ee.$$.fragment,e),h(Ze.$$.fragment,e),h(ze.$$.fragment,e),Pt=!1},d(e){e&&(t(M),t(b),t(m),t(a),t(ut),t(ft),t(se),t(gt),t(re),t(ht),t(ae),t(_t),t(E),t(bt),t(ie),t(vt),t(le),t(yt),t(It),t(ce),t(Mt),t(Tt),t(j),t(wt),t(Bt),t(x),t(Vt),t(jt),t(k),t($t),t(Ct),t($),t(Jt),t(xt),t(F),t(kt),t(Wt),t(Q),t(Zt),t(zt),t(N),t(Ut),t(Ft),t(w),t(Nt),t(Gt),t(pt)),t(i),_(y,e),_(I,e),_(ne,e),_(de,e),_(me,e),_(pe),_(L),_(ue),_(fe,e),_(ge),_(A),_(he,e),_(_e),_(X),_(be,e),_(ve),_(ye),_(Ie),_(Me,e),_(Te),_(we),_(Be,e),_(Ve),_(je),_(O),_($e,e),_(Ce),_(Je),_(xe,e),_(ke),_(We),_(K),_(ee),_(Ze),_(ze,e)}}}const Tn='{"title":"InstructBlipVideo","local":"instructblipvideo","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"InstructBlipVideoConfig","local":"transformers.InstructBlipVideoConfig","sections":[],"depth":2},{"title":"InstructBlipVideoVisionConfig","local":"transformers.InstructBlipVideoVisionConfig","sections":[],"depth":2},{"title":"InstructBlipVideoQFormerConfig","local":"transformers.InstructBlipVideoQFormerConfig","sections":[],"depth":2},{"title":"InstructBlipVideoProcessor","local":"transformers.InstructBlipVideoProcessor","sections":[],"depth":2},{"title":"InstructBlipVideoImageProcessor","local":"transformers.InstructBlipVideoImageProcessor","sections":[],"depth":2},{"title":"InstructBlipVideoVisionModel","local":"transformers.InstructBlipVideoVisionModel","sections":[],"depth":2},{"title":"InstructBlipVideoQFormerModel","local":"transformers.InstructBlipVideoQFormerModel","sections":[],"depth":2},{"title":"InstructBlipVideoForConditionalGeneration","local":"transformers.InstructBlipVideoForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function wn(C){return mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kn extends pn{constructor(i){super(),un(this,i,wn,Mn,dn,{})}}export{kn as component};
