import{s as eo,o as to,n as B}from"../chunks/scheduler.bdbef820.js";import{S as no,i as oo,g as p,s,r as f,A as so,h as m,f as r,c as a,j as F,u,x as h,k as j,y as i,a as c,v as g,d as _,t as b,w as k}from"../chunks/index.33f81d56.js";import{T as It}from"../chunks/Tip.34194030.js";import{D as E}from"../chunks/Docstring.b9574034.js";import{C as Ie}from"../chunks/CodeBlock.3bad7fc9.js";import{E as rt}from"../chunks/ExampleCodeBlock.633185da.js";import{H as V,E as ao}from"../chunks/index.9edc4842.js";function ro(w){let n,v="Example:",l,d,y;return d=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvZGVHZW5Db25maWclMkMlMjBDb2RlR2VuTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ29kZUdlbiUyMDZCJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBDb2RlR2VuQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMENvZGVHZW5Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CodeGenConfig, CodeGenModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CodeGen 6B configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CodeGenConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CodeGenModel(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(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function io(w){let n,v="be encoded differently whether it is at the beginning of the sentence (without space) or not:",l,d,y;return d=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvZGVHZW5Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBDb2RlR2VuVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGY29kZWdlbi0zNTBNLW1vbm8lMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CodeGenTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CodeGenTokenizer.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-350M-mono&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">15496</span>, <span class="hljs-number">995</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">18435</span>, <span class="hljs-number">995</span>]`,wrap:!1}}),{c(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-12atnao"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function lo(w){let n,v="When used with <code>is_split_into_words=True</code>, this tokenizer will add a space before each word (even the first one).";return{c(){n=p("p"),n.innerHTML=v},l(l){n=m(l,"P",{"data-svelte-h":!0}),h(n)!=="svelte-jhmxzm"&&(n.innerHTML=v)},m(l,d){c(l,n,d)},p:B,d(l){l&&r(n)}}}function co(w){let n,v="pair mask has the following format:",l,d,y;return d=new Ie({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(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-qjgeij"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function po(w){let n,v="be encoded differently whether it is at the beginning of the sentence (without space) or not:",l,d,y;return d=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvZGVHZW5Ub2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQ29kZUdlblRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZjb2RlZ2VuLTM1ME0tbW9ubyUyMiklMEF0b2tlbml6ZXIoJTIySGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMEF0b2tlbml6ZXIoJTIyJTIwSGVsbG8lMjB3b3JsZCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CodeGenTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = CodeGenTokenizerFast.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-350M-mono&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">15496</span>, <span class="hljs-number">995</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">18435</span>, <span class="hljs-number">995</span>]`,wrap:!1}}),{c(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-12atnao"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function mo(w){let n,v="When used with <code>is_split_into_words=True</code>, this tokenizer needs to be instantiated with <code>add_prefix_space=True</code>.";return{c(){n=p("p"),n.innerHTML=v},l(l){n=m(l,"P",{"data-svelte-h":!0}),h(n)!=="svelte-9gg91e"&&(n.innerHTML=v)},m(l,d){c(l,n,d)},p:B,d(l){l&&r(n)}}}function ho(w){let n,v="pair mask has the following format:",l,d,y;return d=new Ie({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(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-qjgeij"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function fo(w){let n,v=`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=p("p"),n.innerHTML=v},l(l){n=m(l,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=v)},m(l,d){c(l,n,d)},p:B,d(l){l&&r(n)}}}function uo(w){let n,v=`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=p("p"),n.innerHTML=v},l(l){n=m(l,"P",{"data-svelte-h":!0}),h(n)!=="svelte-fincs2"&&(n.innerHTML=v)},m(l,d){c(l,n,d)},p:B,d(l){l&&r(n)}}}function go(w){let n,v="Example:",l,d,y;return d=new Ie({props:{code:"",highlighted:"",wrap:!1}}),{c(){n=p("p"),n.textContent=v,l=s(),f(d.$$.fragment)},l(t){n=m(t,"P",{"data-svelte-h":!0}),h(n)!=="svelte-11lpom8"&&(n.textContent=v),l=a(t),u(d.$$.fragment,t)},m(t,$){c(t,n,$),c(t,l,$),g(d,t,$),y=!0},p:B,i(t){y||(_(d.$$.fragment,t),y=!0)},o(t){b(d.$$.fragment,t),y=!1},d(t){t&&(r(n),r(l)),k(d,t)}}}function _o(w){let n,v,l,d,y,t,$,$n='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',lt,ae,ct,re,Tn='CodeGen 모델은 Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong이 작성한 논문  <a href="https://arxiv.org/abs/2203.13474" rel="nofollow">A Conversational Paradigm for Program Synthesis</a>에서 제안되었습니다.',pt,ie,Cn='CodeGen 모델은 프로그램 합성(program synthesis)을 위한 자기회귀(autoregressive) 언어 모델로, <a href="https://pile.eleuther.ai/" rel="nofollow">The Pile</a>, BigQuery, BigPython 데이터로 순차적으로 학습되었습니다.',mt,de,wn="논문의 초록은 다음과 같습니다:",ht,le,Mn='<em>프로그램 합성(program synthesis)은 주어진 문제 명세에 대한 해답으로 프로그램을 생성하는 것을 목표로 합니다. 이 논문에서는 대규모 언어 모델(LLM)을 활용한 대화형 프로그램 합성(conversational program synthesis) 접근법을 제안하여, 기존 접근법에서의 방대한 프로그램 탐색 공간과 사용자의 의도를 명세화하는 과정에서의 어려움을 해결합니다. 제안된 방식에서는 프로그램 명세 작성과 실제 프로그램 작성을 사용자와 시스템 간 다회 대화(multi-turn conversation)로 바라봅니다. 즉, 프로그램 합성 과정 명세를 자연어로 표현하고, 기대하는 프로그램 합성을 조건부로 예측하여 생성하는 일종의 순차적 예측 문제(sequence prediction problem)로 접근했습니다. 이를 위해 자연어와 프로그래밍 언어 데이터를 기반으로 CodeGen이라는 대규모 언어 모델 그룹을 학습시켰으며, 데이터로부터 약한 지도(weak supervision)와 데이터 및 모델 규모의 확장만으로도 모델이 자연스럽게 대화 능력을 갖추게 된다는 점을 확인하였습니다. 더해서 모델의 대화형 프로그램 합성 능력을 평가하기 위해 다회 대화 기반 프로그래밍 벤치마크(MTPB)를 개발했습니다. 이 벤치마크는 각 문제를 해결하기 위해 사용자와 모델 간 여러 단계의 대화를 거쳐 프로그램이 점진적으로 합성되는 과정을 요구합니다. 연구 결과, CodeGen 모델은 대화형 능력을 성공적으로 발휘했으며 본 논문에서 제안한 대화형 합성 패러다임의 우수성과 효율성을 입증했습니다. 특히 16B 파라미터 규모로 TPU-v4에서 학습된 CodeGen 모델은 HumanEval 벤치마크에서 OpenAI의 Codex를 뛰어넘는 성능을 기록했습니다. 학습된 사용된 라이브러리인 JaxFormer와 모델 체크포인트는 오픈소스로 공개되었습니다: <a href="https://github.com/salesforce/codegen" rel="nofollow">이 https URL에서 확인하세요</a>.</em>',ft,ce,xn=`이 모델은<a href="https://huggingface.co/rooa" rel="nofollow">Hiroaki Hayashi</a>가 기여했습니다.
모델의 원본 코드는 <a href="https://github.com/salesforce/codegen" rel="nofollow">여기</a>에 있습니다.`,ut,pe,gt,me,Gn='<li>CodeGen 모델의 <a href="https://huggingface.co/models?other=codegen" rel="nofollow">체크포인트</a>는 서로 다른 사전 학습 데이터와 다양한 크기로 제공됩니다.</li> <li>체크포인트의 형식은 다음과 같습니다: <code>Salesforce/codegen-{size}-{data}</code><ul><li><code>size</code>: <code>350M</code>, <code>2B</code>, <code>6B</code>, <code>16B</code></li> <li><code>data</code>: <ul><li><code>nl</code>: The Pile 데이터로 사전학습된 모델</li> <li><code>multi</code>: <code>nl</code> 모델에서 시작하여 다양한 프로그래밍 언어를 추가적으로 학습한 모델</li> <li><code>mono</code>: <code>multi</code> 모델에서 시작하여 추가로 Python 데이터에 대해 학습된 모델</li></ul></li></ul></li> <li>예를 들어, <code>Salesforce/codegen-350M-mono</code>는 3억 5천만(350M) 개의 파라미터를 모델로, The Pile, 다양한 프로그래밍 언어, Python 데이터의 순서로 단계적으로 학습한 체크포인트를 의미합니다.</li>',_t,he,bt,fe,kt,ue,yt,ge,zn='<li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',vt,_e,$t,H,be,Pt,Pe,jn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenModel">CodeGenModel</a>. It is used to instantiate a
CodeGen 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 CodeGen
<a href="https://huggingface.co/Salesforce/codegen-2B-mono" rel="nofollow">Salesforce/codegen-2B-mono</a> architecture. Configuration objects
inherit from <a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the documentation from
<a href="/docs/transformers/main/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ut,O,Tt,ke,Ct,T,ye,Nt,Ue,Ln="Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding.",Ht,Ne,qn="This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will",Jt,R,Wt,He,Fn=`You can get around that behavior by passing <code>add_prefix_space=True</code> when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`,Dt,X,Et,Je,In=`This tokenizer inherits from <code>PreTrainedTokenizer</code> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,Zt,I,ve,Vt,We,Pn="Create a mask from the two sequences passed to be used in a sequence-pair classification task. A sequence",Bt,Q,At,De,Un="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",St,Ee,$e,wt,Te,Mt,C,Ce,Ot,Ze,Nn=`Construct a “fast” CodeGen tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on byte-level
Byte-Pair-Encoding.`,Rt,Ve,Hn="This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will",Xt,Y,Qt,Be,Jn=`You can get around that behavior by passing <code>add_prefix_space=True</code> when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`,Yt,K,Kt,Ae,Wn=`This tokenizer inherits from <code>PreTrainedTokenizerFast</code> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,en,P,we,tn,Se,Dn="Create a mask from the two sequences passed to be used in a sequence-pair classification task. A sequence",nn,ee,on,Oe,En="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",sn,U,Me,an,Re,Zn=`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`,rn,Xe,Vn="Similar to doing <code>self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))</code>.",dn,Qe,Bn=`”]\`.
kwargs (additional keyword arguments, <em>optional</em>):
Will be passed to the underlying model specific decode method.`,xt,xe,Gt,G,Ge,ln,Ye,An="The bare Codegen Model outputting raw hidden-states without any specific head on top.",cn,Ke,Sn=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,pn,et,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.`,mn,Z,ze,hn,tt,Rn='The <a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenModel">CodeGenModel</a> forward method, overrides the <code>__call__</code> special method.',fn,te,zt,je,jt,z,Le,un,nt,Xn="The CodeGen Model transformer with a language modeling head on top.",gn,ot,Qn=`This model inherits from <a href="/docs/transformers/main/ko/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.)`,_n,st,Yn=`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.`,bn,N,qe,kn,at,Kn='The <a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenForCausalLM">CodeGenForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',yn,ne,vn,oe,Lt,Fe,qt,it,Ft;return y=new V({props:{title:"CodeGen",local:"Codegen",headingTag:"h1"}}),ae=new V({props:{title:"개요",local:"Overview",headingTag:"h2"}}),pe=new V({props:{title:"체크포인트 명명 규칙",local:"Checkpoint Naming",headingTag:"h2"}}),he=new V({props:{title:"사용 예시",local:"Usage example",headingTag:"h2"}}),fe=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJTYWxlc2ZvcmNlJTJGY29kZWdlbi0zNTBNLW1vbm8lMjIlMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBJTBBdGV4dCUyMCUzRCUyMCUyMmRlZiUyMGhlbGxvX3dvcmxkKCklM0ElMjIlMEElMEFjb21wbGV0aW9uJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKip0b2tlbml6ZXIodGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpKSUwQSUwQXByaW50KHRva2VuaXplci5kZWNvZGUoY29tcGxldGlvbiU1QjAlNUQpKSUwQQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;Salesforce/codegen-350M-mono&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;def hello_world():&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>completion = model.generate(**tokenizer(text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.decode(completion[<span class="hljs-number">0</span>]))
<span class="hljs-keyword">def</span> <span class="hljs-title function_">hello_world</span>():
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Hello World&quot;</span>)

