import{s as Mn,o as Cn,n as ye}from"../chunks/scheduler.9bc65507.js";import{S as On,i as xn,g as a,s as l,u as _,A as zn,h as s,f as t,c as d,j as g,v,y as u,k as m,o,a as c,w as b,d as y,t as T,x as w}from"../chunks/index.78c82d43.js";import{T as Ke}from"../chunks/Tip.87d55b76.js";import{D as be}from"../chunks/Docstring.f3d04bd2.js";import{C as $n}from"../chunks/CodeBlock.48618ec2.js";import{I as je}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Ln}from"../chunks/ExampleCodeBlock.872b014d.js";function Fn($){let n,f="This model is in maintenance mode only, so we won’t accept any new PRs changing its code.",i,h,L=`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: <code>pip install -U transformers==4.31.0</code>.`;return{c(){n=a("p"),n.textContent=f,i=l(),h=a("p"),h.innerHTML=L},l(p){n=s(p,"P",{"data-svelte-h":!0}),u(n)!=="svelte-lwu440"&&(n.textContent=f),i=d(p),h=s(p,"P",{"data-svelte-h":!0}),u(h)!=="svelte-1o63f7c"&&(h.innerHTML=L)},m(p,O){c(p,n,O),c(p,i,O),c(p,h,O)},p:ye,d(p){p&&(t(n),t(i),t(h))}}}function Pn($){let n,f='This model differs from the <a href="https://huggingface.co/models?search=openllama" rel="nofollow">OpenLLaMA models</a> on the Hugging Face Hub, which primarily use the <a href="llama">LLaMA</a> architecture.';return{c(){n=a("p"),n.innerHTML=f},l(i){n=s(i,"P",{"data-svelte-h":!0}),u(n)!=="svelte-1kc01gl"&&(n.innerHTML=f)},m(i,h){c(i,n,h)},p:ye,d(i){i&&t(n)}}}function In($){let n,f;return n=new $n({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(){_(n.$$.fragment)},l(i){v(n.$$.fragment,i)},m(i,h){b(n,i,h),f=!0},p:ye,i(i){f||(y(n.$$.fragment,i),f=!0)},o(i){T(n.$$.fragment,i),f=!1},d(i){w(n,i)}}}function Sn($){let n,f=`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(){n=a("p"),n.innerHTML=f},l(i){n=s(i,"P",{"data-svelte-h":!0}),u(n)!=="svelte-fincs2"&&(n.innerHTML=f)},m(i,h){c(i,n,h)},p:ye,d(i){i&&t(n)}}}function qn($){let n,f=`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(){n=a("p"),n.innerHTML=f},l(i){n=s(i,"P",{"data-svelte-h":!0}),u(n)!=="svelte-fincs2"&&(n.innerHTML=f)},m(i,h){c(i,n,h)},p:ye,d(i){i&&t(n)}}}function Jn($){let n,f="Example:",i,h,L;return h=new $n({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(){n=a("p"),n.textContent=f,i=l(),_(h.$$.fragment)},l(p){n=s(p,"P",{"data-svelte-h":!0}),u(n)!=="svelte-11lpom8"&&(n.textContent=f),i=d(p),v(h.$$.fragment,p)},m(p,O){c(p,n,O),c(p,i,O),b(h,p,O),L=!0},p:ye,i(p){L||(y(h.$$.fragment,p),L=!0)},o(p){T(h.$$.fragment,p),L=!1},d(p){p&&(t(n),t(i)),w(h,p)}}}function Wn($){let n,f=`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(){n=a("p"),n.innerHTML=f},l(i){n=s(i,"P",{"data-svelte-h":!0}),u(n)!=="svelte-fincs2"&&(n.innerHTML=f)},m(i,h){c(i,n,h)},p:ye,d(i){i&&t(n)}}}function En($){let n,f,i,h,L,p,O,ee,yt,Te,Bt="Open-Llama",et,N,tt,U,nt,S,j,Ve,te,Tt,we,Rt="Overview",ot,ne,Dt='The Open-Llama model was proposed in <a href="https://github.com/s-JoL/Open-Llama" rel="nofollow">Open-Llama project</a> by community developer s-JoL.',at,oe,Xt=`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.`,st,ae,Yt=`This model was contributed by <a href="https://huggingface.co/s-JoL" rel="nofollow">s-JoL</a>.
The original code can be found <a href="https://github.com/s-JoL/Open-Llama" rel="nofollow">Open-Llama</a>.
Checkpoint and usage can be found at <a href="https://huggingface.co/s-JoL/Open-Llama-V1" rel="nofollow">s-JoL/Open-Llama-V1</a>.`,rt,q,V,Ae,se,wt,ke,Qt="OpenLlamaConfig",it,x,re,kt,Le,Kt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/open-llama#transformers.OpenLlamaModel">OpenLlamaModel</a>. 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
<a href="https://huggingface.co/s-JoL/Open-Llama-V1" rel="nofollow">s-JoL/Open-Llama-V1</a>.`,Lt,$e,en=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/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/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,$t,A,lt,J,Z,Ze,ie,Mt,Me,tn="OpenLlamaModel",dt,M,le,Ct,Ce,nn=`The bare Open-Llama Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/v4.33.3/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.)`,Ot,Oe,on=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,xt,xe,an="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>OpenLlamaDecoderLayer</code>",zt,F,de,Ft,ze,sn='The <a href="/docs/transformers/v4.33.3/en/model_doc/open-llama#transformers.OpenLlamaModel">OpenLlamaModel</a> forward method, overrides the <code>__call__</code> special method.',Pt,G,ct,W,B,Ge,ce,It,Fe,rn="OpenLlamaForCausalLM",pt,E,pe,St,z,me,qt,Pe,ln='The <a href="/docs/transformers/v4.33.3/en/model_doc/open-llama#transformers.OpenLlamaForCausalLM">OpenLlamaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Jt,R,Wt,D,mt,H,X,Be,he,Et,Ie,dn="OpenLlamaForSequenceClassification",ht,k,ue,Ht,Se,cn="The LLaMa Model transformer with a sequence classification head on top (linear layer).",Nt,qe,pn=`<a href="/docs/transformers/v4.33.3/en/model_doc/open-llama#transformers.OpenLlamaForSequenceClassification">OpenLlamaForSequenceClassification</a> uses the last token in order to do the classification, as other causal
models (e.g. GPT-2) do.`,Ut,Je,mn=`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).`,jt,We,hn=`This model inherits from <a href="/docs/transformers/v4.33.3/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,Ee,un=`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.`,At,P,fe,Zt,He,fn='The <a href="/docs/transformers/v4.33.3/en/model_doc/open-llama#transformers.OpenLlamaForSequenceClassification">OpenLlamaForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Gt,Y,ut,Re,ft;return ee=new je({}),N=new Ke({props:{warning:!0,$$slots:{default:[Fn]},$$scope:{ctx:$}}}),U=new Ke({props:{warning:!0,$$slots:{default:[Pn]},$$scope:{ctx:$}}}),te=new je({}),se=new je({}),re=new be({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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/configuration_open_llama.py#L33"}}),A=new Ln({props:{anchor:"transformers.OpenLlamaConfig.example",$$slots:{default:[In]},$$scope:{ctx:$}}}),ie=new je({}),le=new be({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.33.3/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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L537"}}),de=new be({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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L592"}}),G=new Ke({props:{$$slots:{default:[Sn]},$$scope:{ctx:$}}}),ce=new je({}),pe=new be({props:{name:"class transformers.OpenLlamaForCausalLM",anchor:"transformers.OpenLlamaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L725"}}),me=new be({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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L755",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.33.3/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) — 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:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),R=new Ke({props:{$$slots:{default:[qn]},$$scope:{ctx:$}}}),D=new Ln({props:{anchor:"transformers.OpenLlamaForCausalLM.forward.example",$$slots:{default:[Jn]},$$scope:{ctx:$}}}),he=new je({}),ue=new be({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.33.3/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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L904"}}),fe=new be({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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.33.3/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.33.3/src/transformers/models/deprecated/open_llama/modeling_open_llama.py#L920"}}),Y=new Ke({props:{$$slots:{default:[Wn]},$$scope:{ctx:$}}}),{c(){n=a("meta"),f=l(),i=a("p"),h=l(),L=a("h1"),p=a("a"),O=a("span"),_(ee.$$.fragment),yt=l(),Te=a("span"),Te.textContent=Bt,et=l(),_(N.$$.fragment),tt=l(),_(U.$$.fragment),nt=l(),S=a("h2"),j=a("a"),Ve=a("span"),_(te.$$.fragment),Tt=l(),we=a("span"),we.textContent=Rt,ot=l(),ne=a("p"),ne.innerHTML=Dt,at=l(),oe=a("p"),oe.textContent=Xt,st=l(),ae=a("p"),ae.innerHTML=Yt,rt=l(),q=a("h2"),V=a("a"),Ae=a("span"),_(se.$$.fragment),wt=l(),ke=a("span"),ke.textContent=Qt,it=l(),x=a("div"),_(re.$$.fragment),kt=l(),Le=a("p"),Le.innerHTML=Kt,Lt=l(),$e=a("p"),$e.innerHTML=en,$t=l(),_(A.$$.fragment),lt=l(),J=a("h2"),Z=a("a"),Ze=a("span"),_(ie.$$.fragment),Mt=l(),Me=a("span"),Me.textContent=tn,dt=l(),M=a("div"),_(le.$$.fragment),Ct=l(),Ce=a("p"),Ce.innerHTML=nn,Ot=l(),Oe=a("p"),Oe.innerHTML=on,xt=l(),xe=a("p"),xe.innerHTML=an,zt=l(),F=a("div"),_(de.$$.fragment),Ft=l(),ze=a("p"),ze.innerHTML=sn,Pt=l(),_(G.$$.fragment),ct=l(),W=a("h2"),B=a("a"),Ge=a("span"),_(ce.$$.fragment),It=l(),Fe=a("span"),Fe.textContent=rn,pt=l(),E=a("div"),_(pe.$$.fragment),St=l(),z=a("div"),_(me.$$.fragment),qt=l(),Pe=a("p"),Pe.innerHTML=ln,Jt=l(),_(R.$$.fragment),Wt=l(),_(D.$$.fragment),mt=l(),H=a("h2"),X=a("a"),Be=a("span"),_(he.$$.fragment),Et=l(),Ie=a("span"),Ie.textContent=dn,ht=l(),k=a("div"),_(ue.$$.fragment),Ht=l(),Se=a("p"),Se.textContent=cn,Nt=l(),qe=a("p"),qe.innerHTML=pn,Ut=l(),Je=a("p"),Je.innerHTML=mn,jt=l(),We=a("p"),We.innerHTML=hn,Vt=l(),Ee=a("p"),Ee.innerHTML=un,At=l(),P=a("div"),_(fe.$$.fragment),Zt=l(),He=a("p"),He.innerHTML=fn,Gt=l(),_(Y.$$.fragment),ut=l(),Re=a("p"),this.h()},l(e){const r=zn("svelte-1phssyn",document.head);n=s(r,"META",{name:!0,content:!0}),r.forEach(t),f=d(e),i=s(e,"P",{}),g(i).forEach(t),h=d(e),L=s(e,"H1",{class:!0});var ge=g(L);p=s(ge,"A",{id:!0,class:!0,href:!0});var De=g(p);O=s(De,"SPAN",{});var Xe=g(O);v(ee.$$.fragment,Xe),Xe.forEach(t),De.forEach(t),yt=d(ge),Te=s(ge,"SPAN",{"data-svelte-h":!0}),u(Te)!=="svelte-1io0lyh"&&(Te.textContent=Bt),ge.forEach(t),et=d(e),v(N.$$.fragment,e),tt=d(e),v(U.$$.fragment,e),nt=d(e),S=s(e,"H2",{class:!0});var _e=g(S);j=s(_e,"A",{id:!0,class:!0,href:!0});var Ye=g(j);Ve=s(Ye,"SPAN",{});var Qe=g(Ve);v(te.$$.fragment,Qe),Qe.forEach(t),Ye.forEach(t),Tt=d(_e),we=s(_e,"SPAN",{"data-svelte-h":!0}),u(we)!=="svelte-1jsw1pg"&&(we.textContent=Rt),_e.forEach(t),ot=d(e),ne=s(e,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-jovbe9"&&(ne.innerHTML=Dt),at=d(e),oe=s(e,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-1snb5sc"&&(oe.textContent=Xt),st=d(e),ae=s(e,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-x7g787"&&(ae.innerHTML=Yt),rt=d(e),q=s(e,"H2",{class:!0});var ve=g(q);V=s(ve,"A",{id:!0,class:!0,href:!0});var gn=g(V);Ae=s(gn,"SPAN",{});var _n=g(Ae);v(se.$$.fragment,_n),_n.forEach(t),gn.forEach(t),wt=d(ve),ke=s(ve,"SPAN",{"data-svelte-h":!0}),u(ke)!=="svelte-1wnm1ts"&&(ke.textContent=Qt),ve.forEach(t),it=d(e),x=s(e,"DIV",{class:!0});var Q=g(x);v(re.$$.fragment,Q),kt=d(Q),Le=s(Q,"P",{"data-svelte-h":!0}),u(Le)!=="svelte-1i8mov2"&&(Le.innerHTML=Kt),Lt=d(Q),$e=s(Q,"P",{"data-svelte-h":!0}),u($e)!=="svelte-cfh5wl"&&($e.innerHTML=en),$t=d(Q),v(A.$$.fragment,Q),Q.forEach(t),lt=d(e),J=s(e,"H2",{class:!0});var gt=g(J);Z=s(gt,"A",{id:!0,class:!0,href:!0});var vn=g(Z);Ze=s(vn,"SPAN",{});var bn=g(Ze);v(ie.$$.fragment,bn),bn.forEach(t),vn.forEach(t),Mt=d(gt),Me=s(gt,"SPAN",{"data-svelte-h":!0}),u(Me)!=="svelte-1rxpvjz"&&(Me.textContent=tn),gt.forEach(t),dt=d(e),M=s(e,"DIV",{class:!0});var I=g(M);v(le.$$.fragment,I),Ct=d(I),Ce=s(I,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-h8v6sm"&&(Ce.innerHTML=nn),Ot=d(I),Oe=s(I,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-hswkmf"&&(Oe.innerHTML=on),xt=d(I),xe=s(I,"P",{"data-svelte-h":!0}),u(xe)!=="svelte-aj729g"&&(xe.innerHTML=an),zt=d(I),F=s(I,"DIV",{class:!0});var Ne=g(F);v(de.$$.fragment,Ne),Ft=d(Ne),ze=s(Ne,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-hgxoj5"&&(ze.innerHTML=sn),Pt=d(Ne),v(G.$$.fragment,Ne),Ne.forEach(t),I.forEach(t),ct=d(e),W=s(e,"H2",{class:!0});var _t=g(W);B=s(_t,"A",{id:!0,class:!0,href:!0});var yn=g(B);Ge=s(yn,"SPAN",{});var Tn=g(Ge);v(ce.$$.fragment,Tn),Tn.forEach(t),yn.forEach(t),It=d(_t),Fe=s(_t,"SPAN",{"data-svelte-h":!0}),u(Fe)!=="svelte-4p1spb"&&(Fe.textContent=rn),_t.forEach(t),pt=d(e),E=s(e,"DIV",{class:!0});var vt=g(E);v(pe.$$.fragment,vt),St=d(vt),z=s(vt,"DIV",{class:!0});var K=g(z);v(me.$$.fragment,K),qt=d(K),Pe=s(K,"P",{"data-svelte-h":!0}),u(Pe)!=="svelte-j3c22h"&&(Pe.innerHTML=ln),Jt=d(K),v(R.$$.fragment,K),Wt=d(K),v(D.$$.fragment,K),K.forEach(t),vt.forEach(t),mt=d(e),H=s(e,"H2",{class:!0});var bt=g(H);X=s(bt,"A",{id:!0,class:!0,href:!0});var wn=g(X);Be=s(wn,"SPAN",{});var kn=g(Be);v(he.$$.fragment,kn),kn.forEach(t),wn.forEach(t),Et=d(bt),Ie=s(bt,"SPAN",{"data-svelte-h":!0}),u(Ie)!=="svelte-bvcpyu"&&(Ie.textContent=dn),bt.forEach(t),ht=d(e),k=s(e,"DIV",{class:!0});var C=g(k);v(ue.$$.fragment,C),Ht=d(C),Se=s(C,"P",{"data-svelte-h":!0}),u(Se)!=="svelte-62must"&&(Se.textContent=cn),Nt=d(C),qe=s(C,"P",{"data-svelte-h":!0}),u(qe)!=="svelte-1dpqvxm"&&(qe.innerHTML=pn),Ut=d(C),Je=s(C,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-10ugs3m"&&(Je.innerHTML=mn),jt=d(C),We=s(C,"P",{"data-svelte-h":!0}),u(We)!=="svelte-ev63c"&&(We.innerHTML=hn),Vt=d(C),Ee=s(C,"P",{"data-svelte-h":!0}),u(Ee)!=="svelte-hswkmf"&&(Ee.innerHTML=un),At=d(C),P=s(C,"DIV",{class:!0});var Ue=g(P);v(fe.$$.fragment,Ue),Zt=d(Ue),He=s(Ue,"P",{"data-svelte-h":!0}),u(He)!=="svelte-2rnevb"&&(He.innerHTML=fn),Gt=d(Ue),v(Y.$$.fragment,Ue),Ue.forEach(t),C.forEach(t),ut=d(e),Re=s(e,"P",{}),g(Re).forEach(t),this.h()},h(){m(n,"name","hf:doc:metadata"),m(n,"content",JSON.stringify(Hn)),m(p,"id","openllama"),m(p,"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"),m(p,"href","#openllama"),m(L,"class","relative group"),m(j,"id","overview"),m(j,"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"),m(j,"href","#overview"),m(S,"class","relative group"),m(V,"id","transformers.OpenLlamaConfig"),m(V,"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"),m(V,"href","#transformers.OpenLlamaConfig"),m(q,"class","relative group"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Z,"id","transformers.OpenLlamaModel"),m(Z,"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"),m(Z,"href","#transformers.OpenLlamaModel"),m(J,"class","relative group"),m(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"id","transformers.OpenLlamaForCausalLM"),m(B,"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"),m(B,"href","#transformers.OpenLlamaForCausalLM"),m(W,"class","relative group"),m(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(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(X,"id","transformers.OpenLlamaForSequenceClassification"),m(X,"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"),m(X,"href","#transformers.OpenLlamaForSequenceClassification"),m(H,"class","relative group"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){o(document.head,n),c(e,f,r),c(e,i,r),c(e,h,r),c(e,L,r),o(L,p),o(p,O),b(ee,O,null),o(L,yt),o(L,Te),c(e,et,r),b(N,e,r),c(e,tt,r),b(U,e,r),c(e,nt,r),c(e,S,r),o(S,j),o(j,Ve),b(te,Ve,null),o(S,Tt),o(S,we),c(e,ot,r),c(e,ne,r),c(e,at,r),c(e,oe,r),c(e,st,r),c(e,ae,r),c(e,rt,r),c(e,q,r),o(q,V),o(V,Ae),b(se,Ae,null),o(q,wt),o(q,ke),c(e,it,r),c(e,x,r),b(re,x,null),o(x,kt),o(x,Le),o(x,Lt),o(x,$e),o(x,$t),b(A,x,null),c(e,lt,r),c(e,J,r),o(J,Z),o(Z,Ze),b(ie,Ze,null),o(J,Mt),o(J,Me),c(e,dt,r),c(e,M,r),b(le,M,null),o(M,Ct),o(M,Ce),o(M,Ot),o(M,Oe),o(M,xt),o(M,xe),o(M,zt),o(M,F),b(de,F,null),o(F,Ft),o(F,ze),o(F,Pt),b(G,F,null),c(e,ct,r),c(e,W,r),o(W,B),o(B,Ge),b(ce,Ge,null),o(W,It),o(W,Fe),c(e,pt,r),c(e,E,r),b(pe,E,null),o(E,St),o(E,z),b(me,z,null),o(z,qt),o(z,Pe),o(z,Jt),b(R,z,null),o(z,Wt),b(D,z,null),c(e,mt,r),c(e,H,r),o(H,X),o(X,Be),b(he,Be,null),o(H,Et),o(H,Ie),c(e,ht,r),c(e,k,r),b(ue,k,null),o(k,Ht),o(k,Se),o(k,Nt),o(k,qe),o(k,Ut),o(k,Je),o(k,jt),o(k,We),o(k,Vt),o(k,Ee),o(k,At),o(k,P),b(fe,P,null),o(P,Zt),o(P,He),o(P,Gt),b(Y,P,null),c(e,ut,r),c(e,Re,r),ft=!0},p(e,[r]){const ge={};r&2&&(ge.$$scope={dirty:r,ctx:e}),N.$set(ge);const De={};r&2&&(De.$$scope={dirty:r,ctx:e}),U.$set(De);const Xe={};r&2&&(Xe.$$scope={dirty:r,ctx:e}),A.$set(Xe);const _e={};r&2&&(_e.$$scope={dirty:r,ctx:e}),G.$set(_e);const Ye={};r&2&&(Ye.$$scope={dirty:r,ctx:e}),R.$set(Ye);const Qe={};r&2&&(Qe.$$scope={dirty:r,ctx:e}),D.$set(Qe);const ve={};r&2&&(ve.$$scope={dirty:r,ctx:e}),Y.$set(ve)},i(e){ft||(y(ee.$$.fragment,e),y(N.$$.fragment,e),y(U.$$.fragment,e),y(te.$$.fragment,e),y(se.$$.fragment,e),y(re.$$.fragment,e),y(A.$$.fragment,e),y(ie.$$.fragment,e),y(le.$$.fragment,e),y(de.$$.fragment,e),y(G.$$.fragment,e),y(ce.$$.fragment,e),y(pe.$$.fragment,e),y(me.$$.fragment,e),y(R.$$.fragment,e),y(D.$$.fragment,e),y(he.$$.fragment,e),y(ue.$$.fragment,e),y(fe.$$.fragment,e),y(Y.$$.fragment,e),ft=!0)},o(e){T(ee.$$.fragment,e),T(N.$$.fragment,e),T(U.$$.fragment,e),T(te.$$.fragment,e),T(se.$$.fragment,e),T(re.$$.fragment,e),T(A.$$.fragment,e),T(ie.$$.fragment,e),T(le.$$.fragment,e),T(de.$$.fragment,e),T(G.$$.fragment,e),T(ce.$$.fragment,e),T(pe.$$.fragment,e),T(me.$$.fragment,e),T(R.$$.fragment,e),T(D.$$.fragment,e),T(he.$$.fragment,e),T(ue.$$.fragment,e),T(fe.$$.fragment,e),T(Y.$$.fragment,e),ft=!1},d(e){e&&(t(f),t(i),t(h),t(L),t(et),t(tt),t(nt),t(S),t(ot),t(ne),t(at),t(oe),t(st),t(ae),t(rt),t(q),t(it),t(x),t(lt),t(J),t(dt),t(M),t(ct),t(W),t(pt),t(E),t(mt),t(H),t(ht),t(k),t(ut),t(Re)),t(n),w(ee),w(N,e),w(U,e),w(te),w(se),w(re),w(A),w(ie),w(le),w(de),w(G),w(ce),w(pe),w(me),w(R),w(D),w(he),w(ue),w(fe),w(Y)}}}const Hn={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 Nn($){return Cn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rn extends On{constructor(n){super(),xn(this,n,Nn,En,Mn,{})}}export{Rn as component};
