import{s as co,A as mo,o as po,n as Pe}from"../chunks/scheduler.01eeda35.js";import{S as ho,i as uo,g as l,s as n,r as m,A as fo,h as c,f as o,c as a,j as P,u as p,x as _,k as C,y as i,a as s,v as h,d as u,t as f,w as g}from"../chunks/index.6dd51b66.js";import{T as Ht}from"../chunks/Tip.de9bae2b.js";import{D as Te}from"../chunks/Docstring.76e6b3cf.js";import{C as ut}from"../chunks/CodeBlock.864da1b0.js";import{E as lo}from"../chunks/ExampleCodeBlock.6a36fb6b.js";import{H as F,E as go}from"../chunks/EditOnGithub.7faefd25.js";function _o(x){let r,b;return r=new ut({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:Pe,i(d){b||(u(r.$$.fragment,d),b=!0)},o(d){f(r.$$.fragment,d),b=!1},d(d){g(r,d)}}}function bo(x){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:Pe,d(d){d&&o(r)}}}function yo(x){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:Pe,d(d){d&&o(r)}}}function vo(x){let r,b="Example:",d,y,z;return y=new ut({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=n(),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,L){s(v,r,L),s(v,d,L),h(y,v,L),z=!0},p:Pe,i(v){z||(u(y.$$.fragment,v),z=!0)},o(v){f(y.$$.fragment,v),z=!1},d(v){v&&(o(r),o(d)),g(y,v)}}}function To(x){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:Pe,d(d){d&&o(r)}}}function ko(x){let r,b,d,y,z,v,L,Pt='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="FlashAttention" src="https://img.shields.io/badge/%E2%9A%A1%EF%B8%8E%20FlashAttention-eae0c8?style=flat"/> <img alt="SDPA" src="https://img.shields.io/badge/SDPA-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',Be,A,Bt='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.',Se,D,St='This model was contributed by <a href="https://huggingface.co/pglo" rel="nofollow">pglo</a>.',Ue,E,Ne,R,Ut='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.',Ge,B,Nt,Ve,O,Ae,X,De,Y,Gt="Zamba2 requires you use <code>transformers</code> version 4.48.0 or higher:",Ee,Q,Re,K,Oe,ee,Xe,te,Ye,oe,Vt="The model cards can be found at:",Qe,ne,At='<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>',Ke,ae,et,se,Dt='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>',tt,re,ot,ie,Et="The model weights are open-sourced via an Apache 2.0 license.",nt,de,at,k,le,ft,ke,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.`,gt,Me,Ot='<a href="https://huggingface.co/Zyphra/Zamba2-2.7B" rel="nofollow">Zyphra/Zamba2-2.7B</a>',_t,$e,Xt=`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.`,bt,S,st,ce,rt,M,me,yt,we,Yt=`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.)`,vt,Ze,Qt=`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.`,Tt,Ce,Kt="Model consisting of <em>config.num_hidden_layers</em> layers.",kt,J,pe,Mt,xe,eo='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2Model">Zamba2Model</a> forward method, overrides the <code>__call__</code> special method.',$t,U,it,he,dt,W,ue,wt,I,fe,Zt,ze,to='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2ForCausalLM">Zamba2ForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Ct,N,xt,G,lt,ge,ct,T,_e,zt,Le,oo="The Zamba2 Model with a sequence classification head on top (linear layer).",Lt,Ie,no=`<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.`,It,Fe,ao=`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).`,Ft,qe,so=`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.)`,qt,Je,ro=`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.`,Jt,j,be,jt,je,io='The <a href="/docs/transformers/main/en/model_doc/zamba2#transformers.Zamba2ForSequenceClassification">Zamba2ForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Wt,V,mt,ye,pt,He,ht;return z=new F({props:{title:"Zamba2",local:"zamba2",headingTag:"h1"}}),E=new F({props:{title:"Model details",local:"model-details",headingTag:"h2"}}),O=new F({props:{title:"Quick start",local:"quick-start",headingTag:"h2"}}),X=new F({props:{title:"Presequities",local:"presequities",headingTag:"h3"}}),Q=new ut({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUzRSUzRDQuNDguMA==",highlighted:"pip install transformers&gt;=4.48.0",wrap:!1}}),K=new F({props:{title:"Inference",local:"inference",headingTag:"h2"}}),ee=new ut({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}}),te=new F({props:{title:"Model card",local:"model-card",headingTag:"h2"}}),ae=new F({props:{title:"Issues",local:"issues",headingTag:"h2"}}),re=new F({props:{title:"License",local:"license",headingTag:"h2"}}),de=new F({props:{title:"Zamba2Config",local:"transformers.Zamba2Config",headingTag:"h2"}}),le=new Te({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:"use_mem_eff_path",val:" = False"},{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.use_mem_eff_path",description:`<strong>use_mem_eff_path</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the fused conv1d and scan in mamba2 layers.`,name:"use_mem_eff_path"},{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 lo({props:{anchor:"transformers.Zamba2Config.example",$$slots:{default:[_o]},$$scope:{ctx:x}}}),ce=new F({props:{title:"Zamba2Model",local:"transformers.Zamba2Model",headingTag:"h2"}}),me=new Te({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#L1358"}}),pe=new Te({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#L1412"}}),U=new Ht({props:{$$slots:{default:[bo]},$$scope:{ctx:x}}}),he=new F({props:{title:"Zamba2ForCausalLM",local:"transformers.Zamba2ForCausalLM",headingTag:"h2"}}),ue=new Te({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#L1618"}}),fe=new Te({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.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.Zamba2ForCausalLM.forward.logits_to_keep",description:`<strong>logits_to_keep</strong> (<code>int</code> or <code>torch.Tensor</code>, <em>optional</em>) &#x2014;
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:"logits_to_keep"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/zamba2/modeling_zamba2.py#L1647",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 Ht({props:{$$slots:{default:[yo]},$$scope:{ctx:x}}}),G=new lo({props:{anchor:"transformers.Zamba2ForCausalLM.forward.example",$$slots:{default:[vo]},$$scope:{ctx:x}}}),ge=new F({props:{title:"Zamba2ForSequenceClassification",local:"transformers.Zamba2ForSequenceClassification",headingTag:"h2"}}),_e=new Te({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#L1800"}}),be=new Te({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#L1832"}}),V=new Ht({props:{$$slots:{default:[To]},$$scope:{ctx:x}}}),ye=new go({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/zamba2.md"}}),{c(){r=l("meta"),b=n(),d=l("p"),y=n(),m(z.$$.fragment),v=n(),L=l("div"),L.innerHTML=Pt,Be=n(),A=l("p"),A.innerHTML=Bt,Se=n(),D=l("p"),D.innerHTML=St,Ue=n(),m(E.$$.fragment),Ne=n(),R=l("p"),R.innerHTML=Ut,Ge=n(),B=l("img"),Ve=n(),m(O.$$.fragment),Ae=n(),m(X.$$.fragment),De=n(),Y=l("p"),Y.innerHTML=Gt,Ee=n(),m(Q.$$.fragment),Re=n(),m(K.$$.fragment),Oe=n(),m(ee.$$.fragment),Xe=n(),m(te.$$.fragment),Ye=n(),oe=l("p"),oe.textContent=Vt,Qe=n(),ne=l("ul"),ne.innerHTML=At,Ke=n(),m(ae.$$.fragment),et=n(),se=l("p"),se.innerHTML=Dt,tt=n(),m(re.$$.fragment),ot=n(),ie=l("p"),ie.textContent=Et,nt=n(),m(de.$$.fragment),at=n(),k=l("div"),m(le.$$.fragment),ft=n(),ke=l("p"),ke.innerHTML=Rt,gt=n(),Me=l("p"),Me.innerHTML=Ot,_t=n(),$e=l("p"),$e.innerHTML=Xt,bt=n(),m(S.$$.fragment),st=n(),m(ce.$$.fragment),rt=n(),M=l("div"),m(me.$$.fragment),yt=n(),we=l("p"),we.innerHTML=Yt,vt=n(),Ze=l("p"),Ze.innerHTML=Qt,Tt=n(),Ce=l("p"),Ce.innerHTML=Kt,kt=n(),J=l("div"),m(pe.$$.fragment),Mt=n(),xe=l("p"),xe.innerHTML=eo,$t=n(),m(U.$$.fragment),it=n(),m(he.$$.fragment),dt=n(),W=l("div"),m(ue.$$.fragment),wt=n(),I=l("div"),m(fe.$$.fragment),Zt=n(),ze=l("p"),ze.innerHTML=to,Ct=n(),m(N.$$.fragment),xt=n(),m(G.$$.fragment),lt=n(),m(ge.$$.fragment),ct=n(),T=l("div"),m(_e.$$.fragment),zt=n(),Le=l("p"),Le.textContent=oo,Lt=n(),Ie=l("p"),Ie.innerHTML=no,It=n(),Fe=l("p"),Fe.innerHTML=ao,Ft=n(),qe=l("p"),qe.innerHTML=so,qt=n(),Je=l("p"),Je.innerHTML=ro,Jt=n(),j=l("div"),m(be.$$.fragment),jt=n(),je=l("p"),je.innerHTML=io,Wt=n(),m(V.$$.fragment),mt=n(),m(ye.$$.fragment),pt=n(),He=l("p"),this.h()},l(e){const t=fo("svelte-u9bgzb",document.head);r=c(t,"META",{name:!0,content:!0}),t.forEach(o),b=a(e),d=c(e,"P",{}),P(d).forEach(o),y=a(e),p(z.$$.fragment,e),v=a(e),L=c(e,"DIV",{class:!0,"data-svelte-h":!0}),_(L)!=="svelte-b95w5j"&&(L.innerHTML=Pt),Be=a(e),A=c(e,"P",{"data-svelte-h":!0}),_(A)!=="svelte-39w8p0"&&(A.innerHTML=Bt),Se=a(e),D=c(e,"P",{"data-svelte-h":!0}),_(D)!=="svelte-1hxftw9"&&(D.innerHTML=St),Ue=a(e),p(E.$$.fragment,e),Ne=a(e),R=c(e,"P",{"data-svelte-h":!0}),_(R)!=="svelte-qwjsus"&&(R.innerHTML=Ut),Ge=a(e),B=c(e,"IMG",{src:!0,width:!0,height:!0}),Ve=a(e),p(O.$$.fragment,e),Ae=a(e),p(X.$$.fragment,e),De=a(e),Y=c(e,"P",{"data-svelte-h":!0}),_(Y)!=="svelte-11vg79s"&&(Y.innerHTML=Gt),Ee=a(e),p(Q.$$.fragment,e),Re=a(e),p(K.$$.fragment,e),Oe=a(e),p(ee.$$.fragment,e),Xe=a(e),p(te.$$.fragment,e),Ye=a(e),oe=c(e,"P",{"data-svelte-h":!0}),_(oe)!=="svelte-ktiv3r"&&(oe.textContent=Vt),Qe=a(e),ne=c(e,"UL",{"data-svelte-h":!0}),_(ne)!=="svelte-1t5oo39"&&(ne.innerHTML=At),Ke=a(e),p(ae.$$.fragment,e),et=a(e),se=c(e,"P",{"data-svelte-h":!0}),_(se)!=="svelte-a82suw"&&(se.innerHTML=Dt),tt=a(e),p(re.$$.fragment,e),ot=a(e),ie=c(e,"P",{"data-svelte-h":!0}),_(ie)!=="svelte-9pg9vx"&&(ie.textContent=Et),nt=a(e),p(de.$$.fragment,e),at=a(e),k=c(e,"DIV",{class:!0});var w=P(k);p(le.$$.fragment,w),ft=a(w),ke=c(w,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-imk2ir"&&(ke.innerHTML=Rt),gt=a(w),Me=c(w,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-ywkcox"&&(Me.innerHTML=Ot),_t=a(w),$e=c(w,"P",{"data-svelte-h":!0}),_($e)!=="svelte-o55m63"&&($e.innerHTML=Xt),bt=a(w),p(S.$$.fragment,w),w.forEach(o),st=a(e),p(ce.$$.fragment,e),rt=a(e),M=c(e,"DIV",{class:!0});var Z=P(M);p(me.$$.fragment,Z),yt=a(Z),we=c(Z,"P",{"data-svelte-h":!0}),_(we)!=="svelte-1b6pmkz"&&(we.innerHTML=Yt),vt=a(Z),Ze=c(Z,"P",{"data-svelte-h":!0}),_(Ze)!=="svelte-hswkmf"&&(Ze.innerHTML=Qt),Tt=a(Z),Ce=c(Z,"P",{"data-svelte-h":!0}),_(Ce)!=="svelte-icjgh4"&&(Ce.innerHTML=Kt),kt=a(Z),J=c(Z,"DIV",{class:!0});var H=P(J);p(pe.$$.fragment,H),Mt=a(H),xe=c(H,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-dr1d5k"&&(xe.innerHTML=eo),$t=a(H),p(U.$$.fragment,H),H.forEach(o),Z.forEach(o),it=a(e),p(he.$$.fragment,e),dt=a(e),W=c(e,"DIV",{class:!0});var ve=P(W);p(ue.$$.fragment,ve),wt=a(ve),I=c(ve,"DIV",{class:!0});var q=P(I);p(fe.$$.fragment,q),Zt=a(q),ze=c(q,"P",{"data-svelte-h":!0}),_(ze)!=="svelte-xyh4k8"&&(ze.innerHTML=to),Ct=a(q),p(N.$$.fragment,q),xt=a(q),p(G.$$.fragment,q),q.forEach(o),ve.forEach(o),lt=a(e),p(ge.$$.fragment,e),ct=a(e),T=c(e,"DIV",{class:!0});var $=P(T);p(_e.$$.fragment,$),zt=a($),Le=c($,"P",{"data-svelte-h":!0}),_(Le)!=="svelte-1p6u4r0"&&(Le.textContent=oo),Lt=a($),Ie=c($,"P",{"data-svelte-h":!0}),_(Ie)!=="svelte-1r5woup"&&(Ie.innerHTML=no),It=a($),Fe=c($,"P",{"data-svelte-h":!0}),_(Fe)!=="svelte-10ugs3m"&&(Fe.innerHTML=ao),Ft=a($),qe=c($,"P",{"data-svelte-h":!0}),_(qe)!=="svelte-6pahdo"&&(qe.innerHTML=so),qt=a($),Je=c($,"P",{"data-svelte-h":!0}),_(Je)!=="svelte-hswkmf"&&(Je.innerHTML=ro),Jt=a($),j=c($,"DIV",{class:!0});var We=P(j);p(be.$$.fragment,We),jt=a(We),je=c(We,"P",{"data-svelte-h":!0}),_(je)!=="svelte-u5nax0"&&(je.innerHTML=io),Wt=a(We),p(V.$$.fragment,We),We.forEach(o),$.forEach(o),mt=a(e),p(ye.$$.fragment,e),pt=a(e),He=c(e,"P",{}),P(He).forEach(o),this.h()},h(){C(r,"name","hf:doc:metadata"),C(r,"content",Mo),C(L,"class","flex flex-wrap space-x-1"),mo(B.src,Nt="https://github.com/user-attachments/assets/c2cff209-b901-483c-87aa-774b82a0769f")||C(B,"src",Nt),C(B,"width","30%"),C(B,"height","40%"),C(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(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,L,t),s(e,Be,t),s(e,A,t),s(e,Se,t),s(e,D,t),s(e,Ue,t),h(E,e,t),s(e,Ne,t),s(e,R,t),s(e,Ge,t),s(e,B,t),s(e,Ve,t),h(O,e,t),s(e,Ae,t),h(X,e,t),s(e,De,t),s(e,Y,t),s(e,Ee,t),h(Q,e,t),s(e,Re,t),h(K,e,t),s(e,Oe,t),h(ee,e,t),s(e,Xe,t),h(te,e,t),s(e,Ye,t),s(e,oe,t),s(e,Qe,t),s(e,ne,t),s(e,Ke,t),h(ae,e,t),s(e,et,t),s(e,se,t),s(e,tt,t),h(re,e,t),s(e,ot,t),s(e,ie,t),s(e,nt,t),h(de,e,t),s(e,at,t),s(e,k,t),h(le,k,null),i(k,ft),i(k,ke),i(k,gt),i(k,Me),i(k,_t),i(k,$e),i(k,bt),h(S,k,null),s(e,st,t),h(ce,e,t),s(e,rt,t),s(e,M,t),h(me,M,null),i(M,yt),i(M,we),i(M,vt),i(M,Ze),i(M,Tt),i(M,Ce),i(M,kt),i(M,J),h(pe,J,null),i(J,Mt),i(J,xe),i(J,$t),h(U,J,null),s(e,it,t),h(he,e,t),s(e,dt,t),s(e,W,t),h(ue,W,null),i(W,wt),i(W,I),h(fe,I,null),i(I,Zt),i(I,ze),i(I,Ct),h(N,I,null),i(I,xt),h(G,I,null),s(e,lt,t),h(ge,e,t),s(e,ct,t),s(e,T,t),h(_e,T,null),i(T,zt),i(T,Le),i(T,Lt),i(T,Ie),i(T,It),i(T,Fe),i(T,Ft),i(T,qe),i(T,qt),i(T,Je),i(T,Jt),i(T,j),h(be,j,null),i(j,jt),i(j,je),i(j,Wt),h(V,j,null),s(e,mt,t),h(ye,e,t),s(e,pt,t),s(e,He,t),ht=!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 ve={};t&2&&(ve.$$scope={dirty:t,ctx:e}),G.$set(ve);const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),V.$set(q)},i(e){ht||(u(z.$$.fragment,e),u(E.$$.fragment,e),u(O.$$.fragment,e),u(X.$$.fragment,e),u(Q.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(ae.$$.fragment,e),u(re.$$.fragment,e),u(de.$$.fragment,e),u(le.$$.fragment,e),u(S.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(U.$$.fragment,e),u(he.$$.fragment,e),u(ue.$$.fragment,e),u(fe.$$.fragment,e),u(N.$$.fragment,e),u(G.$$.fragment,e),u(ge.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(V.$$.fragment,e),u(ye.$$.fragment,e),ht=!0)},o(e){f(z.$$.fragment,e),f(E.$$.fragment,e),f(O.$$.fragment,e),f(X.$$.fragment,e),f(Q.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(de.$$.fragment,e),f(le.$$.fragment,e),f(S.$$.fragment,e),f(ce.$$.fragment,e),f(me.$$.fragment,e),f(pe.$$.fragment,e),f(U.$$.fragment,e),f(he.$$.fragment,e),f(ue.$$.fragment,e),f(fe.$$.fragment,e),f(N.$$.fragment,e),f(G.$$.fragment,e),f(ge.$$.fragment,e),f(_e.$$.fragment,e),f(be.$$.fragment,e),f(V.$$.fragment,e),f(ye.$$.fragment,e),ht=!1},d(e){e&&(o(b),o(d),o(y),o(v),o(L),o(Be),o(A),o(Se),o(D),o(Ue),o(Ne),o(R),o(Ge),o(B),o(Ve),o(Ae),o(De),o(Y),o(Ee),o(Re),o(Oe),o(Xe),o(Ye),o(oe),o(Qe),o(ne),o(Ke),o(et),o(se),o(tt),o(ot),o(ie),o(nt),o(at),o(k),o(st),o(rt),o(M),o(it),o(dt),o(W),o(lt),o(ct),o(T),o(mt),o(pt),o(He)),o(r),g(z,e),g(E,e),g(O,e),g(X,e),g(Q,e),g(K,e),g(ee,e),g(te,e),g(ae,e),g(re,e),g(de,e),g(le),g(S),g(ce,e),g(me),g(pe),g(U),g(he,e),g(ue),g(fe),g(N),g(G),g(ge,e),g(_e),g(be),g(V),g(ye,e)}}}const Mo='{"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 $o(x){return po(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fo extends ho{constructor(r){super(),uo(this,r,$o,ko,co,{})}}export{Fo as component};
