import{s as qn,o as Xn,n as L}from"../chunks/scheduler.25b97de1.js";import{S as En,i as Qn,g as c,s,r as h,A as Hn,h as m,f as l,c as r,j as x,u,x as y,k as $,y as a,a as p,v as g,d as f,t as _,w as M}from"../chunks/index.d9030fc9.js";import{T as Lt}from"../chunks/Tip.baa67368.js";import{D as C}from"../chunks/Docstring.ffac8efa.js";import{C as O}from"../chunks/CodeBlock.e6cd0d95.js";import{E as pt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as J,E as An}from"../chunks/EditOnGithub.91d95064.js";function Sn(v){let t,b="Mllama has an extra token used as a placeholder for image positions in the text. It means that input ids and an input embedding layer will have an extra token. But since the weights for input and output embeddings are not tied, the <code>lm_head</code> layer has one less token and will fail if you want to calculate loss on image tokens or apply some logit processors. In case you are training, make sure to mask out special <code>&quot;&lt;|image|&gt;&quot;</code> tokens in the <code>labels</code> as the model should not be trained on predicting them.",i,d,T="Otherwise if you see CUDA-side index erros when generating, use the below code to expand the <code>lm_head</code> by one more token.",o,w,D;return w=new O({props:{code:"b2xkX2VtYmVkZGluZ3MlMjAlM0QlMjBtb2RlbC5nZXRfb3V0cHV0X2VtYmVkZGluZ3MoKSUwQSUwQW51bV90b2tlbnMlMjAlM0QlMjBtb2RlbC52b2NhYl9zaXplJTIwJTJCJTIwMSUwQXJlc2l6ZWRfZW1iZWRkaW5ncyUyMCUzRCUyMG1vZGVsLl9nZXRfcmVzaXplZF9sbV9oZWFkKG9sZF9lbWJlZGRpbmdzJTJDJTIwbmV3X251bV90b2tlbnMlM0RudW1fdG9rZW5zJTJDJTIwbWVhbl9yZXNpemluZyUzRFRydWUpJTBBcmVzaXplZF9lbWJlZGRpbmdzLnJlcXVpcmVzX2dyYWRfKG9sZF9lbWJlZGRpbmdzLndlaWdodC5yZXF1aXJlc19ncmFkKSUwQW1vZGVsLnNldF9vdXRwdXRfZW1iZWRkaW5ncyhyZXNpemVkX2VtYmVkZGluZ3Mp",highlighted:`old_embeddings = model.get_output_embeddings()

num_tokens = model.vocab_size + <span class="hljs-number">1</span>
resized_embeddings = model._get_resized_lm_head(old_embeddings, new_num_tokens=num_tokens, mean_resizing=<span class="hljs-literal">True</span>)
resized_embeddings.requires_grad_(old_embeddings.weight.requires_grad)
model.set_output_embeddings(resized_embeddings)`,wrap:!1}}),{c(){t=c("p"),t.innerHTML=b,i=s(),d=c("p"),d.innerHTML=T,o=s(),h(w.$$.fragment)},l(k){t=m(k,"P",{"data-svelte-h":!0}),y(t)!=="svelte-k28zha"&&(t.innerHTML=b),i=r(k),d=m(k,"P",{"data-svelte-h":!0}),y(d)!=="svelte-fofx85"&&(d.innerHTML=T),o=r(k),u(w.$$.fragment,k)},m(k,ee){p(k,t,ee),p(k,i,ee),p(k,d,ee),p(k,o,ee),g(w,k,ee),D=!0},p:L,i(k){D||(f(w.$$.fragment,k),D=!0)},o(k){_(w.$$.fragment,k),D=!1},d(k){k&&(l(t),l(i),l(d),l(o)),M(w,k)}}}function Yn(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyME1sbGFtYUNvbmZpZyUyQyUyME1sbGFtYVZpc2lvbkNvbmZpZyUyQyUyME1sbGFtYVRleHRDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ0xJUC12aXNpb24lMjBjb25maWclMEF2aXNpb25fY29uZmlnJTIwJTNEJTIwTWxsYW1hVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwTGxhbWElMjBjb25maWclMEF0ZXh0X2NvbmZpZyUyMCUzRCUyME1sbGFtYVRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtbGxhbWEtMTFiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyME1sbGFtYUNvbmZpZyh2aXNpb25fY29uZmlnJTJDJTIwdGV4dF9jb25maWcpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMG1sbGFtYS0xMWIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbihjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MllamaForConditionalGeneration, MllamaConfig, MllamaVisionConfig, MllamaTextConfig

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a mllama-11b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MllamaConfig(vision_config, text_config)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the mllama-11b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaForConditionalGeneration(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(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function On(v){let t,b;return t=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1sbGFtYVByb2Nlc3NvciUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQXByb2Nlc3NvciUyMCUzRCUyME1sbGFtYVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyKSUwQSUwQXByb2Nlc3NvciglMEElMjAlMjAlMjAlMjBpbWFnZXMlM0R5b3VyX3BpbF9pbWFnZSUyQyUwQSUyMCUyMCUyMCUyMHRleHQlM0QlNUIlMjIlM0MlN0NpbWFnZSU3QyUzRUlmJTIwSSUyMGhhZCUyMHRvJTIwd3JpdGUlMjBhJTIwaGFpa3UlMjBmb3IlMjB0aGlzJTIwb25lJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2VzX2t3YXJncyUyMCUzRCUyMCU3QiUyMnNpemUlMjIlM0ElMjAlN0IlMjJoZWlnaHQlMjIlM0ElMjA0NDglMkMlMjAlMjJ3aWR0aCUyMiUzQSUyMDQ0OCU3RCU3RCUyQyUwQSUyMCUyMCUyMCUyMHRleHRfa3dhcmdzJTIwJTNEJTIwJTdCJTIycGFkZGluZyUyMiUzQSUyMCUyMnJpZ2h0JTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwY29tbW9uX2t3YXJncyUyMCUzRCUyMCU3QiUyMnJldHVybl90ZW5zb3JzJTIyJTNBJTIwJTIycHQlMjIlN0QlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MllamaProcessor
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

processor = MllamaProcessor.from_pretrained(<span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision&quot;</span>)

processor(
    images=your_pil_image,
    text=[<span class="hljs-string">&quot;&lt;|image|&gt;If I had to write a haiku for this one&quot;</span>],
    images_kwargs = {<span class="hljs-string">&quot;size&quot;</span>: {<span class="hljs-string">&quot;height&quot;</span>: <span class="hljs-number">448</span>, <span class="hljs-string">&quot;width&quot;</span>: <span class="hljs-number">448</span>}},
    text_kwargs = {<span class="hljs-string">&quot;padding&quot;</span>: <span class="hljs-string">&quot;right&quot;</span>},
    common_kwargs = {<span class="hljs-string">&quot;return_tensors&quot;</span>: <span class="hljs-string">&quot;pt&quot;</span>},
)`,wrap:!1}}),{c(){h(t.$$.fragment)},l(i){u(t.$$.fragment,i)},m(i,d){g(t,i,d),b=!0},p:L,i(i){b||(f(t.$$.fragment,i),b=!0)},o(i){_(t.$$.fragment,i),b=!1},d(i){M(t,i)}}}function Dn(v){let t,b=`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(){t=c("p"),t.innerHTML=b},l(i){t=m(i,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(i,d){p(i,t,d)},p:L,d(i){i&&l(t)}}}function Kn(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJtZXRhLWxsYW1hJTJGTGxhbWEtMy4yLTExQi1WaXNpb24lMjIlMEFtb2RlbCUyMCUzRCUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMiUzQyU3Q2ltYWdlJTdDJTNFSWYlMjBJJTIwaGFkJTIwdG8lMjB3cml0ZSUyMGElMjBoYWlrdSUyMGZvciUyMHRoaXMlMjBvbmUlMjIlMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnd3dy5pbGFua2VsbWFuLm9yZyUyRnN0b3BzaWducyUyRmF1c3RyYWxpYS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRHByb21wdCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQW91dHB1dCUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxNSklMEElMEFwcm9tcHRfbGVuJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcy5zaGFwZSU1Qi0xJTVEJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG91dHB1dCU1QiUzQSUyQyUyMHByb21wdF9sZW4lM0ElNUQlMEFnZW5lcmF0ZWRfdGV4dCUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSUwQXByaW50KGdlbmVyYXRlZF90ZXh0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, MllamaForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaForConditionalGeneration.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;&lt;|image|&gt;If I had to write a haiku for this one&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://www.ilankelman.org/stopsigns/australia.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=prompt, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output = model.generate(**inputs, max_new_tokens=<span class="hljs-number">15</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_len = inputs.input_ids.shape[-<span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = output[:, prompt_len:]
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text)
[<span class="hljs-string">&#x27;, it would be:.\\\\nA stop sign in Chinatown.\\\\n&#x27;</span>]`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function ea(v){let t,b=`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(){t=c("p"),t.innerHTML=b},l(i){t=m(i,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(i,d){p(i,t,d)},p:L,d(i){i&&l(t)}}}function ta(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNbGxhbWFGb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwTWxsYW1hRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMklmJTIwSSUyMGhhZCUyMHRvJTIwd3JpdGUlMjBhJTIwaGFpa3UlMkMlMjBpdCUyMHdvdWxkJTIwYmUlM0ElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cy5pbnB1dF9pZHMlMkMlMjBtYXhfbGVuZ3RoJTNENDAlMkMlMjBkb19zYW1wbGUlM0RUcnVlJTJDJTIwdGVtcGVyYXR1cmUlM0QwLjYpJTBBcmVzdWx0JTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVEJTBBcHJpbnQocmVzdWx0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MllamaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaForCausalLM.from_pretrained(<span class="hljs-string">&quot;Llama-3.2-11B-Vision&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Llama-3.2-11B-Vision&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;If I had to write a haiku, it would be:&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">40</span>, do_sample=<span class="hljs-literal">True</span>, temperature=<span class="hljs-number">0.6</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>result = tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(result)
If I had to write a haiku, it would be: <span class="hljs-string">&quot;Snowflakes gently fall&quot;</span> - simple, yet peaceful.
I love the idea of snowflakes gently falling, each one`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function oa(v){let t,b=`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(){t=c("p"),t.innerHTML=b},l(i){t=m(i,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(i,d){p(i,t,d)},p:L,d(i){i&&l(t)}}}function na(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBNbGxhbWFUZXh0TW9kZWwlMEElMEFjaGVja3BvaW50JTIwJTNEJTIwJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyJTBBbW9kZWwlMjAlM0QlMjBNbGxhbWFUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEElMEF0ZXh0JTIwJTNEJTIwJTIyJTNDJTdDaW1hZ2UlN0MlM0VJZiUyMEklMjBoYWQlMjB0byUyMHdyaXRlJTIwYSUyMGhhaWt1JTIwZm9yJTIwdGhpcyUyMG9uZSUyMiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0JTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBcHJpbnQob3V0cHV0Lmxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, MllamaTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaTextModel.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;&lt;|image|&gt;If I had to write a haiku for this one&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>output = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output.last_hidden_state.shape)
torch.Size([<span class="hljs-number">1</span>, <span class="hljs-number">13</span>, <span class="hljs-number">4096</span>])`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function aa(v){let t,b=`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(){t=c("p"),t.innerHTML=b},l(i){t=m(i,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(i,d){p(i,t,d)},p:L,d(i){i&&l(t)}}}function sa(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNbGxhbWFGb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwTWxsYW1hRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkxsYW1hLTMuMi0xMUItVmlzaW9uJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMklmJTIwSSUyMGhhZCUyMHRvJTIwd3JpdGUlMjBhJTIwaGFpa3UlMkMlMjBpdCUyMHdvdWxkJTIwYmUlM0ElMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cy5pbnB1dF9pZHMlMkMlMjBtYXhfbGVuZ3RoJTNENDAlMkMlMjBkb19zYW1wbGUlM0RUcnVlJTJDJTIwdGVtcGVyYXR1cmUlM0QwLjYpJTBBcmVzdWx0JTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVEJTBBcHJpbnQocmVzdWx0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MllamaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaForCausalLM.from_pretrained(<span class="hljs-string">&quot;Llama-3.2-11B-Vision&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Llama-3.2-11B-Vision&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;If I had to write a haiku, it would be:&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">40</span>, do_sample=<span class="hljs-literal">True</span>, temperature=<span class="hljs-number">0.6</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>result = tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(result)
If I had to write a haiku, it would be: <span class="hljs-string">&quot;Snowflakes gently fall&quot;</span> - simple, yet peaceful.
I love the idea of snowflakes gently falling, each one`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function ra(v){let t,b=`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(){t=c("p"),t.innerHTML=b},l(i){t=m(i,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(i,d){p(i,t,d)},p:L,d(i){i&&l(t)}}}function la(v){let t,b="Example:",i,d,T;return d=new O({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyME1sbGFtYVZpc2lvbk1vZGVsJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMm1ldGEtbGxhbWElMkZMbGFtYS0zLjItMTFCLVZpc2lvbiUyMiUwQW1vZGVsJTIwJTNEJTIwTWxsYW1hVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnd3dy5pbGFua2VsbWFuLm9yZyUyRnN0b3BzaWducyUyRmF1c3RyYWxpYS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dCUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByaW50KG91dHB1dC5sYXN0X2hpZGRlbl9zdGF0ZS5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, MllamaVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MllamaVisionModel.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://www.ilankelman.org/stopsigns/australia.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>output = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output.last_hidden_state.shape)
torch.Size([<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">1025</span>, <span class="hljs-number">7680</span>])`,wrap:!1}}),{c(){t=c("p"),t.textContent=b,i=s(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=b),i=r(o),u(d.$$.fragment,o)},m(o,w){p(o,t,w),p(o,i,w),g(d,o,w),T=!0},p:L,i(o){T||(f(d.$$.fragment,o),T=!0)},o(o){_(d.$$.fragment,o),T=!1},d(o){o&&(l(t),l(i)),M(d,o)}}}function ia(v){let t,b,i,d,T,o,w,D,k,ee="The Llama 3.2-Vision collection of multimodal large language models (LLMs) is a collection of pretrained and instruction-tuned image reasoning generative models in 11B and 90B sizes (text + images in / text out). The Llama 3.2-Vision instruction-tuned models are optimized for visual recognition, image reasoning, captioning, and answering general questions about an image.",Rt,xe,un="<strong>Model Architecture:</strong> Llama 3.2-Vision is built on top of Llama 3.1 text-only model, which is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. To support image recognition tasks, the Llama 3.2-Vision model uses a separately trained vision adapter that integrates with the pre-trained Llama 3.1 language model. The adapter consists of a series of cross-attention layers that feed image encoder representations into the core LLM.",qt,$e,Xt,Ce,gn="<li>For image+text and text inputs use <code>MllamaForConditionalGeneration</code>.</li> <li>For text-only inputs use <code>MllamaForCausalLM</code> for generation to avoid loading vision tower.</li> <li>Each sample can contain multiple images, and the number of images can vary between samples. The processor will pad the inputs to the maximum number of images across samples and to a maximum number of tiles within each image.</li> <li>The text passed to the processor should have the <code>&quot;&lt;|image|&gt;&quot;</code> tokens where the images should be inserted.</li> <li>The processor has its own <code>apply_chat_template</code> method to convert chat messages to text that can then be passed as text to the processor.</li>",Et,te,Qt,Ue,Ht,ze,At,je,St,Ie,Yt,Je,Ot,Fe,Dt,z,We,_o,ht,fn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaForConditionalGeneration">MllamaForConditionalGeneration</a>. It is used to instantiate an
Mllama 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 Mllama-9B.`,Mo,ut,_n='e.g. <a href="https://huggingface.co/meta-llama/Llama-3.2-11B-Vision" rel="nofollow">meta-llama/Llama-3.2-11B-Vision</a>',bo,gt,Mn=`Configuration objects inherit from <a href="/docs/transformers/pr_22105/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_22105/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,yo,oe,Kt,Ze,eo,U,Be,To,ft,bn=`Constructs a Mllama processor which wraps <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a> and
<code>PretrainedTokenizerFast</code> into a single processor that inherits both the image processor and
tokenizer functionalities. See the <code>__call__()</code> and <a href="/docs/transformers/pr_22105/en/model_doc/owlvit#transformers.OwlViTProcessor.decode">decode()</a> for more
information.
The preferred way of passing kwargs is as a dictionary per modality, see usage example below.`,wo,ne,vo,ae,Pe,ko,_t,yn=`This method forwards all its arguments to PreTrainedTokenizerFast’s <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,xo,se,Ve,$o,Mt,Tn=`This method forwards all its arguments to PreTrainedTokenizerFast’s <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Co,re,Ge,Uo,bt,wn="Post-process the output of the model to decode the text.",to,Le,oo,j,Ne,zo,yt,vn="Constructs a Mllama image processor.",jo,le,Re,Io,Tt,kn=`Pad an image to the <code>size</code> x <code>aspect_ratio</code>. For example, if size is {height: 224, width: 224} and aspect ratio is
(1, 2), the image will be padded to 224x448.`,Jo,ie,qe,Fo,wt,xn="Preprocess a batch of images.",Wo,Y,Xe,Zo,vt,$n=`Resizes an image to fit within a tiled canvas while maintaining its aspect ratio.
The optimal canvas size is calculated based on the maximum number of tiles and the tile size.`,Bo,kt,Cn=`The function first determines the best tile arrangement for the image, then resizes the image
to fit within this canvas. The resized image and the number of tiles along the height and width
dimensions are returned.`,no,Ee,ao,F,Qe,Po,xt,Un=`The Mllama model which consists of a vision encoder and a language model.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,Vo,$t,zn=`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.`,Go,N,He,Lo,Ct,jn='The <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaForConditionalGeneration">MllamaForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',No,de,Ro,ce,so,Ae,ro,W,Se,qo,Ut,In=`The Mllama Text Model with a language modeling head on top.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,Xo,zt,Jn=`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.`,Eo,R,Ye,Qo,jt,Fn='The <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaForCausalLM">MllamaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Ho,me,Ao,pe,lo,Oe,io,Z,De,So,It,Wn=`The Mllama Text Model which consists of transformer with self and cross attention layers.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,Yo,Jt,Zn=`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.`,Oo,q,Ke,Do,Ft,Bn='The <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaTextModel">MllamaTextModel</a> forward method, overrides the <code>__call__</code> special method.',Ko,he,en,ue,co,et,mo,B,tt,tn,Wt,Pn=`The Mllama Text Model with a language modeling head on top.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,on,Zt,Vn=`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.`,nn,X,ot,an,Bt,Gn='The <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaForCausalLM">MllamaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',sn,ge,rn,fe,po,nt,ho,P,at,ln,Pt,Ln=`The Mllama Vision Model which consists of two vision encoders.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,dn,Vt,Nn=`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.`,cn,E,st,mn,Gt,Rn='The <a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaVisionModel">MllamaVisionModel</a> forward method, overrides the <code>__call__</code> special method.',pn,_e,hn,Me,uo,rt,go,Nt,fo;return T=new J({props:{title:"Mllama",local:"mllama",headingTag:"h1"}}),w=new J({props:{title:"Overview",local:"overview",headingTag:"h2"}}),$e=new J({props:{title:"Usage Tips",local:"usage-tips",headingTag:"h2"}}),te=new Lt({props:{warning:!0,$$slots:{default:[Sn]},$$scope:{ctx:v}}}),Ue=new J({props:{title:"Usage Example",local:"usage-example",headingTag:"h2"}}),ze=new J({props:{title:"Instruct model",local:"instruct-model",headingTag:"h4"}}),je=new O({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBNbGxhbWFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBBdXRvUHJvY2Vzc29yJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJtZXRhLWxsYW1hJTJGTGxhbWEtMy4yLTExQi1WaXNpb24tSW5zdHJ1Y3QlMjIlMEFtb2RlbCUyMCUzRCUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIyaW1hZ2UlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIydGV4dCUyMiUyQyUyMCUyMnRleHQlMjIlM0ElMjAlMjJXaGF0JTIwZG9lcyUyMHRoZSUyMGltYWdlJTIwc2hvdyUzRiUyMiU3RCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1RCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUwQSUyMCUyMCUyMCUyMCU1RCUyQyUwQSU1RCUwQXRleHQlMjAlM0QlMjBwcm9jZXNzb3IuYXBwbHlfY2hhdF90ZW1wbGF0ZShtZXNzYWdlcyUyQyUyMGFkZF9nZW5lcmF0aW9uX3Byb21wdCUzRFRydWUpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZsbGF2YS12bC5naXRodWIuaW8lMkZzdGF0aWMlMkZpbWFnZXMlMkZ2aWV3LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEdGV4dCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8obW9kZWwuZGV2aWNlKSUwQW91dHB1dCUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QyNSklMEFwcmludChwcm9jZXNzb3IuZGVjb2RlKG91dHB1dCU1QjAlNUQpKQ==",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MllamaForConditionalGeneration, AutoProcessor

model_id = <span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision-Instruct&quot;</span>
model = MllamaForConditionalGeneration.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>, torch_dtype=torch.bfloat16)
processor = AutoProcessor.from_pretrained(model_id)

messages = [
    [
        {
            <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, 
            <span class="hljs-string">&quot;content&quot;</span>: [
                {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>},
                {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;What does the image show?&quot;</span>}
            ]
        }
    ],
]
text = processor.apply_chat_template(messages, add_generation_prompt=<span class="hljs-literal">True</span>)

url = <span class="hljs-string">&quot;https://llava-vl.github.io/static/images/view.jpg&quot;</span>
image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

inputs = processor(text=text, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)
output = model.generate(**inputs, max_new_tokens=<span class="hljs-number">25</span>)
<span class="hljs-built_in">print</span>(processor.decode(output[<span class="hljs-number">0</span>]))`,wrap:!1}}),Ie=new J({props:{title:"Base model",local:"base-model",headingTag:"h4"}}),Je=new O({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBNbGxhbWFGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBBdXRvUHJvY2Vzc29yJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJtZXRhLWxsYW1hJTJGTGxhbWEtMy4yLTExQi1WaXNpb24lMjIlMEFtb2RlbCUyMCUzRCUyME1sbGFtYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyJTNDJTdDaW1hZ2UlN0MlM0VJZiUyMEklMjBoYWQlMjB0byUyMHdyaXRlJTIwYSUyMGhhaWt1JTIwZm9yJTIwdGhpcyUyMG9uZSUyMiUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGbGxhdmEtdmwuZ2l0aHViLmlvJTJGc3RhdGljJTJGaW1hZ2VzJTJGdmlldy5qcGclMjIlMEFyYXdfaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0Rwcm9tcHQlMkMlMjBpbWFnZXMlM0RyYXdfaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50byhtb2RlbC5kZXZpY2UpJTBBb3V0cHV0JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBkb19zYW1wbGUlM0RGYWxzZSUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMjUpJTBBcHJpbnQocHJvY2Vzc29yLmRlY29kZShvdXRwdXQlNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MllamaForConditionalGeneration, AutoProcessor

model_id = <span class="hljs-string">&quot;meta-llama/Llama-3.2-11B-Vision&quot;</span>
model = MllamaForConditionalGeneration.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>, torch_dtype=torch.bfloat16)
processor = AutoProcessor.from_pretrained(model_id)

prompt = <span class="hljs-string">&quot;&lt;|image|&gt;If I had to write a haiku for this one&quot;</span>
url = <span class="hljs-string">&quot;https://llava-vl.github.io/static/images/view.jpg&quot;</span>
raw_image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

inputs = processor(text=prompt, images=raw_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)
output = model.generate(**inputs, do_sample=<span class="hljs-literal">False</span>, max_new_tokens=<span class="hljs-number">25</span>)
<span class="hljs-built_in">print</span>(processor.decode(output[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))`,wrap:!1}}),Fe=new J({props:{title:"MllamaConfig",local:"transformers.MllamaConfig",headingTag:"h2"}}),We=new C({props:{name:"class transformers.MllamaConfig",anchor:"transformers.MllamaConfig",parameters:[{name:"vision_config",val:" = None"},{name:"text_config",val:" = None"},{name:"image_token_index",val:" = 128256"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MllamaConfig.vision_config",description:`<strong>vision_config</strong> (<code>Union[AutoConfig, dict]</code>, <em>optional</em>, defaults to <code>MllamaVisionConfig</code>) &#x2014;
The config object or dictionary of the vision backbone.`,name:"vision_config"},{anchor:"transformers.MllamaConfig.text_config",description:`<strong>text_config</strong> (<code>Union[AutoConfig, dict]</code>, <em>optional</em>, defaults to <code>MllamaTextConfig</code>) &#x2014;
The config object or dictionary of the text backbone.`,name:"text_config"},{anchor:"transformers.MllamaConfig.image_token_index",description:`<strong>image_token_index</strong> (<code>int</code>, <em>optional</em>, defaults to 128256) &#x2014;
The image token index to encode the image prompt.`,name:"image_token_index"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/configuration_mllama.py#L299"}}),oe=new pt({props:{anchor:"transformers.MllamaConfig.example",$$slots:{default:[Yn]},$$scope:{ctx:v}}}),Ze=new J({props:{title:"MllamaProcessor",local:"transformers.MllamaProcessor",headingTag:"h2"}}),Be=new C({props:{name:"class transformers.MllamaProcessor",anchor:"transformers.MllamaProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.MllamaProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.MllamaProcessor.tokenizer",description:`<strong>tokenizer</strong> ([<code>PreTrainedTokenizer</code>, <code>PreTrainedTokenizerFast</code>]) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/processing_mllama.py#L181"}}),ne=new pt({props:{anchor:"transformers.MllamaProcessor.example",$$slots:{default:[On]},$$scope:{ctx:v}}}),Pe=new C({props:{name:"batch_decode",anchor:"transformers.MllamaProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/processing_mllama.py#L336"}}),Ve=new C({props:{name:"decode",anchor:"transformers.MllamaProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/processing_mllama.py#L343"}}),Ge=new C({props:{name:"post_process_image_text_to_text",anchor:"transformers.MllamaProcessor.post_process_image_text_to_text",parameters:[{name:"generated_outputs",val:""}],parametersDescription:[{anchor:"transformers.MllamaProcessor.post_process_image_text_to_text.generated_outputs",description:`<strong>generated_outputs</strong> (<code>torch.Tensor</code> or <code>np.ndarray</code>) &#x2014;
The output of the model <code>generate</code> function. The output is expected to be a tensor of shape <code>(batch_size, sequence_length)</code>
or <code>(sequence_length,)</code>.`,name:"generated_outputs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/processing_mllama.py#L350",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decoded text.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[str]</code></p>
`}}),Le=new J({props:{title:"MllamaImageProcessor",local:"transformers.MllamaImageProcessor",headingTag:"h2"}}),Ne=new C({props:{name:"class transformers.MllamaImageProcessor",anchor:"transformers.MllamaImageProcessor",parameters:[{name:"do_convert_rgb",val:": bool = True"},{name:"do_resize",val:": bool = True"},{name:"size",val:": Optional = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": float = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"do_pad",val:": bool = True"},{name:"max_image_tiles",val:": int = 4"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MllamaImageProcessor.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. This is useful if the input image is of a different format e.g. RGBA.
Only has an effect if the input image is in the PIL format.`,name:"do_convert_rgb"},{anchor:"transformers.MllamaImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.MllamaImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image tile. Should be a dictionary containing &#x2018;height&#x2019; and &#x2018;width&#x2019; keys, both with integer values.
The height and width values should be equal.`,name:"size"},{anchor:"transformers.MllamaImageProcessor.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>Resampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.MllamaImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.MllamaImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.MllamaImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.MllamaImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.MllamaImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.MllamaImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to pad the images to the largest height and width in the batch.`,name:"do_pad"},{anchor:"transformers.MllamaImageProcessor.max_image_tiles",description:`<strong>max_image_tiles</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The maximum number of tiles to split the image into.`,name:"max_image_tiles"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/image_processing_mllama.py#L570"}}),Re=new C({props:{name:"pad",anchor:"transformers.MllamaImageProcessor.pad",parameters:[{name:"image",val:": ndarray"},{name:"size",val:": Dict"},{name:"aspect_ratio",val:": Tuple"},{name:"data_format",val:": Union = None"},{name:"input_data_format",val:": Union = None"}],parametersDescription:[{anchor:"transformers.MllamaImageProcessor.pad.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to resize.`,name:"image"},{anchor:"transformers.MllamaImageProcessor.pad.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>) &#x2014;
Size of the output image.`,name:"size"},{anchor:"transformers.MllamaImageProcessor.pad.aspect_ratio",description:`<strong>aspect_ratio</strong> (<code>Tuple[int, int]</code>) &#x2014;
The aspect ratio of the image.`,name:"aspect_ratio"},{anchor:"transformers.MllamaImageProcessor.pad.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"},{anchor:"transformers.MllamaImageProcessor.pad.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If not provided, it will be inferred.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/image_processing_mllama.py#L817",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The padded image.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>np.ndarray</code></p>
`}}),qe=new C({props:{name:"preprocess",anchor:"transformers.MllamaImageProcessor.preprocess",parameters:[{name:"images",val:": Union"},{name:"do_convert_rgb",val:": Optional = None"},{name:"do_resize",val:": Optional = None"},{name:"size",val:": Optional = None"},{name:"resample",val:": Optional = 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:"do_pad",val:": Optional = None"},{name:"max_image_tiles",val:": Optional = None"},{name:"input_data_format",val:": Union = None"},{name:"return_tensors",val:": Union = None"}],parametersDescription:[{anchor:"transformers.MllamaImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
A list of images to preprocess.`,name:"images"},{anchor:"transformers.MllamaImageProcessor.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.MllamaImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.MllamaImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image tile. Should be a dictionary containing &#x2018;height&#x2019; and &#x2018;width&#x2019; keys, both with integer values.
The height and width values should be equal.`,name:"size"},{anchor:"transformers.MllamaImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.MllamaImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.MllamaImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.MllamaImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.MllamaImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.MllamaImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.MllamaImageProcessor.preprocess.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_pad</code>) &#x2014;
Whether or not to pad the images to the largest height and width in the batch.`,name:"do_pad"},{anchor:"transformers.MllamaImageProcessor.preprocess.max_image_tiles",description:`<strong>max_image_tiles</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.max_image_tiles</code>) &#x2014;
The maximum number of tiles to split the image into.`,name:"max_image_tiles"},{anchor:"transformers.MllamaImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.MllamaImageProcessor.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"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/image_processing_mllama.py#L635",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><strong>pixel_values</strong> (<code>TensorType</code>): The preprocessed pixel values.</li>
<li><strong>aspect_ratio_ids</strong> (<code>TensorType</code>): The aspect ratio ids of the images.</li>
<li><strong>num_tiles</strong> (<code>List[List[int]]</code>): The number of tiles for each image in the batch.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>BatchFeature</code> of the following structure</p>
`}}),Xe=new C({props:{name:"resize",anchor:"transformers.MllamaImageProcessor.resize",parameters:[{name:"image",val:": ndarray"},{name:"size",val:": Dict"},{name:"max_image_tiles",val:": int"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"data_format",val:": Union = None"},{name:"input_data_format",val:": Union = None"}],parametersDescription:[{anchor:"transformers.MllamaImageProcessor.resize.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to resize.`,name:"image"},{anchor:"transformers.MllamaImageProcessor.resize.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>) &#x2014;
Size of the output image.`,name:"size"},{anchor:"transformers.MllamaImageProcessor.resize.max_image_tiles",description:`<strong>max_image_tiles</strong> (<code>int</code>) &#x2014;
The maximum number of tiles to split the image into.`,name:"max_image_tiles"},{anchor:"transformers.MllamaImageProcessor.resize.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use when resizing the image.`,name:"resample"},{anchor:"transformers.MllamaImageProcessor.resize.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"},{anchor:"transformers.MllamaImageProcessor.resize.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If not provided, it will be inferred.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/image_processing_mllama.py#L864",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The resized image and a tuple containing the number of tiles
along the height and width dimensions.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Union[np.ndarray, Tuple[int, int]]</code></p>
`}}),Ee=new J({props:{title:"MllamaForConditionalGeneration",local:"transformers.MllamaForConditionalGeneration",headingTag:"h2"}}),Qe=new C({props:{name:"class transformers.MllamaForConditionalGeneration",anchor:"transformers.MllamaForConditionalGeneration",parameters:[{name:"config",val:": MllamaConfig"}],parametersDescription:[{anchor:"transformers.MllamaForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig">MllamaConfig</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_22105/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_22105/src/transformers/models/mllama/modeling_mllama.py#L1968"}}),He=new C({props:{name:"forward",anchor:"transformers.MllamaForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"pixel_values",val:": Optional = None"},{name:"aspect_ratio_mask",val:": Optional = None"},{name:"aspect_ratio_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"cross_attention_mask",val:": Optional = None"},{name:"cross_attention_states",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"}],parametersDescription:[{anchor:"transformers.MllamaForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MllamaForConditionalGeneration.forward.pixel_values",description:'<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles, channels, image_size, image_size)) -- The tensors corresponding to the input images. Pixel values can be obtained using [AutoImageProcessor](/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor). See [MllamaImageProcessor.__call__()](/docs/transformers/pr_22105/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__) for details ([]</code>MllamaProcessor`] uses\n<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.MllamaForConditionalGeneration.forward.aspect_ratio_mask",description:`<strong>aspect_ratio_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding tiles. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tiles that are <strong>not masked</strong>,</li>
<li>0 for tiles that are <strong>masked</strong>.</li>
</ul>`,name:"aspect_ratio_mask"},{anchor:"transformers.MllamaForConditionalGeneration.forward.aspect_ratio_ids",description:`<strong>aspect_ratio_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images)</code>, <em>optional</em>) &#x2014;
Aspect ratio ids used to select the appropriate precomputed tile embeddings based on the aspect ratio of each input image.
These ids correspond to indices in the model&#x2019;s list of supported aspect ratios, offset by 1.</p>
<p>For example, if the model supports aspect ratios [[1, 1], [1, 2], [2, 1]]:</p>
<ul>
<li>An image with aspect ratio [1, 1] would have ID 1</li>
<li>An image with aspect ratio [1, 2] would have ID 2</li>
<li>An image with aspect ratio [2, 1] would have ID 3</li>
</ul>
<p>The id 0 is reserved for padding (i.e., no image).</p>
<p>If an image has aspect ratio [1, 2], that means it was split into 2 tiles horizontally, and its <code>aspect_ratio_id</code> would be 2.`,name:"aspect_ratio_ids"},{anchor:"transformers.MllamaForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.MllamaForConditionalGeneration.forward.cross_attention_mask",description:`<strong>cross_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_length, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Cross-attention mask to control the interaction between text tokens and image tiles.
This 4D tensor defines which image tiles each text token should attend to.</p>
<p>For each text token (in seq_length):</p>
<ul>
<li>1 indicates the token <strong>should attend</strong> to the corresponding image tile</li>
<li>0 indicates the token <strong>should not attend</strong> to the corresponding image tile</li>
</ul>`,name:"cross_attention_mask"},{anchor:"transformers.MllamaForConditionalGeneration.forward.cross_attention_states",description:`<strong>cross_attention_states</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Output of the vision model, used for cross-attention. This tensor contains the processed image features that
the language model will attend to.`,name:"cross_attention_states"},{anchor:"transformers.MllamaForConditionalGeneration.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MllamaForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_22105/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MllamaForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MllamaForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MllamaForConditionalGeneration.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.MllamaForConditionalGeneration.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.MllamaForConditionalGeneration.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_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MllamaForConditionalGeneration.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/modeling_mllama.py#L2013",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig"
>MllamaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),de=new Lt({props:{$$slots:{default:[Dn]},$$scope:{ctx:v}}}),ce=new pt({props:{anchor:"transformers.MllamaForConditionalGeneration.forward.example",$$slots:{default:[Kn]},$$scope:{ctx:v}}}),Ae=new J({props:{title:"MllamaForCausalLM",local:"transformers.MllamaForCausalLM",headingTag:"h2"}}),Se=new C({props:{name:"class transformers.MllamaForCausalLM",anchor:"transformers.MllamaForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MllamaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig">MllamaConfig</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_22105/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_22105/src/transformers/models/mllama/modeling_mllama.py#L1835"}}),Ye=new C({props:{name:"forward",anchor:"transformers.MllamaForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"cross_attention_states",val:": Optional = None"},{name:"cross_attention_mask",val:": Optional = None"},{name:"full_text_row_masked_out_mask",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"**loss_kwargs",val:""}],parametersDescription:[{anchor:"transformers.MllamaForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MllamaForCausalLM.forward.pixel_values",description:'<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles, channels, image_size, image_size)) -- The tensors corresponding to the input images. Pixel values can be obtained using [AutoImageProcessor](/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor). See [MllamaImageProcessor.__call__()](/docs/transformers/pr_22105/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__) for details ([]</code>MllamaProcessor`] uses\n<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.MllamaForCausalLM.forward.aspect_ratio_mask",description:`<strong>aspect_ratio_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding tiles. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tiles that are <strong>not masked</strong>,</li>
<li>0 for tiles that are <strong>masked</strong>.</li>
</ul>`,name:"aspect_ratio_mask"},{anchor:"transformers.MllamaForCausalLM.forward.aspect_ratio_ids",description:`<strong>aspect_ratio_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images)</code>, <em>optional</em>) &#x2014;
Aspect ratio ids used to select the appropriate precomputed tile embeddings based on the aspect ratio of each input image.
These ids correspond to indices in the model&#x2019;s list of supported aspect ratios, offset by 1.</p>
<p>For example, if the model supports aspect ratios [[1, 1], [1, 2], [2, 1]]:</p>
<ul>
<li>An image with aspect ratio [1, 1] would have ID 1</li>
<li>An image with aspect ratio [1, 2] would have ID 2</li>
<li>An image with aspect ratio [2, 1] would have ID 3</li>
</ul>
<p>The id 0 is reserved for padding (i.e., no image).</p>
<p>If an image has aspect ratio [1, 2], that means it was split into 2 tiles horizontally, and its <code>aspect_ratio_id</code> would be 2.`,name:"aspect_ratio_ids"},{anchor:"transformers.MllamaForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.MllamaForCausalLM.forward.cross_attention_mask",description:`<strong>cross_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_length, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Cross-attention mask to control the interaction between text tokens and image tiles.
This 4D tensor defines which image tiles each text token should attend to.</p>
<p>For each text token (in seq_length):</p>
<ul>
<li>1 indicates the token <strong>should attend</strong> to the corresponding image tile</li>
<li>0 indicates the token <strong>should not attend</strong> to the corresponding image tile</li>
</ul>`,name:"cross_attention_mask"},{anchor:"transformers.MllamaForCausalLM.forward.cross_attention_states",description:`<strong>cross_attention_states</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Output of the vision model, used for cross-attention. This tensor contains the processed image features that
the language model will attend to.`,name:"cross_attention_states"},{anchor:"transformers.MllamaForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MllamaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_22105/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MllamaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MllamaForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MllamaForCausalLM.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.MllamaForCausalLM.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.MllamaForCausalLM.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_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MllamaForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/modeling_mllama.py#L1871",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</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>MllamaTextConfig</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new Lt({props:{$$slots:{default:[ea]},$$scope:{ctx:v}}}),pe=new pt({props:{anchor:"transformers.MllamaForCausalLM.forward.example",$$slots:{default:[ta]},$$scope:{ctx:v}}}),Oe=new J({props:{title:"MllamaTextModel",local:"transformers.MllamaTextModel",headingTag:"h2"}}),De=new C({props:{name:"class transformers.MllamaTextModel",anchor:"transformers.MllamaTextModel",parameters:[{name:"config",val:": MllamaTextConfig"}],parametersDescription:[{anchor:"transformers.MllamaTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig">MllamaConfig</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_22105/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_22105/src/transformers/models/mllama/modeling_mllama.py#L1526"}}),Ke=new C({props:{name:"forward",anchor:"transformers.MllamaTextModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"cross_attention_states",val:": Optional = None"},{name:"cross_attention_mask",val:": Optional = None"},{name:"full_text_row_masked_out_mask",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",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"},{name:"cache_position",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.MllamaTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MllamaTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.MllamaTextModel.forward.cross_attention_mask",description:`<strong>cross_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_length, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Cross-attention mask to control the interaction between text tokens and image tiles.
This 4D tensor defines which image tiles each text token should attend to.</p>
<p>For each text token (in seq_length):</p>
<ul>
<li>1 indicates the token <strong>should attend</strong> to the corresponding image tile</li>
<li>0 indicates the token <strong>should not attend</strong> to the corresponding image tile</li>
</ul>`,name:"cross_attention_mask"},{anchor:"transformers.MllamaTextModel.forward.cross_attention_states",description:`<strong>cross_attention_states</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Output of the vision model, used for cross-attention. This tensor contains the processed image features that
the language model will attend to.`,name:"cross_attention_states"},{anchor:"transformers.MllamaTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MllamaTextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_22105/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MllamaTextModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MllamaTextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MllamaTextModel.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.MllamaTextModel.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.MllamaTextModel.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_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MllamaTextModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/modeling_mllama.py#L1560",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</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>MllamaTextConfig</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>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new Lt({props:{$$slots:{default:[oa]},$$scope:{ctx:v}}}),ue=new pt({props:{anchor:"transformers.MllamaTextModel.forward.example",$$slots:{default:[na]},$$scope:{ctx:v}}}),et=new J({props:{title:"MllamaForCausalLM",local:"transformers.MllamaForCausalLM",headingTag:"h2"}}),tt=new C({props:{name:"class transformers.MllamaForCausalLM",anchor:"transformers.MllamaForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MllamaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig">MllamaConfig</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_22105/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_22105/src/transformers/models/mllama/modeling_mllama.py#L1835"}}),ot=new C({props:{name:"forward",anchor:"transformers.MllamaForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"cross_attention_states",val:": Optional = None"},{name:"cross_attention_mask",val:": Optional = None"},{name:"full_text_row_masked_out_mask",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"**loss_kwargs",val:""}],parametersDescription:[{anchor:"transformers.MllamaForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MllamaForCausalLM.forward.pixel_values",description:'<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles, channels, image_size, image_size)) -- The tensors corresponding to the input images. Pixel values can be obtained using [AutoImageProcessor](/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor). See [MllamaImageProcessor.__call__()](/docs/transformers/pr_22105/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__) for details ([]</code>MllamaProcessor`] uses\n<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.MllamaForCausalLM.forward.aspect_ratio_mask",description:`<strong>aspect_ratio_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding tiles. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tiles that are <strong>not masked</strong>,</li>
<li>0 for tiles that are <strong>masked</strong>.</li>
</ul>`,name:"aspect_ratio_mask"},{anchor:"transformers.MllamaForCausalLM.forward.aspect_ratio_ids",description:`<strong>aspect_ratio_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images)</code>, <em>optional</em>) &#x2014;
Aspect ratio ids used to select the appropriate precomputed tile embeddings based on the aspect ratio of each input image.
These ids correspond to indices in the model&#x2019;s list of supported aspect ratios, offset by 1.</p>
<p>For example, if the model supports aspect ratios [[1, 1], [1, 2], [2, 1]]:</p>
<ul>
<li>An image with aspect ratio [1, 1] would have ID 1</li>
<li>An image with aspect ratio [1, 2] would have ID 2</li>
<li>An image with aspect ratio [2, 1] would have ID 3</li>
</ul>
<p>The id 0 is reserved for padding (i.e., no image).</p>
<p>If an image has aspect ratio [1, 2], that means it was split into 2 tiles horizontally, and its <code>aspect_ratio_id</code> would be 2.`,name:"aspect_ratio_ids"},{anchor:"transformers.MllamaForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.MllamaForCausalLM.forward.cross_attention_mask",description:`<strong>cross_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_length, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Cross-attention mask to control the interaction between text tokens and image tiles.
This 4D tensor defines which image tiles each text token should attend to.</p>
<p>For each text token (in seq_length):</p>
<ul>
<li>1 indicates the token <strong>should attend</strong> to the corresponding image tile</li>
<li>0 indicates the token <strong>should not attend</strong> to the corresponding image tile</li>
</ul>`,name:"cross_attention_mask"},{anchor:"transformers.MllamaForCausalLM.forward.cross_attention_states",description:`<strong>cross_attention_states</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Output of the vision model, used for cross-attention. This tensor contains the processed image features that
the language model will attend to.`,name:"cross_attention_states"},{anchor:"transformers.MllamaForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MllamaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_22105/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MllamaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MllamaForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.MllamaForCausalLM.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.MllamaForCausalLM.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.MllamaForCausalLM.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_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MllamaForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/modeling_mllama.py#L1871",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</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>MllamaTextConfig</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new Lt({props:{$$slots:{default:[aa]},$$scope:{ctx:v}}}),fe=new pt({props:{anchor:"transformers.MllamaForCausalLM.forward.example",$$slots:{default:[sa]},$$scope:{ctx:v}}}),nt=new J({props:{title:"MllamaVisionModel",local:"transformers.MllamaVisionModel",headingTag:"h2"}}),at=new C({props:{name:"class transformers.MllamaVisionModel",anchor:"transformers.MllamaVisionModel",parameters:[{name:"config",val:": MllamaVisionConfig"}],parametersDescription:[{anchor:"transformers.MllamaVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaConfig">MllamaConfig</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_22105/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_22105/src/transformers/models/mllama/modeling_mllama.py#L1311"}}),st=new C({props:{name:"forward",anchor:"transformers.MllamaVisionModel.forward",parameters:[{name:"pixel_values",val:": Tensor"},{name:"aspect_ratio_ids",val:": Tensor"},{name:"aspect_ratio_mask",val:": Tensor"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.MllamaVisionModel.forward.pixel_values",description:'<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles, channels, image_size, image_size)) -- The tensors corresponding to the input images. Pixel values can be obtained using [AutoImageProcessor](/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor). See [MllamaImageProcessor.__call__()](/docs/transformers/pr_22105/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__) for details ([]</code>MllamaProcessor`] uses\n<a href="/docs/transformers/pr_22105/en/model_doc/mllama#transformers.MllamaImageProcessor">MllamaImageProcessor</a> for processing images).',name:"pixel_values"},{anchor:"transformers.MllamaVisionModel.forward.aspect_ratio_mask",description:`<strong>aspect_ratio_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images, max_num_tiles)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding tiles. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tiles that are <strong>not masked</strong>,</li>
<li>0 for tiles that are <strong>masked</strong>.</li>
</ul>`,name:"aspect_ratio_mask"},{anchor:"transformers.MllamaVisionModel.forward.aspect_ratio_ids",description:`<strong>aspect_ratio_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, max_num_images)</code>, <em>optional</em>) &#x2014;
Aspect ratio ids used to select the appropriate precomputed tile embeddings based on the aspect ratio of each input image.
These ids correspond to indices in the model&#x2019;s list of supported aspect ratios, offset by 1.</p>
<p>For example, if the model supports aspect ratios [[1, 1], [1, 2], [2, 1]]:</p>
<ul>
<li>An image with aspect ratio [1, 1] would have ID 1</li>
<li>An image with aspect ratio [1, 2] would have ID 2</li>
<li>An image with aspect ratio [2, 1] would have ID 3</li>
</ul>
<p>The id 0 is reserved for padding (i.e., no image).</p>
<p>If an image has aspect ratio [1, 2], that means it was split into 2 tiles horizontally, and its <code>aspect_ratio_id</code> would be 2.`,name:"aspect_ratio_ids"},{anchor:"transformers.MllamaVisionModel.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.MllamaVisionModel.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.MllamaVisionModel.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_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mllama/modeling_mllama.py#L1368",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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>MllamaVisionConfig</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>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_22105/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_e=new Lt({props:{$$slots:{default:[ra]},$$scope:{ctx:v}}}),Me=new pt({props:{anchor:"transformers.MllamaVisionModel.forward.example",$$slots:{default:[la]},$$scope:{ctx:v}}}),rt=new An({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/mllama.md"}}),{c(){t=c("meta"),b=s(),i=c("p"),d=s(),h(T.$$.fragment),o=s(),h(w.$$.fragment),D=s(),k=c("p"),k.textContent=ee,Rt=s(),xe=c("p"),xe.innerHTML=un,qt=s(),h($e.$$.fragment),Xt=s(),Ce=c("ul"),Ce.innerHTML=gn,Et=s(),h(te.$$.fragment),Qt=s(),h(Ue.$$.fragment),Ht=s(),h(ze.$$.fragment),At=s(),h(je.$$.fragment),St=s(),h(Ie.$$.fragment),Yt=s(),h(Je.$$.fragment),Ot=s(),h(Fe.$$.fragment),Dt=s(),z=c("div"),h(We.$$.fragment),_o=s(),ht=c("p"),ht.innerHTML=fn,Mo=s(),ut=c("p"),ut.innerHTML=_n,bo=s(),gt=c("p"),gt.innerHTML=Mn,yo=s(),h(oe.$$.fragment),Kt=s(),h(Ze.$$.fragment),eo=s(),U=c("div"),h(Be.$$.fragment),To=s(),ft=c("p"),ft.innerHTML=bn,wo=s(),h(ne.$$.fragment),vo=s(),ae=c("div"),h(Pe.$$.fragment),ko=s(),_t=c("p"),_t.innerHTML=yn,xo=s(),se=c("div"),h(Ve.$$.fragment),$o=s(),Mt=c("p"),Mt.innerHTML=Tn,Co=s(),re=c("div"),h(Ge.$$.fragment),Uo=s(),bt=c("p"),bt.textContent=wn,to=s(),h(Le.$$.fragment),oo=s(),j=c("div"),h(Ne.$$.fragment),zo=s(),yt=c("p"),yt.textContent=vn,jo=s(),le=c("div"),h(Re.$$.fragment),Io=s(),Tt=c("p"),Tt.innerHTML=kn,Jo=s(),ie=c("div"),h(qe.$$.fragment),Fo=s(),wt=c("p"),wt.textContent=xn,Wo=s(),Y=c("div"),h(Xe.$$.fragment),Zo=s(),vt=c("p"),vt.textContent=$n,Bo=s(),kt=c("p"),kt.textContent=Cn,no=s(),h(Ee.$$.fragment),ao=s(),F=c("div"),h(Qe.$$.fragment),Po=s(),xt=c("p"),xt.innerHTML=Un,Vo=s(),$t=c("p"),$t.innerHTML=zn,Go=s(),N=c("div"),h(He.$$.fragment),Lo=s(),Ct=c("p"),Ct.innerHTML=jn,No=s(),h(de.$$.fragment),Ro=s(),h(ce.$$.fragment),so=s(),h(Ae.$$.fragment),ro=s(),W=c("div"),h(Se.$$.fragment),qo=s(),Ut=c("p"),Ut.innerHTML=In,Xo=s(),zt=c("p"),zt.innerHTML=Jn,Eo=s(),R=c("div"),h(Ye.$$.fragment),Qo=s(),jt=c("p"),jt.innerHTML=Fn,Ho=s(),h(me.$$.fragment),Ao=s(),h(pe.$$.fragment),lo=s(),h(Oe.$$.fragment),io=s(),Z=c("div"),h(De.$$.fragment),So=s(),It=c("p"),It.innerHTML=Wn,Yo=s(),Jt=c("p"),Jt.innerHTML=Zn,Oo=s(),q=c("div"),h(Ke.$$.fragment),Do=s(),Ft=c("p"),Ft.innerHTML=Bn,Ko=s(),h(he.$$.fragment),en=s(),h(ue.$$.fragment),co=s(),h(et.$$.fragment),mo=s(),B=c("div"),h(tt.$$.fragment),tn=s(),Wt=c("p"),Wt.innerHTML=Pn,on=s(),Zt=c("p"),Zt.innerHTML=Vn,nn=s(),X=c("div"),h(ot.$$.fragment),an=s(),Bt=c("p"),Bt.innerHTML=Gn,sn=s(),h(ge.$$.fragment),rn=s(),h(fe.$$.fragment),po=s(),h(nt.$$.fragment),ho=s(),P=c("div"),h(at.$$.fragment),ln=s(),Pt=c("p"),Pt.innerHTML=Ln,dn=s(),Vt=c("p"),Vt.innerHTML=Nn,cn=s(),E=c("div"),h(st.$$.fragment),mn=s(),Gt=c("p"),Gt.innerHTML=Rn,pn=s(),h(_e.$$.fragment),hn=s(),h(Me.$$.fragment),uo=s(),h(rt.$$.fragment),go=s(),Nt=c("p"),this.h()},l(e){const n=Hn("svelte-u9bgzb",document.head);t=m(n,"META",{name:!0,content:!0}),n.forEach(l),b=r(e),i=m(e,"P",{}),x(i).forEach(l),d=r(e),u(T.$$.fragment,e),o=r(e),u(w.$$.fragment,e),D=r(e),k=m(e,"P",{"data-svelte-h":!0}),y(k)!=="svelte-1w50ejb"&&(k.textContent=ee),Rt=r(e),xe=m(e,"P",{"data-svelte-h":!0}),y(xe)!=="svelte-1noqrap"&&(xe.innerHTML=un),qt=r(e),u($e.$$.fragment,e),Xt=r(e),Ce=m(e,"UL",{"data-svelte-h":!0}),y(Ce)!=="svelte-1twbff3"&&(Ce.innerHTML=gn),Et=r(e),u(te.$$.fragment,e),Qt=r(e),u(Ue.$$.fragment,e),Ht=r(e),u(ze.$$.fragment,e),At=r(e),u(je.$$.fragment,e),St=r(e),u(Ie.$$.fragment,e),Yt=r(e),u(Je.$$.fragment,e),Ot=r(e),u(Fe.$$.fragment,e),Dt=r(e),z=m(e,"DIV",{class:!0});var V=x(z);u(We.$$.fragment,V),_o=r(V),ht=m(V,"P",{"data-svelte-h":!0}),y(ht)!=="svelte-1ax2uyp"&&(ht.innerHTML=fn),Mo=r(V),ut=m(V,"P",{"data-svelte-h":!0}),y(ut)!=="svelte-8fyj87"&&(ut.innerHTML=_n),bo=r(V),gt=m(V,"P",{"data-svelte-h":!0}),y(gt)!=="svelte-1pjt8ff"&&(gt.innerHTML=Mn),yo=r(V),u(oe.$$.fragment,V),V.forEach(l),Kt=r(e),u(Ze.$$.fragment,e),eo=r(e),U=m(e,"DIV",{class:!0});var I=x(U);u(Be.$$.fragment,I),To=r(I),ft=m(I,"P",{"data-svelte-h":!0}),y(ft)!=="svelte-yq9fz2"&&(ft.innerHTML=bn),wo=r(I),u(ne.$$.fragment,I),vo=r(I),ae=m(I,"DIV",{class:!0});var lt=x(ae);u(Pe.$$.fragment,lt),ko=r(lt),_t=m(lt,"P",{"data-svelte-h":!0}),y(_t)!=="svelte-1tpgi93"&&(_t.innerHTML=yn),lt.forEach(l),xo=r(I),se=m(I,"DIV",{class:!0});var it=x(se);u(Ve.$$.fragment,it),$o=r(it),Mt=m(it,"P",{"data-svelte-h":!0}),y(Mt)!=="svelte-1tn5u91"&&(Mt.innerHTML=Tn),it.forEach(l),Co=r(I),re=m(I,"DIV",{class:!0});var dt=x(re);u(Ge.$$.fragment,dt),Uo=r(dt),bt=m(dt,"P",{"data-svelte-h":!0}),y(bt)!=="svelte-z5vbkk"&&(bt.textContent=wn),dt.forEach(l),I.forEach(l),to=r(e),u(Le.$$.fragment,e),oo=r(e),j=m(e,"DIV",{class:!0});var G=x(j);u(Ne.$$.fragment,G),zo=r(G),yt=m(G,"P",{"data-svelte-h":!0}),y(yt)!=="svelte-h03vcc"&&(yt.textContent=vn),jo=r(G),le=m(G,"DIV",{class:!0});var ct=x(le);u(Re.$$.fragment,ct),Io=r(ct),Tt=m(ct,"P",{"data-svelte-h":!0}),y(Tt)!=="svelte-dymnub"&&(Tt.innerHTML=kn),ct.forEach(l),Jo=r(G),ie=m(G,"DIV",{class:!0});var mt=x(ie);u(qe.$$.fragment,mt),Fo=r(mt),wt=m(mt,"P",{"data-svelte-h":!0}),y(wt)!=="svelte-1xds4wy"&&(wt.textContent=xn),mt.forEach(l),Wo=r(G),Y=m(G,"DIV",{class:!0});var K=x(Y);u(Xe.$$.fragment,K),Zo=r(K),vt=m(K,"P",{"data-svelte-h":!0}),y(vt)!=="svelte-zg52p1"&&(vt.textContent=$n),Bo=r(K),kt=m(K,"P",{"data-svelte-h":!0}),y(kt)!=="svelte-1tffesx"&&(kt.textContent=Cn),K.forEach(l),G.forEach(l),no=r(e),u(Ee.$$.fragment,e),ao=r(e),F=m(e,"DIV",{class:!0});var Q=x(F);u(Qe.$$.fragment,Q),Po=r(Q),xt=m(Q,"P",{"data-svelte-h":!0}),y(xt)!=="svelte-1jpuso6"&&(xt.innerHTML=Un),Vo=r(Q),$t=m(Q,"P",{"data-svelte-h":!0}),y($t)!=="svelte-hswkmf"&&($t.innerHTML=zn),Go=r(Q),N=m(Q,"DIV",{class:!0});var H=x(N);u(He.$$.fragment,H),Lo=r(H),Ct=m(H,"P",{"data-svelte-h":!0}),y(Ct)!=="svelte-16kcr3p"&&(Ct.innerHTML=jn),No=r(H),u(de.$$.fragment,H),Ro=r(H),u(ce.$$.fragment,H),H.forEach(l),Q.forEach(l),so=r(e),u(Ae.$$.fragment,e),ro=r(e),W=m(e,"DIV",{class:!0});var A=x(W);u(Se.$$.fragment,A),qo=r(A),Ut=m(A,"P",{"data-svelte-h":!0}),y(Ut)!=="svelte-1sbqee7"&&(Ut.innerHTML=In),Xo=r(A),zt=m(A,"P",{"data-svelte-h":!0}),y(zt)!=="svelte-hswkmf"&&(zt.innerHTML=Jn),Eo=r(A),R=m(A,"DIV",{class:!0});var S=x(R);u(Ye.$$.fragment,S),Qo=r(S),jt=m(S,"P",{"data-svelte-h":!0}),y(jt)!=="svelte-5nmitf"&&(jt.innerHTML=Fn),Ho=r(S),u(me.$$.fragment,S),Ao=r(S),u(pe.$$.fragment,S),S.forEach(l),A.forEach(l),lo=r(e),u(Oe.$$.fragment,e),io=r(e),Z=m(e,"DIV",{class:!0});var be=x(Z);u(De.$$.fragment,be),So=r(be),It=m(be,"P",{"data-svelte-h":!0}),y(It)!=="svelte-ty2c0h"&&(It.innerHTML=Wn),Yo=r(be),Jt=m(be,"P",{"data-svelte-h":!0}),y(Jt)!=="svelte-hswkmf"&&(Jt.innerHTML=Zn),Oo=r(be),q=m(be,"DIV",{class:!0});var ye=x(q);u(Ke.$$.fragment,ye),Do=r(ye),Ft=m(ye,"P",{"data-svelte-h":!0}),y(Ft)!=="svelte-bvpq0n"&&(Ft.innerHTML=Bn),Ko=r(ye),u(he.$$.fragment,ye),en=r(ye),u(ue.$$.fragment,ye),ye.forEach(l),be.forEach(l),co=r(e),u(et.$$.fragment,e),mo=r(e),B=m(e,"DIV",{class:!0});var Te=x(B);u(tt.$$.fragment,Te),tn=r(Te),Wt=m(Te,"P",{"data-svelte-h":!0}),y(Wt)!=="svelte-1sbqee7"&&(Wt.innerHTML=Pn),on=r(Te),Zt=m(Te,"P",{"data-svelte-h":!0}),y(Zt)!=="svelte-hswkmf"&&(Zt.innerHTML=Vn),nn=r(Te),X=m(Te,"DIV",{class:!0});var we=x(X);u(ot.$$.fragment,we),an=r(we),Bt=m(we,"P",{"data-svelte-h":!0}),y(Bt)!=="svelte-5nmitf"&&(Bt.innerHTML=Gn),sn=r(we),u(ge.$$.fragment,we),rn=r(we),u(fe.$$.fragment,we),we.forEach(l),Te.forEach(l),po=r(e),u(nt.$$.fragment,e),ho=r(e),P=m(e,"DIV",{class:!0});var ve=x(P);u(at.$$.fragment,ve),ln=r(ve),Pt=m(ve,"P",{"data-svelte-h":!0}),y(Pt)!=="svelte-1mddn7x"&&(Pt.innerHTML=Ln),dn=r(ve),Vt=m(ve,"P",{"data-svelte-h":!0}),y(Vt)!=="svelte-hswkmf"&&(Vt.innerHTML=Nn),cn=r(ve),E=m(ve,"DIV",{class:!0});var ke=x(E);u(st.$$.fragment,ke),mn=r(ke),Gt=m(ke,"P",{"data-svelte-h":!0}),y(Gt)!=="svelte-djmtij"&&(Gt.innerHTML=Rn),pn=r(ke),u(_e.$$.fragment,ke),hn=r(ke),u(Me.$$.fragment,ke),ke.forEach(l),ve.forEach(l),uo=r(e),u(rt.$$.fragment,e),go=r(e),Nt=m(e,"P",{}),x(Nt).forEach(l),this.h()},h(){$(t,"name","hf:doc:metadata"),$(t,"content",da),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(P,"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,n){a(document.head,t),p(e,b,n),p(e,i,n),p(e,d,n),g(T,e,n),p(e,o,n),g(w,e,n),p(e,D,n),p(e,k,n),p(e,Rt,n),p(e,xe,n),p(e,qt,n),g($e,e,n),p(e,Xt,n),p(e,Ce,n),p(e,Et,n),g(te,e,n),p(e,Qt,n),g(Ue,e,n),p(e,Ht,n),g(ze,e,n),p(e,At,n),g(je,e,n),p(e,St,n),g(Ie,e,n),p(e,Yt,n),g(Je,e,n),p(e,Ot,n),g(Fe,e,n),p(e,Dt,n),p(e,z,n),g(We,z,null),a(z,_o),a(z,ht),a(z,Mo),a(z,ut),a(z,bo),a(z,gt),a(z,yo),g(oe,z,null),p(e,Kt,n),g(Ze,e,n),p(e,eo,n),p(e,U,n),g(Be,U,null),a(U,To),a(U,ft),a(U,wo),g(ne,U,null),a(U,vo),a(U,ae),g(Pe,ae,null),a(ae,ko),a(ae,_t),a(U,xo),a(U,se),g(Ve,se,null),a(se,$o),a(se,Mt),a(U,Co),a(U,re),g(Ge,re,null),a(re,Uo),a(re,bt),p(e,to,n),g(Le,e,n),p(e,oo,n),p(e,j,n),g(Ne,j,null),a(j,zo),a(j,yt),a(j,jo),a(j,le),g(Re,le,null),a(le,Io),a(le,Tt),a(j,Jo),a(j,ie),g(qe,ie,null),a(ie,Fo),a(ie,wt),a(j,Wo),a(j,Y),g(Xe,Y,null),a(Y,Zo),a(Y,vt),a(Y,Bo),a(Y,kt),p(e,no,n),g(Ee,e,n),p(e,ao,n),p(e,F,n),g(Qe,F,null),a(F,Po),a(F,xt),a(F,Vo),a(F,$t),a(F,Go),a(F,N),g(He,N,null),a(N,Lo),a(N,Ct),a(N,No),g(de,N,null),a(N,Ro),g(ce,N,null),p(e,so,n),g(Ae,e,n),p(e,ro,n),p(e,W,n),g(Se,W,null),a(W,qo),a(W,Ut),a(W,Xo),a(W,zt),a(W,Eo),a(W,R),g(Ye,R,null),a(R,Qo),a(R,jt),a(R,Ho),g(me,R,null),a(R,Ao),g(pe,R,null),p(e,lo,n),g(Oe,e,n),p(e,io,n),p(e,Z,n),g(De,Z,null),a(Z,So),a(Z,It),a(Z,Yo),a(Z,Jt),a(Z,Oo),a(Z,q),g(Ke,q,null),a(q,Do),a(q,Ft),a(q,Ko),g(he,q,null),a(q,en),g(ue,q,null),p(e,co,n),g(et,e,n),p(e,mo,n),p(e,B,n),g(tt,B,null),a(B,tn),a(B,Wt),a(B,on),a(B,Zt),a(B,nn),a(B,X),g(ot,X,null),a(X,an),a(X,Bt),a(X,sn),g(ge,X,null),a(X,rn),g(fe,X,null),p(e,po,n),g(nt,e,n),p(e,ho,n),p(e,P,n),g(at,P,null),a(P,ln),a(P,Pt),a(P,dn),a(P,Vt),a(P,cn),a(P,E),g(st,E,null),a(E,mn),a(E,Gt),a(E,pn),g(_e,E,null),a(E,hn),g(Me,E,null),p(e,uo,n),g(rt,e,n),p(e,go,n),p(e,Nt,n),fo=!0},p(e,[n]){const V={};n&2&&(V.$$scope={dirty:n,ctx:e}),te.$set(V);const I={};n&2&&(I.$$scope={dirty:n,ctx:e}),oe.$set(I);const lt={};n&2&&(lt.$$scope={dirty:n,ctx:e}),ne.$set(lt);const it={};n&2&&(it.$$scope={dirty:n,ctx:e}),de.$set(it);const dt={};n&2&&(dt.$$scope={dirty:n,ctx:e}),ce.$set(dt);const G={};n&2&&(G.$$scope={dirty:n,ctx:e}),me.$set(G);const ct={};n&2&&(ct.$$scope={dirty:n,ctx:e}),pe.$set(ct);const mt={};n&2&&(mt.$$scope={dirty:n,ctx:e}),he.$set(mt);const K={};n&2&&(K.$$scope={dirty:n,ctx:e}),ue.$set(K);const Q={};n&2&&(Q.$$scope={dirty:n,ctx:e}),ge.$set(Q);const H={};n&2&&(H.$$scope={dirty:n,ctx:e}),fe.$set(H);const A={};n&2&&(A.$$scope={dirty:n,ctx:e}),_e.$set(A);const S={};n&2&&(S.$$scope={dirty:n,ctx:e}),Me.$set(S)},i(e){fo||(f(T.$$.fragment,e),f(w.$$.fragment,e),f($e.$$.fragment,e),f(te.$$.fragment,e),f(Ue.$$.fragment,e),f(ze.$$.fragment,e),f(je.$$.fragment,e),f(Ie.$$.fragment,e),f(Je.$$.fragment,e),f(Fe.$$.fragment,e),f(We.$$.fragment,e),f(oe.$$.fragment,e),f(Ze.$$.fragment,e),f(Be.$$.fragment,e),f(ne.$$.fragment,e),f(Pe.$$.fragment,e),f(Ve.$$.fragment,e),f(Ge.$$.fragment,e),f(Le.$$.fragment,e),f(Ne.$$.fragment,e),f(Re.$$.fragment,e),f(qe.$$.fragment,e),f(Xe.$$.fragment,e),f(Ee.$$.fragment,e),f(Qe.$$.fragment,e),f(He.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(Ae.$$.fragment,e),f(Se.$$.fragment,e),f(Ye.$$.fragment,e),f(me.$$.fragment,e),f(pe.$$.fragment,e),f(Oe.$$.fragment,e),f(De.$$.fragment,e),f(Ke.$$.fragment,e),f(he.$$.fragment,e),f(ue.$$.fragment,e),f(et.$$.fragment,e),f(tt.$$.fragment,e),f(ot.$$.fragment,e),f(ge.$$.fragment,e),f(fe.$$.fragment,e),f(nt.$$.fragment,e),f(at.$$.fragment,e),f(st.$$.fragment,e),f(_e.$$.fragment,e),f(Me.$$.fragment,e),f(rt.$$.fragment,e),fo=!0)},o(e){_(T.$$.fragment,e),_(w.$$.fragment,e),_($e.$$.fragment,e),_(te.$$.fragment,e),_(Ue.$$.fragment,e),_(ze.$$.fragment,e),_(je.$$.fragment,e),_(Ie.$$.fragment,e),_(Je.$$.fragment,e),_(Fe.$$.fragment,e),_(We.$$.fragment,e),_(oe.$$.fragment,e),_(Ze.$$.fragment,e),_(Be.$$.fragment,e),_(ne.$$.fragment,e),_(Pe.$$.fragment,e),_(Ve.$$.fragment,e),_(Ge.$$.fragment,e),_(Le.$$.fragment,e),_(Ne.$$.fragment,e),_(Re.$$.fragment,e),_(qe.$$.fragment,e),_(Xe.$$.fragment,e),_(Ee.$$.fragment,e),_(Qe.$$.fragment,e),_(He.$$.fragment,e),_(de.$$.fragment,e),_(ce.$$.fragment,e),_(Ae.$$.fragment,e),_(Se.$$.fragment,e),_(Ye.$$.fragment,e),_(me.$$.fragment,e),_(pe.$$.fragment,e),_(Oe.$$.fragment,e),_(De.$$.fragment,e),_(Ke.$$.fragment,e),_(he.$$.fragment,e),_(ue.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(ge.$$.fragment,e),_(fe.$$.fragment,e),_(nt.$$.fragment,e),_(at.$$.fragment,e),_(st.$$.fragment,e),_(_e.$$.fragment,e),_(Me.$$.fragment,e),_(rt.$$.fragment,e),fo=!1},d(e){e&&(l(b),l(i),l(d),l(o),l(D),l(k),l(Rt),l(xe),l(qt),l(Xt),l(Ce),l(Et),l(Qt),l(Ht),l(At),l(St),l(Yt),l(Ot),l(Dt),l(z),l(Kt),l(eo),l(U),l(to),l(oo),l(j),l(no),l(ao),l(F),l(so),l(ro),l(W),l(lo),l(io),l(Z),l(co),l(mo),l(B),l(po),l(ho),l(P),l(uo),l(go),l(Nt)),l(t),M(T,e),M(w,e),M($e,e),M(te,e),M(Ue,e),M(ze,e),M(je,e),M(Ie,e),M(Je,e),M(Fe,e),M(We),M(oe),M(Ze,e),M(Be),M(ne),M(Pe),M(Ve),M(Ge),M(Le,e),M(Ne),M(Re),M(qe),M(Xe),M(Ee,e),M(Qe),M(He),M(de),M(ce),M(Ae,e),M(Se),M(Ye),M(me),M(pe),M(Oe,e),M(De),M(Ke),M(he),M(ue),M(et,e),M(tt),M(ot),M(ge),M(fe),M(nt,e),M(at),M(st),M(_e),M(Me),M(rt,e)}}}const da='{"title":"Mllama","local":"mllama","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage Tips","local":"usage-tips","sections":[],"depth":2},{"title":"Usage Example","local":"usage-example","sections":[{"title":"Instruct model","local":"instruct-model","sections":[],"depth":4},{"title":"Base model","local":"base-model","sections":[],"depth":4}],"depth":2},{"title":"MllamaConfig","local":"transformers.MllamaConfig","sections":[],"depth":2},{"title":"MllamaProcessor","local":"transformers.MllamaProcessor","sections":[],"depth":2},{"title":"MllamaImageProcessor","local":"transformers.MllamaImageProcessor","sections":[],"depth":2},{"title":"MllamaForConditionalGeneration","local":"transformers.MllamaForConditionalGeneration","sections":[],"depth":2},{"title":"MllamaForCausalLM","local":"transformers.MllamaForCausalLM","sections":[],"depth":2},{"title":"MllamaTextModel","local":"transformers.MllamaTextModel","sections":[],"depth":2},{"title":"MllamaForCausalLM","local":"transformers.MllamaForCausalLM","sections":[],"depth":2},{"title":"MllamaVisionModel","local":"transformers.MllamaVisionModel","sections":[],"depth":2}],"depth":1}';function ca(v){return Xn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ma extends En{constructor(t){super(),Qn(this,t,ca,ia,qn,{})}}export{Ma as component};
