import{S as Vi,i as Ri,s as Yi,e as n,k as p,w as b,t as s,M as Ji,c as r,d as t,m as h,a,x as w,h as i,b as c,G as e,g,y as $,q as y,o as C,B as T,v as Qi,L as Vt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Sn}from"../../chunks/Tip-hf-doc-builder.js";import{D as se}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Uo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as R}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ut}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Xi(G){let d,k,_,f,v;return f=new Uo({props:{code:`from transformers import CodeGenConfig, CodeGenModel

# Initializing a CodeGen 6B configuration
configuration = CodeGenConfig()

# Initializing a model (with random weights) from the configuration
model = CodeGenModel(configuration)

# Accessing the model configuration
configuration = model.config`,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`}}),{c(){d=n("p"),k=s("Example:"),_=p(),b(f.$$.fragment)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"Example:"),u.forEach(t),_=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,_,u),$(f,l,u),v=!0},p:Vt,i(l){v||(y(f.$$.fragment,l),v=!0)},o(l){C(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(_),T(f,l)}}}function Zi(G){let d,k,_,f,v;return f=new Uo({props:{code:`from transformers import CodeGenTokenizer

tokenizer = CodeGenTokenizer.from_pretrained("Salesforce/codegen-350M-mono")
tokenizer("Hello world")["input_ids"]

tokenizer(" Hello world")["input_ids"]`,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>]`}}),{c(){d=n("p"),k=s("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),_=p(),b(f.$$.fragment)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),_=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,_,u),$(f,l,u),v=!0},p:Vt,i(l){v||(y(f.$$.fragment,l),v=!0)},o(l){C(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(_),T(f,l)}}}function Ki(G){let d,k,_,f,v;return{c(){d=n("p"),k=s("When used with "),_=n("code"),f=s("is_split_into_words=True"),v=s(", this tokenizer will add a space before each word (even the first one).")},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"When used with "),_=r(u,"CODE",{});var x=a(_);f=i(x,"is_split_into_words=True"),x.forEach(t),v=i(u,", this tokenizer will add a space before each word (even the first one)."),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,_),e(_,f),e(d,v)},d(l){l&&t(d)}}}function el(G){let d,k,_,f,v;return f=new Uo({props:{code:`from transformers import CodeGenTokenizerFast

tokenizer = CodeGenTokenizerFast.from_pretrained("Salesforce/codegen-350M-mono")
tokenizer("Hello world")["input_ids"]

tokenizer(" Hello world")["input_ids"]`,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>]`}}),{c(){d=n("p"),k=s("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),_=p(),b(f.$$.fragment)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),_=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,_,u),$(f,l,u),v=!0},p:Vt,i(l){v||(y(f.$$.fragment,l),v=!0)},o(l){C(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(_),T(f,l)}}}function ol(G){let d,k,_,f,v,l,u,x;return{c(){d=n("p"),k=s("When used with "),_=n("code"),f=s("is_split_into_words=True"),v=s(", this tokenizer needs to be instantiated with "),l=n("code"),u=s("add_prefix_space=True"),x=s(".")},l(Y){d=r(Y,"P",{});var F=a(d);k=i(F,"When used with "),_=r(F,"CODE",{});var L=a(_);f=i(L,"is_split_into_words=True"),L.forEach(t),v=i(F,", this tokenizer needs to be instantiated with "),l=r(F,"CODE",{});var N=a(l);u=i(N,"add_prefix_space=True"),N.forEach(t),x=i(F,"."),F.forEach(t)},m(Y,F){g(Y,d,F),e(d,k),e(d,_),e(_,f),e(d,v),e(d,l),e(l,u),e(d,x)},d(Y){Y&&t(d)}}}function tl(G){let d,k,_,f,v;return{c(){d=n("p"),k=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(u,"CODE",{});var x=a(_);f=i(x,"Module"),x.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,_),e(_,f),e(d,v)},d(l){l&&t(d)}}}function nl(G){let d,k,_,f,v;return f=new Uo({props:{code:`from transformers import AutoTokenizer, CodeGenModel
import torch

tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen-2B-mono")
model = CodeGenModel.from_pretrained("Salesforce/codegen-2B-mono")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CodeGenModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-2B-mono&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CodeGenModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-2B-mono&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=n("p"),k=s("Example:"),_=p(),b(f.$$.fragment)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"Example:"),u.forEach(t),_=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,_,u),$(f,l,u),v=!0},p:Vt,i(l){v||(y(f.$$.fragment,l),v=!0)},o(l){C(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(_),T(f,l)}}}function rl(G){let d,k,_,f,v;return{c(){d=n("p"),k=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(u,"CODE",{});var x=a(_);f=i(x,"Module"),x.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,d,u),e(d,k),e(d,_),e(_,f),e(d,v)},d(l){l&&t(d)}}}function al(G){let d,k,_,f,v;return f=new Uo({props:{code:`import torch
from transformers import AutoTokenizer, CodeGenForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen-2B-mono")
model = CodeGenForCausalLM.from_pretrained("Salesforce/codegen-2B-mono")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs, labels=inputs["input_ids"])
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CodeGenForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-2B-mono&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CodeGenForCausalLM.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-2B-mono&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),k=s("Example:"),_=p(),b(f.$$.fragment)},l(l){d=r(l,"P",{});var u=a(d);k=i(u,"Example:"),u.forEach(t),_=h(l),w(f.$$.fragment,l)},m(l,u){g(l,d,u),e(d,k),g(l,_,u),$(f,l,u),v=!0},p:Vt,i(l){v||(y(f.$$.fragment,l),v=!0)},o(l){C(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(_),T(f,l)}}}function sl(G){let d,k,_,f,v,l,u,x,Y,F,L,N,Vo,qe,Nn,Ro,In,Rt,ie,Bn,je,Wn,Hn,Yt,le,Un,Ae,Vn,Rn,Jt,To,Yn,Qt,zo,Le,Jn,Oe,Qn,Xn,Xt,W,Zn,De,Kn,er,Se,or,tr,Zt,J,de,Yo,Ne,nr,Jo,rr,Kt,H,Ie,ar,Be,sr,ir,lr,ce,dr,Qo,cr,pr,We,q,Xo,hr,mr,Zo,fr,ur,Ko,gr,_r,et,vr,kr,ot,br,wr,He,tt,$r,yr,Q,Eo,nt,Cr,Tr,zr,pe,rt,Er,Gr,at,xr,Pr,Mr,he,st,Fr,qr,it,jr,Ar,Lr,Ue,Or,lt,Dr,Sr,en,X,me,dt,Ve,Nr,ct,Ir,on,Re,tn,Z,fe,pt,Ye,Br,ht,Wr,nn,Go,mt,xo,Hr,rn,K,ue,ft,Je,Ur,ut,Vr,an,I,Qe,Rr,j,Yr,Po,Jr,Qr,Xe,Xr,Zr,Mo,Kr,ea,Fo,oa,ta,na,ge,sn,ee,_e,gt,Ze,ra,_t,aa,ln,z,Ke,sa,vt,ia,la,kt,da,ca,ve,pa,eo,ha,bt,ma,fa,ua,ke,ga,oo,_a,qo,va,ka,ba,jo,to,dn,oe,be,wt,no,wa,$t,$a,cn,E,ro,ya,ao,Ca,yt,Ta,za,Ea,Ct,Ga,xa,we,Pa,so,Ma,Tt,Fa,qa,ja,$e,Aa,io,La,Ao,Oa,Da,Sa,O,lo,Na,zt,Ia,Ba,co,Wa,Et,Ha,Ua,Va,po,Ra,Gt,Ya,Ja,pn,te,ye,xt,ho,Qa,Pt,Xa,hn,B,mo,Za,fo,Ka,uo,es,os,ts,D,go,ns,ne,rs,Lo,as,ss,Mt,is,ls,ds,Ce,cs,Te,mn,re,ze,Ft,_o,ps,qt,hs,fn,A,vo,ms,jt,fs,us,ko,gs,bo,_s,vs,ks,S,wo,bs,ae,ws,Oo,$s,ys,At,Cs,Ts,zs,Ee,Es,Ge,un;return l=new R({}),qe=new R({}),Ne=new R({}),Ve=new R({}),Re=new Uo({props:{code:`from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "Salesforce/codegen-350M-mono"
model = AutoModelForCausalLM.from_pretrained(checkpoint)
tokenizer = AutoTokenizer.from_pretrained(checkpoint)

text = "def hello_world():"

completion = model.generate(**tokenizer(text, return_tensors="pt"))

print(tokenizer.decode(completion[0]))
`,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()`}}),Ye=new R({}),Je=new R({}),Qe=new se({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/v4.29.0/en/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_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>, defaults to None) &#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.1) &#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.1) &#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.1) &#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-5) &#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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/codegen/configuration_codegen.py#L44"}}),ge=new Ut({props:{anchor:"transformers.CodeGenConfig.example",$$slots:{default:[Xi]},$$scope:{ctx:G}}}),Ze=new R({}),Ke=new se({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:"**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>&lt;|endoftext|&gt;</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>&lt;|endoftext|&gt;</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>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/codegen/tokenization_codegen.py#L98"}}),ve=new Ut({props:{anchor:"transformers.CodeGenTokenizer.example",$$slots:{default:[Zi]},$$scope:{ctx:G}}}),ke=new Sn({props:{$$slots:{default:[Ki]},$$scope:{ctx:G}}}),to=new se({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/v4.29.0/src/transformers/models/codegen/tokenization_codegen.py#L284"}}),no=new R({}),ro=new se({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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CodeGenTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CodeGenTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.CodeGenTokenizerFast.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.CodeGenTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</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>&lt;|endoftext|&gt;</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>&lt;|endoftext|&gt;</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.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the post-processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/codegen/tokenization_codegen_fast.py#L63"}}),we=new Ut({props:{anchor:"transformers.CodeGenTokenizerFast.example",$$slots:{default:[el]},$$scope:{ctx:G}}}),$e=new Sn({props:{$$slots:{default:[ol]},$$scope:{ctx:G}}}),lo=new se({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:": 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/v4.29.0/src/transformers/models/codegen/tokenization_codegen_fast.py#L186",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),ho=new R({}),mo=new se({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/v4.29.0/en/model_doc/codegen#transformers.CodeGenConfig">CodeGenConfig</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.29.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.29.0/src/transformers/models/codegen/modeling_codegen.py#L408"}}),go=new se({props:{name:"forward",anchor:"transformers.CodeGenModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = 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"}],parametersDescription:[{anchor:"transformers.CodeGenModel.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.</p>
<p>Indices can be obtained using <code>AutoProcenizer</code>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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_attention_heads,)</code> or <code>(n_layer, num_attention_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.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/v4.29.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.29.0/src/transformers/models/codegen/modeling_codegen.py#L431",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/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/v4.29.0/en/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>) \u2014 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>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 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 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ce=new Sn({props:{$$slots:{default:[tl]},$$scope:{ctx:G}}}),Te=new Ut({props:{anchor:"transformers.CodeGenModel.forward.example",$$slots:{default:[nl]},$$scope:{ctx:G}}}),_o=new R({}),vo=new se({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/v4.29.0/en/model_doc/codegen#transformers.CodeGenConfig">CodeGenConfig</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.29.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.29.0/src/transformers/models/codegen/modeling_codegen.py#L601"}}),wo=new se({props:{name:"forward",anchor:"transformers.CodeGenForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = 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"}],parametersDescription:[{anchor:"transformers.CodeGenForCausalLM.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.</p>
<p>Indices can be obtained using <code>AutoProcenizer</code>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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_attention_heads,)</code> or <code>(n_layer, num_attention_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.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/codegen/modeling_codegen.py#L645",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.0/en/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) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new Sn({props:{$$slots:{default:[rl]},$$scope:{ctx:G}}}),Ge=new Ut({props:{anchor:"transformers.CodeGenForCausalLM.forward.example",$$slots:{default:[al]},$$scope:{ctx:G}}}),{c(){d=n("meta"),k=p(),_=n("h1"),f=n("a"),v=n("span"),b(l.$$.fragment),u=p(),x=n("span"),Y=s("CodeGen"),F=p(),L=n("h2"),N=n("a"),Vo=n("span"),b(qe.$$.fragment),Nn=p(),Ro=n("span"),In=s("Overview"),Rt=p(),ie=n("p"),Bn=s("The CodeGen model was proposed in "),je=n("a"),Wn=s("A Conversational Paradigm for Program Synthesis"),Hn=s(" by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong."),Yt=p(),le=n("p"),Un=s("CodeGen is an autoregressive language model for program synthesis trained sequentially on "),Ae=n("a"),Vn=s("The Pile"),Rn=s(", BigQuery, and BigPython."),Jt=p(),To=n("p"),Yn=s("The abstract from the paper is the following:"),Qt=p(),zo=n("p"),Le=n("em"),Jn=s("Program synthesis strives to generate a computer program as a solution to a given problem specification. We propose a conversational program synthesis approach via large language models, which addresses the challenges of searching over a vast program space and user intent specification faced in prior approaches. Our new approach casts the process of writing a specification and program as a multi-turn conversation between a user and a system. It treats program synthesis as a sequence prediction problem, in which the specification is expressed in natural language and the desired program is conditionally sampled. We train a family of large language models, called CodeGen, on natural language and programming language data. With weak supervision in the data and the scaling up of data size and model size, conversational capacities emerge from the simple autoregressive language modeling. To study the model behavior on conversational program synthesis, we develop a multi-turn programming benchmark (MTPB), where solving each problem requires multi-step synthesis via multi-turn conversation between the user and the model. Our findings show the emergence of conversational capabilities and the effectiveness of the proposed conversational program synthesis paradigm. In addition, our model CodeGen (with up to 16B parameters trained on TPU-v4) outperforms OpenAI\u2019s Codex on the HumanEval benchmark. We make the training library JaxFormer including checkpoints available as open source contribution: "),Oe=n("a"),Qn=s("this https URL"),Xn=s("."),Xt=p(),W=n("p"),Zn=s("This model was contributed by "),De=n("a"),Kn=s("Hiroaki Hayashi"),er=s(`.
The original code can be found `),Se=n("a"),or=s("here"),tr=s("."),Zt=p(),J=n("h2"),de=n("a"),Yo=n("span"),b(Ne.$$.fragment),nr=p(),Jo=n("span"),rr=s("Checkpoint Naming"),Kt=p(),H=n("ul"),Ie=n("li"),ar=s("CodeGen model "),Be=n("a"),sr=s("checkpoints"),ir=s(" are available on different pre-training data with variable sizes."),lr=p(),ce=n("li"),dr=s("The format is: "),Qo=n("code"),cr=s("Salesforce/codegen-{size}-{data}"),pr=s(", where"),We=n("ul"),q=n("li"),Xo=n("code"),hr=s("size"),mr=s(": "),Zo=n("code"),fr=s("350M"),ur=s(", "),Ko=n("code"),gr=s("2B"),_r=s(", "),et=n("code"),vr=s("6B"),kr=s(", "),ot=n("code"),br=s("16B"),wr=p(),He=n("li"),tt=n("code"),$r=s("data"),yr=s(": "),Q=n("ul"),Eo=n("li"),nt=n("code"),Cr=s("nl"),Tr=s(": Pre-trained on the Pile"),zr=p(),pe=n("li"),rt=n("code"),Er=s("multi"),Gr=s(": Initialized with "),at=n("code"),xr=s("nl"),Pr=s(", then further pre-trained on multiple programming languages data"),Mr=p(),he=n("li"),st=n("code"),Fr=s("mono"),qr=s(": Initialized with "),it=n("code"),jr=s("multi"),Ar=s(", then further pre-trained on Python data"),Lr=p(),Ue=n("li"),Or=s("For example, "),lt=n("code"),Dr=s("Salesforce/codegen-350M-mono"),Sr=s(" offers a 350 million-parameter checkpoint pre-trained sequentially on the Pile, multiple programming languages, and Python."),en=p(),X=n("h2"),me=n("a"),dt=n("span"),b(Ve.$$.fragment),Nr=p(),ct=n("span"),Ir=s("How to use"),on=p(),b(Re.$$.fragment),tn=p(),Z=n("h2"),fe=n("a"),pt=n("span"),b(Ye.$$.fragment),Br=p(),ht=n("span"),Wr=s("Documentation resources"),nn=p(),Go=n("ul"),mt=n("li"),xo=n("a"),Hr=s("Causal language modeling task guide"),rn=p(),K=n("h2"),ue=n("a"),ft=n("span"),b(Je.$$.fragment),Ur=p(),ut=n("span"),Vr=s("CodeGenConfig"),an=p(),I=n("div"),b(Qe.$$.fragment),Rr=p(),j=n("p"),Yr=s("This is the configuration class to store the configuration of a "),Po=n("a"),Jr=s("CodeGenModel"),Qr=s(`. 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
`),Xe=n("a"),Xr=s("Salesforce/codegen-2B-mono"),Zr=s(` architecture. Configuration objects
inherit from `),Mo=n("a"),Kr=s("PretrainedConfig"),ea=s(` and can be used to control the model outputs. Read the documentation from
`),Fo=n("a"),oa=s("PretrainedConfig"),ta=s(" for more information."),na=p(),b(ge.$$.fragment),sn=p(),ee=n("h2"),_e=n("a"),gt=n("span"),b(Ze.$$.fragment),ra=p(),_t=n("span"),aa=s("CodeGenTokenizer"),ln=p(),z=n("div"),b(Ke.$$.fragment),sa=p(),vt=n("p"),ia=s("Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),la=p(),kt=n("p"),da=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ca=p(),b(ve.$$.fragment),pa=p(),eo=n("p"),ha=s("You can get around that behavior by passing "),bt=n("code"),ma=s("add_prefix_space=True"),fa=s(` 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.`),ua=p(),b(ke.$$.fragment),ga=p(),oo=n("p"),_a=s("This tokenizer inherits from "),qo=n("a"),va=s("PreTrainedTokenizer"),ka=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ba=p(),jo=n("div"),b(to.$$.fragment),dn=p(),oe=n("h2"),be=n("a"),wt=n("span"),b(no.$$.fragment),wa=p(),$t=n("span"),$a=s("CodeGenTokenizerFast"),cn=p(),E=n("div"),b(ro.$$.fragment),ya=p(),ao=n("p"),Ca=s("Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),yt=n("em"),Ta=s("tokenizers"),za=s(` library). Based on byte-level
Byte-Pair-Encoding.`),Ea=p(),Ct=n("p"),Ga=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),xa=p(),b(we.$$.fragment),Pa=p(),so=n("p"),Ma=s("You can get around that behavior by passing "),Tt=n("code"),Fa=s("add_prefix_space=True"),qa=s(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),ja=p(),b($e.$$.fragment),Aa=p(),io=n("p"),La=s("This tokenizer inherits from "),Ao=n("a"),Oa=s("PreTrainedTokenizerFast"),Da=s(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Sa=p(),O=n("div"),b(lo.$$.fragment),Na=p(),zt=n("p"),Ia=s(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Ba=p(),co=n("p"),Wa=s("Similar to doing "),Et=n("code"),Ha=s("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ua=s("."),Va=p(),po=n("p"),Ra=s("\u201D]`.\nkwargs (additional keyword arguments, "),Gt=n("em"),Ya=s("optional"),Ja=s(`):
Will be passed to the underlying model specific decode method.`),pn=p(),te=n("h2"),ye=n("a"),xt=n("span"),b(ho.$$.fragment),Qa=p(),Pt=n("span"),Xa=s("CodeGenModel"),hn=p(),B=n("div"),b(mo.$$.fragment),Za=p(),fo=n("p"),Ka=s(`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),uo=n("a"),es=s("torch.nn.Module"),os=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ts=p(),D=n("div"),b(go.$$.fragment),ns=p(),ne=n("p"),rs=s("The "),Lo=n("a"),as=s("CodeGenModel"),ss=s(" forward method, overrides the "),Mt=n("code"),is=s("__call__"),ls=s(" special method."),ds=p(),b(Ce.$$.fragment),cs=p(),b(Te.$$.fragment),mn=p(),re=n("h2"),ze=n("a"),Ft=n("span"),b(_o.$$.fragment),ps=p(),qt=n("span"),hs=s("CodeGenForCausalLM"),fn=p(),A=n("div"),b(vo.$$.fragment),ms=p(),jt=n("p"),fs=s("The CodeGen Model transformer with a language modeling head on top."),us=p(),ko=n("p"),gs=s("This model is a PyTorch "),bo=n("a"),_s=s("torch.nn.Module"),vs=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ks=p(),S=n("div"),b(wo.$$.fragment),bs=p(),ae=n("p"),ws=s("The "),Oo=n("a"),$s=s("CodeGenForCausalLM"),ys=s(" forward method, overrides the "),At=n("code"),Cs=s("__call__"),Ts=s(" special method."),zs=p(),b(Ee.$$.fragment),Es=p(),b(Ge.$$.fragment),this.h()},l(o){const m=Ji('[data-svelte="svelte-1phssyn"]',document.head);d=r(m,"META",{name:!0,content:!0}),m.forEach(t),k=h(o),_=r(o,"H1",{class:!0});var $o=a(_);f=r($o,"A",{id:!0,class:!0,href:!0});var Lt=a(f);v=r(Lt,"SPAN",{});var Ot=a(v);w(l.$$.fragment,Ot),Ot.forEach(t),Lt.forEach(t),u=h($o),x=r($o,"SPAN",{});var Dt=a(x);Y=i(Dt,"CodeGen"),Dt.forEach(t),$o.forEach(t),F=h(o),L=r(o,"H2",{class:!0});var yo=a(L);N=r(yo,"A",{id:!0,class:!0,href:!0});var St=a(N);Vo=r(St,"SPAN",{});var Nt=a(Vo);w(qe.$$.fragment,Nt),Nt.forEach(t),St.forEach(t),Nn=h(yo),Ro=r(yo,"SPAN",{});var It=a(Ro);In=i(It,"Overview"),It.forEach(t),yo.forEach(t),Rt=h(o),ie=r(o,"P",{});var Co=a(ie);Bn=i(Co,"The CodeGen model was proposed in "),je=r(Co,"A",{href:!0,rel:!0});var xs=a(je);Wn=i(xs,"A Conversational Paradigm for Program Synthesis"),xs.forEach(t),Hn=i(Co," by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong."),Co.forEach(t),Yt=h(o),le=r(o,"P",{});var gn=a(le);Un=i(gn,"CodeGen is an autoregressive language model for program synthesis trained sequentially on "),Ae=r(gn,"A",{href:!0,rel:!0});var Ps=a(Ae);Vn=i(Ps,"The Pile"),Ps.forEach(t),Rn=i(gn,", BigQuery, and BigPython."),gn.forEach(t),Jt=h(o),To=r(o,"P",{});var Ms=a(To);Yn=i(Ms,"The abstract from the paper is the following:"),Ms.forEach(t),Qt=h(o),zo=r(o,"P",{});var Fs=a(zo);Le=r(Fs,"EM",{});var _n=a(Le);Jn=i(_n,"Program synthesis strives to generate a computer program as a solution to a given problem specification. We propose a conversational program synthesis approach via large language models, which addresses the challenges of searching over a vast program space and user intent specification faced in prior approaches. Our new approach casts the process of writing a specification and program as a multi-turn conversation between a user and a system. It treats program synthesis as a sequence prediction problem, in which the specification is expressed in natural language and the desired program is conditionally sampled. We train a family of large language models, called CodeGen, on natural language and programming language data. With weak supervision in the data and the scaling up of data size and model size, conversational capacities emerge from the simple autoregressive language modeling. To study the model behavior on conversational program synthesis, we develop a multi-turn programming benchmark (MTPB), where solving each problem requires multi-step synthesis via multi-turn conversation between the user and the model. Our findings show the emergence of conversational capabilities and the effectiveness of the proposed conversational program synthesis paradigm. In addition, our model CodeGen (with up to 16B parameters trained on TPU-v4) outperforms OpenAI\u2019s Codex on the HumanEval benchmark. We make the training library JaxFormer including checkpoints available as open source contribution: "),Oe=r(_n,"A",{href:!0,rel:!0});var qs=a(Oe);Qn=i(qs,"this https URL"),qs.forEach(t),Xn=i(_n,"."),_n.forEach(t),Fs.forEach(t),Xt=h(o),W=r(o,"P",{});var Do=a(W);Zn=i(Do,"This model was contributed by "),De=r(Do,"A",{href:!0,rel:!0});var js=a(De);Kn=i(js,"Hiroaki Hayashi"),js.forEach(t),er=i(Do,`.
The original code can be found `),Se=r(Do,"A",{href:!0,rel:!0});var As=a(Se);or=i(As,"here"),As.forEach(t),tr=i(Do,"."),Do.forEach(t),Zt=h(o),J=r(o,"H2",{class:!0});var vn=a(J);de=r(vn,"A",{id:!0,class:!0,href:!0});var Ls=a(de);Yo=r(Ls,"SPAN",{});var Os=a(Yo);w(Ne.$$.fragment,Os),Os.forEach(t),Ls.forEach(t),nr=h(vn),Jo=r(vn,"SPAN",{});var Ds=a(Jo);rr=i(Ds,"Checkpoint Naming"),Ds.forEach(t),vn.forEach(t),Kt=h(o),H=r(o,"UL",{});var So=a(H);Ie=r(So,"LI",{});var kn=a(Ie);ar=i(kn,"CodeGen model "),Be=r(kn,"A",{href:!0,rel:!0});var Ss=a(Be);sr=i(Ss,"checkpoints"),Ss.forEach(t),ir=i(kn," are available on different pre-training data with variable sizes."),kn.forEach(t),lr=h(So),ce=r(So,"LI",{});var Bt=a(ce);dr=i(Bt,"The format is: "),Qo=r(Bt,"CODE",{});var Ns=a(Qo);cr=i(Ns,"Salesforce/codegen-{size}-{data}"),Ns.forEach(t),pr=i(Bt,", where"),We=r(Bt,"UL",{});var bn=a(We);q=r(bn,"LI",{});var U=a(q);Xo=r(U,"CODE",{});var Is=a(Xo);hr=i(Is,"size"),Is.forEach(t),mr=i(U,": "),Zo=r(U,"CODE",{});var Bs=a(Zo);fr=i(Bs,"350M"),Bs.forEach(t),ur=i(U,", "),Ko=r(U,"CODE",{});var Ws=a(Ko);gr=i(Ws,"2B"),Ws.forEach(t),_r=i(U,", "),et=r(U,"CODE",{});var Hs=a(et);vr=i(Hs,"6B"),Hs.forEach(t),kr=i(U,", "),ot=r(U,"CODE",{});var Us=a(ot);br=i(Us,"16B"),Us.forEach(t),U.forEach(t),wr=h(bn),He=r(bn,"LI",{});var wn=a(He);tt=r(wn,"CODE",{});var Vs=a(tt);$r=i(Vs,"data"),Vs.forEach(t),yr=i(wn,": "),Q=r(wn,"UL",{});var No=a(Q);Eo=r(No,"LI",{});var Gs=a(Eo);nt=r(Gs,"CODE",{});var Rs=a(nt);Cr=i(Rs,"nl"),Rs.forEach(t),Tr=i(Gs,": Pre-trained on the Pile"),Gs.forEach(t),zr=h(No),pe=r(No,"LI",{});var Wt=a(pe);rt=r(Wt,"CODE",{});var Ys=a(rt);Er=i(Ys,"multi"),Ys.forEach(t),Gr=i(Wt,": Initialized with "),at=r(Wt,"CODE",{});var Js=a(at);xr=i(Js,"nl"),Js.forEach(t),Pr=i(Wt,", then further pre-trained on multiple programming languages data"),Wt.forEach(t),Mr=h(No),he=r(No,"LI",{});var Ht=a(he);st=r(Ht,"CODE",{});var Qs=a(st);Fr=i(Qs,"mono"),Qs.forEach(t),qr=i(Ht,": Initialized with "),it=r(Ht,"CODE",{});var Xs=a(it);jr=i(Xs,"multi"),Xs.forEach(t),Ar=i(Ht,", then further pre-trained on Python data"),Ht.forEach(t),No.forEach(t),wn.forEach(t),bn.forEach(t),Bt.forEach(t),Lr=h(So),Ue=r(So,"LI",{});var $n=a(Ue);Or=i($n,"For example, "),lt=r($n,"CODE",{});var Zs=a(lt);Dr=i(Zs,"Salesforce/codegen-350M-mono"),Zs.forEach(t),Sr=i($n," offers a 350 million-parameter checkpoint pre-trained sequentially on the Pile, multiple programming languages, and Python."),$n.forEach(t),So.forEach(t),en=h(o),X=r(o,"H2",{class:!0});var yn=a(X);me=r(yn,"A",{id:!0,class:!0,href:!0});var Ks=a(me);dt=r(Ks,"SPAN",{});var ei=a(dt);w(Ve.$$.fragment,ei),ei.forEach(t),Ks.forEach(t),Nr=h(yn),ct=r(yn,"SPAN",{});var oi=a(ct);Ir=i(oi,"How to use"),oi.forEach(t),yn.forEach(t),on=h(o),w(Re.$$.fragment,o),tn=h(o),Z=r(o,"H2",{class:!0});var Cn=a(Z);fe=r(Cn,"A",{id:!0,class:!0,href:!0});var ti=a(fe);pt=r(ti,"SPAN",{});var ni=a(pt);w(Ye.$$.fragment,ni),ni.forEach(t),ti.forEach(t),Br=h(Cn),ht=r(Cn,"SPAN",{});var ri=a(ht);Wr=i(ri,"Documentation resources"),ri.forEach(t),Cn.forEach(t),nn=h(o),Go=r(o,"UL",{});var ai=a(Go);mt=r(ai,"LI",{});var si=a(mt);xo=r(si,"A",{href:!0});var ii=a(xo);Hr=i(ii,"Causal language modeling task guide"),ii.forEach(t),si.forEach(t),ai.forEach(t),rn=h(o),K=r(o,"H2",{class:!0});var Tn=a(K);ue=r(Tn,"A",{id:!0,class:!0,href:!0});var li=a(ue);ft=r(li,"SPAN",{});var di=a(ft);w(Je.$$.fragment,di),di.forEach(t),li.forEach(t),Ur=h(Tn),ut=r(Tn,"SPAN",{});var ci=a(ut);Vr=i(ci,"CodeGenConfig"),ci.forEach(t),Tn.forEach(t),an=h(o),I=r(o,"DIV",{class:!0});var Io=a(I);w(Qe.$$.fragment,Io),Rr=h(Io),j=r(Io,"P",{});var V=a(j);Yr=i(V,"This is the configuration class to store the configuration of a "),Po=r(V,"A",{href:!0});var pi=a(Po);Jr=i(pi,"CodeGenModel"),pi.forEach(t),Qr=i(V,`. 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
`),Xe=r(V,"A",{href:!0,rel:!0});var hi=a(Xe);Xr=i(hi,"Salesforce/codegen-2B-mono"),hi.forEach(t),Zr=i(V,` architecture. Configuration objects
inherit from `),Mo=r(V,"A",{href:!0});var mi=a(Mo);Kr=i(mi,"PretrainedConfig"),mi.forEach(t),ea=i(V,` and can be used to control the model outputs. Read the documentation from
`),Fo=r(V,"A",{href:!0});var fi=a(Fo);oa=i(fi,"PretrainedConfig"),fi.forEach(t),ta=i(V," for more information."),V.forEach(t),na=h(Io),w(ge.$$.fragment,Io),Io.forEach(t),sn=h(o),ee=r(o,"H2",{class:!0});var zn=a(ee);_e=r(zn,"A",{id:!0,class:!0,href:!0});var ui=a(_e);gt=r(ui,"SPAN",{});var gi=a(gt);w(Ze.$$.fragment,gi),gi.forEach(t),ui.forEach(t),ra=h(zn),_t=r(zn,"SPAN",{});var _i=a(_t);aa=i(_i,"CodeGenTokenizer"),_i.forEach(t),zn.forEach(t),ln=h(o),z=r(o,"DIV",{class:!0});var P=a(z);w(Ke.$$.fragment,P),sa=h(P),vt=r(P,"P",{});var vi=a(vt);ia=i(vi,"Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),vi.forEach(t),la=h(P),kt=r(P,"P",{});var ki=a(kt);da=i(ki,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ki.forEach(t),ca=h(P),w(ve.$$.fragment,P),pa=h(P),eo=r(P,"P",{});var En=a(eo);ha=i(En,"You can get around that behavior by passing "),bt=r(En,"CODE",{});var bi=a(bt);ma=i(bi,"add_prefix_space=True"),bi.forEach(t),fa=i(En,` 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.`),En.forEach(t),ua=h(P),w(ke.$$.fragment,P),ga=h(P),oo=r(P,"P",{});var Gn=a(oo);_a=i(Gn,"This tokenizer inherits from "),qo=r(Gn,"A",{href:!0});var wi=a(qo);va=i(wi,"PreTrainedTokenizer"),wi.forEach(t),ka=i(Gn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Gn.forEach(t),ba=h(P),jo=r(P,"DIV",{class:!0});var $i=a(jo);w(to.$$.fragment,$i),$i.forEach(t),P.forEach(t),dn=h(o),oe=r(o,"H2",{class:!0});var xn=a(oe);be=r(xn,"A",{id:!0,class:!0,href:!0});var yi=a(be);wt=r(yi,"SPAN",{});var Ci=a(wt);w(no.$$.fragment,Ci),Ci.forEach(t),yi.forEach(t),wa=h(xn),$t=r(xn,"SPAN",{});var Ti=a($t);$a=i(Ti,"CodeGenTokenizerFast"),Ti.forEach(t),xn.forEach(t),cn=h(o),E=r(o,"DIV",{class:!0});var M=a(E);w(ro.$$.fragment,M),ya=h(M),ao=r(M,"P",{});var Pn=a(ao);Ca=i(Pn,"Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),yt=r(Pn,"EM",{});var zi=a(yt);Ta=i(zi,"tokenizers"),zi.forEach(t),za=i(Pn,` library). Based on byte-level
Byte-Pair-Encoding.`),Pn.forEach(t),Ea=h(M),Ct=r(M,"P",{});var Ei=a(Ct);Ga=i(Ei,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Ei.forEach(t),xa=h(M),w(we.$$.fragment,M),Pa=h(M),so=r(M,"P",{});var Mn=a(so);Ma=i(Mn,"You can get around that behavior by passing "),Tt=r(Mn,"CODE",{});var Gi=a(Tt);Fa=i(Gi,"add_prefix_space=True"),Gi.forEach(t),qa=i(Mn,` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),Mn.forEach(t),ja=h(M),w($e.$$.fragment,M),Aa=h(M),io=r(M,"P",{});var Fn=a(io);La=i(Fn,"This tokenizer inherits from "),Ao=r(Fn,"A",{href:!0});var xi=a(Ao);Oa=i(xi,"PreTrainedTokenizerFast"),xi.forEach(t),Da=i(Fn,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Fn.forEach(t),Sa=h(M),O=r(M,"DIV",{class:!0});var xe=a(O);w(lo.$$.fragment,xe),Na=h(xe),zt=r(xe,"P",{});var Pi=a(zt);Ia=i(Pi,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Pi.forEach(t),Ba=h(xe),co=r(xe,"P",{});var qn=a(co);Wa=i(qn,"Similar to doing "),Et=r(qn,"CODE",{});var Mi=a(Et);Ha=i(Mi,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Mi.forEach(t),Ua=i(qn,"."),qn.forEach(t),Va=h(xe),po=r(xe,"P",{});var jn=a(po);Ra=i(jn,"\u201D]`.\nkwargs (additional keyword arguments, "),Gt=r(jn,"EM",{});var Fi=a(Gt);Ya=i(Fi,"optional"),Fi.forEach(t),Ja=i(jn,`):
Will be passed to the underlying model specific decode method.`),jn.forEach(t),xe.forEach(t),M.forEach(t),pn=h(o),te=r(o,"H2",{class:!0});var An=a(te);ye=r(An,"A",{id:!0,class:!0,href:!0});var qi=a(ye);xt=r(qi,"SPAN",{});var ji=a(xt);w(ho.$$.fragment,ji),ji.forEach(t),qi.forEach(t),Qa=h(An),Pt=r(An,"SPAN",{});var Ai=a(Pt);Xa=i(Ai,"CodeGenModel"),Ai.forEach(t),An.forEach(t),hn=h(o),B=r(o,"DIV",{class:!0});var Bo=a(B);w(mo.$$.fragment,Bo),Za=h(Bo),fo=r(Bo,"P",{});var Ln=a(fo);Ka=i(Ln,`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),uo=r(Ln,"A",{href:!0,rel:!0});var Li=a(uo);es=i(Li,"torch.nn.Module"),Li.forEach(t),os=i(Ln,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ln.forEach(t),ts=h(Bo),D=r(Bo,"DIV",{class:!0});var Pe=a(D);w(go.$$.fragment,Pe),ns=h(Pe),ne=r(Pe,"P",{});var Wo=a(ne);rs=i(Wo,"The "),Lo=r(Wo,"A",{href:!0});var Oi=a(Lo);as=i(Oi,"CodeGenModel"),Oi.forEach(t),ss=i(Wo," forward method, overrides the "),Mt=r(Wo,"CODE",{});var Di=a(Mt);is=i(Di,"__call__"),Di.forEach(t),ls=i(Wo," special method."),Wo.forEach(t),ds=h(Pe),w(Ce.$$.fragment,Pe),cs=h(Pe),w(Te.$$.fragment,Pe),Pe.forEach(t),Bo.forEach(t),mn=h(o),re=r(o,"H2",{class:!0});var On=a(re);ze=r(On,"A",{id:!0,class:!0,href:!0});var Si=a(ze);Ft=r(Si,"SPAN",{});var Ni=a(Ft);w(_o.$$.fragment,Ni),Ni.forEach(t),Si.forEach(t),ps=h(On),qt=r(On,"SPAN",{});var Ii=a(qt);hs=i(Ii,"CodeGenForCausalLM"),Ii.forEach(t),On.forEach(t),fn=h(o),A=r(o,"DIV",{class:!0});var Me=a(A);w(vo.$$.fragment,Me),ms=h(Me),jt=r(Me,"P",{});var Bi=a(jt);fs=i(Bi,"The CodeGen Model transformer with a language modeling head on top."),Bi.forEach(t),us=h(Me),ko=r(Me,"P",{});var Dn=a(ko);gs=i(Dn,"This model is a PyTorch "),bo=r(Dn,"A",{href:!0,rel:!0});var Wi=a(bo);_s=i(Wi,"torch.nn.Module"),Wi.forEach(t),vs=i(Dn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Dn.forEach(t),ks=h(Me),S=r(Me,"DIV",{class:!0});var Fe=a(S);w(wo.$$.fragment,Fe),bs=h(Fe),ae=r(Fe,"P",{});var Ho=a(ae);ws=i(Ho,"The "),Oo=r(Ho,"A",{href:!0});var Hi=a(Oo);$s=i(Hi,"CodeGenForCausalLM"),Hi.forEach(t),ys=i(Ho," forward method, overrides the "),At=r(Ho,"CODE",{});var Ui=a(At);Cs=i(Ui,"__call__"),Ui.forEach(t),Ts=i(Ho," special method."),Ho.forEach(t),zs=h(Fe),w(Ee.$$.fragment,Fe),Es=h(Fe),w(Ge.$$.fragment,Fe),Fe.forEach(t),Me.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(il)),c(f,"id","codegen"),c(f,"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"),c(f,"href","#codegen"),c(_,"class","relative group"),c(N,"id","overview"),c(N,"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"),c(N,"href","#overview"),c(L,"class","relative group"),c(je,"href","https://arxiv.org/abs/2203.13474"),c(je,"rel","nofollow"),c(Ae,"href","https://pile.eleuther.ai/"),c(Ae,"rel","nofollow"),c(Oe,"href","https://github.com/salesforce/codegen"),c(Oe,"rel","nofollow"),c(De,"href","https://huggingface.co/rooa"),c(De,"rel","nofollow"),c(Se,"href","https://github.com/salesforce/codegen"),c(Se,"rel","nofollow"),c(de,"id","checkpoint-naming"),c(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"),c(de,"href","#checkpoint-naming"),c(J,"class","relative group"),c(Be,"href","https://huggingface.co/models?other=codegen"),c(Be,"rel","nofollow"),c(me,"id","how-to-use"),c(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"),c(me,"href","#how-to-use"),c(X,"class","relative group"),c(fe,"id","documentation-resources"),c(fe,"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"),c(fe,"href","#documentation-resources"),c(Z,"class","relative group"),c(xo,"href","../tasks/language_modeling"),c(ue,"id","transformers.CodeGenConfig"),c(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"),c(ue,"href","#transformers.CodeGenConfig"),c(K,"class","relative group"),c(Po,"href","/docs/transformers/v4.29.0/en/model_doc/codegen#transformers.CodeGenModel"),c(Xe,"href","https://huggingface.co/Salesforce/codegen-2B-mono"),c(Xe,"rel","nofollow"),c(Mo,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Fo,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_e,"id","transformers.CodeGenTokenizer"),c(_e,"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"),c(_e,"href","#transformers.CodeGenTokenizer"),c(ee,"class","relative group"),c(qo,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(be,"id","transformers.CodeGenTokenizerFast"),c(be,"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"),c(be,"href","#transformers.CodeGenTokenizerFast"),c(oe,"class","relative group"),c(Ao,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ye,"id","transformers.CodeGenModel"),c(ye,"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"),c(ye,"href","#transformers.CodeGenModel"),c(te,"class","relative group"),c(uo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(uo,"rel","nofollow"),c(Lo,"href","/docs/transformers/v4.29.0/en/model_doc/codegen#transformers.CodeGenModel"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ze,"id","transformers.CodeGenForCausalLM"),c(ze,"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"),c(ze,"href","#transformers.CodeGenForCausalLM"),c(re,"class","relative group"),c(bo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(bo,"rel","nofollow"),c(Oo,"href","/docs/transformers/v4.29.0/en/model_doc/codegen#transformers.CodeGenForCausalLM"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,m){e(document.head,d),g(o,k,m),g(o,_,m),e(_,f),e(f,v),$(l,v,null),e(_,u),e(_,x),e(x,Y),g(o,F,m),g(o,L,m),e(L,N),e(N,Vo),$(qe,Vo,null),e(L,Nn),e(L,Ro),e(Ro,In),g(o,Rt,m),g(o,ie,m),e(ie,Bn),e(ie,je),e(je,Wn),e(ie,Hn),g(o,Yt,m),g(o,le,m),e(le,Un),e(le,Ae),e(Ae,Vn),e(le,Rn),g(o,Jt,m),g(o,To,m),e(To,Yn),g(o,Qt,m),g(o,zo,m),e(zo,Le),e(Le,Jn),e(Le,Oe),e(Oe,Qn),e(Le,Xn),g(o,Xt,m),g(o,W,m),e(W,Zn),e(W,De),e(De,Kn),e(W,er),e(W,Se),e(Se,or),e(W,tr),g(o,Zt,m),g(o,J,m),e(J,de),e(de,Yo),$(Ne,Yo,null),e(J,nr),e(J,Jo),e(Jo,rr),g(o,Kt,m),g(o,H,m),e(H,Ie),e(Ie,ar),e(Ie,Be),e(Be,sr),e(Ie,ir),e(H,lr),e(H,ce),e(ce,dr),e(ce,Qo),e(Qo,cr),e(ce,pr),e(ce,We),e(We,q),e(q,Xo),e(Xo,hr),e(q,mr),e(q,Zo),e(Zo,fr),e(q,ur),e(q,Ko),e(Ko,gr),e(q,_r),e(q,et),e(et,vr),e(q,kr),e(q,ot),e(ot,br),e(We,wr),e(We,He),e(He,tt),e(tt,$r),e(He,yr),e(He,Q),e(Q,Eo),e(Eo,nt),e(nt,Cr),e(Eo,Tr),e(Q,zr),e(Q,pe),e(pe,rt),e(rt,Er),e(pe,Gr),e(pe,at),e(at,xr),e(pe,Pr),e(Q,Mr),e(Q,he),e(he,st),e(st,Fr),e(he,qr),e(he,it),e(it,jr),e(he,Ar),e(H,Lr),e(H,Ue),e(Ue,Or),e(Ue,lt),e(lt,Dr),e(Ue,Sr),g(o,en,m),g(o,X,m),e(X,me),e(me,dt),$(Ve,dt,null),e(X,Nr),e(X,ct),e(ct,Ir),g(o,on,m),$(Re,o,m),g(o,tn,m),g(o,Z,m),e(Z,fe),e(fe,pt),$(Ye,pt,null),e(Z,Br),e(Z,ht),e(ht,Wr),g(o,nn,m),g(o,Go,m),e(Go,mt),e(mt,xo),e(xo,Hr),g(o,rn,m),g(o,K,m),e(K,ue),e(ue,ft),$(Je,ft,null),e(K,Ur),e(K,ut),e(ut,Vr),g(o,an,m),g(o,I,m),$(Qe,I,null),e(I,Rr),e(I,j),e(j,Yr),e(j,Po),e(Po,Jr),e(j,Qr),e(j,Xe),e(Xe,Xr),e(j,Zr),e(j,Mo),e(Mo,Kr),e(j,ea),e(j,Fo),e(Fo,oa),e(j,ta),e(I,na),$(ge,I,null),g(o,sn,m),g(o,ee,m),e(ee,_e),e(_e,gt),$(Ze,gt,null),e(ee,ra),e(ee,_t),e(_t,aa),g(o,ln,m),g(o,z,m),$(Ke,z,null),e(z,sa),e(z,vt),e(vt,ia),e(z,la),e(z,kt),e(kt,da),e(z,ca),$(ve,z,null),e(z,pa),e(z,eo),e(eo,ha),e(eo,bt),e(bt,ma),e(eo,fa),e(z,ua),$(ke,z,null),e(z,ga),e(z,oo),e(oo,_a),e(oo,qo),e(qo,va),e(oo,ka),e(z,ba),e(z,jo),$(to,jo,null),g(o,dn,m),g(o,oe,m),e(oe,be),e(be,wt),$(no,wt,null),e(oe,wa),e(oe,$t),e($t,$a),g(o,cn,m),g(o,E,m),$(ro,E,null),e(E,ya),e(E,ao),e(ao,Ca),e(ao,yt),e(yt,Ta),e(ao,za),e(E,Ea),e(E,Ct),e(Ct,Ga),e(E,xa),$(we,E,null),e(E,Pa),e(E,so),e(so,Ma),e(so,Tt),e(Tt,Fa),e(so,qa),e(E,ja),$($e,E,null),e(E,Aa),e(E,io),e(io,La),e(io,Ao),e(Ao,Oa),e(io,Da),e(E,Sa),e(E,O),$(lo,O,null),e(O,Na),e(O,zt),e(zt,Ia),e(O,Ba),e(O,co),e(co,Wa),e(co,Et),e(Et,Ha),e(co,Ua),e(O,Va),e(O,po),e(po,Ra),e(po,Gt),e(Gt,Ya),e(po,Ja),g(o,pn,m),g(o,te,m),e(te,ye),e(ye,xt),$(ho,xt,null),e(te,Qa),e(te,Pt),e(Pt,Xa),g(o,hn,m),g(o,B,m),$(mo,B,null),e(B,Za),e(B,fo),e(fo,Ka),e(fo,uo),e(uo,es),e(fo,os),e(B,ts),e(B,D),$(go,D,null),e(D,ns),e(D,ne),e(ne,rs),e(ne,Lo),e(Lo,as),e(ne,ss),e(ne,Mt),e(Mt,is),e(ne,ls),e(D,ds),$(Ce,D,null),e(D,cs),$(Te,D,null),g(o,mn,m),g(o,re,m),e(re,ze),e(ze,Ft),$(_o,Ft,null),e(re,ps),e(re,qt),e(qt,hs),g(o,fn,m),g(o,A,m),$(vo,A,null),e(A,ms),e(A,jt),e(jt,fs),e(A,us),e(A,ko),e(ko,gs),e(ko,bo),e(bo,_s),e(ko,vs),e(A,ks),e(A,S),$(wo,S,null),e(S,bs),e(S,ae),e(ae,ws),e(ae,Oo),e(Oo,$s),e(ae,ys),e(ae,At),e(At,Cs),e(ae,Ts),e(S,zs),$(Ee,S,null),e(S,Es),$(Ge,S,null),un=!0},p(o,[m]){const $o={};m&2&&($o.$$scope={dirty:m,ctx:o}),ge.$set($o);const Lt={};m&2&&(Lt.$$scope={dirty:m,ctx:o}),ve.$set(Lt);const Ot={};m&2&&(Ot.$$scope={dirty:m,ctx:o}),ke.$set(Ot);const Dt={};m&2&&(Dt.$$scope={dirty:m,ctx:o}),we.$set(Dt);const yo={};m&2&&(yo.$$scope={dirty:m,ctx:o}),$e.$set(yo);const St={};m&2&&(St.$$scope={dirty:m,ctx:o}),Ce.$set(St);const Nt={};m&2&&(Nt.$$scope={dirty:m,ctx:o}),Te.$set(Nt);const It={};m&2&&(It.$$scope={dirty:m,ctx:o}),Ee.$set(It);const Co={};m&2&&(Co.$$scope={dirty:m,ctx:o}),Ge.$set(Co)},i(o){un||(y(l.$$.fragment,o),y(qe.$$.fragment,o),y(Ne.$$.fragment,o),y(Ve.$$.fragment,o),y(Re.$$.fragment,o),y(Ye.$$.fragment,o),y(Je.$$.fragment,o),y(Qe.$$.fragment,o),y(ge.$$.fragment,o),y(Ze.$$.fragment,o),y(Ke.$$.fragment,o),y(ve.$$.fragment,o),y(ke.$$.fragment,o),y(to.$$.fragment,o),y(no.$$.fragment,o),y(ro.$$.fragment,o),y(we.$$.fragment,o),y($e.$$.fragment,o),y(lo.$$.fragment,o),y(ho.$$.fragment,o),y(mo.$$.fragment,o),y(go.$$.fragment,o),y(Ce.$$.fragment,o),y(Te.$$.fragment,o),y(_o.$$.fragment,o),y(vo.$$.fragment,o),y(wo.$$.fragment,o),y(Ee.$$.fragment,o),y(Ge.$$.fragment,o),un=!0)},o(o){C(l.$$.fragment,o),C(qe.$$.fragment,o),C(Ne.$$.fragment,o),C(Ve.$$.fragment,o),C(Re.$$.fragment,o),C(Ye.$$.fragment,o),C(Je.$$.fragment,o),C(Qe.$$.fragment,o),C(ge.$$.fragment,o),C(Ze.$$.fragment,o),C(Ke.$$.fragment,o),C(ve.$$.fragment,o),C(ke.$$.fragment,o),C(to.$$.fragment,o),C(no.$$.fragment,o),C(ro.$$.fragment,o),C(we.$$.fragment,o),C($e.$$.fragment,o),C(lo.$$.fragment,o),C(ho.$$.fragment,o),C(mo.$$.fragment,o),C(go.$$.fragment,o),C(Ce.$$.fragment,o),C(Te.$$.fragment,o),C(_o.$$.fragment,o),C(vo.$$.fragment,o),C(wo.$$.fragment,o),C(Ee.$$.fragment,o),C(Ge.$$.fragment,o),un=!1},d(o){t(d),o&&t(k),o&&t(_),T(l),o&&t(F),o&&t(L),T(qe),o&&t(Rt),o&&t(ie),o&&t(Yt),o&&t(le),o&&t(Jt),o&&t(To),o&&t(Qt),o&&t(zo),o&&t(Xt),o&&t(W),o&&t(Zt),o&&t(J),T(Ne),o&&t(Kt),o&&t(H),o&&t(en),o&&t(X),T(Ve),o&&t(on),T(Re,o),o&&t(tn),o&&t(Z),T(Ye),o&&t(nn),o&&t(Go),o&&t(rn),o&&t(K),T(Je),o&&t(an),o&&t(I),T(Qe),T(ge),o&&t(sn),o&&t(ee),T(Ze),o&&t(ln),o&&t(z),T(Ke),T(ve),T(ke),T(to),o&&t(dn),o&&t(oe),T(no),o&&t(cn),o&&t(E),T(ro),T(we),T($e),T(lo),o&&t(pn),o&&t(te),T(ho),o&&t(hn),o&&t(B),T(mo),T(go),T(Ce),T(Te),o&&t(mn),o&&t(re),T(_o),o&&t(fn),o&&t(A),T(vo),T(wo),T(Ee),T(Ge)}}}const il={local:"codegen",sections:[{local:"overview",title:"Overview"},{local:"checkpoint-naming",title:"Checkpoint Naming"},{local:"how-to-use",title:"How to use"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.CodeGenConfig",title:"CodeGenConfig"},{local:"transformers.CodeGenTokenizer",title:"CodeGenTokenizer"},{local:"transformers.CodeGenTokenizerFast",title:"CodeGenTokenizerFast"},{local:"transformers.CodeGenModel",title:"CodeGenModel"},{local:"transformers.CodeGenForCausalLM",title:"CodeGenForCausalLM"}],title:"CodeGen"};function ll(G){return Qi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ul extends Vi{constructor(d){super();Ri(this,d,ll,sl,Yi,{})}}export{ul as default,il as metadata};
