import{s as Ho,o as Qo,n as st}from"../chunks/scheduler.25b97de1.js";import{S as Vo,i as Xo,g as r,s as a,r as m,A as So,h as i,f as o,c as s,j as v,u as p,x as y,k as w,y as n,a as d,v as h,d as g,t as u,w as f}from"../chunks/index.d9030fc9.js";import{T as uo}from"../chunks/Tip.baa67368.js";import{D as C}from"../chunks/Docstring.ffac8efa.js";import{C as fo}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Go}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as W,E as Do}from"../chunks/EditOnGithub.91d95064.js";function Oo(U){let l,M=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=r("p"),l.innerHTML=M},l(_){l=i(_,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=M)},m(_,T){d(_,l,T)},p:st,d(_){_&&o(l)}}}function Yo(U){let l,M=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=r("p"),l.innerHTML=M},l(_){l=i(_,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=M)},m(_,T){d(_,l,T)},p:st,d(_){_&&o(l)}}}function Ko(U){let l,M="Example:",_,T,b;return T=new fo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBcmlhVGV4dEZvckNhdXNhbExNJTBBJTBBbW9kZWwlMjAlM0QlMjBBcmlhVGV4dEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWFyaWFfdGV4dCUyRkFyaWFUZXh0LTItN2ItaGYlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1hcmlhX3RleHQlMkZBcmlhVGV4dC0yLTdiLWhmJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkhleSUyQyUyMGFyZSUyMHlvdSUyMGNvbnNjaW91cyUzRiUyMENhbiUyMHlvdSUyMHRhbGslMjB0byUyMG1lJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwR2VuZXJhdGUlMEFnZW5lcmF0ZV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMuaW5wdXRfaWRzJTJDJTIwbWF4X2xlbmd0aCUzRDMwKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AriaTextForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AriaTextForCausalLM.from_pretrained(<span class="hljs-string">&quot;meta-aria_text/AriaText-2-7b-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;meta-aria_text/AriaText-2-7b-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?&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">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>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-string">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){l=r("p"),l.textContent=M,_=a(),m(T.$$.fragment)},l(c){l=i(c,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=M),_=s(c),p(T.$$.fragment,c)},m(c,x){d(c,l,x),d(c,_,x),h(T,c,x),b=!0},p:st,i(c){b||(g(T.$$.fragment,c),b=!0)},o(c){u(T.$$.fragment,c),b=!1},d(c){c&&(o(l),o(_)),f(T,c)}}}function en(U){let l,M=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){l=r("p"),l.innerHTML=M},l(_){l=i(_,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=M)},m(_,T){d(_,l,T)},p:st,d(_){_&&o(l)}}}function tn(U){let l,M="Example:",_,T,b;return T=new fo({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWZyb20lMjB0cmFuc2Zvcm1lcnMuaW1hZ2VfdXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjBwYXNzaW5nJTIwdGhlJTIwaW1hZ2UlMjB1cmxzJTIwKGluc3RlYWQlMjBvZiUyMHRoZSUyMGFjdHVhbCUyMHBpbCUyMGltYWdlcyklMjB0byUyMHRoZSUyMHByb2Nlc3NvciUyMGlzJTIwYWxzbyUyMHBvc3NpYmxlJTBBaW1hZ2UxJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmNkbi5icml0YW5uaWNhLmNvbSUyRjYxJTJGOTMwNjEtMDUwLTk5MTQ3RENFJTJGU3RhdHVlLW9mLUxpYmVydHktSXNsYW5kLU5ldy1Zb3JrLUJheS5qcGclMjIpJTBBaW1hZ2UyJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmNkbi5icml0YW5uaWNhLmNvbSUyRjU5JTJGOTQ0NTktMDUwLURCQTQyNDY3JTJGU2t5bGluZS1DaGljYWdvLmpwZyUyMiklMEFpbWFnZTMlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGY2RuLmJyaXRhbm5pY2EuY29tJTJGNjglMkYxNzA4NjgtMDUwLThEREU4MjYzJTJGR29sZGVuLUdhdGUtQnJpZGdlLVNhbi1GcmFuY2lzY28uanBnJTIyKSUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlJoeW1lcy1BSSUyRkFyaWElMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMlJoeW1lcy1BSSUyRkFyaWElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIpJTBBJTBBJTIzJTIwQ3JlYXRlJTIwaW5wdXRzJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIyaW1hZ2UlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIydGV4dCUyMiUyQyUyMCUyMnRleHQlMjIlM0ElMjAlMjJJbiUyMHRoaXMlMjBpbWFnZSUyQyUyMHdlJTIwY2FuJTIwc2VlJTIwdGhlJTIwY2l0eSUyMG9mJTIwTmV3JTIwWW9yayUyQyUyMGFuZCUyMG1vcmUlMjBzcGVjaWZpY2FsbHklMjB0aGUlMjBTdGF0dWUlMjBvZiUyMExpYmVydHkuJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTIydHlwZSUyMiUzQSUyMCUyMmltYWdlJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIyV2hhdCUyMGNhbiUyMHdlJTIwc2VlJTIwaW4lMjB0aGlzJTIwaW1hZ2UlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMEElMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIyaW1hZ2UlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIydGV4dCUyMiUyQyUyMCUyMnRleHQlMjIlM0ElMjAlMjJJbiUyMHdoaWNoJTIwY2l0eSUyMGlzJTIwdGhhdCUyMGJyaWRnZSUyMGxvY2F0ZWQlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMEElMjAlMjAlMjAlMjAlN0QlMEElNUQlMEElMEFwcm9tcHRzJTIwJTNEJTIwJTVCcHJvY2Vzc29yLmFwcGx5X2NoYXRfdGVtcGxhdGUoJTVCbWVzc2FnZSU1RCUyQyUyMGFkZF9nZW5lcmF0aW9uX3Byb21wdCUzRFRydWUpJTIwZm9yJTIwbWVzc2FnZSUyMGluJTIwbWVzc2FnZXMlNUQlMEFpbWFnZXMlMjAlM0QlMjAlNUIlNUJpbWFnZTElMkMlMjBpbWFnZTIlNUQlMkMlMjAlNUJpbWFnZTMlNUQlNUQlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRHByb21wdHMlMkMlMjBpbWFnZXMlM0RpbWFnZXMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKG1vZGVsLmRldmljZSklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMjU2KSUwQWdlbmVyYXRlZF90ZXh0cyUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUwQXByaW50KGdlbmVyYXRlZF90ZXh0cyU1QjAlNUQpJTBBJTBBcHJpbnQoZ2VuZXJhdGVkX3RleHRzJTVCMSU1RCk=",highlighted:`<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">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.image_utils <span class="hljs-keyword">import</span> load_image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that passing the image urls (instead of the actual pil images) to the processor is also possible</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image1 = load_image(<span class="hljs-string">&quot;https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image2 = load_image(<span class="hljs-string">&quot;https://cdn.britannica.com/59/94459-050-DBA42467/Skyline-Chicago.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image3 = load_image(<span class="hljs-string">&quot;https://cdn.britannica.com/68/170868-050-8DDE8263/Golden-Gate-Bridge-San-Francisco.jpg&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Rhymes-AI/Aria&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;Rhymes-AI/Aria&quot;</span>, torch_dtype=torch.bfloat16, device_map=<span class="hljs-string">&quot;auto&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Create inputs</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [
<span class="hljs-meta">... </span>    {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;content&quot;</span>: [
<span class="hljs-meta">... </span>            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>},
<span class="hljs-meta">... </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;In this image, we can see the city of New York, and more specifically the Statue of Liberty.&quot;</span>},
<span class="hljs-meta">... </span>            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>},
<span class="hljs-meta">... </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 can we see in this image?&quot;</span>},
<span class="hljs-meta">... </span>        ]
<span class="hljs-meta">... </span>    },
<span class="hljs-meta">... </span>    {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;content&quot;</span>: [
<span class="hljs-meta">... </span>            {<span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;image&quot;</span>},
<span class="hljs-meta">... </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;In which city is that bridge located?&quot;</span>},
<span class="hljs-meta">... </span>        ]
<span class="hljs-meta">... </span>    }
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>prompts = [processor.apply_chat_template([message], add_generation_prompt=<span class="hljs-literal">True</span>) <span class="hljs-keyword">for</span> message <span class="hljs-keyword">in</span> messages]
<span class="hljs-meta">&gt;&gt;&gt; </span>images = [[image1, image2], [image3]]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=prompts, images=images, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**inputs, max_new_tokens=<span class="hljs-number">256</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_texts[<span class="hljs-number">0</span>])
Assistant: There are buildings, trees, lights, <span class="hljs-keyword">and</span> water visible <span class="hljs-keyword">in</span> this image.

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_texts[<span class="hljs-number">1</span>])
Assistant: The bridge <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> San Francisco.`,wrap:!1}}),{c(){l=r("p"),l.textContent=M,_=a(),m(T.$$.fragment)},l(c){l=i(c,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=M),_=s(c),p(T.$$.fragment,c)},m(c,x){d(c,l,x),d(c,_,x),h(T,c,x),b=!0},p:st,i(c){b||(g(T.$$.fragment,c),b=!0)},o(c){u(T.$$.fragment,c),b=!1},d(c){c&&(o(l),o(_)),f(T,c)}}}function on(U){let l,M,_,T,b,c,x,rt,te,_o='The Aria model was proposed in <a href="https://huggingface.co/papers/2410.05993" rel="nofollow">Aria: An Open Multimodal Native Mixture-of-Experts Model</a> by Li et al. from the Rhymes.AI team.',it,oe,yo="Aria is an open multimodal-native model with best-in-class performance across a wide range of multimodal, language, and coding tasks. It has a Mixture-of-Experts architecture, with respectively 3.9B and 3.5B activated parameters per visual token and text token.",lt,ne,To="The abstract from the paper is the following:",dt,ae,Mo="<em>Information comes in diverse modalities. Multimodal native AI models are essential to integrate real-world information and deliver comprehensive understanding. While proprietary multimodal native models exist, their lack of openness imposes obstacles for adoptions, let alone adaptations. To fill this gap, we introduce Aria, an open multimodal native model with best-in-class performance across a wide range of multimodal, language, and coding tasks. Aria is a mixture-of-expert model with 3.9B and 3.5B activated parameters per visual token and text token, respectively. It outperforms Pixtral-12B and Llama3.2-11B, and is competitive against the best proprietary models on various multimodal tasks. We pre-train Aria from scratch following a 4-stage pipeline, which progressively equips the model with strong capabilities in language understanding, multimodal understanding, long context window, and instruction following. We open-source the model weights along with a codebase that facilitates easy adoptions and adaptations of Aria in real-world applications.</em>",ct,se,bo=`This model was contributed by <a href="https://huggingface.co/m-ric" rel="nofollow">m-ric</a>.
The original code can be found <a href="https://github.com/rhymes-ai/Aria" rel="nofollow">here</a>.`,mt,re,pt,ie,vo="Here’s how to use the model for vision tasks:",ht,le,gt,de,ut,A,ce,Ft,Ne,wo=`A vision processor for the Aria model that handles image preprocessing.
Initialize the AriaImageProcessor.`,Nt,E,me,Bt,Be,xo="Process an image with variable resolutions by dividing it into patches.",qt,R,pe,Lt,qe,Ao=`Pads the <code>image</code> with the specified <code>padding</code> and <code>mode</code>. Padding can be in the (<code>height</code>, <code>width</code>)
dimension of in the (<code>num_patches</code>) dimension. In the second case an iterable if tuples is expected
as input.`,Pt,G,he,Wt,Le,jo="Process a list of images.",ft,ge,_t,I,ue,Zt,Pe,ko="AriaProcessor is a processor for the Aria model which wraps the Aria image preprocessor and the LLama slow tokenizer.",Et,H,fe,Rt,We,Co=`This method forwards all its arguments to LlamaTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Gt,Q,_e,Ht,Ze,Io=`This method forwards all its arguments to LlamaTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,yt,ye,Tt,Z,Te,Qt,Ee,Jo=`This class handles the configuration for the text component of the Aria model.
Instantiating a configuration with the defaults will yield a similar configuration to that of the model of the Aria
<a href="https://huggingface.co/rhymes-ai/Aria" rel="nofollow">rhymes-ai/Aria</a> architecture.
This class extends the LlamaConfig to include additional parameters specific to the Mixture of Experts (MoE) architecture.`,Mt,Me,bt,N,be,Vt,Re,$o=`This class handles the configuration for both vision and text components of the Aria model,
as well as additional parameters for image token handling and projector mapping.
Instantiating a configuration with the defaults will yield a similar configuration to that of the model of the Aria
<a href="https://huggingface.co/rhymes-ai/Aria" rel="nofollow">rhymes-ai/Aria</a> architecture.`,Xt,Ge,Uo=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,vt,ve,wt,j,we,St,He,zo=`The bare AriaText Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Dt,Qe,Fo=`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.`,Ot,Ve,No="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>AriaTextDecoderLayer</code>",Yt,q,xe,Kt,Xe,Bo='The <a href="/docs/transformers/main/en/model_doc/aria#transformers.AriaTextModel">AriaTextModel</a> forward method, overrides the <code>__call__</code> special method.',eo,V,xt,Ae,At,J,je,to,Se,qo="Aria model for causal language modeling tasks.",oo,De,Lo=`This class extends <code>LlamaForCausalLM</code> to incorporate the Mixture of Experts (MoE) approach,
allowing for more efficient and scalable language modeling.`,no,z,ke,ao,Oe,Po='The <a href="/docs/transformers/main/en/model_doc/aria#transformers.AriaTextForCausalLM">AriaTextForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',so,X,ro,S,jt,Ce,kt,k,Ie,io,Ye,Wo="Aria model for conditional generation tasks.",lo,Ke,Zo=`This model combines a vision tower, a multi-modal projector, and a language model
to perform tasks that involve both image and text inputs.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,co,et,Eo=`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.`,mo,F,Je,po,tt,Ro='The <a href="/docs/transformers/main/en/model_doc/aria#transformers.AriaForConditionalGeneration">AriaForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',ho,D,go,O,Ct,$e,It,at,Jt;return b=new W({props:{title:"Aria",local:"aria",headingTag:"h1"}}),x=new W({props:{title:"Overview",local:"overview",headingTag:"h2"}}),re=new W({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),le=new fo({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBcmlhUHJvY2Vzc29yJTJDJTIwQXJpYUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQW1vZGVsX2lkX29yX3BhdGglMjAlM0QlMjAlMjJyaHltZXMtYWklMkZBcmlhJTIyJTBBJTBBbW9kZWwlMjAlM0QlMjBBcmlhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZF9vcl9wYXRoJTJDJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIlMEEpJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXJpYVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWRfb3JfcGF0aCklMEElMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0eXBlJTIyJTNBJTIwJTIyaW1hZ2UlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMjJ0ZXh0JTIyJTNBJTIwJTIyd2hhdCUyMGlzJTIwdGhlJTIwaW1hZ2UlM0YlMjIlMkMlMjAlMjJ0eXBlJTIyJTNBJTIwJTIydGV4dCUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1RCUyQyUwQSUyMCUyMCUyMCUyMCU3RCUwQSU1RCUwQSUwQXRleHQlMjAlM0QlMjBwcm9jZXNzb3IuYXBwbHlfY2hhdF90ZW1wbGF0ZShtZXNzYWdlcyUyQyUyMGFkZF9nZW5lcmF0aW9uX3Byb21wdCUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0R0ZXh0JTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWlucHV0cy50byhtb2RlbC5kZXZpY2UpJTBBJTBBb3V0cHV0JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwKippbnB1dHMlMkMlMEElMjAlMjAlMjAlMjBtYXhfbmV3X3Rva2VucyUzRDE1JTJDJTBBJTIwJTIwJTIwJTIwc3RvcF9zdHJpbmdzJTNEJTVCJTIyJTNDJTdDaW1fZW5kJTdDJTNFJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVyJTNEcHJvY2Vzc29yLnRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMGRvX3NhbXBsZSUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjB0ZW1wZXJhdHVyZSUzRDAuOSUyQyUwQSklMEFvdXRwdXRfaWRzJTIwJTNEJTIwb3V0cHV0JTVCMCU1RCU1QmlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSU1QjElNUQlM0ElNUQlMEFyZXNwb25zZSUyMCUzRCUyMHByb2Nlc3Nvci5kZWNvZGUob3V0cHV0X2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKQ==",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> AriaProcessor, AriaForConditionalGeneration

model_id_or_path = <span class="hljs-string">&quot;rhymes-ai/Aria&quot;</span>

model = AriaForConditionalGeneration.from_pretrained(
    model_id_or_path, device_map=<span class="hljs-string">&quot;auto&quot;</span>
)

processor = AriaProcessor.from_pretrained(model_id_or_path)

image = Image.<span class="hljs-built_in">open</span>(requests.get(<span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>, stream=<span class="hljs-literal">True</span>).raw)

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;text&quot;</span>: <span class="hljs-string">&quot;what is the image?&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>},
        ],
    }
]

text = processor.apply_chat_template(messages, add_generation_prompt=<span class="hljs-literal">True</span>)
inputs = processor(text=text, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
inputs.to(model.device)

output = model.generate(
    **inputs,
    max_new_tokens=<span class="hljs-number">15</span>,
    stop_strings=[<span class="hljs-string">&quot;&lt;|im_end|&gt;&quot;</span>],
    tokenizer=processor.tokenizer,
    do_sample=<span class="hljs-literal">True</span>,
    temperature=<span class="hljs-number">0.9</span>,
)
output_ids = output[<span class="hljs-number">0</span>][inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[<span class="hljs-number">1</span>]:]
response = processor.decode(output_ids, skip_special_tokens=<span class="hljs-literal">True</span>)`,wrap:!1}}),de=new W({props:{title:"AriaImageProcessor",local:"transformers.AriaImageProcessor",headingTag:"h2"}}),ce=new C({props:{name:"class transformers.AriaImageProcessor",anchor:"transformers.AriaImageProcessor",parameters:[{name:"image_mean",val:": typing.List[float] = None"},{name:"image_std",val:": typing.List[float] = None"},{name:"max_image_size",val:": int = 980"},{name:"min_image_size",val:": int = 336"},{name:"split_resolutions",val:": typing.Optional[typing.List[typing.Tuple[int, int]]] = None"},{name:"split_image",val:": typing.Optional[bool] = False"},{name:"do_convert_rgb",val:": typing.Optional[bool] = True"},{name:"do_normalize",val:": typing.Optional[bool] = True"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AriaImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>list</code>, <em>optional</em>, defaults to [0.5, 0.5, 0.5]) &#x2014;
Mean values for normalization.`,name:"image_mean"},{anchor:"transformers.AriaImageProcessor.image_std",description:`<strong>image_std</strong> (<code>list</code>, <em>optional</em>, defaults to [0.5, 0.5, 0.5]) &#x2014;
Standard deviation values for normalization.`,name:"image_std"},{anchor:"transformers.AriaImageProcessor.max_image_size",description:`<strong>max_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 980) &#x2014;
Maximum image size.`,name:"max_image_size"},{anchor:"transformers.AriaImageProcessor.min_image_size",description:`<strong>min_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 336) &#x2014;
Minimum image size.`,name:"min_image_size"},{anchor:"transformers.AriaImageProcessor.split_resolutions",description:`<strong>split_resolutions</strong> (<code>list</code>, <em>optional</em>, defaults to a list of optimal,resolutions as tuples) &#x2014;
The optimal resolutions for splitting the image.`,name:"split_resolutions"},{anchor:"transformers.AriaImageProcessor.split_image",description:`<strong>split_image</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to split the image.`,name:"split_image"},{anchor:"transformers.AriaImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.AriaImageProcessor.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.AriaImageProcessor.resample",description:`<strong>resample</strong> (PILImageResampling, <em>optional</em>, defaults to <code>BICUBIC</code>) &#x2014;
The resampling filter to use if resizing the image.`,name:"resample"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/image_processing_aria.py#L110"}}),me=new C({props:{name:"get_image_patches",anchor:"transformers.AriaImageProcessor.get_image_patches",parameters:[{name:"image",val:": <built-in function array>"},{name:"grid_pinpoints",val:": typing.List[typing.Tuple[int, int]]"},{name:"patch_size",val:": int"},{name:"resample",val:": Resampling"},{name:"data_format",val:": ChannelDimension"},{name:"input_data_format",val:": ChannelDimension"}],parametersDescription:[{anchor:"transformers.AriaImageProcessor.get_image_patches.image",description:`<strong>image</strong> (<code>np.array</code>) &#x2014;
The input image to be processed.`,name:"image"},{anchor:"transformers.AriaImageProcessor.get_image_patches.grid_pinpoints",description:`<strong>grid_pinpoints</strong> (List[Tuple[int, int]]) &#x2014;
A list of possible resolutions as tuples.`,name:"grid_pinpoints"},{anchor:"transformers.AriaImageProcessor.get_image_patches.patch_size",description:`<strong>patch_size</strong> (<code>int</code>) &#x2014;
Size of the patches to divide the image into.`,name:"patch_size"},{anchor:"transformers.AriaImageProcessor.get_image_patches.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>) &#x2014;
Resampling filter to use if resizing the image.`,name:"resample"},{anchor:"transformers.AriaImageProcessor.get_image_patches.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>) &#x2014;
The channel dimension format for the output image.`,name:"data_format"},{anchor:"transformers.AriaImageProcessor.get_image_patches.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>) &#x2014;
The channel dimension format of the input image.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/image_processing_aria.py#L453",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of NumPy arrays containing the processed image patches.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[np.array]</code></p>
`}}),pe=new C({props:{name:"pad",anchor:"transformers.AriaImageProcessor.pad",parameters:[{name:"image",val:": ndarray"},{name:"padding",val:": typing.Union[int, typing.Tuple[int, int], typing.Iterable[typing.Tuple[int, int]]]"},{name:"mode",val:": PaddingMode = <PaddingMode.CONSTANT: 'constant'>"},{name:"constant_values",val:": typing.Union[float, typing.Iterable[float]] = 0.0"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.AriaImageProcessor.pad.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
The image to pad.`,name:"image"},{anchor:"transformers.AriaImageProcessor.pad.padding",description:`<strong>padding</strong> (<code>int</code> or <code>Tuple[int, int]</code> or <code>Iterable[Tuple[int, int]]</code>) &#x2014;
Padding to apply to the edges of the height, width axes. Can be one of three formats:<ul>
<li><code>((before_height, after_height), (before_width, after_width))</code> unique pad widths for each axis.</li>
<li><code>((before, after),)</code> yields same before and after pad for height and width.</li>
<li><code>(pad,)</code> or int is a shortcut for before = after = pad width for all axes.</li>
</ul>`,name:"padding"},{anchor:"transformers.AriaImageProcessor.pad.mode",description:`<strong>mode</strong> (<code>PaddingMode</code>) &#x2014;
The padding mode to use. Can be one of:<ul>
<li><code>&quot;constant&quot;</code>: pads with a constant value.</li>
<li><code>&quot;reflect&quot;</code>: pads with the reflection of the vector mirrored on the first and last values of the
vector along each axis.</li>
<li><code>&quot;replicate&quot;</code>: pads with the replication of the last value on the edge of the array along each axis.</li>
<li><code>&quot;symmetric&quot;</code>: pads with the reflection of the vector mirrored along the edge of the array.</li>
</ul>`,name:"mode"},{anchor:"transformers.AriaImageProcessor.pad.constant_values",description:`<strong>constant_values</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>) &#x2014;
The value to use for the padding if <code>mode</code> is <code>&quot;constant&quot;</code>.`,name:"constant_values"},{anchor:"transformers.AriaImageProcessor.pad.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.
If unset, will use same as the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.AriaImageProcessor.pad.input_data_format",description:`<strong>input_data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for 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.
If unset, will use the inferred format of the input image.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/image_processing_aria.py#L387",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>
`}}),he=new C({props:{name:"preprocess",anchor:"transformers.AriaImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')], typing.List[typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]]]"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"max_image_size",val:": typing.Optional[int] = None"},{name:"min_image_size",val:": typing.Optional[int] = None"},{name:"split_image",val:": typing.Optional[bool] = None"},{name:"do_convert_rgb",val:": typing.Optional[bool] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"resample",val:": Resampling = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = 'pt'"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.AriaImageProcessor.preprocess.images",description:`<strong>images</strong> (ImageInput or list of ImageInput) &#x2014;
The input image or a list of images.`,name:"images"},{anchor:"transformers.AriaImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>list</code>, <em>optional</em>, defaults to [0.5, 0.5, 0.5]) &#x2014;
Mean values for normalization.`,name:"image_mean"},{anchor:"transformers.AriaImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>list</code>, <em>optional</em>, defaults to [0.5, 0.5, 0.5]) &#x2014;
Standard deviation values for normalization.`,name:"image_std"},{anchor:"transformers.AriaImageProcessor.preprocess.max_image_size",description:`<strong>max_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.max_image_size</code> (980)) &#x2014;
Maximum image size.`,name:"max_image_size"},{anchor:"transformers.AriaImageProcessor.preprocess.min_image_size",description:`<strong>min_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.min_image_size</code> (336)) &#x2014;
Minimum image size.`,name:"min_image_size"},{anchor:"transformers.AriaImageProcessor.preprocess.split_image",description:`<strong>split_image</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.split_image</code> (False)) &#x2014;
Whether to split the image.`,name:"split_image"},{anchor:"transformers.AriaImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code> (True)) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.AriaImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code> (True)) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.AriaImageProcessor.preprocess.resample",description:`<strong>resample</strong> (PILImageResampling, <em>optional</em>, defaults to <code>self.resample</code> (BICUBIC)) &#x2014;
The resampling filter to use if resizing the image.`,name:"resample"},{anchor:"transformers.AriaImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>, defaults to &#x201C;pt&#x201D;) &#x2014;
The type of tensor to return.`,name:"return_tensors"},{anchor:"transformers.AriaImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>:
image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>:
image in (height, width, num_channels) format.
If unset, will use same as the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.AriaImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for 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.
If unset, will use the inferred format of the input image.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/image_processing_aria.py#L168",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A BatchFeature object containing:</p>
<ul>
<li>‘pixel_values’:
Tensor of processed image pixel values.</li>
<li>‘pixel_mask’:
Boolean pixel mask. This mask is a 2D tensor of shape (max_image_size, max_image_size) where:<ul>
<li>True (1) values indicate pixels that belong to the original resized image.</li>
<li>False (0) values indicate pixels that are part of the padding.
The mask helps distinguish between actual image content and padded areas in subsequent processing steps.</li>
</ul></li>
<li>‘num_crops’:
The maximum number of crops across all images.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>BatchFeature</p>
`}}),ge=new W({props:{title:"AriaProcessor",local:"transformers.AriaProcessor",headingTag:"h2"}}),ue=new C({props:{name:"class transformers.AriaProcessor",anchor:"transformers.AriaProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:": typing.Union[transformers.models.auto.tokenization_auto.AutoTokenizer, str] = None"},{name:"chat_template",val:": typing.Optional[str] = None"},{name:"size_conversion",val:": typing.Optional[typing.Dict[typing.Union[float, int], int]] = None"}],parametersDescription:[{anchor:"transformers.AriaProcessor.image_processor",description:`<strong>image_processor</strong> (<code>AriaImageProcessor</code>, <em>optional</em>) &#x2014;
The AriaImageProcessor to use for image preprocessing.`,name:"image_processor"},{anchor:"transformers.AriaProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizerBase</code>, <em>optional</em>) &#x2014;
An instance of <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase">PreTrainedTokenizerBase</a>. This should correspond with the model&#x2019;s text model. The tokenizer is a required input.`,name:"tokenizer"},{anchor:"transformers.AriaProcessor.chat_template",description:`<strong>chat_template</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A Jinja template which will be used to convert lists of messages in a chat into a tokenizable string.`,name:"chat_template"},{anchor:"transformers.AriaProcessor.size_conversion",description:`<strong>size_conversion</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary indicating size conversions for images.`,name:"size_conversion"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/processing_aria.py#L44"}}),fe=new C({props:{name:"batch_decode",anchor:"transformers.AriaProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/processing_aria.py#L143"}}),_e=new C({props:{name:"decode",anchor:"transformers.AriaProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/processing_aria.py#L150"}}),ye=new W({props:{title:"AriaTextConfig",local:"transformers.AriaTextConfig",headingTag:"h2"}}),Te=new C({props:{name:"class transformers.AriaTextConfig",anchor:"transformers.AriaTextConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:": int = 4096"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"num_key_value_heads",val:" = None"},{name:"hidden_act",val:" = 'silu'"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-06"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 2"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"pretraining_tp",val:" = 1"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 10000.0"},{name:"rope_scaling",val:" = None"},{name:"attention_bias",val:" = False"},{name:"attention_dropout",val:" = 0.0"},{name:"mlp_bias",val:" = False"},{name:"head_dim",val:" = None"},{name:"moe_num_experts",val:": int = 8"},{name:"moe_topk",val:": int = 2"},{name:"moe_num_shared_experts",val:": int = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AriaTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the LLaMA model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/llama2#transformers.LlamaModel">LlamaModel</a>`,name:"vocab_size"},{anchor:"transformers.AriaTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.AriaTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The size of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.AriaTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.AriaTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.AriaTextConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
<code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if
<code>num_key_value_heads=1</code> the model will use Multi Query Attention (MQA) otherwise GQA is used. When
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
by meanpooling all the original heads within that group. For more details checkout <a href="https://arxiv.org/pdf/2305.13245.pdf" rel="nofollow">this
paper</a>. If it is not specified, will default to
<code>num_attention_heads</code>.`,name:"num_key_value_heads"},{anchor:"transformers.AriaTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.AriaTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with. Llama 1 supports up to 2048 tokens,
Llama 2 up to 4096, CodeLlama up to 16384.`,name:"max_position_embeddings"},{anchor:"transformers.AriaTextConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.AriaTextConfig.rms_norm_eps",description:`<strong>rms_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the rms normalization layers.`,name:"rms_norm_eps"},{anchor:"transformers.AriaTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.AriaTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.AriaTextConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.AriaTextConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.AriaTextConfig.pretraining_tp",description:`<strong>pretraining_tp</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to <a href="https://huggingface.co/docs/transformers/main/perf_train_gpu_many#tensor-parallelism" rel="nofollow">this
document</a> to
understand more about it. This value is necessary to ensure exact reproducibility of the pretraining
results. Please refer to <a href="https://github.com/pytorch/pytorch/issues/76232" rel="nofollow">this issue</a>.`,name:"pretraining_tp"},{anchor:"transformers.AriaTextConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings"},{anchor:"transformers.AriaTextConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.AriaTextConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
and you expect the model to work on longer <code>max_position_embeddings</code>, we recommend you to update this value
accordingly.
Expected contents:
<code>rope_type</code> (<code>str</code>):
The sub-variant of RoPE to use. Can be one of [&#x2018;default&#x2019;, &#x2018;linear&#x2019;, &#x2018;dynamic&#x2019;, &#x2018;yarn&#x2019;, &#x2018;longrope&#x2019;,
&#x2018;llama3&#x2019;], with &#x2018;default&#x2019; being the original RoPE implementation.
<code>factor</code> (<code>float</code>, <em>optional</em>):
Used with all rope types except &#x2018;default&#x2019;. The scaling factor to apply to the RoPE embeddings. In
most scaling types, a <code>factor</code> of x will enable the model to handle sequences of length x <em>
original maximum pre-trained length.
<code>original_max_position_embeddings</code> (<code>int</code>, </em>optional<em>):
Used with &#x2018;dynamic&#x2019;, &#x2018;longrope&#x2019; and &#x2018;llama3&#x2019;. The original max position embeddings used during
pretraining.
<code>attention_factor</code> (<code>float</code>, </em>optional<em>):
Used with &#x2018;yarn&#x2019; and &#x2018;longrope&#x2019;. The scaling factor to be applied on the attention
computation. If unspecified, it defaults to value recommended by the implementation, using the
<code>factor</code> field to infer the suggested value.
<code>beta_fast</code> (<code>float</code>, </em>optional<em>):
Only used with &#x2018;yarn&#x2019;. Parameter to set the boundary for extrapolation (only) in the linear
ramp function. If unspecified, it defaults to 32.
<code>beta_slow</code> (<code>float</code>, </em>optional<em>):
Only used with &#x2018;yarn&#x2019;. Parameter to set the boundary for interpolation (only) in the linear
ramp function. If unspecified, it defaults to 1.
<code>short_factor</code> (<code>List[float]</code>, </em>optional<em>):
Only used with &#x2018;longrope&#x2019;. The scaling factor to be applied to short contexts (&lt;
<code>original_max_position_embeddings</code>). Must be a list of numbers with the same length as the hidden
size divided by the number of attention heads divided by 2
<code>long_factor</code> (<code>List[float]</code>, </em>optional<em>):
Only used with &#x2018;longrope&#x2019;. The scaling factor to be applied to long contexts (&lt;
<code>original_max_position_embeddings</code>). Must be a list of numbers with the same length as the hidden
size divided by the number of attention heads divided by 2
<code>low_freq_factor</code> (<code>float</code>, </em>optional<em>):
Only used with &#x2018;llama3&#x2019;. Scaling factor applied to low frequency components of the RoPE
<code>high_freq_factor</code> (<code>float</code>, </em>optional*):
Only used with &#x2018;llama3&#x2019;. Scaling factor applied to high frequency components of the RoPE`,name:"rope_scaling"},{anchor:"transformers.AriaTextConfig.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in the query, key, value and output projection layers during self-attention.`,name:"attention_bias"},{anchor:"transformers.AriaTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.AriaTextConfig.mlp_bias",description:`<strong>mlp_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in up_proj, down_proj and gate_proj layers in the MLP layers.`,name:"mlp_bias"},{anchor:"transformers.AriaTextConfig.head_dim",description:`<strong>head_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The attention head dimension. If None, it will default to hidden_size // num_heads`,name:"head_dim"},{anchor:"transformers.AriaTextConfig.moe_num_experts",description:`<strong>moe_num_experts</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The number of experts in the MoE layer.`,name:"moe_num_experts"},{anchor:"transformers.AriaTextConfig.moe_topk",description:`<strong>moe_topk</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of top experts to route to for each token.`,name:"moe_topk"},{anchor:"transformers.AriaTextConfig.moe_num_shared_experts",description:`<strong>moe_num_shared_experts</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of shared experts.`,name:"moe_num_shared_experts"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/configuration_aria.py#L28"}}),Me=new W({props:{title:"AriaConfig",local:"transformers.AriaConfig",headingTag:"h2"}}),be=new C({props:{name:"class transformers.AriaConfig",anchor:"transformers.AriaConfig",parameters:[{name:"vision_config",val:" = None"},{name:"vision_feature_layer",val:": int = -1"},{name:"text_config",val:": AriaTextConfig = None"},{name:"projector_patch_to_query_dict",val:": typing.Dict = None"},{name:"image_token_index",val:": int = 9"},{name:"initializer_range",val:": float = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AriaConfig.vision_config",description:`<strong>vision_config</strong> (<code>AriaVisionConfig</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Configuration for the vision component.`,name:"vision_config"},{anchor:"transformers.AriaConfig.vision_feature_layer",description:`<strong>vision_feature_layer</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
The index of the layer to select the vision feature.`,name:"vision_feature_layer"},{anchor:"transformers.AriaConfig.text_config",description:`<strong>text_config</strong> (<code>AriaTextConfig</code> or <code>dict</code>, <em>optional</em>) &#x2014;
Configuration for the text component.`,name:"text_config"},{anchor:"transformers.AriaConfig.projector_patch_to_query_dict",description:`<strong>projector_patch_to_query_dict</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Mapping of patch sizes to query dimensions.`,name:"projector_patch_to_query_dict"},{anchor:"transformers.AriaConfig.image_token_index",description:`<strong>image_token_index</strong> (<code>int</code>, <em>optional</em>, defaults to 9) &#x2014;
Index used to represent image tokens.`,name:"image_token_index"},{anchor:"transformers.AriaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated normal initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.AriaConfig.model_type",description:`<strong>model_type</strong> (<code>str</code>) &#x2014;
Type of the model, set to <code>&quot;aria&quot;</code>.`,name:"model_type"},{anchor:"transformers.AriaConfig.image_token_index",description:`<strong>image_token_index</strong> (<code>int</code>) &#x2014;
Index used to represent image tokens.`,name:"image_token_index"},{anchor:"transformers.AriaConfig.projector_patch_to_query_dict",description:`<strong>projector_patch_to_query_dict</strong> (<code>dict</code>) &#x2014;
Mapping of patch sizes to query dimensions.`,name:"projector_patch_to_query_dict"},{anchor:"transformers.AriaConfig.vision_config",description:`<strong>vision_config</strong> (<code>AriaVisionConfig</code>) &#x2014;
Configuration for the vision component.`,name:"vision_config"},{anchor:"transformers.AriaConfig.text_config",description:`<strong>text_config</strong> (<code>AriaTextConfig</code>) &#x2014;
Configuration for the text component.`,name:"text_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/configuration_aria.py#L218"}}),ve=new W({props:{title:"AriaTextModel",local:"transformers.AriaTextModel",headingTag:"h2"}}),we=new C({props:{name:"class transformers.AriaTextModel",anchor:"transformers.AriaTextModel",parameters:[{name:"config",val:": AriaTextConfig"}],parametersDescription:[{anchor:"transformers.AriaTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/aria#transformers.AriaTextConfig">AriaTextConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.AriaTextModel.config",description:"<strong>config</strong> &#x2014; AriaTextConfig",name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/modeling_aria.py#L865"}}),xe=new C({props:{name:"forward",anchor:"transformers.AriaTextModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[transformers.cache_utils.Cache] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**flash_attn_kwargs",val:": typing_extensions.Unpack[transformers.modeling_flash_attention_utils.FlashAttentionKwargs]"}],parametersDescription:[{anchor:"transformers.AriaTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AriaTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>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.AriaTextModel.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.AriaTextModel.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/main/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.AriaTextModel.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.AriaTextModel.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.AriaTextModel.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.AriaTextModel.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.AriaTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AriaTextModel.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/main/src/transformers/models/aria/modeling_aria.py#L899"}}),V=new uo({props:{$$slots:{default:[Oo]},$$scope:{ctx:U}}}),Ae=new W({props:{title:"AriaTextForCausalLM",local:"transformers.AriaTextForCausalLM",headingTag:"h2"}}),je=new C({props:{name:"class transformers.AriaTextForCausalLM",anchor:"transformers.AriaTextForCausalLM",parameters:[{name:"config",val:": AriaTextConfig"}],parametersDescription:[{anchor:"transformers.AriaTextForCausalLM.config",description:`<strong>config</strong> (<code>AriaTextConfig</code>) &#x2014;
Configuration object for the model.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/modeling_aria.py#L1131"}}),ke=new C({props:{name:"forward",anchor:"transformers.AriaTextForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.aria.modeling_aria.KwargsForCausalLM]"}],parametersDescription:[{anchor:"transformers.AriaTextForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AriaTextForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>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.AriaTextForCausalLM.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.AriaTextForCausalLM.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/main/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.AriaTextForCausalLM.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.AriaTextForCausalLM.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.AriaTextForCausalLM.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.AriaTextForCausalLM.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.AriaTextForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AriaTextForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.AriaTextForCausalLM.forward.Args",description:`<strong>Args</strong> &#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:"Args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/modeling_aria.py#L1174",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/aria#transformers.AriaTextConfig"
>AriaTextConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),X=new uo({props:{$$slots:{default:[Yo]},$$scope:{ctx:U}}}),S=new Go({props:{anchor:"transformers.AriaTextForCausalLM.forward.example",$$slots:{default:[Ko]},$$scope:{ctx:U}}}),Ce=new W({props:{title:"AriaForConditionalGeneration",local:"transformers.AriaForConditionalGeneration",headingTag:"h2"}}),Ie=new C({props:{name:"class transformers.AriaForConditionalGeneration",anchor:"transformers.AriaForConditionalGeneration",parameters:[{name:"config",val:": AriaConfig"}],parametersDescription:[{anchor:"transformers.AriaForConditionalGeneration.config",description:`<strong>config</strong> (<code>AriaConfig</code>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/modeling_aria.py#L1355"}}),Je=new C({props:{name:"forward",anchor:"transformers.AriaForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"pixel_values",val:": FloatTensor = None"},{name:"pixel_mask",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**loss_kwargs",val:""}],parametersDescription:[{anchor:"transformers.AriaForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Input token IDs.`,name:"input_ids"},{anchor:"transformers.AriaForConditionalGeneration.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pixel values of the images.`,name:"pixel_values"},{anchor:"transformers.AriaForConditionalGeneration.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Mask for the pixel values.`,name:"pixel_mask"},{anchor:"transformers.AriaForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Attention mask.`,name:"attention_mask"},{anchor:"transformers.AriaForConditionalGeneration.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Position IDs.`,name:"position_ids"},{anchor:"transformers.AriaForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>List[torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Past key values for efficient processing.`,name:"past_key_values"},{anchor:"transformers.AriaForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Input embeddings.`,name:"inputs_embeds"},{anchor:"transformers.AriaForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss.`,name:"labels"},{anchor:"transformers.AriaForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to use the model&#x2019;s cache mechanism.`,name:"use_cache"},{anchor:"transformers.AriaForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to output attention weights.`,name:"output_attentions"},{anchor:"transformers.AriaForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to output hidden states.`,name:"output_hidden_states"},{anchor:"transformers.AriaForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return a <code>ModelOutput</code> object.`,name:"return_dict"},{anchor:"transformers.AriaForConditionalGeneration.forward.num_logits_to_keep",description:`<strong>num_logits_to_keep</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Calculate logits for the last <code>num_logits_to_keep</code> tokens, or all <code>input_ids</code> if <code>0</code>.`,name:"num_logits_to_keep"},{anchor:"transformers.AriaForConditionalGeneration.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Cache positions.`,name:"cache_position"},{anchor:"transformers.AriaForConditionalGeneration.forward.*loss_kwargs",description:`*<strong>*loss_kwargs</strong> &#x2014;
Additional keyword arguments for loss calculation.`,name:"*loss_kwargs"},{anchor:"transformers.AriaForConditionalGeneration.forward.Args",description:`<strong>Args</strong> &#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 <code>model.image_token_id</code> (where <code>model</code> is your instance of <code>Idefics3ForConditionalGeneration</code>).
Tokens with indices set to <code>model.image_token_id</code> are ignored (masked), the loss is only
computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"Args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/aria/modeling_aria.py#L1434",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.aria.modeling_aria.AriaCausalLMOutputWithPast</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.aria.configuration_aria.AriaConfig'&gt;</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>
<li>
<p><strong>image_hidden_states</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — A <code>torch.FloatTensor</code> of size (batch_size, num_images, sequence_length, hidden_size)\`.
image_hidden_states of the model produced by the vision encoder and after projecting the last hidden state.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.aria.modeling_aria.AriaCausalLMOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),D=new uo({props:{$$slots:{default:[en]},$$scope:{ctx:U}}}),O=new Go({props:{anchor:"transformers.AriaForConditionalGeneration.forward.example",$$slots:{default:[tn]},$$scope:{ctx:U}}}),$e=new Do({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/aria.md"}}),{c(){l=r("meta"),M=a(),_=r("p"),T=a(),m(b.$$.fragment),c=a(),m(x.$$.fragment),rt=a(),te=r("p"),te.innerHTML=_o,it=a(),oe=r("p"),oe.textContent=yo,lt=a(),ne=r("p"),ne.textContent=To,dt=a(),ae=r("p"),ae.innerHTML=Mo,ct=a(),se=r("p"),se.innerHTML=bo,mt=a(),m(re.$$.fragment),pt=a(),ie=r("p"),ie.textContent=vo,ht=a(),m(le.$$.fragment),gt=a(),m(de.$$.fragment),ut=a(),A=r("div"),m(ce.$$.fragment),Ft=a(),Ne=r("p"),Ne.textContent=wo,Nt=a(),E=r("div"),m(me.$$.fragment),Bt=a(),Be=r("p"),Be.textContent=xo,qt=a(),R=r("div"),m(pe.$$.fragment),Lt=a(),qe=r("p"),qe.innerHTML=Ao,Pt=a(),G=r("div"),m(he.$$.fragment),Wt=a(),Le=r("p"),Le.textContent=jo,ft=a(),m(ge.$$.fragment),_t=a(),I=r("div"),m(ue.$$.fragment),Zt=a(),Pe=r("p"),Pe.textContent=ko,Et=a(),H=r("div"),m(fe.$$.fragment),Rt=a(),We=r("p"),We.innerHTML=Co,Gt=a(),Q=r("div"),m(_e.$$.fragment),Ht=a(),Ze=r("p"),Ze.innerHTML=Io,yt=a(),m(ye.$$.fragment),Tt=a(),Z=r("div"),m(Te.$$.fragment),Qt=a(),Ee=r("p"),Ee.innerHTML=Jo,Mt=a(),m(Me.$$.fragment),bt=a(),N=r("div"),m(be.$$.fragment),Vt=a(),Re=r("p"),Re.innerHTML=$o,Xt=a(),Ge=r("p"),Ge.innerHTML=Uo,vt=a(),m(ve.$$.fragment),wt=a(),j=r("div"),m(we.$$.fragment),St=a(),He=r("p"),He.innerHTML=zo,Dt=a(),Qe=r("p"),Qe.innerHTML=Fo,Ot=a(),Ve=r("p"),Ve.innerHTML=No,Yt=a(),q=r("div"),m(xe.$$.fragment),Kt=a(),Xe=r("p"),Xe.innerHTML=Bo,eo=a(),m(V.$$.fragment),xt=a(),m(Ae.$$.fragment),At=a(),J=r("div"),m(je.$$.fragment),to=a(),Se=r("p"),Se.textContent=qo,oo=a(),De=r("p"),De.innerHTML=Lo,no=a(),z=r("div"),m(ke.$$.fragment),ao=a(),Oe=r("p"),Oe.innerHTML=Po,so=a(),m(X.$$.fragment),ro=a(),m(S.$$.fragment),jt=a(),m(Ce.$$.fragment),kt=a(),k=r("div"),m(Ie.$$.fragment),io=a(),Ye=r("p"),Ye.textContent=Wo,lo=a(),Ke=r("p"),Ke.innerHTML=Zo,co=a(),et=r("p"),et.innerHTML=Eo,mo=a(),F=r("div"),m(Je.$$.fragment),po=a(),tt=r("p"),tt.innerHTML=Ro,ho=a(),m(D.$$.fragment),go=a(),m(O.$$.fragment),Ct=a(),m($e.$$.fragment),It=a(),at=r("p"),this.h()},l(e){const t=So("svelte-u9bgzb",document.head);l=i(t,"META",{name:!0,content:!0}),t.forEach(o),M=s(e),_=i(e,"P",{}),v(_).forEach(o),T=s(e),p(b.$$.fragment,e),c=s(e),p(x.$$.fragment,e),rt=s(e),te=i(e,"P",{"data-svelte-h":!0}),y(te)!=="svelte-195me2j"&&(te.innerHTML=_o),it=s(e),oe=i(e,"P",{"data-svelte-h":!0}),y(oe)!=="svelte-1owneff"&&(oe.textContent=yo),lt=s(e),ne=i(e,"P",{"data-svelte-h":!0}),y(ne)!=="svelte-vfdo9a"&&(ne.textContent=To),dt=s(e),ae=i(e,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-nlncfs"&&(ae.innerHTML=Mo),ct=s(e),se=i(e,"P",{"data-svelte-h":!0}),y(se)!=="svelte-ioiyaz"&&(se.innerHTML=bo),mt=s(e),p(re.$$.fragment,e),pt=s(e),ie=i(e,"P",{"data-svelte-h":!0}),y(ie)!=="svelte-1h4ykjz"&&(ie.textContent=vo),ht=s(e),p(le.$$.fragment,e),gt=s(e),p(de.$$.fragment,e),ut=s(e),A=i(e,"DIV",{class:!0});var $=v(A);p(ce.$$.fragment,$),Ft=s($),Ne=i($,"P",{"data-svelte-h":!0}),y(Ne)!=="svelte-xu4frv"&&(Ne.textContent=wo),Nt=s($),E=i($,"DIV",{class:!0});var Ue=v(E);p(me.$$.fragment,Ue),Bt=s(Ue),Be=i(Ue,"P",{"data-svelte-h":!0}),y(Be)!=="svelte-1ycjrv2"&&(Be.textContent=xo),Ue.forEach(o),qt=s($),R=i($,"DIV",{class:!0});var ze=v(R);p(pe.$$.fragment,ze),Lt=s(ze),qe=i(ze,"P",{"data-svelte-h":!0}),y(qe)!=="svelte-1wucq2q"&&(qe.innerHTML=Ao),ze.forEach(o),Pt=s($),G=i($,"DIV",{class:!0});var Fe=v(G);p(he.$$.fragment,Fe),Wt=s(Fe),Le=i(Fe,"P",{"data-svelte-h":!0}),y(Le)!=="svelte-1bzutl7"&&(Le.textContent=jo),Fe.forEach(o),$.forEach(o),ft=s(e),p(ge.$$.fragment,e),_t=s(e),I=i(e,"DIV",{class:!0});var B=v(I);p(ue.$$.fragment,B),Zt=s(B),Pe=i(B,"P",{"data-svelte-h":!0}),y(Pe)!=="svelte-1nclzmj"&&(Pe.textContent=ko),Et=s(B),H=i(B,"DIV",{class:!0});var $t=v(H);p(fe.$$.fragment,$t),Rt=s($t),We=i($t,"P",{"data-svelte-h":!0}),y(We)!=="svelte-1o9eza"&&(We.innerHTML=Co),$t.forEach(o),Gt=s(B),Q=i(B,"DIV",{class:!0});var Ut=v(Q);p(_e.$$.fragment,Ut),Ht=s(Ut),Ze=i(Ut,"P",{"data-svelte-h":!0}),y(Ze)!=="svelte-kk16qw"&&(Ze.innerHTML=Io),Ut.forEach(o),B.forEach(o),yt=s(e),p(ye.$$.fragment,e),Tt=s(e),Z=i(e,"DIV",{class:!0});var zt=v(Z);p(Te.$$.fragment,zt),Qt=s(zt),Ee=i(zt,"P",{"data-svelte-h":!0}),y(Ee)!=="svelte-1e52xps"&&(Ee.innerHTML=Jo),zt.forEach(o),Mt=s(e),p(Me.$$.fragment,e),bt=s(e),N=i(e,"DIV",{class:!0});var ot=v(N);p(be.$$.fragment,ot),Vt=s(ot),Re=i(ot,"P",{"data-svelte-h":!0}),y(Re)!=="svelte-1yio4ls"&&(Re.innerHTML=$o),Xt=s(ot),Ge=i(ot,"P",{"data-svelte-h":!0}),y(Ge)!=="svelte-o55m63"&&(Ge.innerHTML=Uo),ot.forEach(o),vt=s(e),p(ve.$$.fragment,e),wt=s(e),j=i(e,"DIV",{class:!0});var L=v(j);p(we.$$.fragment,L),St=s(L),He=i(L,"P",{"data-svelte-h":!0}),y(He)!=="svelte-1nvpgt8"&&(He.innerHTML=zo),Dt=s(L),Qe=i(L,"P",{"data-svelte-h":!0}),y(Qe)!=="svelte-hswkmf"&&(Qe.innerHTML=Fo),Ot=s(L),Ve=i(L,"P",{"data-svelte-h":!0}),y(Ve)!=="svelte-hv6iwd"&&(Ve.innerHTML=No),Yt=s(L),q=i(L,"DIV",{class:!0});var nt=v(q);p(xe.$$.fragment,nt),Kt=s(nt),Xe=i(nt,"P",{"data-svelte-h":!0}),y(Xe)!=="svelte-y3k5h8"&&(Xe.innerHTML=Bo),eo=s(nt),p(V.$$.fragment,nt),nt.forEach(o),L.forEach(o),xt=s(e),p(Ae.$$.fragment,e),At=s(e),J=i(e,"DIV",{class:!0});var Y=v(J);p(je.$$.fragment,Y),to=s(Y),Se=i(Y,"P",{"data-svelte-h":!0}),y(Se)!=="svelte-1a7pb01"&&(Se.textContent=qo),oo=s(Y),De=i(Y,"P",{"data-svelte-h":!0}),y(De)!=="svelte-1r6b2j"&&(De.innerHTML=Lo),no=s(Y),z=i(Y,"DIV",{class:!0});var K=v(z);p(ke.$$.fragment,K),ao=s(K),Oe=i(K,"P",{"data-svelte-h":!0}),y(Oe)!=="svelte-1kg7dko"&&(Oe.innerHTML=Po),so=s(K),p(X.$$.fragment,K),ro=s(K),p(S.$$.fragment,K),K.forEach(o),Y.forEach(o),jt=s(e),p(Ce.$$.fragment,e),kt=s(e),k=i(e,"DIV",{class:!0});var P=v(k);p(Ie.$$.fragment,P),io=s(P),Ye=i(P,"P",{"data-svelte-h":!0}),y(Ye)!=="svelte-1yqt7kz"&&(Ye.textContent=Wo),lo=s(P),Ke=i(P,"P",{"data-svelte-h":!0}),y(Ke)!=="svelte-21u6jb"&&(Ke.innerHTML=Zo),co=s(P),et=i(P,"P",{"data-svelte-h":!0}),y(et)!=="svelte-hswkmf"&&(et.innerHTML=Eo),mo=s(P),F=i(P,"DIV",{class:!0});var ee=v(F);p(Je.$$.fragment,ee),po=s(ee),tt=i(ee,"P",{"data-svelte-h":!0}),y(tt)!=="svelte-1or1ojk"&&(tt.innerHTML=Ro),ho=s(ee),p(D.$$.fragment,ee),go=s(ee),p(O.$$.fragment,ee),ee.forEach(o),P.forEach(o),Ct=s(e),p($e.$$.fragment,e),It=s(e),at=i(e,"P",{}),v(at).forEach(o),this.h()},h(){w(l,"name","hf:doc:metadata"),w(l,"content",nn),w(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(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(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){n(document.head,l),d(e,M,t),d(e,_,t),d(e,T,t),h(b,e,t),d(e,c,t),h(x,e,t),d(e,rt,t),d(e,te,t),d(e,it,t),d(e,oe,t),d(e,lt,t),d(e,ne,t),d(e,dt,t),d(e,ae,t),d(e,ct,t),d(e,se,t),d(e,mt,t),h(re,e,t),d(e,pt,t),d(e,ie,t),d(e,ht,t),h(le,e,t),d(e,gt,t),h(de,e,t),d(e,ut,t),d(e,A,t),h(ce,A,null),n(A,Ft),n(A,Ne),n(A,Nt),n(A,E),h(me,E,null),n(E,Bt),n(E,Be),n(A,qt),n(A,R),h(pe,R,null),n(R,Lt),n(R,qe),n(A,Pt),n(A,G),h(he,G,null),n(G,Wt),n(G,Le),d(e,ft,t),h(ge,e,t),d(e,_t,t),d(e,I,t),h(ue,I,null),n(I,Zt),n(I,Pe),n(I,Et),n(I,H),h(fe,H,null),n(H,Rt),n(H,We),n(I,Gt),n(I,Q),h(_e,Q,null),n(Q,Ht),n(Q,Ze),d(e,yt,t),h(ye,e,t),d(e,Tt,t),d(e,Z,t),h(Te,Z,null),n(Z,Qt),n(Z,Ee),d(e,Mt,t),h(Me,e,t),d(e,bt,t),d(e,N,t),h(be,N,null),n(N,Vt),n(N,Re),n(N,Xt),n(N,Ge),d(e,vt,t),h(ve,e,t),d(e,wt,t),d(e,j,t),h(we,j,null),n(j,St),n(j,He),n(j,Dt),n(j,Qe),n(j,Ot),n(j,Ve),n(j,Yt),n(j,q),h(xe,q,null),n(q,Kt),n(q,Xe),n(q,eo),h(V,q,null),d(e,xt,t),h(Ae,e,t),d(e,At,t),d(e,J,t),h(je,J,null),n(J,to),n(J,Se),n(J,oo),n(J,De),n(J,no),n(J,z),h(ke,z,null),n(z,ao),n(z,Oe),n(z,so),h(X,z,null),n(z,ro),h(S,z,null),d(e,jt,t),h(Ce,e,t),d(e,kt,t),d(e,k,t),h(Ie,k,null),n(k,io),n(k,Ye),n(k,lo),n(k,Ke),n(k,co),n(k,et),n(k,mo),n(k,F),h(Je,F,null),n(F,po),n(F,tt),n(F,ho),h(D,F,null),n(F,go),h(O,F,null),d(e,Ct,t),h($e,e,t),d(e,It,t),d(e,at,t),Jt=!0},p(e,[t]){const $={};t&2&&($.$$scope={dirty:t,ctx:e}),V.$set($);const Ue={};t&2&&(Ue.$$scope={dirty:t,ctx:e}),X.$set(Ue);const ze={};t&2&&(ze.$$scope={dirty:t,ctx:e}),S.$set(ze);const Fe={};t&2&&(Fe.$$scope={dirty:t,ctx:e}),D.$set(Fe);const B={};t&2&&(B.$$scope={dirty:t,ctx:e}),O.$set(B)},i(e){Jt||(g(b.$$.fragment,e),g(x.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(de.$$.fragment,e),g(ce.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),g(he.$$.fragment,e),g(ge.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(_e.$$.fragment,e),g(ye.$$.fragment,e),g(Te.$$.fragment,e),g(Me.$$.fragment,e),g(be.$$.fragment,e),g(ve.$$.fragment,e),g(we.$$.fragment,e),g(xe.$$.fragment,e),g(V.$$.fragment,e),g(Ae.$$.fragment,e),g(je.$$.fragment,e),g(ke.$$.fragment,e),g(X.$$.fragment,e),g(S.$$.fragment,e),g(Ce.$$.fragment,e),g(Ie.$$.fragment,e),g(Je.$$.fragment,e),g(D.$$.fragment,e),g(O.$$.fragment,e),g($e.$$.fragment,e),Jt=!0)},o(e){u(b.$$.fragment,e),u(x.$$.fragment,e),u(re.$$.fragment,e),u(le.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(he.$$.fragment,e),u(ge.$$.fragment,e),u(ue.$$.fragment,e),u(fe.$$.fragment,e),u(_e.$$.fragment,e),u(ye.$$.fragment,e),u(Te.$$.fragment,e),u(Me.$$.fragment,e),u(be.$$.fragment,e),u(ve.$$.fragment,e),u(we.$$.fragment,e),u(xe.$$.fragment,e),u(V.$$.fragment,e),u(Ae.$$.fragment,e),u(je.$$.fragment,e),u(ke.$$.fragment,e),u(X.$$.fragment,e),u(S.$$.fragment,e),u(Ce.$$.fragment,e),u(Ie.$$.fragment,e),u(Je.$$.fragment,e),u(D.$$.fragment,e),u(O.$$.fragment,e),u($e.$$.fragment,e),Jt=!1},d(e){e&&(o(M),o(_),o(T),o(c),o(rt),o(te),o(it),o(oe),o(lt),o(ne),o(dt),o(ae),o(ct),o(se),o(mt),o(pt),o(ie),o(ht),o(gt),o(ut),o(A),o(ft),o(_t),o(I),o(yt),o(Tt),o(Z),o(Mt),o(bt),o(N),o(vt),o(wt),o(j),o(xt),o(At),o(J),o(jt),o(kt),o(k),o(Ct),o(It),o(at)),o(l),f(b,e),f(x,e),f(re,e),f(le,e),f(de,e),f(ce),f(me),f(pe),f(he),f(ge,e),f(ue),f(fe),f(_e),f(ye,e),f(Te),f(Me,e),f(be),f(ve,e),f(we),f(xe),f(V),f(Ae,e),f(je),f(ke),f(X),f(S),f(Ce,e),f(Ie),f(Je),f(D),f(O),f($e,e)}}}const nn='{"title":"Aria","local":"aria","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"AriaImageProcessor","local":"transformers.AriaImageProcessor","sections":[],"depth":2},{"title":"AriaProcessor","local":"transformers.AriaProcessor","sections":[],"depth":2},{"title":"AriaTextConfig","local":"transformers.AriaTextConfig","sections":[],"depth":2},{"title":"AriaConfig","local":"transformers.AriaConfig","sections":[],"depth":2},{"title":"AriaTextModel","local":"transformers.AriaTextModel","sections":[],"depth":2},{"title":"AriaTextForCausalLM","local":"transformers.AriaTextForCausalLM","sections":[],"depth":2},{"title":"AriaForConditionalGeneration","local":"transformers.AriaForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function an(U){return Qo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hn extends Vo{constructor(l){super(),Xo(this,l,an,on,Ho,{})}}export{hn as component};
