import{s as Ws,o as Js,n as bt}from"../chunks/scheduler.9bc65507.js";import{S as Ds,i as Vs,g as n,s as r,u,A as Bs,h as a,f as t,c as i,j as h,v as f,y as c,k as m,o,a as l,w as g,d as _,t as v,x as b}from"../chunks/index.78c82d43.js";import{T as ya}from"../chunks/Tip.87d55b76.js";import{D as x}from"../chunks/Docstring.4e7352e2.js";import{C as io}from"../chunks/CodeBlock.73e038be.js";import{I as X}from"../chunks/IconCopyLink.bedaa44d.js";import{E as kn}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as Ns}from"../chunks/PipelineTag.75b0f707.js";function Rs(z){let d,L;return d=new io({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMExsYW1hTW9kZWwlMkMlMjBMbGFtYUNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBMTGFNQSUyMGxsYW1hLTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMExsYW1hQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwbGxhbWEtN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMExsYW1hTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlamaModel, LlamaConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a LLaMA llama-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = LlamaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the llama-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LlamaModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){u(d.$$.fragment)},l(p){f(d.$$.fragment,p)},m(p,y){g(d,p,y),L=!0},p:bt,i(p){L||(_(d.$$.fragment,p),L=!0)},o(p){v(d.$$.fragment,p),L=!1},d(p){b(d,p)}}}function Gs(z){let d,L="sequence pair mask has the following format:",p,y,$;return y=new io({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`,wrap:!1}}),{c(){d=n("p"),d.textContent=L,p=r(),u(y.$$.fragment)},l(k){d=a(k,"P",{"data-svelte-h":!0}),c(d)!=="svelte-16klr56"&&(d.textContent=L),p=i(k),f(y.$$.fragment,k)},m(k,P){l(k,d,P),l(k,p,P),g(y,k,P),$=!0},p:bt,i(k){$||(_(y.$$.fragment,k),$=!0)},o(k){v(y.$$.fragment,k),$=!1},d(k){k&&(t(d),t(p)),b(y,k)}}}function Zs(z){let d,L;return d=new io({props:{code:"JTBBJTVCMSUyQyUyMDE1MDQzJTJDJTIwNDQ1JTJDJTIwMzM4JTJDJTIwMjYzJTJDJTIwMTI0MyU1RA==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlamaTokenizerFast

tokenizer = LlamaTokenizerFast.from_pretrained(&quot;hf-internal-testing/llama-tokenizer&quot;)
tokenizer.encode(&quot;Hello this is a test&quot;)
&gt;&gt;&gt; [<span class="hljs-number">1</span>, <span class="hljs-number">15043</span>, <span class="hljs-number">445</span>, <span class="hljs-number">338</span>, <span class="hljs-number">263</span>, <span class="hljs-number">1243</span>]`,wrap:!1}}),{c(){u(d.$$.fragment)},l(p){f(d.$$.fragment,p)},m(p,y){g(d,p,y),L=!0},p:bt,i(p){L||(_(d.$$.fragment,p),L=!0)},o(p){v(d.$$.fragment,p),L=!1},d(p){b(d,p)}}}function Os(z){let d,L=`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(){d=n("p"),d.innerHTML=L},l(p){d=a(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=L)},m(p,y){l(p,d,y)},p:bt,d(p){p&&t(d)}}}function Xs(z){let d,L=`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(){d=n("p"),d.innerHTML=L},l(p){d=a(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=L)},m(p,y){l(p,d,y)},p:bt,d(p){p&&t(d)}}}function Ys(z){let d,L="Example:",p,y,$;return y=new io({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBMbGFtYUZvckNhdXNhbExNJTBBJTBBbW9kZWwlMjAlM0QlMjBMbGFtYUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZChQQVRIX1RPX0NPTlZFUlRFRF9XRUlHSFRTKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKFBBVEhfVE9fQ09OVkVSVEVEX1RPS0VOSVpFUiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, LlamaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = LlamaForCausalLM.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>`,wrap:!1}}),{c(){d=n("p"),d.textContent=L,p=r(),u(y.$$.fragment)},l(k){d=a(k,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=L),p=i(k),f(y.$$.fragment,k)},m(k,P){l(k,d,P),l(k,p,P),g(y,k,P),$=!0},p:bt,i(k){$||(_(y.$$.fragment,k),$=!0)},o(k){v(y.$$.fragment,k),$=!1},d(k){k&&(t(d),t(p)),b(y,k)}}}function Qs(z){let d,L=`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(){d=n("p"),d.innerHTML=L},l(p){d=a(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=L)},m(p,y){l(p,d,y)},p:bt,d(p){p&&t(d)}}}function Ks(z){let d,L,p,y,$,k,P,be,yn,kt,La="LLaMA",Lo,W,Y,lo,ke,Ln,yt,Ta="Overview",To,ye,wa='The LLaMA model was proposed in <a href="https://arxiv.org/abs/2302.13971" rel="nofollow">LLaMA: Open and Efficient Foundation Language Models</a> by Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, Guillaume Lample. It is a collection of foundation language models ranging from 7B to 65B parameters.',wo,Le,$a="The abstract from the paper is the following:",$o,Te,Ma="<em>We introduce LLaMA, a collection of foundation language models ranging from 7B to 65B parameters. We train our models on trillions of tokens, and show that it is possible to train state-of-the-art models using publicly available datasets exclusively, without resorting to proprietary and inaccessible datasets. In particular, LLaMA-13B outperforms GPT-3 (175B) on most benchmarks, and LLaMA-65B is competitive with the best models, Chinchilla-70B and PaLM-540B. We release all our models to the research community.</em>",Mo,we,xa="Tips:",xo,$e,Ca='<li>Weights for the LLaMA models can be obtained from by filling out <a href="https://docs.google.com/forms/d/e/1FAIpQLSfqNECQnMkycAp2jP4Z9TFX0cGR4uf7b_fBxjY_OjhJILlKGA/viewform?usp=send_form" rel="nofollow">this form</a></li> <li>After downloading the weights, they will need to be converted to the Hugging Face Transformers format using the <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py" rel="nofollow">conversion script</a>. The script can be called with the following (example) command:</li>',Co,Me,zo,xe,za="<li>After conversion, the model and tokenizer can be loaded via:</li>",Fo,Ce,Ao,ze,Fa=`Note that executing the script requires enough CPU RAM to host the whole model in float16 precision (even if the biggest versions
come in several checkpoints they each contain a part of each weight of the model, so we need to load them all in RAM). For the 65B model, it’s thus 130GB of RAM needed.`,Po,Fe,Aa='<li>The LLaMA tokenizer is a BPE model based on <a href="https://github.com/google/sentencepiece" rel="nofollow">sentencepiece</a>. One quirk of sentencepiece is that when decoding a sequence, if the first token is the start of the word (e.g. “Banana”), the tokenizer does not prepend the prefix space to the string.</li>',qo,Ae,Pa='This model was contributed by <a href="https://huggingface.co/zphang" rel="nofollow">zphang</a> with contributions from <a href="https://huggingface.co/BlackSamorez" rel="nofollow">BlackSamorez</a>. The code of the implementation in Hugging Face is based on GPT-NeoX <a href="https://github.com/EleutherAI/gpt-neox" rel="nofollow">here</a>. The original code of the authors can be found <a href="https://github.com/facebookresearch/llama" rel="nofollow">here</a>.',Io,Pe,qa="Based on the original LLaMA model, Meta AI has released some follow-up works:",Eo,qe,Ia='<li><strong>Llama2</strong>: Llama2 is an improved version of Llama with some architectural tweaks (Grouped Query Attention), and is pre-trained on 2Trillion tokens. Refer to the documentation of Llama2 which can be found <a href="llama2">here</a>.</li>',jo,J,Q,co,Ie,Tn,Lt,Ea="Resources",Ho,Ee,ja="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with LLaMA. If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",Uo,je,So,He,Ha='<li>A <a href="https://colab.research.google.com/github/bigscience-workshop/petals/blob/main/examples/prompt-tuning-sst2.ipynb#scrollTo=f04ba4d2" rel="nofollow">notebook</a> on how to use prompt tuning to adapt the LLaMA model for text classification task. 🌎</li>',No,Ue,Wo,Se,Ua='<li><a href="https://huggingface.co/blog/stackllama#stackllama-a-hands-on-guide-to-train-llama-with-rlhf" rel="nofollow">StackLLaMA: A hands-on guide to train LLaMA with RLHF</a>, a blog post about how to train LLaMA to answer questions on <a href="https://stackexchange.com/" rel="nofollow">Stack Exchange</a> with RLHF.</li>',Jo,Ne,Sa="⚗️ Optimization",Do,We,Na='<li>A <a href="https://colab.research.google.com/drive/1SQUXq1AMZPSLD4mk3A3swUIc6Y2dclme?usp=sharing" rel="nofollow">notebook</a> on how to fine-tune LLaMA model using xturing library on GPU which has limited memory. 🌎</li>',Vo,Je,Wa="⚡️ Inference",Bo,De,Ja='<li>A <a href="https://colab.research.google.com/github/DominguesM/alpaca-lora-ptbr-7b/blob/main/notebooks/02%20-%20Evaluate.ipynb" rel="nofollow">notebook</a> on how to run the LLaMA Model using PeftModel from the 🤗 PEFT library. 🌎</li> <li>A <a href="https://colab.research.google.com/drive/1l2GiSSPbajVyp2Nk3CFT4t3uH6-5TiBe?usp=sharing" rel="nofollow">notebook</a> on how to load a PEFT adapter LLaMA model with LangChain. 🌎</li>',Ro,Ve,Da="🚀 Deploy",Go,Be,Va='<li>A <a href="https://colab.research.google.com/github/lxe/simple-llama-finetuner/blob/master/Simple_LLaMA_FineTuner.ipynb#scrollTo=3PM_DilAZD8T" rel="nofollow">notebook</a> on how to fine-tune LLaMA model using LoRA method via the 🤗 PEFT library with intuitive UI. 🌎</li> <li>A <a href="https://github.com/aws/amazon-sagemaker-examples/blob/main/introduction_to_amazon_algorithms/jumpstart-foundation-models/text-generation-open-llama.ipynb" rel="nofollow">notebook</a> on how to deploy Open-LLaMA model for text generation on Amazon SageMaker. 🌎</li>',Zo,D,K,mo,Re,wn,Tt,Ba="LlamaConfig",Oo,q,Ge,$n,wt,Ra=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaModel">LlamaModel</a>. It is used to instantiate an 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 LLaMA-7B.`,Mn,$t,Ga=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/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.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,xn,ee,Xo,V,te,po,Ze,Cn,Mt,Za="LlamaTokenizer",Yo,C,Oe,zn,xt,Oa=`Construct a Llama tokenizer. Based on byte-level Byte-Pair-Encoding. The default padding token is unset as there is
no padding token in the original model.`,Fn,Ct,Xe,An,oe,Ye,Pn,zt,Xa=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,qn,I,Qe,In,Ft,Ya="Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT",En,ne,jn,At,Qa="if token_ids_1 is None, only returns the first portion of the mask (0s).",Hn,ae,Ke,Un,Pt,Ka="Save the vocabulary and special tokens file to a directory.",Qo,B,se,ho,et,Sn,qt,es="LlamaTokenizerFast",Ko,T,tt,Nn,It,ts="Construct a Llama tokenizer. Based on byte-level Byte-Pair-Encoding.",Wn,Et,os="This uses notably ByteFallback and no normalization.",Jn,re,Dn,jt,ns=`If you want to change the <code>bos_token</code> or the <code>eos_token</code>, make sure to specify them when initializing the model, or
call <code>tokenizer.update_post_processor()</code> to make sure that the post-processing is correctly done (otherwise the
values of the first token and final token of an encoded sequence will not be correct). For more details, checkout
[post-processors] (<a href="https://huggingface.co/docs/tokenizers/api/post-processors" rel="nofollow">https://huggingface.co/docs/tokenizers/api/post-processors</a>) documentation.`,Vn,Ht,as=`This tokenizer inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Bn,Ut,ot,Rn,ie,nt,Gn,St,ss=`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> or <code>encode_plus</code> methods.`,Zn,H,at,On,Nt,rs=`Create the token type IDs corresponding to the sequences passed. <a href="../glossary#token-type-ids">What are token type
IDs?</a>`,Xn,Wt,is="Should be overridden in a subclass if the model has a special way of building those.",Yn,le,st,Qn,Jt,ls="Updates the underlying post processor with the current <code>bos_token</code> and <code>eos_token</code>.",Kn,Dt,rt,en,R,de,uo,it,ea,Vt,ds="LlamaModel",tn,F,lt,ta,Bt,cs=`The bare LLaMA Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/v4.34.0/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.)`,oa,Rt,ms=`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.`,na,Gt,ps="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>LlamaDecoderLayer</code>",aa,U,dt,sa,Zt,hs='The <a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaModel">LlamaModel</a> forward method, overrides the <code>__call__</code> special method.',ra,ce,on,G,me,fo,ct,ia,Ot,us="LlamaForCausalLM",nn,Z,mt,la,E,pt,da,Xt,fs='The <a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaForCausalLM">LlamaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',ca,pe,ma,he,an,O,ue,go,ht,pa,Yt,gs="LlamaForSequenceClassification",sn,M,ut,ha,Qt,_s="The LLaMa Model transformer with a sequence classification head on top (linear layer).",ua,Kt,vs=`<a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaForSequenceClassification">LlamaForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,fa,eo,bs=`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).`,ga,to,ks=`This model inherits from <a href="/docs/transformers/v4.34.0/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.)`,_a,oo,ys=`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.`,va,S,ft,ba,no,Ls='The <a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaForSequenceClassification">LlamaForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',ka,fe,rn,_o,ln;return be=new X({}),ke=new X({}),Me=new io({props:{code:"cHl0aG9uJTIwc3JjJTJGdHJhbnNmb3JtZXJzJTJGbW9kZWxzJTJGbGxhbWElMkZjb252ZXJ0X2xsYW1hX3dlaWdodHNfdG9faGYucHklMjAlNUMlMEElMjAlMjAlMjAlMjAtLWlucHV0X2RpciUyMCUyRnBhdGglMkZ0byUyRmRvd25sb2FkZWQlMkZsbGFtYSUyRndlaWdodHMlMjAtLW1vZGVsX3NpemUlMjA3QiUyMC0tb3V0cHV0X2RpciUyMCUyRm91dHB1dCUyRnBhdGg=",highlighted:`python src/transformers/models/llama/convert_llama_weights_to_hf.py \\
    --input_dir /path/to/downloaded/llama/weights --model_size 7B --output_dir /output/path`,wrap:!1}}),Ce=new io({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMExsYW1hRm9yQ2F1c2FsTE0lMkMlMjBMbGFtYVRva2VuaXplciUwQSUwQXRva2VuaXplciUyMCUzRCUyMExsYW1hVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjIlMkZvdXRwdXQlMkZwYXRoJTIyKSUwQW1vZGVsJTIwJTNEJTIwTGxhbWFGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyJTJGb3V0cHV0JTJGcGF0aCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlamaForCausalLM, LlamaTokenizer

tokenizer = LlamaTokenizer.from_pretrained(<span class="hljs-string">&quot;/output/path&quot;</span>)
model = LlamaForCausalLM.from_pretrained(<span class="hljs-string">&quot;/output/path&quot;</span>)`,wrap:!1}}),Ie=new X({}),je=new Ns({props:{pipeline:"text-classification"}}),Ue=new Ns({props:{pipeline:"question-answering"}}),Re=new X({}),Ge=new x({props:{name:"class transformers.LlamaConfig",anchor:"transformers.LlamaConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:" = 11008"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"num_key_value_heads",val:" = None"},{name:"hidden_act",val:" = 'silu'"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-06"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = None"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"pretraining_tp",val:" = 1"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 10000.0"},{name:"rope_scaling",val:" = None"},{name:"attention_bias",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LlamaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the LLaMA model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaModel">LlamaModel</a>`,name:"vocab_size"},{anchor:"transformers.LlamaConfig.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.LlamaConfig.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.LlamaConfig.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.LlamaConfig.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.LlamaConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
<code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if
<code>num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed by meanpooling all the original heads within that group. For more details checkout [this paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to </code>num_attention_heads\`.`,name:"num_key_value_heads"},{anchor:"transformers.LlamaConfig.pretraining_tp",description:`<strong>pretraining_tp</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to <a href="https://huggingface.co/docs/transformers/parallelism" rel="nofollow">this
document</a> to understand more about it. This value is
necessary to ensure exact reproducibility of the pretraining results. Please refer to <a href="https://github.com/pytorch/pytorch/issues/76232" rel="nofollow">this
issue</a>.`,name:"pretraining_tp"},{anchor:"transformers.LlamaConfig.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.LlamaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with. Llama 1 supports up to 2048 tokens,
Llama 2 up to 4096, CodeLlama up to 16384.`,name:"max_position_embeddings"},{anchor:"transformers.LlamaConfig.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.LlamaConfig.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.LlamaConfig.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.LlamaConfig.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.LlamaConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.LlamaConfig.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.`,name:"rope_scaling"},{anchor:"transformers.LlamaConfig.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in the query, key, value and output projection layers during self-attention.</p>
<p>Example &#x2014;`,name:"attention_bias"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/configuration_llama.py#L31"}}),ee=new kn({props:{anchor:"transformers.LlamaConfig.example",$$slots:{default:[Rs]},$$scope:{ctx:z}}}),Ze=new X({}),Oe=new x({props:{name:"class transformers.LlamaTokenizer",anchor:"transformers.LlamaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"add_bos_token",val:" = True"},{name:"add_eos_token",val:" = False"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"use_default_system_prompt",val:" = True"},{name:"spaces_between_special_tokens",val:" = False"},{name:"legacy",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LlamaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.LlamaTokenizer.legacy",description:`<strong>legacy</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the <code>legacy</code> behavior of the tokenizer should be used. Legacy is before the merge of #24622
and #25224 which includes fixes to properly handle tokens that appear after special tokens. A simple
example:</p>
<ul>
<li><code>legacy=True</code>:</li>
</ul>`,name:"legacy"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama.py#L66"}}),Xe=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.LlamaTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama.py#L296"}}),Ye=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.LlamaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.LlamaTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.LlamaTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.LlamaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama.py#L307",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Qe=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.LlamaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.LlamaTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.LlamaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama.py#L344",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ne=new kn({props:{anchor:"transformers.LlamaTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Gs]},$$scope:{ctx:z}}}),Ke=new x({props:{name:"save_vocabulary",anchor:"transformers.LlamaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:""},{name:"filename_prefix",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.LlamaTokenizer.save_vocabulary.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
The directory in which to save the vocabulary.`,name:"save_directory"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama.py#L269",returnDescription:`
<p>Paths to the files saved.</p>
`,returnType:`
<p><code>Tuple(str)</code></p>
`}}),et=new X({}),tt=new x({props:{name:"class transformers.LlamaTokenizerFast",anchor:"transformers.LlamaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"add_bos_token",val:" = True"},{name:"add_eos_token",val:" = False"},{name:"use_default_system_prompt",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LlamaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .model extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.LlamaTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/huggingface/tokenizers" rel="nofollow">tokenizers</a> file (generally has a .json extension) that
contains everything needed to load the tokenizer.`,name:"tokenizer_file"},{anchor:"transformers.LlamaTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>str</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Wether to cleanup spaces after decoding, cleanup consists in removing potential artifacts like extra
spaces.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.LlamaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.`,name:"bos_token"},{anchor:"transformers.LlamaTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.LlamaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama_fast.py#L57"}}),re=new kn({props:{anchor:"transformers.LlamaTokenizerFast.example",$$slots:{default:[Zs]},$$scope:{ctx:z}}}),ot=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.LlamaTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama_fast.py#L255"}}),nt=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.LlamaTokenizerFast.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.LlamaTokenizerFast.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids of the first sequence.`,name:"token_ids_0"},{anchor:"transformers.LlamaTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of ids of the second sequence.`,name:"token_ids_1"},{anchor:"transformers.LlamaTokenizerFast.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/tokenization_utils_base.py#L3770",returnDescription:`
<p>1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p>A list of integers in the range [0, 1]</p>
`}}),at=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.LlamaTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.LlamaTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.LlamaTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/tokenization_utils_base.py#L3305",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),st=new x({props:{name:"update_post_processor",anchor:"transformers.LlamaTokenizerFast.update_post_processor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama_fast.py#L142"}}),rt=new x({props:{name:"save_vocabulary",anchor:"transformers.LlamaTokenizerFast.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/tokenization_llama_fast.py#L182"}}),it=new X({}),lt=new x({props:{name:"class transformers.LlamaModel",anchor:"transformers.LlamaModel",parameters:[{name:"config",val:": LlamaConfig"}],parametersDescription:[{anchor:"transformers.LlamaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaConfig">LlamaConfig</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.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; LlamaConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/modeling_llama.py#L776"}}),dt=new x({props:{name:"forward",anchor:"transformers.LlamaModel.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.LlamaModel.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__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.LlamaModel.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.LlamaModel.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.LlamaModel.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>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.LlamaModel.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.LlamaModel.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.LlamaModel.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.LlamaModel.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.LlamaModel.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.34.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.34.0/src/transformers/models/llama/modeling_llama.py#L827"}}),ce=new ya({props:{$$slots:{default:[Os]},$$scope:{ctx:z}}}),ct=new X({}),mt=new x({props:{name:"class transformers.LlamaForCausalLM",anchor:"transformers.LlamaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/llama/modeling_llama.py#L960"}}),pt=new x({props:{name:"forward",anchor:"transformers.LlamaForCausalLM.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.LlamaForCausalLM.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__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.LlamaForCausalLM.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.LlamaForCausalLM.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.LlamaForCausalLM.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>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.LlamaForCausalLM.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.LlamaForCausalLM.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.LlamaForCausalLM.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.LlamaForCausalLM.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.LlamaForCausalLM.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.34.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.34.0/src/transformers/models/llama/modeling_llama.py#L990",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.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.34.0/en/model_doc/llama2#transformers.LlamaConfig"
>LlamaConfig</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.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new ya({props:{$$slots:{default:[Xs]},$$scope:{ctx:z}}}),he=new kn({props:{anchor:"transformers.LlamaForCausalLM.forward.example",$$slots:{default:[Ys]},$$scope:{ctx:z}}}),ht=new X({}),ut=new x({props:{name:"class transformers.LlamaForSequenceClassification",anchor:"transformers.LlamaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LlamaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/llama2#transformers.LlamaConfig">LlamaConfig</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.34.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.34.0/src/transformers/models/llama/modeling_llama.py#L1139"}}),ft=new x({props:{name:"forward",anchor:"transformers.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__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.LlamaForSequenceClassification.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.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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.LlamaForSequenceClassification.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.LlamaForSequenceClassification.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.34.0/src/transformers/models/llama/modeling_llama.py#L1155"}}),fe=new ya({props:{$$slots:{default:[Qs]},$$scope:{ctx:z}}}),{c(){d=n("meta"),L=r(),p=n("p"),y=r(),$=n("h1"),k=n("a"),P=n("span"),u(be.$$.fragment),yn=r(),kt=n("span"),kt.textContent=La,Lo=r(),W=n("h2"),Y=n("a"),lo=n("span"),u(ke.$$.fragment),Ln=r(),yt=n("span"),yt.textContent=Ta,To=r(),ye=n("p"),ye.innerHTML=wa,wo=r(),Le=n("p"),Le.textContent=$a,$o=r(),Te=n("p"),Te.innerHTML=Ma,Mo=r(),we=n("p"),we.textContent=xa,xo=r(),$e=n("ul"),$e.innerHTML=Ca,Co=r(),u(Me.$$.fragment),zo=r(),xe=n("ul"),xe.innerHTML=za,Fo=r(),u(Ce.$$.fragment),Ao=r(),ze=n("p"),ze.textContent=Fa,Po=r(),Fe=n("ul"),Fe.innerHTML=Aa,qo=r(),Ae=n("p"),Ae.innerHTML=Pa,Io=r(),Pe=n("p"),Pe.textContent=qa,Eo=r(),qe=n("ul"),qe.innerHTML=Ia,jo=r(),J=n("h2"),Q=n("a"),co=n("span"),u(Ie.$$.fragment),Tn=r(),Lt=n("span"),Lt.textContent=Ea,Ho=r(),Ee=n("p"),Ee.textContent=ja,Uo=r(),u(je.$$.fragment),So=r(),He=n("ul"),He.innerHTML=Ha,No=r(),u(Ue.$$.fragment),Wo=r(),Se=n("ul"),Se.innerHTML=Ua,Jo=r(),Ne=n("p"),Ne.textContent=Sa,Do=r(),We=n("ul"),We.innerHTML=Na,Vo=r(),Je=n("p"),Je.textContent=Wa,Bo=r(),De=n("ul"),De.innerHTML=Ja,Ro=r(),Ve=n("p"),Ve.textContent=Da,Go=r(),Be=n("ul"),Be.innerHTML=Va,Zo=r(),D=n("h2"),K=n("a"),mo=n("span"),u(Re.$$.fragment),wn=r(),Tt=n("span"),Tt.textContent=Ba,Oo=r(),q=n("div"),u(Ge.$$.fragment),$n=r(),wt=n("p"),wt.innerHTML=Ra,Mn=r(),$t=n("p"),$t.innerHTML=Ga,xn=r(),u(ee.$$.fragment),Xo=r(),V=n("h2"),te=n("a"),po=n("span"),u(Ze.$$.fragment),Cn=r(),Mt=n("span"),Mt.textContent=Za,Yo=r(),C=n("div"),u(Oe.$$.fragment),zn=r(),xt=n("p"),xt.textContent=Oa,Fn=r(),Ct=n("div"),u(Xe.$$.fragment),An=r(),oe=n("div"),u(Ye.$$.fragment),Pn=r(),zt=n("p"),zt.innerHTML=Xa,qn=r(),I=n("div"),u(Qe.$$.fragment),In=r(),Ft=n("p"),Ft.textContent=Ya,En=r(),u(ne.$$.fragment),jn=r(),At=n("p"),At.textContent=Qa,Hn=r(),ae=n("div"),u(Ke.$$.fragment),Un=r(),Pt=n("p"),Pt.textContent=Ka,Qo=r(),B=n("h2"),se=n("a"),ho=n("span"),u(et.$$.fragment),Sn=r(),qt=n("span"),qt.textContent=es,Ko=r(),T=n("div"),u(tt.$$.fragment),Nn=r(),It=n("p"),It.textContent=ts,Wn=r(),Et=n("p"),Et.textContent=os,Jn=r(),u(re.$$.fragment),Dn=r(),jt=n("p"),jt.innerHTML=ns,Vn=r(),Ht=n("p"),Ht.innerHTML=as,Bn=r(),Ut=n("div"),u(ot.$$.fragment),Rn=r(),ie=n("div"),u(nt.$$.fragment),Gn=r(),St=n("p"),St.innerHTML=ss,Zn=r(),H=n("div"),u(at.$$.fragment),On=r(),Nt=n("p"),Nt.innerHTML=rs,Xn=r(),Wt=n("p"),Wt.textContent=is,Yn=r(),le=n("div"),u(st.$$.fragment),Qn=r(),Jt=n("p"),Jt.innerHTML=ls,Kn=r(),Dt=n("div"),u(rt.$$.fragment),en=r(),R=n("h2"),de=n("a"),uo=n("span"),u(it.$$.fragment),ea=r(),Vt=n("span"),Vt.textContent=ds,tn=r(),F=n("div"),u(lt.$$.fragment),ta=r(),Bt=n("p"),Bt.innerHTML=cs,oa=r(),Rt=n("p"),Rt.innerHTML=ms,na=r(),Gt=n("p"),Gt.innerHTML=ps,aa=r(),U=n("div"),u(dt.$$.fragment),sa=r(),Zt=n("p"),Zt.innerHTML=hs,ra=r(),u(ce.$$.fragment),on=r(),G=n("h2"),me=n("a"),fo=n("span"),u(ct.$$.fragment),ia=r(),Ot=n("span"),Ot.textContent=us,nn=r(),Z=n("div"),u(mt.$$.fragment),la=r(),E=n("div"),u(pt.$$.fragment),da=r(),Xt=n("p"),Xt.innerHTML=fs,ca=r(),u(pe.$$.fragment),ma=r(),u(he.$$.fragment),an=r(),O=n("h2"),ue=n("a"),go=n("span"),u(ht.$$.fragment),pa=r(),Yt=n("span"),Yt.textContent=gs,sn=r(),M=n("div"),u(ut.$$.fragment),ha=r(),Qt=n("p"),Qt.textContent=_s,ua=r(),Kt=n("p"),Kt.innerHTML=vs,fa=r(),eo=n("p"),eo.innerHTML=bs,ga=r(),to=n("p"),to.innerHTML=ks,_a=r(),oo=n("p"),oo.innerHTML=ys,va=r(),S=n("div"),u(ft.$$.fragment),ba=r(),no=n("p"),no.innerHTML=Ls,ka=r(),u(fe.$$.fragment),rn=r(),_o=n("p"),this.h()},l(e){const s=Bs("svelte-1phssyn",document.head);d=a(s,"META",{name:!0,content:!0}),s.forEach(t),L=i(e),p=a(e,"P",{}),h(p).forEach(t),y=i(e),$=a(e,"H1",{class:!0});var gt=h($);k=a(gt,"A",{id:!0,class:!0,href:!0});var vo=h(k);P=a(vo,"SPAN",{});var bo=h(P);f(be.$$.fragment,bo),bo.forEach(t),vo.forEach(t),yn=i(gt),kt=a(gt,"SPAN",{"data-svelte-h":!0}),c(kt)!=="svelte-10uy0om"&&(kt.textContent=La),gt.forEach(t),Lo=i(e),W=a(e,"H2",{class:!0});var _t=h(W);Y=a(_t,"A",{id:!0,class:!0,href:!0});var ko=h(Y);lo=a(ko,"SPAN",{});var yo=h(lo);f(ke.$$.fragment,yo),yo.forEach(t),ko.forEach(t),Ln=i(_t),yt=a(_t,"SPAN",{"data-svelte-h":!0}),c(yt)!=="svelte-1jsw1pg"&&(yt.textContent=Ta),_t.forEach(t),To=i(e),ye=a(e,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-1mfapnf"&&(ye.innerHTML=wa),wo=i(e),Le=a(e,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-vfdo9a"&&(Le.textContent=$a),$o=i(e),Te=a(e,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-sl0nly"&&(Te.innerHTML=Ma),Mo=i(e),we=a(e,"P",{"data-svelte-h":!0}),c(we)!=="svelte-axv494"&&(we.textContent=xa),xo=i(e),$e=a(e,"UL",{"data-svelte-h":!0}),c($e)!=="svelte-oqmv1y"&&($e.innerHTML=Ca),Co=i(e),f(Me.$$.fragment,e),zo=i(e),xe=a(e,"UL",{"data-svelte-h":!0}),c(xe)!=="svelte-yjbkch"&&(xe.innerHTML=za),Fo=i(e),f(Ce.$$.fragment,e),Ao=i(e),ze=a(e,"P",{"data-svelte-h":!0}),c(ze)!=="svelte-3h7jh3"&&(ze.textContent=Fa),Po=i(e),Fe=a(e,"UL",{"data-svelte-h":!0}),c(Fe)!=="svelte-1xmggxn"&&(Fe.innerHTML=Aa),qo=i(e),Ae=a(e,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-1ivivso"&&(Ae.innerHTML=Pa),Io=i(e),Pe=a(e,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-a39vkx"&&(Pe.textContent=qa),Eo=i(e),qe=a(e,"UL",{"data-svelte-h":!0}),c(qe)!=="svelte-y8u21a"&&(qe.innerHTML=Ia),jo=i(e),J=a(e,"H2",{class:!0});var vt=h(J);Q=a(vt,"A",{id:!0,class:!0,href:!0});var Ts=h(Q);co=a(Ts,"SPAN",{});var ws=h(co);f(Ie.$$.fragment,ws),ws.forEach(t),Ts.forEach(t),Tn=i(vt),Lt=a(vt,"SPAN",{"data-svelte-h":!0}),c(Lt)!=="svelte-w4zzv6"&&(Lt.textContent=Ea),vt.forEach(t),Ho=i(e),Ee=a(e,"P",{"data-svelte-h":!0}),c(Ee)!=="svelte-h1kz0m"&&(Ee.textContent=ja),Uo=i(e),f(je.$$.fragment,e),So=i(e),He=a(e,"UL",{"data-svelte-h":!0}),c(He)!=="svelte-dp296g"&&(He.innerHTML=Ha),No=i(e),f(Ue.$$.fragment,e),Wo=i(e),Se=a(e,"UL",{"data-svelte-h":!0}),c(Se)!=="svelte-ab7kge"&&(Se.innerHTML=Ua),Jo=i(e),Ne=a(e,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-liq2q7"&&(Ne.textContent=Sa),Do=i(e),We=a(e,"UL",{"data-svelte-h":!0}),c(We)!=="svelte-10a5770"&&(We.innerHTML=Na),Vo=i(e),Je=a(e,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-1wntqpp"&&(Je.textContent=Wa),Bo=i(e),De=a(e,"UL",{"data-svelte-h":!0}),c(De)!=="svelte-1t43wyu"&&(De.innerHTML=Ja),Ro=i(e),Ve=a(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-lk14e4"&&(Ve.textContent=Da),Go=i(e),Be=a(e,"UL",{"data-svelte-h":!0}),c(Be)!=="svelte-162yhfz"&&(Be.innerHTML=Va),Zo=i(e),D=a(e,"H2",{class:!0});var dn=h(D);K=a(dn,"A",{id:!0,class:!0,href:!0});var $s=h(K);mo=a($s,"SPAN",{});var Ms=h(mo);f(Re.$$.fragment,Ms),Ms.forEach(t),$s.forEach(t),wn=i(dn),Tt=a(dn,"SPAN",{"data-svelte-h":!0}),c(Tt)!=="svelte-7iuhrk"&&(Tt.textContent=Ba),dn.forEach(t),Oo=i(e),q=a(e,"DIV",{class:!0});var ge=h(q);f(Ge.$$.fragment,ge),$n=i(ge),wt=a(ge,"P",{"data-svelte-h":!0}),c(wt)!=="svelte-x8ltem"&&(wt.innerHTML=Ra),Mn=i(ge),$t=a(ge,"P",{"data-svelte-h":!0}),c($t)!=="svelte-10kqkkl"&&($t.innerHTML=Ga),xn=i(ge),f(ee.$$.fragment,ge),ge.forEach(t),Xo=i(e),V=a(e,"H2",{class:!0});var cn=h(V);te=a(cn,"A",{id:!0,class:!0,href:!0});var xs=h(te);po=a(xs,"SPAN",{});var Cs=h(po);f(Ze.$$.fragment,Cs),Cs.forEach(t),xs.forEach(t),Cn=i(cn),Mt=a(cn,"SPAN",{"data-svelte-h":!0}),c(Mt)!=="svelte-1hr2ekz"&&(Mt.textContent=Za),cn.forEach(t),Yo=i(e),C=a(e,"DIV",{class:!0});var j=h(C);f(Oe.$$.fragment,j),zn=i(j),xt=a(j,"P",{"data-svelte-h":!0}),c(xt)!=="svelte-qfiu5a"&&(xt.textContent=Oa),Fn=i(j),Ct=a(j,"DIV",{class:!0});var zs=h(Ct);f(Xe.$$.fragment,zs),zs.forEach(t),An=i(j),oe=a(j,"DIV",{class:!0});var mn=h(oe);f(Ye.$$.fragment,mn),Pn=i(mn),zt=a(mn,"P",{"data-svelte-h":!0}),c(zt)!=="svelte-1f4f5kp"&&(zt.innerHTML=Xa),mn.forEach(t),qn=i(j),I=a(j,"DIV",{class:!0});var _e=h(I);f(Qe.$$.fragment,_e),In=i(_e),Ft=a(_e,"P",{"data-svelte-h":!0}),c(Ft)!=="svelte-13bfd60"&&(Ft.textContent=Ya),En=i(_e),f(ne.$$.fragment,_e),jn=i(_e),At=a(_e,"P",{"data-svelte-h":!0}),c(At)!=="svelte-wtrslu"&&(At.textContent=Qa),_e.forEach(t),Hn=i(j),ae=a(j,"DIV",{class:!0});var pn=h(ae);f(Ke.$$.fragment,pn),Un=i(pn),Pt=a(pn,"P",{"data-svelte-h":!0}),c(Pt)!=="svelte-1slb66l"&&(Pt.textContent=Ka),pn.forEach(t),j.forEach(t),Qo=i(e),B=a(e,"H2",{class:!0});var hn=h(B);se=a(hn,"A",{id:!0,class:!0,href:!0});var Fs=h(se);ho=a(Fs,"SPAN",{});var As=h(ho);f(et.$$.fragment,As),As.forEach(t),Fs.forEach(t),Sn=i(hn),qt=a(hn,"SPAN",{"data-svelte-h":!0}),c(qt)!=="svelte-r8mzo5"&&(qt.textContent=es),hn.forEach(t),Ko=i(e),T=a(e,"DIV",{class:!0});var w=h(T);f(tt.$$.fragment,w),Nn=i(w),It=a(w,"P",{"data-svelte-h":!0}),c(It)!=="svelte-15tdcz8"&&(It.textContent=ts),Wn=i(w),Et=a(w,"P",{"data-svelte-h":!0}),c(Et)!=="svelte-llhmpa"&&(Et.textContent=os),Jn=i(w),f(re.$$.fragment,w),Dn=i(w),jt=a(w,"P",{"data-svelte-h":!0}),c(jt)!=="svelte-cnb6q1"&&(jt.innerHTML=ns),Vn=i(w),Ht=a(w,"P",{"data-svelte-h":!0}),c(Ht)!=="svelte-ttxvs6"&&(Ht.innerHTML=as),Bn=i(w),Ut=a(w,"DIV",{class:!0});var Ps=h(Ut);f(ot.$$.fragment,Ps),Ps.forEach(t),Rn=i(w),ie=a(w,"DIV",{class:!0});var un=h(ie);f(nt.$$.fragment,un),Gn=i(un),St=a(un,"P",{"data-svelte-h":!0}),c(St)!=="svelte-1wmjg8a"&&(St.innerHTML=ss),un.forEach(t),Zn=i(w),H=a(w,"DIV",{class:!0});var ao=h(H);f(at.$$.fragment,ao),On=i(ao),Nt=a(ao,"P",{"data-svelte-h":!0}),c(Nt)!=="svelte-zj1vf1"&&(Nt.innerHTML=rs),Xn=i(ao),Wt=a(ao,"P",{"data-svelte-h":!0}),c(Wt)!=="svelte-9vptpw"&&(Wt.textContent=is),ao.forEach(t),Yn=i(w),le=a(w,"DIV",{class:!0});var fn=h(le);f(st.$$.fragment,fn),Qn=i(fn),Jt=a(fn,"P",{"data-svelte-h":!0}),c(Jt)!=="svelte-nfci2w"&&(Jt.innerHTML=ls),fn.forEach(t),Kn=i(w),Dt=a(w,"DIV",{class:!0});var qs=h(Dt);f(rt.$$.fragment,qs),qs.forEach(t),w.forEach(t),en=i(e),R=a(e,"H2",{class:!0});var gn=h(R);de=a(gn,"A",{id:!0,class:!0,href:!0});var Is=h(de);uo=a(Is,"SPAN",{});var Es=h(uo);f(it.$$.fragment,Es),Es.forEach(t),Is.forEach(t),ea=i(gn),Vt=a(gn,"SPAN",{"data-svelte-h":!0}),c(Vt)!=="svelte-1txfp0z"&&(Vt.textContent=ds),gn.forEach(t),tn=i(e),F=a(e,"DIV",{class:!0});var N=h(F);f(lt.$$.fragment,N),ta=i(N),Bt=a(N,"P",{"data-svelte-h":!0}),c(Bt)!=="svelte-vmn8lj"&&(Bt.innerHTML=cs),oa=i(N),Rt=a(N,"P",{"data-svelte-h":!0}),c(Rt)!=="svelte-hswkmf"&&(Rt.innerHTML=ms),na=i(N),Gt=a(N,"P",{"data-svelte-h":!0}),c(Gt)!=="svelte-eom0yk"&&(Gt.innerHTML=ps),aa=i(N),U=a(N,"DIV",{class:!0});var so=h(U);f(dt.$$.fragment,so),sa=i(so),Zt=a(so,"P",{"data-svelte-h":!0}),c(Zt)!=="svelte-rfhgb8"&&(Zt.innerHTML=hs),ra=i(so),f(ce.$$.fragment,so),so.forEach(t),N.forEach(t),on=i(e),G=a(e,"H2",{class:!0});var _n=h(G);me=a(_n,"A",{id:!0,class:!0,href:!0});var js=h(me);fo=a(js,"SPAN",{});var Hs=h(fo);f(ct.$$.fragment,Hs),Hs.forEach(t),js.forEach(t),ia=i(_n),Ot=a(_n,"SPAN",{"data-svelte-h":!0}),c(Ot)!=="svelte-nvcter"&&(Ot.textContent=us),_n.forEach(t),nn=i(e),Z=a(e,"DIV",{class:!0});var vn=h(Z);f(mt.$$.fragment,vn),la=i(vn),E=a(vn,"DIV",{class:!0});var ve=h(E);f(pt.$$.fragment,ve),da=i(ve),Xt=a(ve,"P",{"data-svelte-h":!0}),c(Xt)!=="svelte-1l0p81g"&&(Xt.innerHTML=fs),ca=i(ve),f(pe.$$.fragment,ve),ma=i(ve),f(he.$$.fragment,ve),ve.forEach(t),vn.forEach(t),an=i(e),O=a(e,"H2",{class:!0});var bn=h(O);ue=a(bn,"A",{id:!0,class:!0,href:!0});var Us=h(ue);go=a(Us,"SPAN",{});var Ss=h(go);f(ht.$$.fragment,Ss),Ss.forEach(t),Us.forEach(t),pa=i(bn),Yt=a(bn,"SPAN",{"data-svelte-h":!0}),c(Yt)!=="svelte-ftlzum"&&(Yt.textContent=gs),bn.forEach(t),sn=i(e),M=a(e,"DIV",{class:!0});var A=h(M);f(ut.$$.fragment,A),ha=i(A),Qt=a(A,"P",{"data-svelte-h":!0}),c(Qt)!=="svelte-62must"&&(Qt.textContent=_s),ua=i(A),Kt=a(A,"P",{"data-svelte-h":!0}),c(Kt)!=="svelte-1uf9ne7"&&(Kt.innerHTML=vs),fa=i(A),eo=a(A,"P",{"data-svelte-h":!0}),c(eo)!=="svelte-10ugs3m"&&(eo.innerHTML=bs),ga=i(A),to=a(A,"P",{"data-svelte-h":!0}),c(to)!=="svelte-hmtw9k"&&(to.innerHTML=ks),_a=i(A),oo=a(A,"P",{"data-svelte-h":!0}),c(oo)!=="svelte-hswkmf"&&(oo.innerHTML=ys),va=i(A),S=a(A,"DIV",{class:!0});var ro=h(S);f(ft.$$.fragment,ro),ba=i(ro),no=a(ro,"P",{"data-svelte-h":!0}),c(no)!=="svelte-967wb6"&&(no.innerHTML=Ls),ka=i(ro),f(fe.$$.fragment,ro),ro.forEach(t),A.forEach(t),rn=i(e),_o=a(e,"P",{}),h(_o).forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(er)),m(k,"id","llama"),m(k,"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(k,"href","#llama"),m($,"class","relative group"),m(Y,"id","overview"),m(Y,"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(Y,"href","#overview"),m(W,"class","relative group"),m(Q,"id","resources"),m(Q,"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(Q,"href","#resources"),m(J,"class","relative group"),m(K,"id","transformers.LlamaConfig"),m(K,"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(K,"href","#transformers.LlamaConfig"),m(D,"class","relative group"),m(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(te,"id","transformers.LlamaTokenizer"),m(te,"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(te,"href","#transformers.LlamaTokenizer"),m(V,"class","relative group"),m(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(se,"id","transformers.LlamaTokenizerFast"),m(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"),m(se,"href","#transformers.LlamaTokenizerFast"),m(B,"class","relative group"),m(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(de,"id","transformers.LlamaModel"),m(de,"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(de,"href","#transformers.LlamaModel"),m(R,"class","relative group"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(me,"id","transformers.LlamaForCausalLM"),m(me,"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(me,"href","#transformers.LlamaForCausalLM"),m(G,"class","relative group"),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(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(ue,"id","transformers.LlamaForSequenceClassification"),m(ue,"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(ue,"href","#transformers.LlamaForSequenceClassification"),m(O,"class","relative group"),m(S,"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(e,s){o(document.head,d),l(e,L,s),l(e,p,s),l(e,y,s),l(e,$,s),o($,k),o(k,P),g(be,P,null),o($,yn),o($,kt),l(e,Lo,s),l(e,W,s),o(W,Y),o(Y,lo),g(ke,lo,null),o(W,Ln),o(W,yt),l(e,To,s),l(e,ye,s),l(e,wo,s),l(e,Le,s),l(e,$o,s),l(e,Te,s),l(e,Mo,s),l(e,we,s),l(e,xo,s),l(e,$e,s),l(e,Co,s),g(Me,e,s),l(e,zo,s),l(e,xe,s),l(e,Fo,s),g(Ce,e,s),l(e,Ao,s),l(e,ze,s),l(e,Po,s),l(e,Fe,s),l(e,qo,s),l(e,Ae,s),l(e,Io,s),l(e,Pe,s),l(e,Eo,s),l(e,qe,s),l(e,jo,s),l(e,J,s),o(J,Q),o(Q,co),g(Ie,co,null),o(J,Tn),o(J,Lt),l(e,Ho,s),l(e,Ee,s),l(e,Uo,s),g(je,e,s),l(e,So,s),l(e,He,s),l(e,No,s),g(Ue,e,s),l(e,Wo,s),l(e,Se,s),l(e,Jo,s),l(e,Ne,s),l(e,Do,s),l(e,We,s),l(e,Vo,s),l(e,Je,s),l(e,Bo,s),l(e,De,s),l(e,Ro,s),l(e,Ve,s),l(e,Go,s),l(e,Be,s),l(e,Zo,s),l(e,D,s),o(D,K),o(K,mo),g(Re,mo,null),o(D,wn),o(D,Tt),l(e,Oo,s),l(e,q,s),g(Ge,q,null),o(q,$n),o(q,wt),o(q,Mn),o(q,$t),o(q,xn),g(ee,q,null),l(e,Xo,s),l(e,V,s),o(V,te),o(te,po),g(Ze,po,null),o(V,Cn),o(V,Mt),l(e,Yo,s),l(e,C,s),g(Oe,C,null),o(C,zn),o(C,xt),o(C,Fn),o(C,Ct),g(Xe,Ct,null),o(C,An),o(C,oe),g(Ye,oe,null),o(oe,Pn),o(oe,zt),o(C,qn),o(C,I),g(Qe,I,null),o(I,In),o(I,Ft),o(I,En),g(ne,I,null),o(I,jn),o(I,At),o(C,Hn),o(C,ae),g(Ke,ae,null),o(ae,Un),o(ae,Pt),l(e,Qo,s),l(e,B,s),o(B,se),o(se,ho),g(et,ho,null),o(B,Sn),o(B,qt),l(e,Ko,s),l(e,T,s),g(tt,T,null),o(T,Nn),o(T,It),o(T,Wn),o(T,Et),o(T,Jn),g(re,T,null),o(T,Dn),o(T,jt),o(T,Vn),o(T,Ht),o(T,Bn),o(T,Ut),g(ot,Ut,null),o(T,Rn),o(T,ie),g(nt,ie,null),o(ie,Gn),o(ie,St),o(T,Zn),o(T,H),g(at,H,null),o(H,On),o(H,Nt),o(H,Xn),o(H,Wt),o(T,Yn),o(T,le),g(st,le,null),o(le,Qn),o(le,Jt),o(T,Kn),o(T,Dt),g(rt,Dt,null),l(e,en,s),l(e,R,s),o(R,de),o(de,uo),g(it,uo,null),o(R,ea),o(R,Vt),l(e,tn,s),l(e,F,s),g(lt,F,null),o(F,ta),o(F,Bt),o(F,oa),o(F,Rt),o(F,na),o(F,Gt),o(F,aa),o(F,U),g(dt,U,null),o(U,sa),o(U,Zt),o(U,ra),g(ce,U,null),l(e,on,s),l(e,G,s),o(G,me),o(me,fo),g(ct,fo,null),o(G,ia),o(G,Ot),l(e,nn,s),l(e,Z,s),g(mt,Z,null),o(Z,la),o(Z,E),g(pt,E,null),o(E,da),o(E,Xt),o(E,ca),g(pe,E,null),o(E,ma),g(he,E,null),l(e,an,s),l(e,O,s),o(O,ue),o(ue,go),g(ht,go,null),o(O,pa),o(O,Yt),l(e,sn,s),l(e,M,s),g(ut,M,null),o(M,ha),o(M,Qt),o(M,ua),o(M,Kt),o(M,fa),o(M,eo),o(M,ga),o(M,to),o(M,_a),o(M,oo),o(M,va),o(M,S),g(ft,S,null),o(S,ba),o(S,no),o(S,ka),g(fe,S,null),l(e,rn,s),l(e,_o,s),ln=!0},p(e,[s]){const gt={};s&2&&(gt.$$scope={dirty:s,ctx:e}),ee.$set(gt);const vo={};s&2&&(vo.$$scope={dirty:s,ctx:e}),ne.$set(vo);const bo={};s&2&&(bo.$$scope={dirty:s,ctx:e}),re.$set(bo);const _t={};s&2&&(_t.$$scope={dirty:s,ctx:e}),ce.$set(_t);const ko={};s&2&&(ko.$$scope={dirty:s,ctx:e}),pe.$set(ko);const yo={};s&2&&(yo.$$scope={dirty:s,ctx:e}),he.$set(yo);const vt={};s&2&&(vt.$$scope={dirty:s,ctx:e}),fe.$set(vt)},i(e){ln||(_(be.$$.fragment,e),_(ke.$$.fragment,e),_(Me.$$.fragment,e),_(Ce.$$.fragment,e),_(Ie.$$.fragment,e),_(je.$$.fragment,e),_(Ue.$$.fragment,e),_(Re.$$.fragment,e),_(Ge.$$.fragment,e),_(ee.$$.fragment,e),_(Ze.$$.fragment,e),_(Oe.$$.fragment,e),_(Xe.$$.fragment,e),_(Ye.$$.fragment,e),_(Qe.$$.fragment,e),_(ne.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(re.$$.fragment,e),_(ot.$$.fragment,e),_(nt.$$.fragment,e),_(at.$$.fragment,e),_(st.$$.fragment,e),_(rt.$$.fragment,e),_(it.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),_(ce.$$.fragment,e),_(ct.$$.fragment,e),_(mt.$$.fragment,e),_(pt.$$.fragment,e),_(pe.$$.fragment,e),_(he.$$.fragment,e),_(ht.$$.fragment,e),_(ut.$$.fragment,e),_(ft.$$.fragment,e),_(fe.$$.fragment,e),ln=!0)},o(e){v(be.$$.fragment,e),v(ke.$$.fragment,e),v(Me.$$.fragment,e),v(Ce.$$.fragment,e),v(Ie.$$.fragment,e),v(je.$$.fragment,e),v(Ue.$$.fragment,e),v(Re.$$.fragment,e),v(Ge.$$.fragment,e),v(ee.$$.fragment,e),v(Ze.$$.fragment,e),v(Oe.$$.fragment,e),v(Xe.$$.fragment,e),v(Ye.$$.fragment,e),v(Qe.$$.fragment,e),v(ne.$$.fragment,e),v(Ke.$$.fragment,e),v(et.$$.fragment,e),v(tt.$$.fragment,e),v(re.$$.fragment,e),v(ot.$$.fragment,e),v(nt.$$.fragment,e),v(at.$$.fragment,e),v(st.$$.fragment,e),v(rt.$$.fragment,e),v(it.$$.fragment,e),v(lt.$$.fragment,e),v(dt.$$.fragment,e),v(ce.$$.fragment,e),v(ct.$$.fragment,e),v(mt.$$.fragment,e),v(pt.$$.fragment,e),v(pe.$$.fragment,e),v(he.$$.fragment,e),v(ht.$$.fragment,e),v(ut.$$.fragment,e),v(ft.$$.fragment,e),v(fe.$$.fragment,e),ln=!1},d(e){e&&(t(L),t(p),t(y),t($),t(Lo),t(W),t(To),t(ye),t(wo),t(Le),t($o),t(Te),t(Mo),t(we),t(xo),t($e),t(Co),t(zo),t(xe),t(Fo),t(Ao),t(ze),t(Po),t(Fe),t(qo),t(Ae),t(Io),t(Pe),t(Eo),t(qe),t(jo),t(J),t(Ho),t(Ee),t(Uo),t(So),t(He),t(No),t(Wo),t(Se),t(Jo),t(Ne),t(Do),t(We),t(Vo),t(Je),t(Bo),t(De),t(Ro),t(Ve),t(Go),t(Be),t(Zo),t(D),t(Oo),t(q),t(Xo),t(V),t(Yo),t(C),t(Qo),t(B),t(Ko),t(T),t(en),t(R),t(tn),t(F),t(on),t(G),t(nn),t(Z),t(an),t(O),t(sn),t(M),t(rn),t(_o)),t(d),b(be),b(ke),b(Me,e),b(Ce,e),b(Ie),b(je,e),b(Ue,e),b(Re),b(Ge),b(ee),b(Ze),b(Oe),b(Xe),b(Ye),b(Qe),b(ne),b(Ke),b(et),b(tt),b(re),b(ot),b(nt),b(at),b(st),b(rt),b(it),b(lt),b(dt),b(ce),b(ct),b(mt),b(pt),b(pe),b(he),b(ht),b(ut),b(ft),b(fe)}}}const er={local:"llama",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.LlamaConfig",title:"LlamaConfig"},{local:"transformers.LlamaTokenizer",title:"LlamaTokenizer"},{local:"transformers.LlamaTokenizerFast",title:"LlamaTokenizerFast"},{local:"transformers.LlamaModel",title:"LlamaModel"},{local:"transformers.LlamaForCausalLM",title:"LlamaForCausalLM"},{local:"transformers.LlamaForSequenceClassification",title:"LlamaForSequenceClassification"}],title:"LLaMA"};function tr(z){return Js(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cr extends Ds{constructor(d){super(),Vs(this,d,tr,Ks,Ws,{})}}export{cr as component};
