import{s as rn,f as dn,o as ln,n as He}from"../chunks/scheduler.25b97de1.js";import{S as cn,i as mn,g as l,s as o,r as m,A as pn,h as c,f as n,c as a,j as P,u as p,x as _,k as I,y as i,a as s,v as h,d as u,t as f,w as g}from"../chunks/index.d9030fc9.js";import{T as jt}from"../chunks/Tip.baa67368.js";import{D as ve}from"../chunks/Docstring.ffac8efa.js";import{C as pt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as sn}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as L,E as hn}from"../chunks/EditOnGithub.91d95064.js";function un(C){let r,b;return r=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFphbWJhMk1vZGVsJTJDJTIwWmFtYmEyQ29uZmlnJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFphbWJhMi0yLjdCJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFphbWJhMkNvbmZpZygpJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMFphbWJhMi0yLjdCJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBaYW1iYTJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Zamba2Model, Zamba2Config
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Zamba2-2.7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Zamba2Config()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the Zamba2-2.7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Zamba2Model(configuration)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){m(r.$$.fragment)},l(d){p(r.$$.fragment,d)},m(d,y){h(r,d,y),b=!0},p:He,i(d){b||(u(r.$$.fragment,d),b=!0)},o(d){f(r.$$.fragment,d),b=!1},d(d){g(r,d)}}}function fn(C){let r,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=b},l(d){r=c(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(d,y){s(d,r,y)},p:He,d(d){d&&n(r)}}}function gn(C){let r,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=b},l(d){r=c(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(d,y){s(d,r,y)},p:He,d(d){d&&n(r)}}}function _n(C){let r,b="Example:",d,y,z;return y=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBaYW1iYTJGb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwWmFtYmEyRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMlp5cGhyYSUyRlphbWJhMi03Qi12MSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJaeXBocmElMkZaYW1iYTItN0ItdjElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySGV5JTJDJTIwYXJlJTIweW91JTIwY29uc2Npb3VzJTNGJTIwQ2FuJTIweW91JTIwdGFsayUyMHRvJTIwbWUlM0YlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cy5pbnB1dF9pZHMlMkMlMjBtYXhfbGVuZ3RoJTNEMzApJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, Zamba2ForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = Zamba2ForCausalLM.from_pretrained(<span class="hljs-string">&quot;Zyphra/Zamba2-7B-v1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Zyphra/Zamba2-7B-v1&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(){r=l("p"),r.textContent=b,d=o(),m(y.$$.fragment)},l(v){r=c(v,"P",{"data-svelte-h":!0}),_(r)!=="svelte-11lpom8"&&(r.textContent=b),d=a(v),p(y.$$.fragment,v)},m(v,q){s(v,r,q),s(v,d,q),h(y,v,q),z=!0},p:He,i(v){z||(u(y.$$.fragment,v),z=!0)},o(v){f(y.$$.fragment,v),z=!1},d(v){v&&(n(r),n(d)),g(y,v)}}}function bn(C){let r,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=b},l(d){r=c(d,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(d,y){s(d,r,y)},p:He,d(d){d&&n(r)}}}function yn(C){let r,b,d,y,z,v,q,Wt='Zamba2 is a large language model (LLM) trained by Zyphra, and made available under an Apache 2.0 license. Please see the <a href="https://huggingface.co/collections/zyphra/" rel="nofollow">Zyphra Hugging Face</a> repository for model weights.',Pe,R,Ht='This model was contributed by <a href="https://huggingface.co/pglo" rel="nofollow">pglo</a>.',Be,A,Se,D,Pt='Zamba2-1.2B, Zamba2-2.7B and Zamba2-7B are hybrid models combining state-space models (Specifically <a href="https://github.com/state-spaces/mamba" rel="nofollow">Mamba</a>) and transformer, and were trained using next-token prediction. Zamba2 uses shared transformer layers after every 6 mamba blocks. It uses the <a href="https://huggingface.co/mistralai/Mistral-7B-v0.1" rel="nofollow">Mistral v0.1 tokenizer</a>. We came to this architecture after a series of ablations at small scales. Zamba2-1.2B, Zamba2-2.7B and Zamba2-7B were pre-trained on 2T and 3T tokens, respectively.',Ue,B,Bt,Ne,E,Ge,O,Ve,X,St="Zamba2 requires you use <code>transformers</code> version 4.48.0 or higher:",Re,Y,Ae,Q,De,K,Ee,ee,Oe,te,Ut="The model cards can be found at:",Xe,ne,Nt='<li><a href="https://huggingface.co/Zyphra/Zamba2-1.2B" rel="nofollow">Zamba2-1.2B</a></li> <li><a href="https://huggingface.co/Zyphra/Zamba2-2.7B" rel="nofollow">Zamba2-2.7B</a></li> <li><a href="https://huggingface.co/Zyphra/Zamba2-7B" rel="nofollow">Zamba2-7B</a></li>',Ye,oe,Qe,ae,Gt='For issues with model output, or community discussion, please use the Hugging Face community <a href="https://huggingface.co/Zyphra/Zamba2-7B/discussions" rel="nofollow">forum</a>',Ke,se,et,re,Vt="The model weights are open-sourced via an Apache 2.0 license.",tt,ie,nt,k,de,ht,Te,Rt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2Model">Zamba2Model</a>. It is used to instantiate a
Zamba2 model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the Zamba2 model.`,ut,ke,At='<a href="https://huggingface.co/Zyphra/Zamba2-2.7B" rel="nofollow">Zyphra/Zamba2-2.7B</a>',ft,Me,Dt=`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.`,gt,S,ot,le,at,M,ce,_t,$e,Et=`The bare Zamba2 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.)`,bt,we,Ot=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,yt,Ze,Xt="Model consisting of <em>config.num_hidden_layers</em> layers.",vt,J,me,Tt,Ce,Yt='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2Model">Zamba2Model</a> forward method, overrides the <code>__call__</code> special method.',kt,U,st,pe,rt,W,he,Mt,x,ue,$t,ze,Qt='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2ForCausalLM">Zamba2ForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',wt,N,Zt,G,it,fe,dt,T,ge,Ct,xe,Kt="The Zamba2 Model with a sequence classification head on top (linear layer).",zt,Ie,en=`<a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2ForSequenceClassification">Zamba2ForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,xt,Le,tn=`Since it does classification on the last token, it requires to know the position of the last token. If a
<code>pad_token_id</code> is defined in the configuration, it finds the last token that is not a padding token in each row. If
no <code>pad_token_id</code> is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when <code>inputs_embeds</code> are passed instead of <code>input_ids</code>, it does the same (take the last value in
each row of the batch).`,It,qe,nn=`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.)`,Lt,Fe,on=`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.`,qt,j,_e,Ft,Je,an='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2ForSequenceClassification">Zamba2ForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Jt,V,lt,be,ct,We,mt;return z=new L({props:{title:"Zamba2",local:"zamba2",headingTag:"h1"}}),A=new L({props:{title:"Model details",local:"model-details",headingTag:"h2"}}),E=new L({props:{title:"Quick start",local:"quick-start",headingTag:"h2"}}),O=new L({props:{title:"Presequities",local:"presequities",headingTag:"h3"}}),Y=new pt({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUzRSUzRDQuNDguMA==",highlighted:"pip install transformers&gt;=4.48.0",wrap:!1}}),Q=new L({props:{title:"Inference",local:"inference",headingTag:"h2"}}),K=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyWnlwaHJhJTJGWmFtYmEyLTdCJTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMlp5cGhyYSUyRlphbWJhMi03QiUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJjdWRhJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEElMEFpbnB1dF90ZXh0JTIwJTNEJTIwJTIyV2hhdCUyMGZhY3RvcnMlMjBjb250cmlidXRlZCUyMHRvJTIwdGhlJTIwZmFsbCUyMG9mJTIwdGhlJTIwUm9tYW4lMjBFbXBpcmUlM0YlMjIlMEFpbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoaW5wdXRfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKCUyMmN1ZGElMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRfaWRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxMDApJTBBcHJpbnQodG9rZW5pemVyLmRlY29kZShvdXRwdXRzJTVCMCU1RCkp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForCausalLM
<span class="hljs-keyword">import</span> torch

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Zyphra/Zamba2-7B&quot;</span>)
model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;Zyphra/Zamba2-7B&quot;</span>, device_map=<span class="hljs-string">&quot;cuda&quot;</span>, torch_dtype=torch.bfloat16)

input_text = <span class="hljs-string">&quot;What factors contributed to the fall of the Roman Empire?&quot;</span>
input_ids = tokenizer(input_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

outputs = model.generate(**input_ids, max_new_tokens=<span class="hljs-number">100</span>)
<span class="hljs-built_in">print</span>(tokenizer.decode(outputs[<span class="hljs-number">0</span>]))`,wrap:!1}}),ee=new L({props:{title:"Model card",local:"model-card",headingTag:"h2"}}),oe=new L({props:{title:"Issues",local:"issues",headingTag:"h2"}}),se=new L({props:{title:"License",local:"license",headingTag:"h2"}}),ie=new L({props:{title:"Zamba2Config",local:"transformers.Zamba2Config",headingTag:"h2"}}),de=new ve({props:{name:"class transformers.Zamba2Config",anchor:"transformers.Zamba2Config",parameters:[{name:"vocab_size",val:" = 32000"},{name:"max_position_embeddings",val:" = 4096"},{name:"hidden_size",val:" = 2560"},{name:"num_hidden_layers",val:" = 54"},{name:"layers_block_type",val:" = None"},{name:"mamba_d_state",val:" = 64"},{name:"mamba_d_conv",val:" = 4"},{name:"mamba_expand",val:" = 2"},{name:"mamba_ngroups",val:" = 1"},{name:"time_step_min",val:" = 0.001"},{name:"time_step_max",val:" = 0.1"},{name:"time_step_floor",val:" = 0.0001"},{name:"time_step_limit",val:" = None"},{name:"n_mamba_heads",val:" = 8"},{name:"use_conv_bias",val:" = True"},{name:"chunk_size",val:" = 256"},{name:"add_bias_linear",val:" = False"},{name:"intermediate_size",val:" = None"},{name:"hidden_act",val:" = 'gelu'"},{name:"num_attention_heads",val:" = 32"},{name:"num_key_value_heads",val:" = None"},{name:"attention_dropout",val:" = 0.0"},{name:"num_mem_blocks",val:" = 1"},{name:"use_shared_attention_adapter",val:" = False"},{name:"adapter_rank",val:" = 128"},{name:"use_mem_rope",val:" = False"},{name:"rope_theta",val:" = 10000"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"num_logits_to_keep",val:" = 1"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"use_long_context",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Zamba2Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the Zamba2 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/zamba2#transformers.Zamba2Model">Zamba2Model</a>`,name:"vocab_size"},{anchor:"transformers.Zamba2Config.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.Zamba2Config.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2560) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.Zamba2Config.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 54) &#x2014;
Number of hidden layers in the model.`,name:"num_hidden_layers"},{anchor:"transformers.Zamba2Config.layers_block_type",description:`<strong>layers_block_type</strong> (<code>list</code>, <em>optional</em>) &#x2014;
List of layer types, which can be either &#x201C;mamba&#x201D; or &#x201C;hybrid&#x201D;.`,name:"layers_block_type"},{anchor:"transformers.Zamba2Config.mamba_d_state",description:"<strong>mamba_d_state</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014; shape of the state space latents.",name:"mamba_d_state"},{anchor:"transformers.Zamba2Config.mamba_d_conv",description:"<strong>mamba_d_conv</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Size of the convolution kernel.",name:"mamba_d_conv"},{anchor:"transformers.Zamba2Config.mamba_expand",description:"<strong>mamba_expand</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; Expanding factor used to determine the intermediate size.",name:"mamba_expand"},{anchor:"transformers.Zamba2Config.mamba_ngroups",description:`<strong>mamba_ngroups</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of groups for the evolution matrices of mamba 2.`,name:"mamba_ngroups"},{anchor:"transformers.Zamba2Config.time_step_min",description:`<strong>time_step_min</strong> (<code>float</code>, <em>optional</em>, defaults to 0.001) &#x2014;
Minimum <code>time_step</code> used to bound <code>dt_proj.bias</code>.`,name:"time_step_min"},{anchor:"transformers.Zamba2Config.time_step_max",description:`<strong>time_step_max</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Maximum <code>time_step</code> used to bound <code>dt_proj.bias</code>.`,name:"time_step_max"},{anchor:"transformers.Zamba2Config.time_step_floor",description:`<strong>time_step_floor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0001) &#x2014;
Minimum clamping value of the <code>dt_proj.bias</code> layer initialization.`,name:"time_step_floor"},{anchor:"transformers.Zamba2Config.time_step_limit",description:`<strong>time_step_limit</strong> (<code>tuple</code>, <em>optional</em>) &#x2014;
Accepted range of time step values.`,name:"time_step_limit"},{anchor:"transformers.Zamba2Config.n_mamba_heads",description:`<strong>n_mamba_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of heads for the evolution matrices of mamba 2.`,name:"n_mamba_heads"},{anchor:"transformers.Zamba2Config.use_conv_bias",description:`<strong>use_conv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use bias in the convolution layer of the mixer block.`,name:"use_conv_bias"},{anchor:"transformers.Zamba2Config.chunk_size",description:`<strong>chunk_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Size of the chunks that will comprise the sequence.`,name:"chunk_size"},{anchor:"transformers.Zamba2Config.add_bias_linear",description:`<strong>add_bias_linear</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating whether or not to use bias in various layers`,name:"add_bias_linear"},{anchor:"transformers.Zamba2Config.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4 * hidden_size) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.Zamba2Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the MLP.`,name:"hidden_act"},{anchor:"transformers.Zamba2Config.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.Zamba2Config.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=None</code>, the model will use Multi Head Attention (MHA), if
\`num_key_value_heads=1 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>.`,name:"num_key_value_heads"},{anchor:"transformers.Zamba2Config.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.Zamba2Config.num_mem_blocks",description:`<strong>num_mem_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of unshared transformer blocks.`,name:"num_mem_blocks"},{anchor:"transformers.Zamba2Config.use_shared_attention_adapter",description:`<strong>use_shared_attention_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, unshared adapters (formally the same as LoRA but used in the base model) will be added to the q, k, v projectors in the shared attention layers.`,name:"use_shared_attention_adapter"},{anchor:"transformers.Zamba2Config.adapter_rank",description:`<strong>adapter_rank</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Rank of the adapter in the shared MLP and shared attention layers.`,name:"adapter_rank"},{anchor:"transformers.Zamba2Config.use_mem_rope",description:`<strong>use_mem_rope</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If True, includes RoPE in the shared attention layers.`,name:"use_mem_rope"},{anchor:"transformers.Zamba2Config.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to <code>10000.0</code>) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.Zamba2Config.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.Zamba2Config.rms_norm_eps",description:`<strong>rms_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the rms normalization layers.`,name:"rms_norm_eps"},{anchor:"transformers.Zamba2Config.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.Zamba2Config.num_logits_to_keep",description:`<strong>num_logits_to_keep</strong> (<code>int</code> or <code>None</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of prompt logits to calculate during generation. If <code>None</code>, all logits will be calculated. If an
integer value, only last <code>num_logits_to_keep</code> logits will be calculated. Default is 1 because only the
logits of the last prompt token are needed for generation. For long sequences, the logits for the entire
sequence may use a lot of memory so, setting <code>num_logits_to_keep=1</code> will reduce memory footprint
significantly.`,name:"num_logits_to_keep"},{anchor:"transformers.Zamba2Config.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the padding token.`,name:"pad_token_id"},{anchor:"transformers.Zamba2Config.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The id of the &#x201C;beginning-of-sequence&#x201D; token.`,name:"bos_token_id"},{anchor:"transformers.Zamba2Config.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the &#x201C;end-of-sequence&#x201D; token.`,name:"eos_token_id"},{anchor:"transformers.Zamba2Config.use_long_context",description:`<strong>use_long_context</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates the context-extended version of Zamba by modifying RoPE.`,name:"use_long_context"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/configuration_zamba2.py#L26"}}),S=new sn({props:{anchor:"transformers.Zamba2Config.example",$$slots:{default:[un]},$$scope:{ctx:C}}}),le=new L({props:{title:"Zamba2Model",local:"transformers.Zamba2Model",headingTag:"h2"}}),ce=new ve({props:{name:"class transformers.Zamba2Model",anchor:"transformers.Zamba2Model",parameters:[{name:"config",val:": Zamba2Config"}],parametersDescription:[{anchor:"transformers.Zamba2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2Config">Zamba2Config</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.Zamba2Model.config",description:"<strong>config</strong> &#x2014; Zamba2Config",name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1347"}}),me=new ve({props:{name:"forward",anchor:"transformers.Zamba2Model.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.models.zamba2.modeling_zamba2.Zamba2HybridDynamicCache] = 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"}],parametersDescription:[{anchor:"transformers.Zamba2Model.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.Zamba2Model.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.Zamba2Model.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.Zamba2Model.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Zamba2HybridDynamicCache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
A Zamba2HybridDynamicCache object containing pre-computed hidden-states (keys and values in the
self-attention blocks and convolution and ssm states in the mamba blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.
Key and value cache tensors have shape <code>(batch_size, num_heads, seq_len, head_dim)</code>.
Convolution and ssm states tensors have shape <code>(batch_size, d_inner, d_conv)</code> and
<code>(batch_size, d_inner, d_state)</code> respectively.
See the <code>Zamba2HybridDynamicCache</code> class for more details.</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.Zamba2Model.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.Zamba2Model.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.Zamba2Model.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.Zamba2Model.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.Zamba2Model.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.Zamba2Model.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/zamba2/modeling_zamba2.py#L1401"}}),U=new jt({props:{$$slots:{default:[fn]},$$scope:{ctx:C}}}),pe=new L({props:{title:"Zamba2ForCausalLM",local:"transformers.Zamba2ForCausalLM",headingTag:"h2"}}),he=new ve({props:{name:"class transformers.Zamba2ForCausalLM",anchor:"transformers.Zamba2ForCausalLM",parameters:[{name:"config",val:": Zamba2Config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1607"}}),ue=new ve({props:{name:"forward",anchor:"transformers.Zamba2ForCausalLM.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.models.zamba2.modeling_zamba2.Zamba2HybridDynamicCache] = 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:"logits_to_keep",val:": typing.Union[int, torch.Tensor] = 0"},{name:"**loss_kwargs",val:""}],parametersDescription:[{anchor:"transformers.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Zamba2HybridDynamicCache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
A Zamba2HybridDynamicCache object containing pre-computed hidden-states (keys and values in the
self-attention blocks and convolution and ssm states in the mamba blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.
Key and value cache tensors have shape <code>(batch_size, num_heads, seq_len, head_dim)</code>.
Convolution and ssm states tensors have shape <code>(batch_size, d_inner, d_conv)</code> and
<code>(batch_size, d_inner, d_state)</code> respectively.
See the <code>Zamba2HybridDynamicCache</code> class for more details.</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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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.Zamba2ForCausalLM.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>logits_to_keep (<code>int</code> or <code>torch.Tensor</code>, <em>optional</em>):
If an <code>int</code>, compute logits for the last <code>logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.
If a <code>torch.Tensor</code>, must be 1D corresponding to the indices to keep in the sequence length dimension.
This is useful when using packed tensor format (single dimension for batch and sequence length).`,name:"Args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1636",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 (<code>Zyphra/Zamba2-2.7B</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),N=new jt({props:{$$slots:{default:[gn]},$$scope:{ctx:C}}}),G=new sn({props:{anchor:"transformers.Zamba2ForCausalLM.forward.example",$$slots:{default:[_n]},$$scope:{ctx:C}}}),fe=new L({props:{title:"Zamba2ForSequenceClassification",local:"transformers.Zamba2ForSequenceClassification",headingTag:"h2"}}),ge=new ve({props:{name:"class transformers.Zamba2ForSequenceClassification",anchor:"transformers.Zamba2ForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Zamba2ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2Config">Zamba2Config</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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1785"}}),_e=new ve({props:{name:"forward",anchor:"transformers.Zamba2ForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.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"}],parametersDescription:[{anchor:"transformers.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Zamba2HybridDynamicCache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
A Zamba2HybridDynamicCache object containing pre-computed hidden-states (keys and values in the
self-attention blocks and convolution and ssm states in the mamba blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.
Key and value cache tensors have shape <code>(batch_size, num_heads, seq_len, head_dim)</code>.
Convolution and ssm states tensors have shape <code>(batch_size, d_inner, d_conv)</code> and
<code>(batch_size, d_inner, d_state)</code> respectively.
See the <code>Zamba2HybridDynamicCache</code> class for more details.</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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.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.Zamba2ForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1817"}}),V=new jt({props:{$$slots:{default:[bn]},$$scope:{ctx:C}}}),be=new hn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/zamba2.md"}}),{c(){r=l("meta"),b=o(),d=l("p"),y=o(),m(z.$$.fragment),v=o(),q=l("p"),q.innerHTML=Wt,Pe=o(),R=l("p"),R.innerHTML=Ht,Be=o(),m(A.$$.fragment),Se=o(),D=l("p"),D.innerHTML=Pt,Ue=o(),B=l("img"),Ne=o(),m(E.$$.fragment),Ge=o(),m(O.$$.fragment),Ve=o(),X=l("p"),X.innerHTML=St,Re=o(),m(Y.$$.fragment),Ae=o(),m(Q.$$.fragment),De=o(),m(K.$$.fragment),Ee=o(),m(ee.$$.fragment),Oe=o(),te=l("p"),te.textContent=Ut,Xe=o(),ne=l("ul"),ne.innerHTML=Nt,Ye=o(),m(oe.$$.fragment),Qe=o(),ae=l("p"),ae.innerHTML=Gt,Ke=o(),m(se.$$.fragment),et=o(),re=l("p"),re.textContent=Vt,tt=o(),m(ie.$$.fragment),nt=o(),k=l("div"),m(de.$$.fragment),ht=o(),Te=l("p"),Te.innerHTML=Rt,ut=o(),ke=l("p"),ke.innerHTML=At,ft=o(),Me=l("p"),Me.innerHTML=Dt,gt=o(),m(S.$$.fragment),ot=o(),m(le.$$.fragment),at=o(),M=l("div"),m(ce.$$.fragment),_t=o(),$e=l("p"),$e.innerHTML=Et,bt=o(),we=l("p"),we.innerHTML=Ot,yt=o(),Ze=l("p"),Ze.innerHTML=Xt,vt=o(),J=l("div"),m(me.$$.fragment),Tt=o(),Ce=l("p"),Ce.innerHTML=Yt,kt=o(),m(U.$$.fragment),st=o(),m(pe.$$.fragment),rt=o(),W=l("div"),m(he.$$.fragment),Mt=o(),x=l("div"),m(ue.$$.fragment),$t=o(),ze=l("p"),ze.innerHTML=Qt,wt=o(),m(N.$$.fragment),Zt=o(),m(G.$$.fragment),it=o(),m(fe.$$.fragment),dt=o(),T=l("div"),m(ge.$$.fragment),Ct=o(),xe=l("p"),xe.textContent=Kt,zt=o(),Ie=l("p"),Ie.innerHTML=en,xt=o(),Le=l("p"),Le.innerHTML=tn,It=o(),qe=l("p"),qe.innerHTML=nn,Lt=o(),Fe=l("p"),Fe.innerHTML=on,qt=o(),j=l("div"),m(_e.$$.fragment),Ft=o(),Je=l("p"),Je.innerHTML=an,Jt=o(),m(V.$$.fragment),lt=o(),m(be.$$.fragment),ct=o(),We=l("p"),this.h()},l(e){const t=pn("svelte-u9bgzb",document.head);r=c(t,"META",{name:!0,content:!0}),t.forEach(n),b=a(e),d=c(e,"P",{}),P(d).forEach(n),y=a(e),p(z.$$.fragment,e),v=a(e),q=c(e,"P",{"data-svelte-h":!0}),_(q)!=="svelte-39w8p0"&&(q.innerHTML=Wt),Pe=a(e),R=c(e,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1hxftw9"&&(R.innerHTML=Ht),Be=a(e),p(A.$$.fragment,e),Se=a(e),D=c(e,"P",{"data-svelte-h":!0}),_(D)!=="svelte-qwjsus"&&(D.innerHTML=Pt),Ue=a(e),B=c(e,"IMG",{src:!0,width:!0,height:!0}),Ne=a(e),p(E.$$.fragment,e),Ge=a(e),p(O.$$.fragment,e),Ve=a(e),X=c(e,"P",{"data-svelte-h":!0}),_(X)!=="svelte-11vg79s"&&(X.innerHTML=St),Re=a(e),p(Y.$$.fragment,e),Ae=a(e),p(Q.$$.fragment,e),De=a(e),p(K.$$.fragment,e),Ee=a(e),p(ee.$$.fragment,e),Oe=a(e),te=c(e,"P",{"data-svelte-h":!0}),_(te)!=="svelte-ktiv3r"&&(te.textContent=Ut),Xe=a(e),ne=c(e,"UL",{"data-svelte-h":!0}),_(ne)!=="svelte-1t5oo39"&&(ne.innerHTML=Nt),Ye=a(e),p(oe.$$.fragment,e),Qe=a(e),ae=c(e,"P",{"data-svelte-h":!0}),_(ae)!=="svelte-a82suw"&&(ae.innerHTML=Gt),Ke=a(e),p(se.$$.fragment,e),et=a(e),re=c(e,"P",{"data-svelte-h":!0}),_(re)!=="svelte-9pg9vx"&&(re.textContent=Vt),tt=a(e),p(ie.$$.fragment,e),nt=a(e),k=c(e,"DIV",{class:!0});var w=P(k);p(de.$$.fragment,w),ht=a(w),Te=c(w,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-imk2ir"&&(Te.innerHTML=Rt),ut=a(w),ke=c(w,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-ywkcox"&&(ke.innerHTML=At),ft=a(w),Me=c(w,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-o55m63"&&(Me.innerHTML=Dt),gt=a(w),p(S.$$.fragment,w),w.forEach(n),ot=a(e),p(le.$$.fragment,e),at=a(e),M=c(e,"DIV",{class:!0});var Z=P(M);p(ce.$$.fragment,Z),_t=a(Z),$e=c(Z,"P",{"data-svelte-h":!0}),_($e)!=="svelte-1b6pmkz"&&($e.innerHTML=Et),bt=a(Z),we=c(Z,"P",{"data-svelte-h":!0}),_(we)!=="svelte-hswkmf"&&(we.innerHTML=Ot),yt=a(Z),Ze=c(Z,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-icjgh4"&&(Ze.innerHTML=Xt),vt=a(Z),J=c(Z,"DIV",{class:!0});var H=P(J);p(me.$$.fragment,H),Tt=a(H),Ce=c(H,"P",{"data-svelte-h":!0}),_(Ce)!=="svelte-dr1d5k"&&(Ce.innerHTML=Yt),kt=a(H),p(U.$$.fragment,H),H.forEach(n),Z.forEach(n),st=a(e),p(pe.$$.fragment,e),rt=a(e),W=c(e,"DIV",{class:!0});var ye=P(W);p(he.$$.fragment,ye),Mt=a(ye),x=c(ye,"DIV",{class:!0});var F=P(x);p(ue.$$.fragment,F),$t=a(F),ze=c(F,"P",{"data-svelte-h":!0}),_(ze)!=="svelte-xyh4k8"&&(ze.innerHTML=Qt),wt=a(F),p(N.$$.fragment,F),Zt=a(F),p(G.$$.fragment,F),F.forEach(n),ye.forEach(n),it=a(e),p(fe.$$.fragment,e),dt=a(e),T=c(e,"DIV",{class:!0});var $=P(T);p(ge.$$.fragment,$),Ct=a($),xe=c($,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-1p6u4r0"&&(xe.textContent=Kt),zt=a($),Ie=c($,"P",{"data-svelte-h":!0}),_(Ie)!=="svelte-1r5woup"&&(Ie.innerHTML=en),xt=a($),Le=c($,"P",{"data-svelte-h":!0}),_(Le)!=="svelte-10ugs3m"&&(Le.innerHTML=tn),It=a($),qe=c($,"P",{"data-svelte-h":!0}),_(qe)!=="svelte-6pahdo"&&(qe.innerHTML=nn),Lt=a($),Fe=c($,"P",{"data-svelte-h":!0}),_(Fe)!=="svelte-hswkmf"&&(Fe.innerHTML=on),qt=a($),j=c($,"DIV",{class:!0});var je=P(j);p(_e.$$.fragment,je),Ft=a(je),Je=c(je,"P",{"data-svelte-h":!0}),_(Je)!=="svelte-u5nax0"&&(Je.innerHTML=an),Jt=a(je),p(V.$$.fragment,je),je.forEach(n),$.forEach(n),lt=a(e),p(be.$$.fragment,e),ct=a(e),We=c(e,"P",{}),P(We).forEach(n),this.h()},h(){I(r,"name","hf:doc:metadata"),I(r,"content",vn),dn(B.src,Bt="https://github.com/user-attachments/assets/c2cff209-b901-483c-87aa-774b82a0769f")||I(B,"src",Bt),I(B,"width","30%"),I(B,"height","40%"),I(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(T,"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){i(document.head,r),s(e,b,t),s(e,d,t),s(e,y,t),h(z,e,t),s(e,v,t),s(e,q,t),s(e,Pe,t),s(e,R,t),s(e,Be,t),h(A,e,t),s(e,Se,t),s(e,D,t),s(e,Ue,t),s(e,B,t),s(e,Ne,t),h(E,e,t),s(e,Ge,t),h(O,e,t),s(e,Ve,t),s(e,X,t),s(e,Re,t),h(Y,e,t),s(e,Ae,t),h(Q,e,t),s(e,De,t),h(K,e,t),s(e,Ee,t),h(ee,e,t),s(e,Oe,t),s(e,te,t),s(e,Xe,t),s(e,ne,t),s(e,Ye,t),h(oe,e,t),s(e,Qe,t),s(e,ae,t),s(e,Ke,t),h(se,e,t),s(e,et,t),s(e,re,t),s(e,tt,t),h(ie,e,t),s(e,nt,t),s(e,k,t),h(de,k,null),i(k,ht),i(k,Te),i(k,ut),i(k,ke),i(k,ft),i(k,Me),i(k,gt),h(S,k,null),s(e,ot,t),h(le,e,t),s(e,at,t),s(e,M,t),h(ce,M,null),i(M,_t),i(M,$e),i(M,bt),i(M,we),i(M,yt),i(M,Ze),i(M,vt),i(M,J),h(me,J,null),i(J,Tt),i(J,Ce),i(J,kt),h(U,J,null),s(e,st,t),h(pe,e,t),s(e,rt,t),s(e,W,t),h(he,W,null),i(W,Mt),i(W,x),h(ue,x,null),i(x,$t),i(x,ze),i(x,wt),h(N,x,null),i(x,Zt),h(G,x,null),s(e,it,t),h(fe,e,t),s(e,dt,t),s(e,T,t),h(ge,T,null),i(T,Ct),i(T,xe),i(T,zt),i(T,Ie),i(T,xt),i(T,Le),i(T,It),i(T,qe),i(T,Lt),i(T,Fe),i(T,qt),i(T,j),h(_e,j,null),i(j,Ft),i(j,Je),i(j,Jt),h(V,j,null),s(e,lt,t),h(be,e,t),s(e,ct,t),s(e,We,t),mt=!0},p(e,[t]){const w={};t&2&&(w.$$scope={dirty:t,ctx:e}),S.$set(w);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),U.$set(Z);const H={};t&2&&(H.$$scope={dirty:t,ctx:e}),N.$set(H);const ye={};t&2&&(ye.$$scope={dirty:t,ctx:e}),G.$set(ye);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),V.$set(F)},i(e){mt||(u(z.$$.fragment,e),u(A.$$.fragment,e),u(E.$$.fragment,e),u(O.$$.fragment,e),u(Y.$$.fragment,e),u(Q.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(oe.$$.fragment,e),u(se.$$.fragment,e),u(ie.$$.fragment,e),u(de.$$.fragment,e),u(S.$$.fragment,e),u(le.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(U.$$.fragment,e),u(pe.$$.fragment,e),u(he.$$.fragment,e),u(ue.$$.fragment,e),u(N.$$.fragment,e),u(G.$$.fragment,e),u(fe.$$.fragment,e),u(ge.$$.fragment,e),u(_e.$$.fragment,e),u(V.$$.fragment,e),u(be.$$.fragment,e),mt=!0)},o(e){f(z.$$.fragment,e),f(A.$$.fragment,e),f(E.$$.fragment,e),f(O.$$.fragment,e),f(Y.$$.fragment,e),f(Q.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(oe.$$.fragment,e),f(se.$$.fragment,e),f(ie.$$.fragment,e),f(de.$$.fragment,e),f(S.$$.fragment,e),f(le.$$.fragment,e),f(ce.$$.fragment,e),f(me.$$.fragment,e),f(U.$$.fragment,e),f(pe.$$.fragment,e),f(he.$$.fragment,e),f(ue.$$.fragment,e),f(N.$$.fragment,e),f(G.$$.fragment,e),f(fe.$$.fragment,e),f(ge.$$.fragment,e),f(_e.$$.fragment,e),f(V.$$.fragment,e),f(be.$$.fragment,e),mt=!1},d(e){e&&(n(b),n(d),n(y),n(v),n(q),n(Pe),n(R),n(Be),n(Se),n(D),n(Ue),n(B),n(Ne),n(Ge),n(Ve),n(X),n(Re),n(Ae),n(De),n(Ee),n(Oe),n(te),n(Xe),n(ne),n(Ye),n(Qe),n(ae),n(Ke),n(et),n(re),n(tt),n(nt),n(k),n(ot),n(at),n(M),n(st),n(rt),n(W),n(it),n(dt),n(T),n(lt),n(ct),n(We)),n(r),g(z,e),g(A,e),g(E,e),g(O,e),g(Y,e),g(Q,e),g(K,e),g(ee,e),g(oe,e),g(se,e),g(ie,e),g(de),g(S),g(le,e),g(ce),g(me),g(U),g(pe,e),g(he),g(ue),g(N),g(G),g(fe,e),g(ge),g(_e),g(V),g(be,e)}}}const vn='{"title":"Zamba2","local":"zamba2","sections":[{"title":"Model details","local":"model-details","sections":[],"depth":2},{"title":"Quick start","local":"quick-start","sections":[{"title":"Presequities","local":"presequities","sections":[],"depth":3}],"depth":2},{"title":"Inference","local":"inference","sections":[],"depth":2},{"title":"Model card","local":"model-card","sections":[],"depth":2},{"title":"Issues","local":"issues","sections":[],"depth":2},{"title":"License","local":"license","sections":[],"depth":2},{"title":"Zamba2Config","local":"transformers.Zamba2Config","sections":[],"depth":2},{"title":"Zamba2Model","local":"transformers.Zamba2Model","sections":[],"depth":2},{"title":"Zamba2ForCausalLM","local":"transformers.Zamba2ForCausalLM","sections":[],"depth":2},{"title":"Zamba2ForSequenceClassification","local":"transformers.Zamba2ForSequenceClassification","sections":[],"depth":2}],"depth":1}';function Tn(C){return ln(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xn extends cn{constructor(r){super(),mn(this,r,Tn,yn,rn,{})}}export{xn as component};
