import{S as qa,i as Ja,s as Aa,e as s,k as m,w,t as n,M as Wa,c as r,d as t,m as f,a as i,x as T,h as a,b as d,G as e,g as _,y as k,q as L,o as $,B as O,v as Ua,L as Ia}from"../../chunks/vendor-hf-doc-builder.js";import{T as Io}from"../../chunks/Tip-hf-doc-builder.js";import{D as Ne}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Sa}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ro}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xa}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Na(E){let l,v,c,u,b,p,g,y;return{c(){l=s("p"),v=n("This model is in maintenance mode only, so we won\u2019t accept any new PRs changing its code."),c=m(),u=s("p"),b=n(`If you run into any issues running this model, please reinstall the last version that supported this model: v4.31.0.
You can do so by running the following command: `),p=s("code"),g=n("pip install -U transformers==4.31.0"),y=n(".")},l(M){l=r(M,"P",{});var C=i(l);v=a(C,"This model is in maintenance mode only, so we won\u2019t accept any new PRs changing its code."),C.forEach(t),c=f(M),u=r(M,"P",{});var F=i(u);b=a(F,`If you run into any issues running this model, please reinstall the last version that supported this model: v4.31.0.
You can do so by running the following command: `),p=r(F,"CODE",{});var A=i(p);g=a(A,"pip install -U transformers==4.31.0"),A.forEach(t),y=a(F,"."),F.forEach(t)},m(M,C){_(M,l,C),e(l,v),_(M,c,C),_(M,u,C),e(u,b),e(u,p),e(p,g),e(u,y)},d(M){M&&t(l),M&&t(c),M&&t(u)}}}function Ba(E){let l,v,c,u,b,p,g,y;return{c(){l=s("p"),v=n("This model differs from the "),c=s("a"),u=n("OpenLLaMA models"),b=n(" on the Hugging Face Hub, which primarily use the "),p=s("a"),g=n("LLaMA"),y=n(" architecture."),this.h()},l(M){l=r(M,"P",{});var C=i(l);v=a(C,"This model differs from the "),c=r(C,"A",{href:!0,rel:!0});var F=i(c);u=a(F,"OpenLLaMA models"),F.forEach(t),b=a(C," on the Hugging Face Hub, which primarily use the "),p=r(C,"A",{href:!0});var A=i(p);g=a(A,"LLaMA"),A.forEach(t),y=a(C," architecture."),C.forEach(t),this.h()},h(){d(c,"href","https://huggingface.co/models?search=openllama"),d(c,"rel","nofollow"),d(p,"href","llama")},m(M,C){_(M,l,C),e(l,v),e(l,c),e(c,u),e(l,b),e(l,p),e(p,g),e(l,y)},d(M){M&&t(l)}}}function Va(E){let l,v;return l=new Sa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME9wZW5MbGFtYU1vZGVsJTJDJTIwT3BlbkxsYW1hQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyME9wZW4tTGxhbWElMjBvcGVuX2xsYW1hLTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyME9wZW5MbGFtYUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMG9wZW5fbGxhbWEtN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME9wZW5MbGFtYU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OpenLlamaModel, OpenLlamaConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Open-Llama open_llama-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = OpenLlamaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the open_llama-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OpenLlamaModel(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`}}),{c(){w(l.$$.fragment)},l(c){T(l.$$.fragment,c)},m(c,u){k(l,c,u),v=!0},p:Ia,i(c){v||(L(l.$$.fragment,c),v=!0)},o(c){$(l.$$.fragment,c),v=!1},d(c){O(l,c)}}}function ja(E){let l,v,c,u,b;return{c(){l=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s("code"),u=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){l=r(p,"P",{});var g=i(l);v=a(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(g,"CODE",{});var y=i(c);u=a(y,"Module"),y.forEach(t),b=a(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(t)},m(p,g){_(p,l,g),e(l,v),e(l,c),e(c,u),e(l,b)},d(p){p&&t(l)}}}function Da(E){let l,v,c,u,b;return{c(){l=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s("code"),u=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){l=r(p,"P",{});var g=i(l);v=a(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(g,"CODE",{});var y=i(c);u=a(y,"Module"),y.forEach(t),b=a(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(t)},m(p,g){_(p,l,g),e(l,v),e(l,c),e(c,u),e(l,b)},d(p){p&&t(l)}}}function Ga(E){let l,v,c,u,b;return u=new Sa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBPcGVuTGxhbWFGb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwT3BlbkxsYW1hRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKFBBVEhfVE9fQ09OVkVSVEVEX1dFSUdIVFMpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoUEFUSF9UT19DT05WRVJURURfVE9LRU5JWkVSKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkhleSUyQyUyMGFyZSUyMHlvdSUyMGNvbnNjaW91cyUzRiUyMENhbiUyMHlvdSUyMHRhbGslMjB0byUyMG1lJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwR2VuZXJhdGUlMEFnZW5lcmF0ZV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMuaW5wdXRfaWRzJTJDJTIwbWF4X2xlbmd0aCUzRDMwKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, OpenLlamaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OpenLlamaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)

<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>`}}),{c(){l=s("p"),v=n("Example:"),c=m(),w(u.$$.fragment)},l(p){l=r(p,"P",{});var g=i(l);v=a(g,"Example:"),g.forEach(t),c=f(p),T(u.$$.fragment,p)},m(p,g){_(p,l,g),e(l,v),_(p,c,g),k(u,p,g),b=!0},p:Ia,i(p){b||(L(u.$$.fragment,p),b=!0)},o(p){$(u.$$.fragment,p),b=!1},d(p){p&&t(l),p&&t(c),O(u,p)}}}function Za(E){let l,v,c,u,b;return{c(){l=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s("code"),u=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){l=r(p,"P",{});var g=i(l);v=a(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=r(g,"CODE",{});var y=i(c);u=a(y,"Module"),y.forEach(t),b=a(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(t)},m(p,g){_(p,l,g),e(l,v),e(l,c),e(c,u),e(l,b)},d(p){p&&t(l)}}}function Ra(E){let l,v,c,u,b,p,g,y,M,C,F,A,ee,So,V,oe,io,ge,at,lo,st,qo,te,rt,_e,it,lt,Jo,Be,dt,Ao,q,ct,ve,pt,ht,be,mt,ft,ye,ut,gt,Wo,j,ne,co,we,_t,po,vt,Uo,I,Te,bt,D,yt,Ve,wt,Tt,ke,kt,Lt,$t,G,Ot,je,Mt,Ct,De,zt,Et,Ft,ae,No,Z,se,ho,Le,Pt,mo,xt,Bo,P,$e,It,Oe,St,Ge,qt,Jt,At,Me,Wt,Ce,Ut,Nt,Bt,re,Vt,fo,jt,Dt,uo,Gt,Zt,W,ze,Rt,R,Ht,Ze,Xt,Yt,go,Qt,Kt,en,ie,Vo,H,le,_o,Ee,on,vo,tn,jo,X,Fe,nn,J,Pe,an,Y,sn,Re,rn,ln,bo,dn,cn,pn,de,hn,ce,Do,Q,pe,yo,xe,mn,wo,fn,Go,z,Ie,un,To,gn,_n,He,Xe,vn,bn,yn,S,wn,ko,Tn,kn,Lo,Ln,$n,$o,On,Mn,Oo,Cn,zn,En,Se,Fn,Ye,Pn,xn,In,qe,Sn,Je,qn,Jn,An,U,Ae,Wn,K,Un,Qe,Nn,Bn,Mo,Vn,jn,Dn,he,Zo;return p=new ro({}),F=new Io({props:{warning:!0,$$slots:{default:[Na]},$$scope:{ctx:E}}}),ee=new Io({props:{warning:!0,$$slots:{default:[Ba]},$$scope:{ctx:E}}}),ge=new ro({}),we=new ro({}),Te=new Ne({props:{name:"class transformers.OpenLlamaConfig",anchor:"transformers.OpenLlamaConfig",parameters:[{name:"vocab_size",val:" = 100000"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:" = 11008"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"hidden_act",val:" = 'silu'"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-06"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"tie_word_embeddings",val:" = False"},{name:"use_memory_efficient_attention",val:" = True"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_dropout_prob",val:" = 0.1"},{name:"use_stable_embedding",val:" = True"},{name:"shared_input_output_embedding",val:" = True"},{name:"rope_scaling",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OpenLlamaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the Open-Llama model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaModel">OpenLlamaModel</a>`,name:"vocab_size"},{anchor:"transformers.OpenLlamaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.OpenLlamaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 11008) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.OpenLlamaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.OpenLlamaConfig.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 encoder.`,name:"num_attention_heads"},{anchor:"transformers.OpenLlamaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.OpenLlamaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.OpenLlamaConfig.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.OpenLlamaConfig.rms_norm_eps",description:`<strong>rms_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the rms normalization layers.`,name:"rms_norm_eps"},{anchor:"transformers.OpenLlamaConfig.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.OpenLlamaConfig.tie_word_embeddings(bool,",description:`<strong>tie_word_embeddings(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings(bool,"},{anchor:"transformers.OpenLlamaConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
strategies: linear and dynamic. Their scaling factor must be an float greater than 1. The expected format
is <code>{&quot;type&quot;: strategy name, &quot;factor&quot;: scaling factor}</code>. When using this flag, don&#x2019;t update
<code>max_position_embeddings</code> to the expected new maximum. See the following thread for more information on how
these scaling strategies behave:
<a href="https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/" rel="nofollow">https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/</a>. This is an
experimental feature, subject to breaking API changes in future versions.</p>
<p>Example &#x2014;`,name:"rope_scaling"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/deprecated/open_llama/configuration_open_llama.py#L33"}}),ae=new xa({props:{anchor:"transformers.OpenLlamaConfig.example",$$slots:{default:[Va]},$$scope:{ctx:E}}}),Le=new ro({}),$e=new Ne({props:{name:"class transformers.OpenLlamaModel",anchor:"transformers.OpenLlamaModel",parameters:[{name:"config",val:": OpenLlamaConfig"}],parametersDescription:[{anchor:"transformers.OpenLlamaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaConfig">OpenLlamaConfig</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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; OpenLlamaConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L529"}}),ze=new Ne({props:{name:"forward",anchor:"transformers.OpenLlamaModel.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[typing.List[torch.FloatTensor]] = 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"}],parametersDescription:[{anchor:"transformers.OpenLlamaModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.OpenLlamaModel.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>decoder_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.OpenLlamaModel.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.OpenLlamaModel.forward.past_key_values",description:`<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>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_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>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.OpenLlamaModel.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.OpenLlamaModel.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.OpenLlamaModel.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.OpenLlamaModel.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.OpenLlamaModel.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L584"}}),ie=new Io({props:{$$slots:{default:[ja]},$$scope:{ctx:E}}}),Ee=new ro({}),Fe=new Ne({props:{name:"class transformers.OpenLlamaForCausalLM",anchor:"transformers.OpenLlamaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L717"}}),Pe=new Ne({props:{name:"forward",anchor:"transformers.OpenLlamaForCausalLM.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[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.OpenLlamaForCausalLM.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.OpenLlamaForCausalLM.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>decoder_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.OpenLlamaForCausalLM.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.OpenLlamaForCausalLM.forward.past_key_values",description:`<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>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_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>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.OpenLlamaForCausalLM.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.OpenLlamaForCausalLM.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.OpenLlamaForCausalLM.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.OpenLlamaForCausalLM.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.OpenLlamaForCausalLM.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L747",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaConfig"
>OpenLlamaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),de=new Io({props:{$$slots:{default:[Da]},$$scope:{ctx:E}}}),ce=new xa({props:{anchor:"transformers.OpenLlamaForCausalLM.forward.example",$$slots:{default:[Ga]},$$scope:{ctx:E}}}),xe=new ro({}),Ie=new Ne({props:{name:"class transformers.OpenLlamaForSequenceClassification",anchor:"transformers.OpenLlamaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.OpenLlamaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaConfig">OpenLlamaConfig</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/v4.32.0/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/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L896"}}),Ae=new Ne({props:{name:"forward",anchor:"transformers.OpenLlamaForSequenceClassification.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[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.OpenLlamaForSequenceClassification.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.OpenLlamaForSequenceClassification.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/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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>decoder_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.OpenLlamaForSequenceClassification.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.OpenLlamaForSequenceClassification.forward.past_key_values",description:`<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>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_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>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.OpenLlamaForSequenceClassification.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.OpenLlamaForSequenceClassification.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.OpenLlamaForSequenceClassification.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.OpenLlamaForSequenceClassification.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.OpenLlamaForSequenceClassification.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/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.OpenLlamaForSequenceClassification.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/v4.32.0/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L912"}}),he=new Io({props:{$$slots:{default:[Za]},$$scope:{ctx:E}}}),{c(){l=s("meta"),v=m(),c=s("h1"),u=s("a"),b=s("span"),w(p.$$.fragment),g=m(),y=s("span"),M=n("Open-Llama"),C=m(),w(F.$$.fragment),A=m(),w(ee.$$.fragment),So=m(),V=s("h2"),oe=s("a"),io=s("span"),w(ge.$$.fragment),at=m(),lo=s("span"),st=n("Overview"),qo=m(),te=s("p"),rt=n("The Open-Llama model was proposed in "),_e=s("a"),it=n("Open-Llama project"),lt=n(" by community developer s-JoL."),Jo=m(),Be=s("p"),dt=n(`The model is mainly based on LLaMA with some modifications, incorporating memory-efficient attention from Xformers, stable embedding from Bloom, and shared input-output embedding from PaLM.
And the model is pre-trained on both Chinese and English, which gives it better performance on Chinese language tasks.`),Ao=m(),q=s("p"),ct=n("This model was contributed by "),ve=s("a"),pt=n("s-JoL"),ht=n(`.
The original code can be found `),be=s("a"),mt=n("Open-Llama"),ft=n(`.
Checkpoint and usage can be found at `),ye=s("a"),ut=n("s-JoL/Open-Llama-V1"),gt=n("."),Wo=m(),j=s("h2"),ne=s("a"),co=s("span"),w(we.$$.fragment),_t=m(),po=s("span"),vt=n("OpenLlamaConfig"),Uo=m(),I=s("div"),w(Te.$$.fragment),bt=m(),D=s("p"),yt=n("This is the configuration class to store the configuration of a "),Ve=s("a"),wt=n("OpenLlamaModel"),Tt=n(`. It is used to instantiate an
Open-Llama 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
`),ke=s("a"),kt=n("s-JoL/Open-Llama-V1"),Lt=n("."),$t=m(),G=s("p"),Ot=n("Configuration objects inherit from "),je=s("a"),Mt=n("PretrainedConfig"),Ct=n(` and can be used to control the model outputs. Read the
documentation from `),De=s("a"),zt=n("PretrainedConfig"),Et=n(" for more information."),Ft=m(),w(ae.$$.fragment),No=m(),Z=s("h2"),se=s("a"),ho=s("span"),w(Le.$$.fragment),Pt=m(),mo=s("span"),xt=n("OpenLlamaModel"),Bo=m(),P=s("div"),w($e.$$.fragment),It=m(),Oe=s("p"),St=n(`The bare Open-Llama Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ge=s("a"),qt=n("PreTrainedModel"),Jt=n(`. 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.)`),At=m(),Me=s("p"),Wt=n("This model is also a PyTorch "),Ce=s("a"),Ut=n("torch.nn.Module"),Nt=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bt=m(),re=s("p"),Vt=n("Transformer decoder consisting of "),fo=s("em"),jt=n("config.num_hidden_layers"),Dt=n(" layers. Each layer is a "),uo=s("code"),Gt=n("OpenLlamaDecoderLayer"),Zt=m(),W=s("div"),w(ze.$$.fragment),Rt=m(),R=s("p"),Ht=n("The "),Ze=s("a"),Xt=n("OpenLlamaModel"),Yt=n(" forward method, overrides the "),go=s("code"),Qt=n("__call__"),Kt=n(" special method."),en=m(),w(ie.$$.fragment),Vo=m(),H=s("h2"),le=s("a"),_o=s("span"),w(Ee.$$.fragment),on=m(),vo=s("span"),tn=n("OpenLlamaForCausalLM"),jo=m(),X=s("div"),w(Fe.$$.fragment),nn=m(),J=s("div"),w(Pe.$$.fragment),an=m(),Y=s("p"),sn=n("The "),Re=s("a"),rn=n("OpenLlamaForCausalLM"),ln=n(" forward method, overrides the "),bo=s("code"),dn=n("__call__"),cn=n(" special method."),pn=m(),w(de.$$.fragment),hn=m(),w(ce.$$.fragment),Do=m(),Q=s("h2"),pe=s("a"),yo=s("span"),w(xe.$$.fragment),mn=m(),wo=s("span"),fn=n("OpenLlamaForSequenceClassification"),Go=m(),z=s("div"),w(Ie.$$.fragment),un=m(),To=s("p"),gn=n("The LLaMa Model transformer with a sequence classification head on top (linear layer)."),_n=m(),He=s("p"),Xe=s("a"),vn=n("OpenLlamaForSequenceClassification"),bn=n(` uses the last token in order to do the classification, as other causal
models (e.g. GPT-2) do.`),yn=m(),S=s("p"),wn=n(`Since it does classification on the last token, it requires to know the position of the last token. If a
`),ko=s("code"),Tn=n("pad_token_id"),kn=n(` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),Lo=s("code"),Ln=n("pad_token_id"),$n=n(` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),$o=s("code"),On=n("inputs_embeds"),Mn=n(" are passed instead of "),Oo=s("code"),Cn=n("input_ids"),zn=n(`, it does the same (take the last value in
each row of the batch).`),En=m(),Se=s("p"),Fn=n("This model inherits from "),Ye=s("a"),Pn=n("PreTrainedModel"),xn=n(`. 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.)`),In=m(),qe=s("p"),Sn=n("This model is also a PyTorch "),Je=s("a"),qn=n("torch.nn.Module"),Jn=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),An=m(),U=s("div"),w(Ae.$$.fragment),Wn=m(),K=s("p"),Un=n("The "),Qe=s("a"),Nn=n("OpenLlamaForSequenceClassification"),Bn=n(" forward method, overrides the "),Mo=s("code"),Vn=n("__call__"),jn=n(" special method."),Dn=m(),w(he.$$.fragment),this.h()},l(o){const h=Wa('[data-svelte="svelte-1phssyn"]',document.head);l=r(h,"META",{name:!0,content:!0}),h.forEach(t),v=f(o),c=r(o,"H1",{class:!0});var We=i(c);u=r(We,"A",{id:!0,class:!0,href:!0});var Co=i(u);b=r(Co,"SPAN",{});var zo=i(b);T(p.$$.fragment,zo),zo.forEach(t),Co.forEach(t),g=f(We),y=r(We,"SPAN",{});var Eo=i(y);M=a(Eo,"Open-Llama"),Eo.forEach(t),We.forEach(t),C=f(o),T(F.$$.fragment,o),A=f(o),T(ee.$$.fragment,o),So=f(o),V=r(o,"H2",{class:!0});var Ue=i(V);oe=r(Ue,"A",{id:!0,class:!0,href:!0});var Fo=i(oe);io=r(Fo,"SPAN",{});var Po=i(io);T(ge.$$.fragment,Po),Po.forEach(t),Fo.forEach(t),at=f(Ue),lo=r(Ue,"SPAN",{});var Zn=i(lo);st=a(Zn,"Overview"),Zn.forEach(t),Ue.forEach(t),qo=f(o),te=r(o,"P",{});var Ro=i(te);rt=a(Ro,"The Open-Llama model was proposed in "),_e=r(Ro,"A",{href:!0,rel:!0});var Rn=i(_e);it=a(Rn,"Open-Llama project"),Rn.forEach(t),lt=a(Ro," by community developer s-JoL."),Ro.forEach(t),Jo=f(o),Be=r(o,"P",{});var Hn=i(Be);dt=a(Hn,`The model is mainly based on LLaMA with some modifications, incorporating memory-efficient attention from Xformers, stable embedding from Bloom, and shared input-output embedding from PaLM.
And the model is pre-trained on both Chinese and English, which gives it better performance on Chinese language tasks.`),Hn.forEach(t),Ao=f(o),q=r(o,"P",{});var me=i(q);ct=a(me,"This model was contributed by "),ve=r(me,"A",{href:!0,rel:!0});var Xn=i(ve);pt=a(Xn,"s-JoL"),Xn.forEach(t),ht=a(me,`.
The original code can be found `),be=r(me,"A",{href:!0,rel:!0});var Yn=i(be);mt=a(Yn,"Open-Llama"),Yn.forEach(t),ft=a(me,`.
Checkpoint and usage can be found at `),ye=r(me,"A",{href:!0,rel:!0});var Qn=i(ye);ut=a(Qn,"s-JoL/Open-Llama-V1"),Qn.forEach(t),gt=a(me,"."),me.forEach(t),Wo=f(o),j=r(o,"H2",{class:!0});var Ho=i(j);ne=r(Ho,"A",{id:!0,class:!0,href:!0});var Kn=i(ne);co=r(Kn,"SPAN",{});var ea=i(co);T(we.$$.fragment,ea),ea.forEach(t),Kn.forEach(t),_t=f(Ho),po=r(Ho,"SPAN",{});var oa=i(po);vt=a(oa,"OpenLlamaConfig"),oa.forEach(t),Ho.forEach(t),Uo=f(o),I=r(o,"DIV",{class:!0});var fe=i(I);T(Te.$$.fragment,fe),bt=f(fe),D=r(fe,"P",{});var Ke=i(D);yt=a(Ke,"This is the configuration class to store the configuration of a "),Ve=r(Ke,"A",{href:!0});var ta=i(Ve);wt=a(ta,"OpenLlamaModel"),ta.forEach(t),Tt=a(Ke,`. It is used to instantiate an
Open-Llama 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
`),ke=r(Ke,"A",{href:!0,rel:!0});var na=i(ke);kt=a(na,"s-JoL/Open-Llama-V1"),na.forEach(t),Lt=a(Ke,"."),Ke.forEach(t),$t=f(fe),G=r(fe,"P",{});var eo=i(G);Ot=a(eo,"Configuration objects inherit from "),je=r(eo,"A",{href:!0});var aa=i(je);Mt=a(aa,"PretrainedConfig"),aa.forEach(t),Ct=a(eo,` and can be used to control the model outputs. Read the
documentation from `),De=r(eo,"A",{href:!0});var sa=i(De);zt=a(sa,"PretrainedConfig"),sa.forEach(t),Et=a(eo," for more information."),eo.forEach(t),Ft=f(fe),T(ae.$$.fragment,fe),fe.forEach(t),No=f(o),Z=r(o,"H2",{class:!0});var Xo=i(Z);se=r(Xo,"A",{id:!0,class:!0,href:!0});var ra=i(se);ho=r(ra,"SPAN",{});var ia=i(ho);T(Le.$$.fragment,ia),ia.forEach(t),ra.forEach(t),Pt=f(Xo),mo=r(Xo,"SPAN",{});var la=i(mo);xt=a(la,"OpenLlamaModel"),la.forEach(t),Xo.forEach(t),Bo=f(o),P=r(o,"DIV",{class:!0});var N=i(P);T($e.$$.fragment,N),It=f(N),Oe=r(N,"P",{});var Yo=i(Oe);St=a(Yo,`The bare Open-Llama Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ge=r(Yo,"A",{href:!0});var da=i(Ge);qt=a(da,"PreTrainedModel"),da.forEach(t),Jt=a(Yo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yo.forEach(t),At=f(N),Me=r(N,"P",{});var Qo=i(Me);Wt=a(Qo,"This model is also a PyTorch "),Ce=r(Qo,"A",{href:!0,rel:!0});var ca=i(Ce);Ut=a(ca,"torch.nn.Module"),ca.forEach(t),Nt=a(Qo,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qo.forEach(t),Bt=f(N),re=r(N,"P",{});var xo=i(re);Vt=a(xo,"Transformer decoder consisting of "),fo=r(xo,"EM",{});var pa=i(fo);jt=a(pa,"config.num_hidden_layers"),pa.forEach(t),Dt=a(xo," layers. Each layer is a "),uo=r(xo,"CODE",{});var ha=i(uo);Gt=a(ha,"OpenLlamaDecoderLayer"),ha.forEach(t),xo.forEach(t),Zt=f(N),W=r(N,"DIV",{class:!0});var oo=i(W);T(ze.$$.fragment,oo),Rt=f(oo),R=r(oo,"P",{});var to=i(R);Ht=a(to,"The "),Ze=r(to,"A",{href:!0});var ma=i(Ze);Xt=a(ma,"OpenLlamaModel"),ma.forEach(t),Yt=a(to," forward method, overrides the "),go=r(to,"CODE",{});var fa=i(go);Qt=a(fa,"__call__"),fa.forEach(t),Kt=a(to," special method."),to.forEach(t),en=f(oo),T(ie.$$.fragment,oo),oo.forEach(t),N.forEach(t),Vo=f(o),H=r(o,"H2",{class:!0});var Ko=i(H);le=r(Ko,"A",{id:!0,class:!0,href:!0});var ua=i(le);_o=r(ua,"SPAN",{});var ga=i(_o);T(Ee.$$.fragment,ga),ga.forEach(t),ua.forEach(t),on=f(Ko),vo=r(Ko,"SPAN",{});var _a=i(vo);tn=a(_a,"OpenLlamaForCausalLM"),_a.forEach(t),Ko.forEach(t),jo=f(o),X=r(o,"DIV",{class:!0});var et=i(X);T(Fe.$$.fragment,et),nn=f(et),J=r(et,"DIV",{class:!0});var ue=i(J);T(Pe.$$.fragment,ue),an=f(ue),Y=r(ue,"P",{});var no=i(Y);sn=a(no,"The "),Re=r(no,"A",{href:!0});var va=i(Re);rn=a(va,"OpenLlamaForCausalLM"),va.forEach(t),ln=a(no," forward method, overrides the "),bo=r(no,"CODE",{});var ba=i(bo);dn=a(ba,"__call__"),ba.forEach(t),cn=a(no," special method."),no.forEach(t),pn=f(ue),T(de.$$.fragment,ue),hn=f(ue),T(ce.$$.fragment,ue),ue.forEach(t),et.forEach(t),Do=f(o),Q=r(o,"H2",{class:!0});var ot=i(Q);pe=r(ot,"A",{id:!0,class:!0,href:!0});var ya=i(pe);yo=r(ya,"SPAN",{});var wa=i(yo);T(xe.$$.fragment,wa),wa.forEach(t),ya.forEach(t),mn=f(ot),wo=r(ot,"SPAN",{});var Ta=i(wo);fn=a(Ta,"OpenLlamaForSequenceClassification"),Ta.forEach(t),ot.forEach(t),Go=f(o),z=r(o,"DIV",{class:!0});var x=i(z);T(Ie.$$.fragment,x),un=f(x),To=r(x,"P",{});var ka=i(To);gn=a(ka,"The LLaMa Model transformer with a sequence classification head on top (linear layer)."),ka.forEach(t),_n=f(x),He=r(x,"P",{});var Gn=i(He);Xe=r(Gn,"A",{href:!0});var La=i(Xe);vn=a(La,"OpenLlamaForSequenceClassification"),La.forEach(t),bn=a(Gn,` uses the last token in order to do the classification, as other causal
models (e.g. GPT-2) do.`),Gn.forEach(t),yn=f(x),S=r(x,"P",{});var B=i(S);wn=a(B,`Since it does classification on the last token, it requires to know the position of the last token. If a
`),ko=r(B,"CODE",{});var $a=i(ko);Tn=a($a,"pad_token_id"),$a.forEach(t),kn=a(B,` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),Lo=r(B,"CODE",{});var Oa=i(Lo);Ln=a(Oa,"pad_token_id"),Oa.forEach(t),$n=a(B,` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),$o=r(B,"CODE",{});var Ma=i($o);On=a(Ma,"inputs_embeds"),Ma.forEach(t),Mn=a(B," are passed instead of "),Oo=r(B,"CODE",{});var Ca=i(Oo);Cn=a(Ca,"input_ids"),Ca.forEach(t),zn=a(B,`, it does the same (take the last value in
each row of the batch).`),B.forEach(t),En=f(x),Se=r(x,"P",{});var tt=i(Se);Fn=a(tt,"This model inherits from "),Ye=r(tt,"A",{href:!0});var za=i(Ye);Pn=a(za,"PreTrainedModel"),za.forEach(t),xn=a(tt,`. 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.)`),tt.forEach(t),In=f(x),qe=r(x,"P",{});var nt=i(qe);Sn=a(nt,"This model is also a PyTorch "),Je=r(nt,"A",{href:!0,rel:!0});var Ea=i(Je);qn=a(Ea,"torch.nn.Module"),Ea.forEach(t),Jn=a(nt,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nt.forEach(t),An=f(x),U=r(x,"DIV",{class:!0});var ao=i(U);T(Ae.$$.fragment,ao),Wn=f(ao),K=r(ao,"P",{});var so=i(K);Un=a(so,"The "),Qe=r(so,"A",{href:!0});var Fa=i(Qe);Nn=a(Fa,"OpenLlamaForSequenceClassification"),Fa.forEach(t),Bn=a(so," forward method, overrides the "),Mo=r(so,"CODE",{});var Pa=i(Mo);Vn=a(Pa,"__call__"),Pa.forEach(t),jn=a(so," special method."),so.forEach(t),Dn=f(ao),T(he.$$.fragment,ao),ao.forEach(t),x.forEach(t),this.h()},h(){d(l,"name","hf:doc:metadata"),d(l,"content",JSON.stringify(Ha)),d(u,"id","openllama"),d(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(u,"href","#openllama"),d(c,"class","relative group"),d(oe,"id","overview"),d(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(oe,"href","#overview"),d(V,"class","relative group"),d(_e,"href","https://github.com/s-JoL/Open-Llama"),d(_e,"rel","nofollow"),d(ve,"href","https://huggingface.co/s-JoL"),d(ve,"rel","nofollow"),d(be,"href","https://github.com/s-JoL/Open-Llama"),d(be,"rel","nofollow"),d(ye,"href","https://huggingface.co/s-JoL/Open-Llama-V1"),d(ye,"rel","nofollow"),d(ne,"id","transformers.OpenLlamaConfig"),d(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ne,"href","#transformers.OpenLlamaConfig"),d(j,"class","relative group"),d(Ve,"href","/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaModel"),d(ke,"href","https://huggingface.co/s-JoL/Open-Llama-V1"),d(ke,"rel","nofollow"),d(je,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(De,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(se,"id","transformers.OpenLlamaModel"),d(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(se,"href","#transformers.OpenLlamaModel"),d(Z,"class","relative group"),d(Ge,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),d(Ce,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ce,"rel","nofollow"),d(Ze,"href","/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaModel"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"id","transformers.OpenLlamaForCausalLM"),d(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(le,"href","#transformers.OpenLlamaForCausalLM"),d(H,"class","relative group"),d(Re,"href","/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaForCausalLM"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"id","transformers.OpenLlamaForSequenceClassification"),d(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(pe,"href","#transformers.OpenLlamaForSequenceClassification"),d(Q,"class","relative group"),d(Xe,"href","/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaForSequenceClassification"),d(Ye,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),d(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Je,"rel","nofollow"),d(Qe,"href","/docs/transformers/v4.32.0/en/model_doc/open-llama#transformers.OpenLlamaForSequenceClassification"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,h){e(document.head,l),_(o,v,h),_(o,c,h),e(c,u),e(u,b),k(p,b,null),e(c,g),e(c,y),e(y,M),_(o,C,h),k(F,o,h),_(o,A,h),k(ee,o,h),_(o,So,h),_(o,V,h),e(V,oe),e(oe,io),k(ge,io,null),e(V,at),e(V,lo),e(lo,st),_(o,qo,h),_(o,te,h),e(te,rt),e(te,_e),e(_e,it),e(te,lt),_(o,Jo,h),_(o,Be,h),e(Be,dt),_(o,Ao,h),_(o,q,h),e(q,ct),e(q,ve),e(ve,pt),e(q,ht),e(q,be),e(be,mt),e(q,ft),e(q,ye),e(ye,ut),e(q,gt),_(o,Wo,h),_(o,j,h),e(j,ne),e(ne,co),k(we,co,null),e(j,_t),e(j,po),e(po,vt),_(o,Uo,h),_(o,I,h),k(Te,I,null),e(I,bt),e(I,D),e(D,yt),e(D,Ve),e(Ve,wt),e(D,Tt),e(D,ke),e(ke,kt),e(D,Lt),e(I,$t),e(I,G),e(G,Ot),e(G,je),e(je,Mt),e(G,Ct),e(G,De),e(De,zt),e(G,Et),e(I,Ft),k(ae,I,null),_(o,No,h),_(o,Z,h),e(Z,se),e(se,ho),k(Le,ho,null),e(Z,Pt),e(Z,mo),e(mo,xt),_(o,Bo,h),_(o,P,h),k($e,P,null),e(P,It),e(P,Oe),e(Oe,St),e(Oe,Ge),e(Ge,qt),e(Oe,Jt),e(P,At),e(P,Me),e(Me,Wt),e(Me,Ce),e(Ce,Ut),e(Me,Nt),e(P,Bt),e(P,re),e(re,Vt),e(re,fo),e(fo,jt),e(re,Dt),e(re,uo),e(uo,Gt),e(P,Zt),e(P,W),k(ze,W,null),e(W,Rt),e(W,R),e(R,Ht),e(R,Ze),e(Ze,Xt),e(R,Yt),e(R,go),e(go,Qt),e(R,Kt),e(W,en),k(ie,W,null),_(o,Vo,h),_(o,H,h),e(H,le),e(le,_o),k(Ee,_o,null),e(H,on),e(H,vo),e(vo,tn),_(o,jo,h),_(o,X,h),k(Fe,X,null),e(X,nn),e(X,J),k(Pe,J,null),e(J,an),e(J,Y),e(Y,sn),e(Y,Re),e(Re,rn),e(Y,ln),e(Y,bo),e(bo,dn),e(Y,cn),e(J,pn),k(de,J,null),e(J,hn),k(ce,J,null),_(o,Do,h),_(o,Q,h),e(Q,pe),e(pe,yo),k(xe,yo,null),e(Q,mn),e(Q,wo),e(wo,fn),_(o,Go,h),_(o,z,h),k(Ie,z,null),e(z,un),e(z,To),e(To,gn),e(z,_n),e(z,He),e(He,Xe),e(Xe,vn),e(He,bn),e(z,yn),e(z,S),e(S,wn),e(S,ko),e(ko,Tn),e(S,kn),e(S,Lo),e(Lo,Ln),e(S,$n),e(S,$o),e($o,On),e(S,Mn),e(S,Oo),e(Oo,Cn),e(S,zn),e(z,En),e(z,Se),e(Se,Fn),e(Se,Ye),e(Ye,Pn),e(Se,xn),e(z,In),e(z,qe),e(qe,Sn),e(qe,Je),e(Je,qn),e(qe,Jn),e(z,An),e(z,U),k(Ae,U,null),e(U,Wn),e(U,K),e(K,Un),e(K,Qe),e(Qe,Nn),e(K,Bn),e(K,Mo),e(Mo,Vn),e(K,jn),e(U,Dn),k(he,U,null),Zo=!0},p(o,[h]){const We={};h&2&&(We.$$scope={dirty:h,ctx:o}),F.$set(We);const Co={};h&2&&(Co.$$scope={dirty:h,ctx:o}),ee.$set(Co);const zo={};h&2&&(zo.$$scope={dirty:h,ctx:o}),ae.$set(zo);const Eo={};h&2&&(Eo.$$scope={dirty:h,ctx:o}),ie.$set(Eo);const Ue={};h&2&&(Ue.$$scope={dirty:h,ctx:o}),de.$set(Ue);const Fo={};h&2&&(Fo.$$scope={dirty:h,ctx:o}),ce.$set(Fo);const Po={};h&2&&(Po.$$scope={dirty:h,ctx:o}),he.$set(Po)},i(o){Zo||(L(p.$$.fragment,o),L(F.$$.fragment,o),L(ee.$$.fragment,o),L(ge.$$.fragment,o),L(we.$$.fragment,o),L(Te.$$.fragment,o),L(ae.$$.fragment,o),L(Le.$$.fragment,o),L($e.$$.fragment,o),L(ze.$$.fragment,o),L(ie.$$.fragment,o),L(Ee.$$.fragment,o),L(Fe.$$.fragment,o),L(Pe.$$.fragment,o),L(de.$$.fragment,o),L(ce.$$.fragment,o),L(xe.$$.fragment,o),L(Ie.$$.fragment,o),L(Ae.$$.fragment,o),L(he.$$.fragment,o),Zo=!0)},o(o){$(p.$$.fragment,o),$(F.$$.fragment,o),$(ee.$$.fragment,o),$(ge.$$.fragment,o),$(we.$$.fragment,o),$(Te.$$.fragment,o),$(ae.$$.fragment,o),$(Le.$$.fragment,o),$($e.$$.fragment,o),$(ze.$$.fragment,o),$(ie.$$.fragment,o),$(Ee.$$.fragment,o),$(Fe.$$.fragment,o),$(Pe.$$.fragment,o),$(de.$$.fragment,o),$(ce.$$.fragment,o),$(xe.$$.fragment,o),$(Ie.$$.fragment,o),$(Ae.$$.fragment,o),$(he.$$.fragment,o),Zo=!1},d(o){t(l),o&&t(v),o&&t(c),O(p),o&&t(C),O(F,o),o&&t(A),O(ee,o),o&&t(So),o&&t(V),O(ge),o&&t(qo),o&&t(te),o&&t(Jo),o&&t(Be),o&&t(Ao),o&&t(q),o&&t(Wo),o&&t(j),O(we),o&&t(Uo),o&&t(I),O(Te),O(ae),o&&t(No),o&&t(Z),O(Le),o&&t(Bo),o&&t(P),O($e),O(ze),O(ie),o&&t(Vo),o&&t(H),O(Ee),o&&t(jo),o&&t(X),O(Fe),O(Pe),O(de),O(ce),o&&t(Do),o&&t(Q),O(xe),o&&t(Go),o&&t(z),O(Ie),O(Ae),O(he)}}}const Ha={local:"openllama",sections:[{local:"overview",title:"Overview"},{local:"transformers.OpenLlamaConfig",title:"OpenLlamaConfig"},{local:"transformers.OpenLlamaModel",title:"OpenLlamaModel"},{local:"transformers.OpenLlamaForCausalLM",title:"OpenLlamaForCausalLM"},{local:"transformers.OpenLlamaForSequenceClassification",title:"OpenLlamaForSequenceClassification"}],title:"Open-Llama"};function Xa(E){return Ua(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ns extends qa{constructor(l){super();Ja(this,l,Xa,Ra,Aa,{})}}export{ns as default,Ha as metadata};
