import{S as zi,i as Gi,s as Ei,e as n,k as p,w as b,t as s,M as xi,c as a,d as t,m as h,a as r,x as w,h as i,b as c,G as e,g as _,y as $,q as y,o as C,B as T,v as Pi,L as St}from"../../chunks/vendor-hf-doc-builder.js";import{T as En}from"../../chunks/Tip-hf-doc-builder.js";import{D as ae}from"../../chunks/Docstring-hf-doc-builder.js";import{C as No}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ot}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Mi(E){let d,k,g,m,v;return m=new No({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:"),g=p(),b(m.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"Example:"),u.forEach(t),g=h(l),w(m.$$.fragment,l)},m(l,u){_(l,d,u),e(d,k),_(l,g,u),$(m,l,u),v=!0},p:St,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){C(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(g),T(m,l)}}}function Fi(E){let d,k,g,m,v;return m=new No({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="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CodeGenTokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = CodeGenTokenizer.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-350M-mono&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[15496, 995]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[18435, 995]`}}),{c(){d=n("p"),k=s("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),g=p(),b(m.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),g=h(l),w(m.$$.fragment,l)},m(l,u){_(l,d,u),e(d,k),_(l,g,u),$(m,l,u),v=!0},p:St,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){C(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(g),T(m,l)}}}function qi(E){let d,k,g,m,v;return{c(){d=n("p"),k=s("When used with "),g=n("code"),m=s("is_split_into_words=True"),v=s(", this tokenizer will add a space before each word (even the first one).")},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"When used with "),g=a(u,"CODE",{});var x=r(g);m=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){_(l,d,u),e(d,k),e(d,g),e(g,m),e(d,v)},d(l){l&&t(d)}}}function ji(E){let d,k,g,m,v;return m=new No({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="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CodeGenTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = CodeGenTokenizerFast.from_pretrained(<span class="hljs-string">&quot;Salesforce/codegen-350M-mono&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[15496, 995]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[18435, 995]`}}),{c(){d=n("p"),k=s("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),g=p(),b(m.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),u.forEach(t),g=h(l),w(m.$$.fragment,l)},m(l,u){_(l,d,u),e(d,k),_(l,g,u),$(m,l,u),v=!0},p:St,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){C(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(g),T(m,l)}}}function Ai(E){let d,k,g,m,v,l,u,x;return{c(){d=n("p"),k=s("When used with "),g=n("code"),m=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(R){d=a(R,"P",{});var F=r(d);k=i(F,"When used with "),g=a(F,"CODE",{});var L=r(g);m=i(L,"is_split_into_words=True"),L.forEach(t),v=i(F,", this tokenizer needs to be instantiated with "),l=a(F,"CODE",{});var N=r(l);u=i(N,"add_prefix_space=True"),N.forEach(t),x=i(F,"."),F.forEach(t)},m(R,F){_(R,d,F),e(d,k),e(d,g),e(g,m),e(d,v),e(d,l),e(l,u),e(d,x)},d(R){R&&t(d)}}}function Li(E){let d,k,g,m,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 "),g=n("code"),m=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=a(l,"P",{});var u=r(d);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var x=r(g);m=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){_(l,d,u),e(d,k),e(d,g),e(g,m),e(d,v)},d(l){l&&t(d)}}}function Oi(E){let d,k,g,m,v;return m=new No({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:"),g=p(),b(m.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"Example:"),u.forEach(t),g=h(l),w(m.$$.fragment,l)},m(l,u){_(l,d,u),e(d,k),_(l,g,u),$(m,l,u),v=!0},p:St,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){C(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(g),T(m,l)}}}function Si(E){let d,k,g,m,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 "),g=n("code"),m=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=a(l,"P",{});var u=r(d);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var x=r(g);m=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){_(l,d,u),e(d,k),e(d,g),e(g,m),e(d,v)},d(l){l&&t(d)}}}function Di(E){let d,k,g,m,v;return m=new No({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:"),g=p(),b(m.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);k=i(u,"Example:"),u.forEach(t),g=h(l),w(m.$$.fragment,l)},m(l,u){_(l,d,u),e(d,k),_(l,g,u),$(m,l,u),v=!0},p:St,i(l){v||(y(m.$$.fragment,l),v=!0)},o(l){C(m.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(g),T(m,l)}}}function Ni(E){let d,k,g,m,v,l,u,x,R,F,L,N,Io,Me,xn,Bo,Pn,Dt,se,Mn,Fe,Fn,qn,Nt,ie,jn,qe,An,Ln,It,$o,On,Bt,yo,je,Sn,Ae,Dn,Nn,Wt,W,In,Le,Bn,Wn,Oe,Hn,Un,Ht,Y,le,Wo,Se,Vn,Ho,Rn,Ut,H,De,Yn,Ne,Jn,Qn,Xn,de,Zn,Uo,Kn,ea,Ie,q,Vo,oa,ta,Ro,na,aa,Yo,ra,sa,Jo,ia,la,Qo,da,ca,Be,Xo,pa,ha,J,Co,Zo,ma,fa,ua,ce,Ko,ga,_a,et,va,ka,ba,pe,ot,wa,$a,tt,ya,Ca,Ta,We,za,nt,Ga,Ea,Vt,Q,he,at,He,xa,rt,Pa,Rt,Ue,Yt,X,me,st,Ve,Ma,it,Fa,Jt,I,Re,qa,j,ja,To,Aa,La,Ye,Oa,Sa,zo,Da,Na,Go,Ia,Ba,Wa,fe,Qt,Z,ue,lt,Je,Ha,dt,Ua,Xt,z,Qe,Va,ct,Ra,Ya,pt,Ja,Qa,ge,Xa,Xe,Za,ht,Ka,er,or,_e,tr,Ze,nr,Eo,ar,rr,sr,xo,Ke,Zt,K,ve,mt,eo,ir,ft,lr,Kt,G,oo,dr,to,cr,ut,pr,hr,mr,gt,fr,ur,ke,gr,no,_r,_t,vr,kr,br,be,wr,ao,$r,Po,yr,Cr,Tr,O,ro,zr,vt,Gr,Er,so,xr,kt,Pr,Mr,Fr,io,qr,bt,jr,Ar,en,ee,we,wt,lo,Lr,$t,Or,on,B,co,Sr,po,Dr,ho,Nr,Ir,Br,S,mo,Wr,oe,Hr,Mo,Ur,Vr,yt,Rr,Yr,Jr,$e,Qr,ye,tn,te,Ce,Ct,fo,Xr,Tt,Zr,nn,A,uo,Kr,zt,es,os,go,ts,_o,ns,as,rs,D,vo,ss,ne,is,Fo,ls,ds,Gt,cs,ps,hs,Te,ms,ze,an;return l=new re({}),Me=new re({}),Se=new re({}),He=new re({}),Ue=new No({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()`}}),Ve=new re({}),Re=new ae({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:"scale_attn_weights",val:" = True"},{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/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.scale_attn_weights",description:`<strong>scale_attn_weights</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Scale attention weights by dividing by sqrt(hidden_size).`,name:"scale_attn_weights"},{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/main/src/transformers/models/codegen/configuration_codegen.py#L44"}}),fe=new Ot({props:{anchor:"transformers.CodeGenConfig.example",$$slots:{default:[Mi]},$$scope:{ctx:E}}}),Je=new re({}),Qe=new ae({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/main/src/transformers/models/codegen/tokenization_codegen.py#L99"}}),ge=new Ot({props:{anchor:"transformers.CodeGenTokenizer.example",$$slots:{default:[Fi]},$$scope:{ctx:E}}}),_e=new En({props:{$$slots:{default:[qi]},$$scope:{ctx:E}}}),Ke=new ae({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#L283"}}),eo=new re({}),oo=new ae({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/main/src/transformers/models/codegen/tokenization_codegen_fast.py#L63"}}),ke=new Ot({props:{anchor:"transformers.CodeGenTokenizerFast.example",$$slots:{default:[ji]},$$scope:{ctx:E}}}),be=new En({props:{$$slots:{default:[Ai]},$$scope:{ctx:E}}}),ro=new ae({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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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#L184",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),lo=new re({}),co=new ae({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/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/main/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/main/src/transformers/models/codegen/modeling_codegen.py#L425"}}),mo=new ae({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/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/codegen/modeling_codegen.py#L448",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new En({props:{$$slots:{default:[Li]},$$scope:{ctx:E}}}),ye=new Ot({props:{anchor:"transformers.CodeGenModel.forward.example",$$slots:{default:[Oi]},$$scope:{ctx:E}}}),fo=new re({}),uo=new ae({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/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/main/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/main/src/transformers/models/codegen/modeling_codegen.py#L616"}}),vo=new ae({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/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/codegen/modeling_codegen.py#L661",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new En({props:{$$slots:{default:[Si]},$$scope:{ctx:E}}}),ze=new Ot({props:{anchor:"transformers.CodeGenForCausalLM.forward.example",$$slots:{default:[Di]},$$scope:{ctx:E}}}),{c(){d=n("meta"),k=p(),g=n("h1"),m=n("a"),v=n("span"),b(l.$$.fragment),u=p(),x=n("span"),R=s("CodeGen"),F=p(),L=n("h2"),N=n("a"),Io=n("span"),b(Me.$$.fragment),xn=p(),Bo=n("span"),Pn=s("Overview"),Dt=p(),se=n("p"),Mn=s("The CodeGen model was proposed in "),Fe=n("a"),Fn=s("A Conversational Paradigm for Program Synthesis"),qn=s(" by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong."),Nt=p(),ie=n("p"),jn=s("CodeGen is an autoregressive language model for program synthesis trained sequentially on "),qe=n("a"),An=s("The Pile"),Ln=s(", BigQuery, and BigPython."),It=p(),$o=n("p"),On=s("The abstract from the paper is the following:"),Bt=p(),yo=n("p"),je=n("em"),Sn=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: "),Ae=n("a"),Dn=s("this https URL"),Nn=s("."),Wt=p(),W=n("p"),In=s("This model was contributed by "),Le=n("a"),Bn=s("Hiroaki Hayashi"),Wn=s(`.
The original code can be found `),Oe=n("a"),Hn=s("here"),Un=s("."),Ht=p(),Y=n("h2"),le=n("a"),Wo=n("span"),b(Se.$$.fragment),Vn=p(),Ho=n("span"),Rn=s("Checkpoint Naming"),Ut=p(),H=n("ul"),De=n("li"),Yn=s("CodeGen model "),Ne=n("a"),Jn=s("checkpoints"),Qn=s(" are available on different pre-training data with variable sizes."),Xn=p(),de=n("li"),Zn=s("The format is: "),Uo=n("code"),Kn=s("Salesforce/codegen-{size}-{data}"),ea=s(", where"),Ie=n("ul"),q=n("li"),Vo=n("code"),oa=s("size"),ta=s(": "),Ro=n("code"),na=s("350M"),aa=s(", "),Yo=n("code"),ra=s("2B"),sa=s(", "),Jo=n("code"),ia=s("6B"),la=s(", "),Qo=n("code"),da=s("16B"),ca=p(),Be=n("li"),Xo=n("code"),pa=s("data"),ha=s(": "),J=n("ul"),Co=n("li"),Zo=n("code"),ma=s("nl"),fa=s(": Pre-trained on the Pile"),ua=p(),ce=n("li"),Ko=n("code"),ga=s("multi"),_a=s(": Initialized with "),et=n("code"),va=s("nl"),ka=s(", then further pre-trained on multiple programming languages data"),ba=p(),pe=n("li"),ot=n("code"),wa=s("mono"),$a=s(": Initialized with "),tt=n("code"),ya=s("multi"),Ca=s(", then further pre-trained on Python data"),Ta=p(),We=n("li"),za=s("For example, "),nt=n("code"),Ga=s("Salesforce/codegen-350M-mono"),Ea=s(" offers a 350 million-parameter checkpoint pre-trained sequentially on the Pile, multiple programming languages, and Python."),Vt=p(),Q=n("h2"),he=n("a"),at=n("span"),b(He.$$.fragment),xa=p(),rt=n("span"),Pa=s("How to use"),Rt=p(),b(Ue.$$.fragment),Yt=p(),X=n("h2"),me=n("a"),st=n("span"),b(Ve.$$.fragment),Ma=p(),it=n("span"),Fa=s("CodeGenConfig"),Jt=p(),I=n("div"),b(Re.$$.fragment),qa=p(),j=n("p"),ja=s("This is the configuration class to store the configuration of a "),To=n("a"),Aa=s("CodeGenModel"),La=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
`),Ye=n("a"),Oa=s("Salesforce/codegen-2B-mono"),Sa=s(` architecture. Configuration objects
inherit from `),zo=n("a"),Da=s("PretrainedConfig"),Na=s(` and can be used to control the model outputs. Read the documentation from
`),Go=n("a"),Ia=s("PretrainedConfig"),Ba=s(" for more information."),Wa=p(),b(fe.$$.fragment),Qt=p(),Z=n("h2"),ue=n("a"),lt=n("span"),b(Je.$$.fragment),Ha=p(),dt=n("span"),Ua=s("CodeGenTokenizer"),Xt=p(),z=n("div"),b(Qe.$$.fragment),Va=p(),ct=n("p"),Ra=s("Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),Ya=p(),pt=n("p"),Ja=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Qa=p(),b(ge.$$.fragment),Xa=p(),Xe=n("p"),Za=s("You can get around that behavior by passing "),ht=n("code"),Ka=s("add_prefix_space=True"),er=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.`),or=p(),b(_e.$$.fragment),tr=p(),Ze=n("p"),nr=s("This tokenizer inherits from "),Eo=n("a"),ar=s("PreTrainedTokenizer"),rr=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),sr=p(),xo=n("div"),b(Ke.$$.fragment),Zt=p(),K=n("h2"),ve=n("a"),mt=n("span"),b(eo.$$.fragment),ir=p(),ft=n("span"),lr=s("CodeGenTokenizerFast"),Kt=p(),G=n("div"),b(oo.$$.fragment),dr=p(),to=n("p"),cr=s("Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),ut=n("em"),pr=s("tokenizers"),hr=s(` library). Based on byte-level
Byte-Pair-Encoding.`),mr=p(),gt=n("p"),fr=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ur=p(),b(ke.$$.fragment),gr=p(),no=n("p"),_r=s("You can get around that behavior by passing "),_t=n("code"),vr=s("add_prefix_space=True"),kr=s(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),br=p(),b(be.$$.fragment),wr=p(),ao=n("p"),$r=s("This tokenizer inherits from "),Po=n("a"),yr=s("PreTrainedTokenizerFast"),Cr=s(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Tr=p(),O=n("div"),b(ro.$$.fragment),zr=p(),vt=n("p"),Gr=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.`),Er=p(),so=n("p"),xr=s("Similar to doing "),kt=n("code"),Pr=s("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Mr=s("."),Fr=p(),io=n("p"),qr=s("\u201D]`.\nkwargs (additional keyword arguments, "),bt=n("em"),jr=s("optional"),Ar=s(`):
Will be passed to the underlying model specific decode method.`),en=p(),ee=n("h2"),we=n("a"),wt=n("span"),b(lo.$$.fragment),Lr=p(),$t=n("span"),Or=s("CodeGenModel"),on=p(),B=n("div"),b(co.$$.fragment),Sr=p(),po=n("p"),Dr=s(`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=n("a"),Nr=s("torch.nn.Module"),Ir=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.`),Br=p(),S=n("div"),b(mo.$$.fragment),Wr=p(),oe=n("p"),Hr=s("The "),Mo=n("a"),Ur=s("CodeGenModel"),Vr=s(" forward method, overrides the "),yt=n("code"),Rr=s("__call__"),Yr=s(" special method."),Jr=p(),b($e.$$.fragment),Qr=p(),b(ye.$$.fragment),tn=p(),te=n("h2"),Ce=n("a"),Ct=n("span"),b(fo.$$.fragment),Xr=p(),Tt=n("span"),Zr=s("CodeGenForCausalLM"),nn=p(),A=n("div"),b(uo.$$.fragment),Kr=p(),zt=n("p"),es=s("The CodeGen Model transformer with a language modeling head on top."),os=p(),go=n("p"),ts=s("This model is a PyTorch "),_o=n("a"),ns=s("torch.nn.Module"),as=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.`),rs=p(),D=n("div"),b(vo.$$.fragment),ss=p(),ne=n("p"),is=s("The "),Fo=n("a"),ls=s("CodeGenForCausalLM"),ds=s(" forward method, overrides the "),Gt=n("code"),cs=s("__call__"),ps=s(" special method."),hs=p(),b(Te.$$.fragment),ms=p(),b(ze.$$.fragment),this.h()},l(o){const f=xi('[data-svelte="svelte-1phssyn"]',document.head);d=a(f,"META",{name:!0,content:!0}),f.forEach(t),k=h(o),g=a(o,"H1",{class:!0});var ko=r(g);m=a(ko,"A",{id:!0,class:!0,href:!0});var Et=r(m);v=a(Et,"SPAN",{});var xt=r(v);w(l.$$.fragment,xt),xt.forEach(t),Et.forEach(t),u=h(ko),x=a(ko,"SPAN",{});var Pt=r(x);R=i(Pt,"CodeGen"),Pt.forEach(t),ko.forEach(t),F=h(o),L=a(o,"H2",{class:!0});var bo=r(L);N=a(bo,"A",{id:!0,class:!0,href:!0});var Mt=r(N);Io=a(Mt,"SPAN",{});var Ft=r(Io);w(Me.$$.fragment,Ft),Ft.forEach(t),Mt.forEach(t),xn=h(bo),Bo=a(bo,"SPAN",{});var qt=r(Bo);Pn=i(qt,"Overview"),qt.forEach(t),bo.forEach(t),Dt=h(o),se=a(o,"P",{});var wo=r(se);Mn=i(wo,"The CodeGen model was proposed in "),Fe=a(wo,"A",{href:!0,rel:!0});var us=r(Fe);Fn=i(us,"A Conversational Paradigm for Program Synthesis"),us.forEach(t),qn=i(wo," by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong."),wo.forEach(t),Nt=h(o),ie=a(o,"P",{});var rn=r(ie);jn=i(rn,"CodeGen is an autoregressive language model for program synthesis trained sequentially on "),qe=a(rn,"A",{href:!0,rel:!0});var gs=r(qe);An=i(gs,"The Pile"),gs.forEach(t),Ln=i(rn,", BigQuery, and BigPython."),rn.forEach(t),It=h(o),$o=a(o,"P",{});var _s=r($o);On=i(_s,"The abstract from the paper is the following:"),_s.forEach(t),Bt=h(o),yo=a(o,"P",{});var vs=r(yo);je=a(vs,"EM",{});var sn=r(je);Sn=i(sn,"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: "),Ae=a(sn,"A",{href:!0,rel:!0});var ks=r(Ae);Dn=i(ks,"this https URL"),ks.forEach(t),Nn=i(sn,"."),sn.forEach(t),vs.forEach(t),Wt=h(o),W=a(o,"P",{});var qo=r(W);In=i(qo,"This model was contributed by "),Le=a(qo,"A",{href:!0,rel:!0});var bs=r(Le);Bn=i(bs,"Hiroaki Hayashi"),bs.forEach(t),Wn=i(qo,`.
The original code can be found `),Oe=a(qo,"A",{href:!0,rel:!0});var ws=r(Oe);Hn=i(ws,"here"),ws.forEach(t),Un=i(qo,"."),qo.forEach(t),Ht=h(o),Y=a(o,"H2",{class:!0});var ln=r(Y);le=a(ln,"A",{id:!0,class:!0,href:!0});var $s=r(le);Wo=a($s,"SPAN",{});var ys=r(Wo);w(Se.$$.fragment,ys),ys.forEach(t),$s.forEach(t),Vn=h(ln),Ho=a(ln,"SPAN",{});var Cs=r(Ho);Rn=i(Cs,"Checkpoint Naming"),Cs.forEach(t),ln.forEach(t),Ut=h(o),H=a(o,"UL",{});var jo=r(H);De=a(jo,"LI",{});var dn=r(De);Yn=i(dn,"CodeGen model "),Ne=a(dn,"A",{href:!0,rel:!0});var Ts=r(Ne);Jn=i(Ts,"checkpoints"),Ts.forEach(t),Qn=i(dn," are available on different pre-training data with variable sizes."),dn.forEach(t),Xn=h(jo),de=a(jo,"LI",{});var jt=r(de);Zn=i(jt,"The format is: "),Uo=a(jt,"CODE",{});var zs=r(Uo);Kn=i(zs,"Salesforce/codegen-{size}-{data}"),zs.forEach(t),ea=i(jt,", where"),Ie=a(jt,"UL",{});var cn=r(Ie);q=a(cn,"LI",{});var U=r(q);Vo=a(U,"CODE",{});var Gs=r(Vo);oa=i(Gs,"size"),Gs.forEach(t),ta=i(U,": "),Ro=a(U,"CODE",{});var Es=r(Ro);na=i(Es,"350M"),Es.forEach(t),aa=i(U,", "),Yo=a(U,"CODE",{});var xs=r(Yo);ra=i(xs,"2B"),xs.forEach(t),sa=i(U,", "),Jo=a(U,"CODE",{});var Ps=r(Jo);ia=i(Ps,"6B"),Ps.forEach(t),la=i(U,", "),Qo=a(U,"CODE",{});var Ms=r(Qo);da=i(Ms,"16B"),Ms.forEach(t),U.forEach(t),ca=h(cn),Be=a(cn,"LI",{});var pn=r(Be);Xo=a(pn,"CODE",{});var Fs=r(Xo);pa=i(Fs,"data"),Fs.forEach(t),ha=i(pn,": "),J=a(pn,"UL",{});var Ao=r(J);Co=a(Ao,"LI",{});var fs=r(Co);Zo=a(fs,"CODE",{});var qs=r(Zo);ma=i(qs,"nl"),qs.forEach(t),fa=i(fs,": Pre-trained on the Pile"),fs.forEach(t),ua=h(Ao),ce=a(Ao,"LI",{});var At=r(ce);Ko=a(At,"CODE",{});var js=r(Ko);ga=i(js,"multi"),js.forEach(t),_a=i(At,": Initialized with "),et=a(At,"CODE",{});var As=r(et);va=i(As,"nl"),As.forEach(t),ka=i(At,", then further pre-trained on multiple programming languages data"),At.forEach(t),ba=h(Ao),pe=a(Ao,"LI",{});var Lt=r(pe);ot=a(Lt,"CODE",{});var Ls=r(ot);wa=i(Ls,"mono"),Ls.forEach(t),$a=i(Lt,": Initialized with "),tt=a(Lt,"CODE",{});var Os=r(tt);ya=i(Os,"multi"),Os.forEach(t),Ca=i(Lt,", then further pre-trained on Python data"),Lt.forEach(t),Ao.forEach(t),pn.forEach(t),cn.forEach(t),jt.forEach(t),Ta=h(jo),We=a(jo,"LI",{});var hn=r(We);za=i(hn,"For example, "),nt=a(hn,"CODE",{});var Ss=r(nt);Ga=i(Ss,"Salesforce/codegen-350M-mono"),Ss.forEach(t),Ea=i(hn," offers a 350 million-parameter checkpoint pre-trained sequentially on the Pile, multiple programming languages, and Python."),hn.forEach(t),jo.forEach(t),Vt=h(o),Q=a(o,"H2",{class:!0});var mn=r(Q);he=a(mn,"A",{id:!0,class:!0,href:!0});var Ds=r(he);at=a(Ds,"SPAN",{});var Ns=r(at);w(He.$$.fragment,Ns),Ns.forEach(t),Ds.forEach(t),xa=h(mn),rt=a(mn,"SPAN",{});var Is=r(rt);Pa=i(Is,"How to use"),Is.forEach(t),mn.forEach(t),Rt=h(o),w(Ue.$$.fragment,o),Yt=h(o),X=a(o,"H2",{class:!0});var fn=r(X);me=a(fn,"A",{id:!0,class:!0,href:!0});var Bs=r(me);st=a(Bs,"SPAN",{});var Ws=r(st);w(Ve.$$.fragment,Ws),Ws.forEach(t),Bs.forEach(t),Ma=h(fn),it=a(fn,"SPAN",{});var Hs=r(it);Fa=i(Hs,"CodeGenConfig"),Hs.forEach(t),fn.forEach(t),Jt=h(o),I=a(o,"DIV",{class:!0});var Lo=r(I);w(Re.$$.fragment,Lo),qa=h(Lo),j=a(Lo,"P",{});var V=r(j);ja=i(V,"This is the configuration class to store the configuration of a "),To=a(V,"A",{href:!0});var Us=r(To);Aa=i(Us,"CodeGenModel"),Us.forEach(t),La=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
`),Ye=a(V,"A",{href:!0,rel:!0});var Vs=r(Ye);Oa=i(Vs,"Salesforce/codegen-2B-mono"),Vs.forEach(t),Sa=i(V,` architecture. Configuration objects
inherit from `),zo=a(V,"A",{href:!0});var Rs=r(zo);Da=i(Rs,"PretrainedConfig"),Rs.forEach(t),Na=i(V,` and can be used to control the model outputs. Read the documentation from
`),Go=a(V,"A",{href:!0});var Ys=r(Go);Ia=i(Ys,"PretrainedConfig"),Ys.forEach(t),Ba=i(V," for more information."),V.forEach(t),Wa=h(Lo),w(fe.$$.fragment,Lo),Lo.forEach(t),Qt=h(o),Z=a(o,"H2",{class:!0});var un=r(Z);ue=a(un,"A",{id:!0,class:!0,href:!0});var Js=r(ue);lt=a(Js,"SPAN",{});var Qs=r(lt);w(Je.$$.fragment,Qs),Qs.forEach(t),Js.forEach(t),Ha=h(un),dt=a(un,"SPAN",{});var Xs=r(dt);Ua=i(Xs,"CodeGenTokenizer"),Xs.forEach(t),un.forEach(t),Xt=h(o),z=a(o,"DIV",{class:!0});var P=r(z);w(Qe.$$.fragment,P),Va=h(P),ct=a(P,"P",{});var Zs=r(ct);Ra=i(Zs,"Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),Zs.forEach(t),Ya=h(P),pt=a(P,"P",{});var Ks=r(pt);Ja=i(Ks,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Ks.forEach(t),Qa=h(P),w(ge.$$.fragment,P),Xa=h(P),Xe=a(P,"P",{});var gn=r(Xe);Za=i(gn,"You can get around that behavior by passing "),ht=a(gn,"CODE",{});var ei=r(ht);Ka=i(ei,"add_prefix_space=True"),ei.forEach(t),er=i(gn,` 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.`),gn.forEach(t),or=h(P),w(_e.$$.fragment,P),tr=h(P),Ze=a(P,"P",{});var _n=r(Ze);nr=i(_n,"This tokenizer inherits from "),Eo=a(_n,"A",{href:!0});var oi=r(Eo);ar=i(oi,"PreTrainedTokenizer"),oi.forEach(t),rr=i(_n,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_n.forEach(t),sr=h(P),xo=a(P,"DIV",{class:!0});var ti=r(xo);w(Ke.$$.fragment,ti),ti.forEach(t),P.forEach(t),Zt=h(o),K=a(o,"H2",{class:!0});var vn=r(K);ve=a(vn,"A",{id:!0,class:!0,href:!0});var ni=r(ve);mt=a(ni,"SPAN",{});var ai=r(mt);w(eo.$$.fragment,ai),ai.forEach(t),ni.forEach(t),ir=h(vn),ft=a(vn,"SPAN",{});var ri=r(ft);lr=i(ri,"CodeGenTokenizerFast"),ri.forEach(t),vn.forEach(t),Kt=h(o),G=a(o,"DIV",{class:!0});var M=r(G);w(oo.$$.fragment,M),dr=h(M),to=a(M,"P",{});var kn=r(to);cr=i(kn,"Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),ut=a(kn,"EM",{});var si=r(ut);pr=i(si,"tokenizers"),si.forEach(t),hr=i(kn,` library). Based on byte-level
Byte-Pair-Encoding.`),kn.forEach(t),mr=h(M),gt=a(M,"P",{});var ii=r(gt);fr=i(ii,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ii.forEach(t),ur=h(M),w(ke.$$.fragment,M),gr=h(M),no=a(M,"P",{});var bn=r(no);_r=i(bn,"You can get around that behavior by passing "),_t=a(bn,"CODE",{});var li=r(_t);vr=i(li,"add_prefix_space=True"),li.forEach(t),kr=i(bn,` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),bn.forEach(t),br=h(M),w(be.$$.fragment,M),wr=h(M),ao=a(M,"P",{});var wn=r(ao);$r=i(wn,"This tokenizer inherits from "),Po=a(wn,"A",{href:!0});var di=r(Po);yr=i(di,"PreTrainedTokenizerFast"),di.forEach(t),Cr=i(wn,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),wn.forEach(t),Tr=h(M),O=a(M,"DIV",{class:!0});var Ge=r(O);w(ro.$$.fragment,Ge),zr=h(Ge),vt=a(Ge,"P",{});var ci=r(vt);Gr=i(ci,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),ci.forEach(t),Er=h(Ge),so=a(Ge,"P",{});var $n=r(so);xr=i($n,"Similar to doing "),kt=a($n,"CODE",{});var pi=r(kt);Pr=i(pi,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),pi.forEach(t),Mr=i($n,"."),$n.forEach(t),Fr=h(Ge),io=a(Ge,"P",{});var yn=r(io);qr=i(yn,"\u201D]`.\nkwargs (additional keyword arguments, "),bt=a(yn,"EM",{});var hi=r(bt);jr=i(hi,"optional"),hi.forEach(t),Ar=i(yn,`):
Will be passed to the underlying model specific decode method.`),yn.forEach(t),Ge.forEach(t),M.forEach(t),en=h(o),ee=a(o,"H2",{class:!0});var Cn=r(ee);we=a(Cn,"A",{id:!0,class:!0,href:!0});var mi=r(we);wt=a(mi,"SPAN",{});var fi=r(wt);w(lo.$$.fragment,fi),fi.forEach(t),mi.forEach(t),Lr=h(Cn),$t=a(Cn,"SPAN",{});var ui=r($t);Or=i(ui,"CodeGenModel"),ui.forEach(t),Cn.forEach(t),on=h(o),B=a(o,"DIV",{class:!0});var Oo=r(B);w(co.$$.fragment,Oo),Sr=h(Oo),po=a(Oo,"P",{});var Tn=r(po);Dr=i(Tn,`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=a(Tn,"A",{href:!0,rel:!0});var gi=r(ho);Nr=i(gi,"torch.nn.Module"),gi.forEach(t),Ir=i(Tn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Tn.forEach(t),Br=h(Oo),S=a(Oo,"DIV",{class:!0});var Ee=r(S);w(mo.$$.fragment,Ee),Wr=h(Ee),oe=a(Ee,"P",{});var So=r(oe);Hr=i(So,"The "),Mo=a(So,"A",{href:!0});var _i=r(Mo);Ur=i(_i,"CodeGenModel"),_i.forEach(t),Vr=i(So," forward method, overrides the "),yt=a(So,"CODE",{});var vi=r(yt);Rr=i(vi,"__call__"),vi.forEach(t),Yr=i(So," special method."),So.forEach(t),Jr=h(Ee),w($e.$$.fragment,Ee),Qr=h(Ee),w(ye.$$.fragment,Ee),Ee.forEach(t),Oo.forEach(t),tn=h(o),te=a(o,"H2",{class:!0});var zn=r(te);Ce=a(zn,"A",{id:!0,class:!0,href:!0});var ki=r(Ce);Ct=a(ki,"SPAN",{});var bi=r(Ct);w(fo.$$.fragment,bi),bi.forEach(t),ki.forEach(t),Xr=h(zn),Tt=a(zn,"SPAN",{});var wi=r(Tt);Zr=i(wi,"CodeGenForCausalLM"),wi.forEach(t),zn.forEach(t),nn=h(o),A=a(o,"DIV",{class:!0});var xe=r(A);w(uo.$$.fragment,xe),Kr=h(xe),zt=a(xe,"P",{});var $i=r(zt);es=i($i,"The CodeGen Model transformer with a language modeling head on top."),$i.forEach(t),os=h(xe),go=a(xe,"P",{});var Gn=r(go);ts=i(Gn,"This model is a PyTorch "),_o=a(Gn,"A",{href:!0,rel:!0});var yi=r(_o);ns=i(yi,"torch.nn.Module"),yi.forEach(t),as=i(Gn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gn.forEach(t),rs=h(xe),D=a(xe,"DIV",{class:!0});var Pe=r(D);w(vo.$$.fragment,Pe),ss=h(Pe),ne=a(Pe,"P",{});var Do=r(ne);is=i(Do,"The "),Fo=a(Do,"A",{href:!0});var Ci=r(Fo);ls=i(Ci,"CodeGenForCausalLM"),Ci.forEach(t),ds=i(Do," forward method, overrides the "),Gt=a(Do,"CODE",{});var Ti=r(Gt);cs=i(Ti,"__call__"),Ti.forEach(t),ps=i(Do," special method."),Do.forEach(t),hs=h(Pe),w(Te.$$.fragment,Pe),ms=h(Pe),w(ze.$$.fragment,Pe),Pe.forEach(t),xe.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Ii)),c(m,"id","codegen"),c(m,"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(m,"href","#codegen"),c(g,"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(Fe,"href","https://arxiv.org/abs/2203.13474"),c(Fe,"rel","nofollow"),c(qe,"href","https://pile.eleuther.ai/"),c(qe,"rel","nofollow"),c(Ae,"href","https://github.com/salesforce/codegen"),c(Ae,"rel","nofollow"),c(Le,"href","https://huggingface.co/rooa"),c(Le,"rel","nofollow"),c(Oe,"href","https://github.com/salesforce/codegen"),c(Oe,"rel","nofollow"),c(le,"id","checkpoint-naming"),c(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(le,"href","#checkpoint-naming"),c(Y,"class","relative group"),c(Ne,"href","https://huggingface.co/models?other=codegen"),c(Ne,"rel","nofollow"),c(he,"id","how-to-use"),c(he,"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(he,"href","#how-to-use"),c(Q,"class","relative group"),c(me,"id","transformers.CodeGenConfig"),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","#transformers.CodeGenConfig"),c(X,"class","relative group"),c(To,"href","/docs/transformers/main/en/model_doc/codegen#transformers.CodeGenModel"),c(Ye,"href","https://huggingface.co/Salesforce/codegen-2B-mono"),c(Ye,"rel","nofollow"),c(zo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(Go,"href","/docs/transformers/main/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(ue,"id","transformers.CodeGenTokenizer"),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.CodeGenTokenizer"),c(Z,"class","relative group"),c(Eo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(xo,"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(ve,"id","transformers.CodeGenTokenizerFast"),c(ve,"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(ve,"href","#transformers.CodeGenTokenizerFast"),c(K,"class","relative group"),c(Po,"href","/docs/transformers/main/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(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(we,"id","transformers.CodeGenModel"),c(we,"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(we,"href","#transformers.CodeGenModel"),c(ee,"class","relative group"),c(ho,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ho,"rel","nofollow"),c(Mo,"href","/docs/transformers/main/en/model_doc/codegen#transformers.CodeGenModel"),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(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(Ce,"id","transformers.CodeGenForCausalLM"),c(Ce,"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(Ce,"href","#transformers.CodeGenForCausalLM"),c(te,"class","relative group"),c(_o,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(_o,"rel","nofollow"),c(Fo,"href","/docs/transformers/main/en/model_doc/codegen#transformers.CodeGenForCausalLM"),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(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,f){e(document.head,d),_(o,k,f),_(o,g,f),e(g,m),e(m,v),$(l,v,null),e(g,u),e(g,x),e(x,R),_(o,F,f),_(o,L,f),e(L,N),e(N,Io),$(Me,Io,null),e(L,xn),e(L,Bo),e(Bo,Pn),_(o,Dt,f),_(o,se,f),e(se,Mn),e(se,Fe),e(Fe,Fn),e(se,qn),_(o,Nt,f),_(o,ie,f),e(ie,jn),e(ie,qe),e(qe,An),e(ie,Ln),_(o,It,f),_(o,$o,f),e($o,On),_(o,Bt,f),_(o,yo,f),e(yo,je),e(je,Sn),e(je,Ae),e(Ae,Dn),e(je,Nn),_(o,Wt,f),_(o,W,f),e(W,In),e(W,Le),e(Le,Bn),e(W,Wn),e(W,Oe),e(Oe,Hn),e(W,Un),_(o,Ht,f),_(o,Y,f),e(Y,le),e(le,Wo),$(Se,Wo,null),e(Y,Vn),e(Y,Ho),e(Ho,Rn),_(o,Ut,f),_(o,H,f),e(H,De),e(De,Yn),e(De,Ne),e(Ne,Jn),e(De,Qn),e(H,Xn),e(H,de),e(de,Zn),e(de,Uo),e(Uo,Kn),e(de,ea),e(de,Ie),e(Ie,q),e(q,Vo),e(Vo,oa),e(q,ta),e(q,Ro),e(Ro,na),e(q,aa),e(q,Yo),e(Yo,ra),e(q,sa),e(q,Jo),e(Jo,ia),e(q,la),e(q,Qo),e(Qo,da),e(Ie,ca),e(Ie,Be),e(Be,Xo),e(Xo,pa),e(Be,ha),e(Be,J),e(J,Co),e(Co,Zo),e(Zo,ma),e(Co,fa),e(J,ua),e(J,ce),e(ce,Ko),e(Ko,ga),e(ce,_a),e(ce,et),e(et,va),e(ce,ka),e(J,ba),e(J,pe),e(pe,ot),e(ot,wa),e(pe,$a),e(pe,tt),e(tt,ya),e(pe,Ca),e(H,Ta),e(H,We),e(We,za),e(We,nt),e(nt,Ga),e(We,Ea),_(o,Vt,f),_(o,Q,f),e(Q,he),e(he,at),$(He,at,null),e(Q,xa),e(Q,rt),e(rt,Pa),_(o,Rt,f),$(Ue,o,f),_(o,Yt,f),_(o,X,f),e(X,me),e(me,st),$(Ve,st,null),e(X,Ma),e(X,it),e(it,Fa),_(o,Jt,f),_(o,I,f),$(Re,I,null),e(I,qa),e(I,j),e(j,ja),e(j,To),e(To,Aa),e(j,La),e(j,Ye),e(Ye,Oa),e(j,Sa),e(j,zo),e(zo,Da),e(j,Na),e(j,Go),e(Go,Ia),e(j,Ba),e(I,Wa),$(fe,I,null),_(o,Qt,f),_(o,Z,f),e(Z,ue),e(ue,lt),$(Je,lt,null),e(Z,Ha),e(Z,dt),e(dt,Ua),_(o,Xt,f),_(o,z,f),$(Qe,z,null),e(z,Va),e(z,ct),e(ct,Ra),e(z,Ya),e(z,pt),e(pt,Ja),e(z,Qa),$(ge,z,null),e(z,Xa),e(z,Xe),e(Xe,Za),e(Xe,ht),e(ht,Ka),e(Xe,er),e(z,or),$(_e,z,null),e(z,tr),e(z,Ze),e(Ze,nr),e(Ze,Eo),e(Eo,ar),e(Ze,rr),e(z,sr),e(z,xo),$(Ke,xo,null),_(o,Zt,f),_(o,K,f),e(K,ve),e(ve,mt),$(eo,mt,null),e(K,ir),e(K,ft),e(ft,lr),_(o,Kt,f),_(o,G,f),$(oo,G,null),e(G,dr),e(G,to),e(to,cr),e(to,ut),e(ut,pr),e(to,hr),e(G,mr),e(G,gt),e(gt,fr),e(G,ur),$(ke,G,null),e(G,gr),e(G,no),e(no,_r),e(no,_t),e(_t,vr),e(no,kr),e(G,br),$(be,G,null),e(G,wr),e(G,ao),e(ao,$r),e(ao,Po),e(Po,yr),e(ao,Cr),e(G,Tr),e(G,O),$(ro,O,null),e(O,zr),e(O,vt),e(vt,Gr),e(O,Er),e(O,so),e(so,xr),e(so,kt),e(kt,Pr),e(so,Mr),e(O,Fr),e(O,io),e(io,qr),e(io,bt),e(bt,jr),e(io,Ar),_(o,en,f),_(o,ee,f),e(ee,we),e(we,wt),$(lo,wt,null),e(ee,Lr),e(ee,$t),e($t,Or),_(o,on,f),_(o,B,f),$(co,B,null),e(B,Sr),e(B,po),e(po,Dr),e(po,ho),e(ho,Nr),e(po,Ir),e(B,Br),e(B,S),$(mo,S,null),e(S,Wr),e(S,oe),e(oe,Hr),e(oe,Mo),e(Mo,Ur),e(oe,Vr),e(oe,yt),e(yt,Rr),e(oe,Yr),e(S,Jr),$($e,S,null),e(S,Qr),$(ye,S,null),_(o,tn,f),_(o,te,f),e(te,Ce),e(Ce,Ct),$(fo,Ct,null),e(te,Xr),e(te,Tt),e(Tt,Zr),_(o,nn,f),_(o,A,f),$(uo,A,null),e(A,Kr),e(A,zt),e(zt,es),e(A,os),e(A,go),e(go,ts),e(go,_o),e(_o,ns),e(go,as),e(A,rs),e(A,D),$(vo,D,null),e(D,ss),e(D,ne),e(ne,is),e(ne,Fo),e(Fo,ls),e(ne,ds),e(ne,Gt),e(Gt,cs),e(ne,ps),e(D,hs),$(Te,D,null),e(D,ms),$(ze,D,null),an=!0},p(o,[f]){const ko={};f&2&&(ko.$$scope={dirty:f,ctx:o}),fe.$set(ko);const Et={};f&2&&(Et.$$scope={dirty:f,ctx:o}),ge.$set(Et);const xt={};f&2&&(xt.$$scope={dirty:f,ctx:o}),_e.$set(xt);const Pt={};f&2&&(Pt.$$scope={dirty:f,ctx:o}),ke.$set(Pt);const bo={};f&2&&(bo.$$scope={dirty:f,ctx:o}),be.$set(bo);const Mt={};f&2&&(Mt.$$scope={dirty:f,ctx:o}),$e.$set(Mt);const Ft={};f&2&&(Ft.$$scope={dirty:f,ctx:o}),ye.$set(Ft);const qt={};f&2&&(qt.$$scope={dirty:f,ctx:o}),Te.$set(qt);const wo={};f&2&&(wo.$$scope={dirty:f,ctx:o}),ze.$set(wo)},i(o){an||(y(l.$$.fragment,o),y(Me.$$.fragment,o),y(Se.$$.fragment,o),y(He.$$.fragment,o),y(Ue.$$.fragment,o),y(Ve.$$.fragment,o),y(Re.$$.fragment,o),y(fe.$$.fragment,o),y(Je.$$.fragment,o),y(Qe.$$.fragment,o),y(ge.$$.fragment,o),y(_e.$$.fragment,o),y(Ke.$$.fragment,o),y(eo.$$.fragment,o),y(oo.$$.fragment,o),y(ke.$$.fragment,o),y(be.$$.fragment,o),y(ro.$$.fragment,o),y(lo.$$.fragment,o),y(co.$$.fragment,o),y(mo.$$.fragment,o),y($e.$$.fragment,o),y(ye.$$.fragment,o),y(fo.$$.fragment,o),y(uo.$$.fragment,o),y(vo.$$.fragment,o),y(Te.$$.fragment,o),y(ze.$$.fragment,o),an=!0)},o(o){C(l.$$.fragment,o),C(Me.$$.fragment,o),C(Se.$$.fragment,o),C(He.$$.fragment,o),C(Ue.$$.fragment,o),C(Ve.$$.fragment,o),C(Re.$$.fragment,o),C(fe.$$.fragment,o),C(Je.$$.fragment,o),C(Qe.$$.fragment,o),C(ge.$$.fragment,o),C(_e.$$.fragment,o),C(Ke.$$.fragment,o),C(eo.$$.fragment,o),C(oo.$$.fragment,o),C(ke.$$.fragment,o),C(be.$$.fragment,o),C(ro.$$.fragment,o),C(lo.$$.fragment,o),C(co.$$.fragment,o),C(mo.$$.fragment,o),C($e.$$.fragment,o),C(ye.$$.fragment,o),C(fo.$$.fragment,o),C(uo.$$.fragment,o),C(vo.$$.fragment,o),C(Te.$$.fragment,o),C(ze.$$.fragment,o),an=!1},d(o){t(d),o&&t(k),o&&t(g),T(l),o&&t(F),o&&t(L),T(Me),o&&t(Dt),o&&t(se),o&&t(Nt),o&&t(ie),o&&t(It),o&&t($o),o&&t(Bt),o&&t(yo),o&&t(Wt),o&&t(W),o&&t(Ht),o&&t(Y),T(Se),o&&t(Ut),o&&t(H),o&&t(Vt),o&&t(Q),T(He),o&&t(Rt),T(Ue,o),o&&t(Yt),o&&t(X),T(Ve),o&&t(Jt),o&&t(I),T(Re),T(fe),o&&t(Qt),o&&t(Z),T(Je),o&&t(Xt),o&&t(z),T(Qe),T(ge),T(_e),T(Ke),o&&t(Zt),o&&t(K),T(eo),o&&t(Kt),o&&t(G),T(oo),T(ke),T(be),T(ro),o&&t(en),o&&t(ee),T(lo),o&&t(on),o&&t(B),T(co),T(mo),T($e),T(ye),o&&t(tn),o&&t(te),T(fo),o&&t(nn),o&&t(A),T(uo),T(vo),T(Te),T(ze)}}}const Ii={local:"codegen",sections:[{local:"overview",title:"Overview"},{local:"checkpoint-naming",title:"Checkpoint Naming"},{local:"how-to-use",title:"How to use"},{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 Bi(E){return Pi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ji extends zi{constructor(d){super();Gi(this,d,Bi,Ni,Ei,{})}}export{Ji as default,Ii as metadata};