hello_world()`,wrap:!1}}),ue=new V({props:{title:"자료",local:"Resources",headingTag:"h2"}}),_e=new V({props:{title:"CodeGenConfig",local:"transformers.CodeGenConfig",headingTag:"h2"}}),be=new E({props:{name:"class transformers.CodeGenConfig",anchor:"transformers.CodeGenConfig",parameters:[{name:"vocab_size",val:" = 50400"},{name:"n_positions",val:" = 2048"},{name:"n_ctx",val:" = 2048"},{name:"n_embd",val:" = 4096"},{name:"n_layer",val:" = 28"},{name:"n_head",val:" = 16"},{name:"rotary_dim",val:" = 64"},{name:"n_inner",val:" = None"},{name:"activation_function",val:" = 'gelu_new'"},{name:"resid_pdrop",val:" = 0.0"},{name:"embd_pdrop",val:" = 0.0"},{name:"attn_pdrop",val:" = 0.0"},{name:"layer_norm_epsilon",val:" = 1e-05"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"bos_token_id",val:" = 50256"},{name:"eos_token_id",val:" = 50256"},{name:"tie_word_embeddings",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50400) &#x2014;
Vocabulary size of the CodeGen model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenModel">CodeGenModel</a>.`,name:"vocab_size"},{anchor:"transformers.CodeGenConfig.n_positions",description:`<strong>n_positions</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:"n_positions"},{anchor:"transformers.CodeGenConfig.n_ctx",description:`<strong>n_ctx</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
This attribute is used in <code>CodeGenModel.__init__</code> without any real effect.`,name:"n_ctx"},{anchor:"transformers.CodeGenConfig.n_embd",description:`<strong>n_embd</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the embeddings and hidden states.`,name:"n_embd"},{anchor:"transformers.CodeGenConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 28) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.CodeGenConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.CodeGenConfig.rotary_dim",description:`<strong>rotary_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of dimensions in the embedding that Rotary Position Embedding is applied to.`,name:"rotary_dim"},{anchor:"transformers.CodeGenConfig.n_inner",description:`<strong>n_inner</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the inner feed-forward layers. <code>None</code> will set it to 4 times n_embd`,name:"n_inner"},{anchor:"transformers.CodeGenConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu_new&quot;</code>) &#x2014;
Activation function, to be selected in the list <code>[&quot;relu&quot;, &quot;silu&quot;, &quot;gelu&quot;, &quot;tanh&quot;, &quot;gelu_new&quot;]</code>.`,name:"activation_function"},{anchor:"transformers.CodeGenConfig.resid_pdrop",description:`<strong>resid_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"resid_pdrop"},{anchor:"transformers.CodeGenConfig.embd_pdrop",description:`<strong>embd_pdrop</strong> (<code>int</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the embeddings.`,name:"embd_pdrop"},{anchor:"transformers.CodeGenConfig.attn_pdrop",description:`<strong>attn_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention.`,name:"attn_pdrop"},{anchor:"transformers.CodeGenConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon to use in the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.CodeGenConfig.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.CodeGenConfig.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).`,name:"use_cache"},{anchor:"transformers.CodeGenConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.CodeGenConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.CodeGenConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model&#x2019;s input and output word embeddings should be tied. Note that this is only relevant if the
model has a output word embedding layer.`,name:"tie_word_embeddings"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/configuration_codegen.py#L29"}}),O=new rt({props:{anchor:"transformers.CodeGenConfig.example",$$slots:{default:[ro]},$$scope:{ctx:w}}}),ke=new V({props:{title:"CodeGenTokenizer",local:"transformers.CodeGenTokenizer",headingTag:"h2"}}),ye=new E({props:{name:"class transformers.CodeGenTokenizer",anchor:"transformers.CodeGenTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = None"},{name:"add_prefix_space",val:" = False"},{name:"add_bos_token",val:" = False"},{name:"return_token_type_ids",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CodeGenTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CodeGenTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.CodeGenTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&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"},{anchor:"transformers.CodeGenTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CodeGenTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.CodeGenTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.CodeGenTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (CodeGen tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.CodeGenTokenizer.add_bos_token",description:`<strong>add_bos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to add a beginning of sequence token at the start of sequences.`,name:"add_bos_token"},{anchor:"transformers.CodeGenTokenizer.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return token type IDs.`,name:"return_token_type_ids"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/tokenization_codegen.py#L84"}}),R=new rt({props:{anchor:"transformers.CodeGenTokenizer.example",$$slots:{default:[io]},$$scope:{ctx:w}}}),X=new It({props:{$$slots:{default:[lo]},$$scope:{ctx:w}}}),ve=new E({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CodeGenTokenizer.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.CodeGenTokenizer.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.CodeGenTokenizer.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/main/src/transformers/models/codegen/tokenization_codegen.py#L279",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Q=new rt({props:{anchor:"transformers.CodeGenTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[co]},$$scope:{ctx:w}}}),$e=new E({props:{name:"save_vocabulary",anchor:"transformers.CodeGenTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/tokenization_codegen.py#L308"}}),Te=new V({props:{title:"CodeGenTokenizerFast",local:"transformers.CodeGenTokenizerFast",headingTag:"h2"}}),Ce=new E({props:{name:"class transformers.CodeGenTokenizerFast",anchor:"transformers.CodeGenTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"add_prefix_space",val:" = False"},{name:"return_token_type_ids",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CodeGenTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CodeGenTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to <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.CodeGenTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&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"},{anchor:"transformers.CodeGenTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.CodeGenTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.CodeGenTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (CodeGen tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.CodeGenTokenizerFast.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return token type IDs.`,name:"return_token_type_ids"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/tokenization_codegen_fast.py#L42"}}),Y=new rt({props:{anchor:"transformers.CodeGenTokenizerFast.example",$$slots:{default:[po]},$$scope:{ctx:w}}}),K=new It({props:{$$slots:{default:[mo]},$$scope:{ctx:w}}}),we=new E({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CodeGenTokenizerFast.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.CodeGenTokenizerFast.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.CodeGenTokenizerFast.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/main/src/transformers/models/codegen/tokenization_codegen_fast.py#L158",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),ee=new rt({props:{anchor:"transformers.CodeGenTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[ho]},$$scope:{ctx:w}}}),Me=new E({props:{name:"decode",anchor:"transformers.CodeGenTokenizerFast.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": typing.Optional[bool] = None"},{name:"truncate_before_pattern",val:": typing.Optional[typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenTokenizerFast.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.CodeGenTokenizerFast.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.CodeGenTokenizerFast.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code> (available in the <code>tokenizer_config</code>).`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.CodeGenTokenizerFast.decode.truncate_before_pattern",description:`<strong>truncate_before_pattern</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
A list of regular expression strings that will be used to truncate the returned string. This can be
used to remove extra pieces of code (e.g. truncate if observing a comment symbol &#x201D;#&#x201D; at the beginning
of a new line). An example pattern could be \`[&#x201D;^#&#x201D;, re.escape(&#x201D;&lt;|endoftext|&gt;&#x201D;), &#x201D;^&apos;&apos;&apos;&#x201D;, &#x201D;`,name:"truncate_before_pattern"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/tokenization_codegen_fast.py#L191",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decoded sentence.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),xe=new V({props:{title:"CodeGenModel",local:"transformers.CodeGenModel",headingTag:"h2"}}),Ge=new E({props:{name:"class transformers.CodeGenModel",anchor:"transformers.CodeGenModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CodeGenModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenModel">CodeGenModel</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/modeling_codegen.py#L325"}}),ze=new E({props:{name:"forward",anchor:"transformers.CodeGenModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.Tuple[typing.Tuple[torch.Tensor]], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[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"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CodeGenModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Union[~cache_utils.Cache, Tuple[Tuple[torch.Tensor]], NoneType]</code>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/main/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</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.CodeGenModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.CodeGenModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CodeGenModel.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.CodeGenModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.CodeGenModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_dim)</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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CodeGenModel.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.CodeGenModel.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.CodeGenModel.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.CodeGenModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CodeGenModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/modeling_codegen.py#L349",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</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/main/ko/model_doc/codegen#transformers.CodeGenConfig"
>CodeGenConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>Cache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — It is a <a
  href="/docs/transformers/main/ko/internal/generation_utils#transformers.Cache"
>Cache</a> instance. For more details, see our <a
  href="https://huggingface.co/docs/transformers/en/kv_cache"
  rel="nofollow"
>kv cache guide</a>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new It({props:{$$slots:{default:[fo]},$$scope:{ctx:w}}}),je=new V({props:{title:"CodeGenForCausalLM",local:"transformers.CodeGenForCausalLM",headingTag:"h2"}}),Le=new E({props:{name:"class transformers.CodeGenForCausalLM",anchor:"transformers.CodeGenForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CodeGenForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ko/model_doc/codegen#transformers.CodeGenForCausalLM">CodeGenForCausalLM</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/modeling_codegen.py#L620"}}),qe=new E({props:{name:"forward",anchor:"transformers.CodeGenForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.Tuple[typing.Tuple[torch.Tensor]], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[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"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CodeGenForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Union[~cache_utils.Cache, Tuple[Tuple[torch.Tensor]], NoneType]</code>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/main/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</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.CodeGenForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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>`,name:"attention_mask"},{anchor:"transformers.CodeGenForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CodeGenForCausalLM.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.CodeGenForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</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:"head_mask"},{anchor:"transformers.CodeGenForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_dim)</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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CodeGenForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.CodeGenForCausalLM.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.CodeGenForCausalLM.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.CodeGenForCausalLM.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.CodeGenForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CodeGenForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/modeling_codegen.py#L642",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ko/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/main/ko/model_doc/codegen#transformers.CodeGenConfig"
>CodeGenConfig</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>Cache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — It is a <a
  href="/docs/transformers/main/ko/internal/generation_utils#transformers.Cache"
>Cache</a> instance. For more details, see our <a
  href="https://huggingface.co/docs/transformers/en/kv_cache"
  rel="nofollow"
>kv cache guide</a>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ko/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ne=new It({props:{$$slots:{default:[uo]},$$scope:{ctx:w}}}),oe=new rt({props:{anchor:"transformers.CodeGenForCausalLM.forward.example",$$slots:{default:[go]},$$scope:{ctx:w}}}),Fe=new ao({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/codegen.md"}}),{c(){n=p("meta"),v=s(),l=p("p"),d=s(),f(y.$$.fragment),t=s(),$=p("div"),$.innerHTML=$n,lt=s(),f(ae.$$.fragment),ct=s(),re=p("p"),re.innerHTML=Tn,pt=s(),ie=p("p"),ie.innerHTML=Cn,mt=s(),de=p("p"),de.textContent=wn,ht=s(),le=p("p"),le.innerHTML=Mn,ft=s(),ce=p("p"),ce.innerHTML=xn,ut=s(),f(pe.$$.fragment),gt=s(),me=p("ul"),me.innerHTML=Gn,_t=s(),f(he.$$.fragment),bt=s(),f(fe.$$.fragment),kt=s(),f(ue.$$.fragment),yt=s(),ge=p("ul"),ge.innerHTML=zn,vt=s(),f(_e.$$.fragment),$t=s(),H=p("div"),f(be.$$.fragment),Pt=s(),Pe=p("p"),Pe.innerHTML=jn,Ut=s(),f(O.$$.fragment),Tt=s(),f(ke.$$.fragment),Ct=s(),T=p("div"),f(ye.$$.fragment),Nt=s(),Ue=p("p"),Ue.textContent=Ln,Ht=s(),Ne=p("p"),Ne.textContent=qn,Jt=s(),f(R.$$.fragment),Wt=s(),He=p("p"),He.innerHTML=Fn,Dt=s(),f(X.$$.fragment),Et=s(),Je=p("p"),Je.innerHTML=In,Zt=s(),I=p("div"),f(ve.$$.fragment),Vt=s(),We=p("p"),We.textContent=Pn,Bt=s(),f(Q.$$.fragment),At=s(),De=p("p"),De.innerHTML=Un,St=s(),Ee=p("div"),f($e.$$.fragment),wt=s(),f(Te.$$.fragment),Mt=s(),C=p("div"),f(Ce.$$.fragment),Ot=s(),Ze=p("p"),Ze.innerHTML=Nn,Rt=s(),Ve=p("p"),Ve.textContent=Hn,Xt=s(),f(Y.$$.fragment),Qt=s(),Be=p("p"),Be.innerHTML=Jn,Yt=s(),f(K.$$.fragment),Kt=s(),Ae=p("p"),Ae.innerHTML=Wn,en=s(),P=p("div"),f(we.$$.fragment),tn=s(),Se=p("p"),Se.textContent=Dn,nn=s(),f(ee.$$.fragment),on=s(),Oe=p("p"),Oe.innerHTML=En,sn=s(),U=p("div"),f(Me.$$.fragment),an=s(),Re=p("p"),Re.textContent=Zn,rn=s(),Xe=p("p"),Xe.innerHTML=Vn,dn=s(),Qe=p("p"),Qe.innerHTML=Bn,xt=s(),f(xe.$$.fragment),Gt=s(),G=p("div"),f(Ge.$$.fragment),ln=s(),Ye=p("p"),Ye.textContent=An,cn=s(),Ke=p("p"),Ke.innerHTML=Sn,pn=s(),et=p("p"),et.innerHTML=On,mn=s(),Z=p("div"),f(ze.$$.fragment),hn=s(),tt=p("p"),tt.innerHTML=Rn,fn=s(),f(te.$$.fragment),zt=s(),f(je.$$.fragment),jt=s(),z=p("div"),f(Le.$$.fragment),un=s(),nt=p("p"),nt.textContent=Xn,gn=s(),ot=p("p"),ot.innerHTML=Qn,_n=s(),st=p("p"),st.innerHTML=Yn,bn=s(),N=p("div"),f(qe.$$.fragment),kn=s(),at=p("p"),at.innerHTML=Kn,yn=s(),f(ne.$$.fragment),vn=s(),f(oe.$$.fragment),Lt=s(),f(Fe.$$.fragment),qt=s(),it=p("p"),this.h()},l(e){const o=so("svelte-u9bgzb",document.head);n=m(o,"META",{name:!0,content:!0}),o.forEach(r),v=a(e),l=m(e,"P",{}),F(l).forEach(r),d=a(e),u(y.$$.fragment,e),t=a(e),$=m(e,"DIV",{class:!0,"data-svelte-h":!0}),h($)!=="svelte-13t8s2t"&&($.innerHTML=$n),lt=a(e),u(ae.$$.fragment,e),ct=a(e),re=m(e,"P",{"data-svelte-h":!0}),h(re)!=="svelte-1buq804"&&(re.innerHTML=Tn),pt=a(e),ie=m(e,"P",{"data-svelte-h":!0}),h(ie)!=="svelte-1ncyrhx"&&(ie.innerHTML=Cn),mt=a(e),de=m(e,"P",{"data-svelte-h":!0}),h(de)!=="svelte-e5r8wp"&&(de.textContent=wn),ht=a(e),le=m(e,"P",{"data-svelte-h":!0}),h(le)!=="svelte-syzbc9"&&(le.innerHTML=Mn),ft=a(e),ce=m(e,"P",{"data-svelte-h":!0}),h(ce)!=="svelte-umceq4"&&(ce.innerHTML=xn),ut=a(e),u(pe.$$.fragment,e),gt=a(e),me=m(e,"UL",{"data-svelte-h":!0}),h(me)!=="svelte-gswdqk"&&(me.innerHTML=Gn),_t=a(e),u(he.$$.fragment,e),bt=a(e),u(fe.$$.fragment,e),kt=a(e),u(ue.$$.fragment,e),yt=a(e),ge=m(e,"UL",{"data-svelte-h":!0}),h(ge)!=="svelte-162aebv"&&(ge.innerHTML=zn),vt=a(e),u(_e.$$.fragment,e),$t=a(e),H=m(e,"DIV",{class:!0});var A=F(H);u(be.$$.fragment,A),Pt=a(A),Pe=m(A,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-2mleq8"&&(Pe.innerHTML=jn),Ut=a(A),u(O.$$.fragment,A),A.forEach(r),Tt=a(e),u(ke.$$.fragment,e),Ct=a(e),T=m(e,"DIV",{class:!0});var M=F(T);u(ye.$$.fragment,M),Nt=a(M),Ue=m(M,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-3tmseo"&&(Ue.textContent=Ln),Ht=a(M),Ne=m(M,"P",{"data-svelte-h":!0}),h(Ne)!=="svelte-1s077p3"&&(Ne.textContent=qn),Jt=a(M),u(R.$$.fragment,M),Wt=a(M),He=m(M,"P",{"data-svelte-h":!0}),h(He)!=="svelte-1jfcabo"&&(He.innerHTML=Fn),Dt=a(M),u(X.$$.fragment,M),Et=a(M),Je=m(M,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-1urdkfw"&&(Je.innerHTML=In),Zt=a(M),I=m(M,"DIV",{class:!0});var J=F(I);u(ve.$$.fragment,J),Vt=a(J),We=m(J,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1oby08q"&&(We.textContent=Pn),Bt=a(J),u(Q.$$.fragment,J),At=a(J),De=m(J,"P",{"data-svelte-h":!0}),h(De)!=="svelte-owoxgn"&&(De.innerHTML=Un),J.forEach(r),St=a(M),Ee=m(M,"DIV",{class:!0});var dt=F(Ee);u($e.$$.fragment,dt),dt.forEach(r),M.forEach(r),wt=a(e),u(Te.$$.fragment,e),Mt=a(e),C=m(e,"DIV",{class:!0});var x=F(C);u(Ce.$$.fragment,x),Ot=a(x),Ze=m(x,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-ct13nj"&&(Ze.innerHTML=Nn),Rt=a(x),Ve=m(x,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-1s077p3"&&(Ve.textContent=Hn),Xt=a(x),u(Y.$$.fragment,x),Qt=a(x),Be=m(x,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-1afeqmz"&&(Be.innerHTML=Jn),Yt=a(x),u(K.$$.fragment,x),Kt=a(x),Ae=m(x,"P",{"data-svelte-h":!0}),h(Ae)!=="svelte-1ndfe3e"&&(Ae.innerHTML=Wn),en=a(x),P=m(x,"DIV",{class:!0});var W=F(P);u(we.$$.fragment,W),tn=a(W),Se=m(W,"P",{"data-svelte-h":!0}),h(Se)!=="svelte-1oby08q"&&(Se.textContent=Dn),nn=a(W),u(ee.$$.fragment,W),on=a(W),Oe=m(W,"P",{"data-svelte-h":!0}),h(Oe)!=="svelte-owoxgn"&&(Oe.innerHTML=En),W.forEach(r),sn=a(x),U=m(x,"DIV",{class:!0});var D=F(U);u(Me.$$.fragment,D),an=a(D),Re=m(D,"P",{"data-svelte-h":!0}),h(Re)!=="svelte-vbfkpu"&&(Re.textContent=Zn),rn=a(D),Xe=m(D,"P",{"data-svelte-h":!0}),h(Xe)!=="svelte-125uxon"&&(Xe.innerHTML=Vn),dn=a(D),Qe=m(D,"P",{"data-svelte-h":!0}),h(Qe)!=="svelte-zuidod"&&(Qe.innerHTML=Bn),D.forEach(r),x.forEach(r),xt=a(e),u(xe.$$.fragment,e),Gt=a(e),G=m(e,"DIV",{class:!0});var L=F(G);u(Ge.$$.fragment,L),ln=a(L),Ye=m(L,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-14u75xd"&&(Ye.textContent=An),cn=a(L),Ke=m(L,"P",{"data-svelte-h":!0}),h(Ke)!=="svelte-u3dlub"&&(Ke.innerHTML=Sn),pn=a(L),et=m(L,"P",{"data-svelte-h":!0}),h(et)!=="svelte-hswkmf"&&(et.innerHTML=On),mn=a(L),Z=m(L,"DIV",{class:!0});var S=F(Z);u(ze.$$.fragment,S),hn=a(S),tt=m(S,"P",{"data-svelte-h":!0}),h(tt)!=="svelte-og19sb"&&(tt.innerHTML=Rn),fn=a(S),u(te.$$.fragment,S),S.forEach(r),L.forEach(r),zt=a(e),u(je.$$.fragment,e),jt=a(e),z=m(e,"DIV",{class:!0});var q=F(z);u(Le.$$.fragment,q),un=a(q),nt=m(q,"P",{"data-svelte-h":!0}),h(nt)!=="svelte-8jmfdo"&&(nt.textContent=Xn),gn=a(q),ot=m(q,"P",{"data-svelte-h":!0}),h(ot)!=="svelte-u3dlub"&&(ot.innerHTML=Qn),_n=a(q),st=m(q,"P",{"data-svelte-h":!0}),h(st)!=="svelte-hswkmf"&&(st.innerHTML=Yn),bn=a(q),N=m(q,"DIV",{class:!0});var se=F(N);u(qe.$$.fragment,se),kn=a(se),at=m(se,"P",{"data-svelte-h":!0}),h(at)!=="svelte-ywfcwr"&&(at.innerHTML=Kn),yn=a(se),u(ne.$$.fragment,se),vn=a(se),u(oe.$$.fragment,se),se.forEach(r),q.forEach(r),Lt=a(e),u(Fe.$$.fragment,e),qt=a(e),it=m(e,"P",{}),F(it).forEach(r),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",bo),j($,"class","flex flex-wrap space-x-1"),j(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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,o){i(document.head,n),c(e,v,o),c(e,l,o),c(e,d,o),g(y,e,o),c(e,t,o),c(e,$,o),c(e,lt,o),g(ae,e,o),c(e,ct,o),c(e,re,o),c(e,pt,o),c(e,ie,o),c(e,mt,o),c(e,de,o),c(e,ht,o),c(e,le,o),c(e,ft,o),c(e,ce,o),c(e,ut,o),g(pe,e,o),c(e,gt,o),c(e,me,o),c(e,_t,o),g(he,e,o),c(e,bt,o),g(fe,e,o),c(e,kt,o),g(ue,e,o),c(e,yt,o),c(e,ge,o),c(e,vt,o),g(_e,e,o),c(e,$t,o),c(e,H,o),g(be,H,null),i(H,Pt),i(H,Pe),i(H,Ut),g(O,H,null),c(e,Tt,o),g(ke,e,o),c(e,Ct,o),c(e,T,o),g(ye,T,null),i(T,Nt),i(T,Ue),i(T,Ht),i(T,Ne),i(T,Jt),g(R,T,null),i(T,Wt),i(T,He),i(T,Dt),g(X,T,null),i(T,Et),i(T,Je),i(T,Zt),i(T,I),g(ve,I,null),i(I,Vt),i(I,We),i(I,Bt),g(Q,I,null),i(I,At),i(I,De),i(T,St),i(T,Ee),g($e,Ee,null),c(e,wt,o),g(Te,e,o),c(e,Mt,o),c(e,C,o),g(Ce,C,null),i(C,Ot),i(C,Ze),i(C,Rt),i(C,Ve),i(C,Xt),g(Y,C,null),i(C,Qt),i(C,Be),i(C,Yt),g(K,C,null),i(C,Kt),i(C,Ae),i(C,en),i(C,P),g(we,P,null),i(P,tn),i(P,Se),i(P,nn),g(ee,P,null),i(P,on),i(P,Oe),i(C,sn),i(C,U),g(Me,U,null),i(U,an),i(U,Re),i(U,rn),i(U,Xe),i(U,dn),i(U,Qe),c(e,xt,o),g(xe,e,o),c(e,Gt,o),c(e,G,o),g(Ge,G,null),i(G,ln),i(G,Ye),i(G,cn),i(G,Ke),i(G,pn),i(G,et),i(G,mn),i(G,Z),g(ze,Z,null),i(Z,hn),i(Z,tt),i(Z,fn),g(te,Z,null),c(e,zt,o),g(je,e,o),c(e,jt,o),c(e,z,o),g(Le,z,null),i(z,un),i(z,nt),i(z,gn),i(z,ot),i(z,_n),i(z,st),i(z,bn),i(z,N),g(qe,N,null),i(N,kn),i(N,at),i(N,yn),g(ne,N,null),i(N,vn),g(oe,N,null),c(e,Lt,o),g(Fe,e,o),c(e,qt,o),c(e,it,o),Ft=!0},p(e,[o]){const A={};o&2&&(A.$$scope={dirty:o,ctx:e}),O.$set(A);const M={};o&2&&(M.$$scope={dirty:o,ctx:e}),R.$set(M);const J={};o&2&&(J.$$scope={dirty:o,ctx:e}),X.$set(J);const dt={};o&2&&(dt.$$scope={dirty:o,ctx:e}),Q.$set(dt);const x={};o&2&&(x.$$scope={dirty:o,ctx:e}),Y.$set(x);const W={};o&2&&(W.$$scope={dirty:o,ctx:e}),K.$set(W);const D={};o&2&&(D.$$scope={dirty:o,ctx:e}),ee.$set(D);const L={};o&2&&(L.$$scope={dirty:o,ctx:e}),te.$set(L);const S={};o&2&&(S.$$scope={dirty:o,ctx:e}),ne.$set(S);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),oe.$set(q)},i(e){Ft||(_(y.$$.fragment,e),_(ae.$$.fragment,e),_(pe.$$.fragment,e),_(he.$$.fragment,e),_(fe.$$.fragment,e),_(ue.$$.fragment,e),_(_e.$$.fragment,e),_(be.$$.fragment,e),_(O.$$.fragment,e),_(ke.$$.fragment,e),_(ye.$$.fragment,e),_(R.$$.fragment,e),_(X.$$.fragment,e),_(ve.$$.fragment,e),_(Q.$$.fragment,e),_($e.$$.fragment,e),_(Te.$$.fragment,e),_(Ce.$$.fragment,e),_(Y.$$.fragment,e),_(K.$$.fragment,e),_(we.$$.fragment,e),_(ee.$$.fragment,e),_(Me.$$.fragment,e),_(xe.$$.fragment,e),_(Ge.$$.fragment,e),_(ze.$$.fragment,e),_(te.$$.fragment,e),_(je.$$.fragment,e),_(Le.$$.fragment,e),_(qe.$$.fragment,e),_(ne.$$.fragment,e),_(oe.$$.fragment,e),_(Fe.$$.fragment,e),Ft=!0)},o(e){b(y.$$.fragment,e),b(ae.$$.fragment,e),b(pe.$$.fragment,e),b(he.$$.fragment,e),b(fe.$$.fragment,e),b(ue.$$.fragment,e),b(_e.$$.fragment,e),b(be.$$.fragment,e),b(O.$$.fragment,e),b(ke.$$.fragment,e),b(ye.$$.fragment,e),b(R.$$.fragment,e),b(X.$$.fragment,e),b(ve.$$.fragment,e),b(Q.$$.fragment,e),b($e.$$.fragment,e),b(Te.$$.fragment,e),b(Ce.$$.fragment,e),b(Y.$$.fragment,e),b(K.$$.fragment,e),b(we.$$.fragment,e),b(ee.$$.fragment,e),b(Me.$$.fragment,e),b(xe.$$.fragment,e),b(Ge.$$.fragment,e),b(ze.$$.fragment,e),b(te.$$.fragment,e),b(je.$$.fragment,e),b(Le.$$.fragment,e),b(qe.$$.fragment,e),b(ne.$$.fragment,e),b(oe.$$.fragment,e),b(Fe.$$.fragment,e),Ft=!1},d(e){e&&(r(v),r(l),r(d),r(t),r($),r(lt),r(ct),r(re),r(pt),r(ie),r(mt),r(de),r(ht),r(le),r(ft),r(ce),r(ut),r(gt),r(me),r(_t),r(bt),r(kt),r(yt),r(ge),r(vt),r($t),r(H),r(Tt),r(Ct),r(T),r(wt),r(Mt),r(C),r(xt),r(Gt),r(G),r(zt),r(jt),r(z),r(Lt),r(qt),r(it)),r(n),k(y,e),k(ae,e),k(pe,e),k(he,e),k(fe,e),k(ue,e),k(_e,e),k(be),k(O),k(ke,e),k(ye),k(R),k(X),k(ve),k(Q),k($e),k(Te,e),k(Ce),k(Y),k(K),k(we),k(ee),k(Me),k(xe,e),k(Ge),k(ze),k(te),k(je,e),k(Le),k(qe),k(ne),k(oe),k(Fe,e)}}}const bo='{"title":"CodeGen","local":"Codegen","sections":[{"title":"개요","local":"Overview","sections":[],"depth":2},{"title":"체크포인트 명명 규칙","local":"Checkpoint Naming","sections":[],"depth":2},{"title":"사용 예시","local":"Usage example","sections":[],"depth":2},{"title":"자료","local":"Resources","sections":[],"depth":2},{"title":"CodeGenConfig","local":"transformers.CodeGenConfig","sections":[],"depth":2},{"title":"CodeGenTokenizer","local":"transformers.CodeGenTokenizer","sections":[],"depth":2},{"title":"CodeGenTokenizerFast","local":"transformers.CodeGenTokenizerFast","sections":[],"depth":2},{"title":"CodeGenModel","local":"transformers.CodeGenModel","sections":[],"depth":2},{"title":"CodeGenForCausalLM","local":"transformers.CodeGenForCausalLM","sections":[],"depth":2}],"depth":1}';function ko(w){return to(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xo extends no{constructor(n){super(),oo(this,n,ko,_o,eo,{})}}export{xo as component};
