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 r,d as t,m as h,a,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 re}from"../../chunks/Docstring-hf-doc-builder.js";import{C as No}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ae}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=r(l,"P",{});var u=a(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=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),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=r(l,"P",{});var u=a(d);k=i(u,"When used with "),g=r(u,"CODE",{});var x=a(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=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),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 Li(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=r(R,"P",{});var F=a(d);k=i(F,"When used with "),g=r(F,"CODE",{});var A=a(g);m=i(A,"is_split_into_words=True"),A.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(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 Ai(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=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 "),g=r(u,"CODE",{});var x=a(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 GPT2Tokenizer, CodeGenModel
import torch

tokenizer = GPT2Tokenizer.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> GPT2Tokenizer, 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 = GPT2Tokenizer.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=r(l,"P",{});var u=a(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=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 "),g=r(u,"CODE",{});var x=a(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 GPT2Tokenizer, CodeGenForCausalLM

tokenizer = GPT2Tokenizer.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> GPT2Tokenizer, CodeGenForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = GPT2Tokenizer.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=r(l,"P",{});var u=a(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,A,N,Io,Me,xn,Bo,Pn,Dt,se,Mn,Fe,Fn,qn,Nt,ie,jn,qe,Ln,An,It,$o,On,Bt,yo,je,Sn,Le,Dn,Nn,Wt,W,In,Ae,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,er,Ie,q,Vo,or,tr,Ro,nr,rr,Yo,ar,sr,Jo,ir,lr,Qo,dr,cr,Be,Xo,pr,hr,J,Co,Zo,mr,fr,ur,ce,Ko,gr,_r,et,vr,kr,br,pe,ot,wr,$r,tt,yr,Cr,Tr,We,zr,nt,Gr,Er,Vt,Q,he,rt,He,xr,at,Pr,Rt,Ue,Yt,X,me,st,Ve,Mr,it,Fr,Jt,I,Re,qr,j,jr,To,Lr,Ar,Ye,Or,Sr,zo,Dr,Nr,Go,Ir,Br,Wr,fe,Qt,Z,ue,lt,Je,Hr,dt,Ur,Xt,z,Qe,Vr,ct,Rr,Yr,pt,Jr,Qr,ge,Xr,Xe,Zr,ht,Kr,ea,oa,_e,ta,Ze,na,Eo,ra,aa,sa,xo,Ke,Zt,K,ve,mt,eo,ia,ft,la,Kt,G,oo,da,to,ca,ut,pa,ha,ma,gt,fa,ua,ke,ga,no,_a,_t,va,ka,ba,be,wa,ro,$a,Po,ya,Ca,Ta,O,ao,za,vt,Ga,Ea,so,xa,kt,Pa,Ma,Fa,io,qa,bt,ja,La,en,ee,we,wt,lo,Aa,$t,Oa,on,B,co,Sa,po,Da,ho,Na,Ia,Ba,S,mo,Wa,oe,Ha,Mo,Ua,Va,yt,Ra,Ya,Ja,$e,Qa,ye,tn,te,Ce,Ct,fo,Xa,Tt,Za,nn,L,uo,Ka,zt,es,os,go,ts,_o,ns,rs,as,D,vo,ss,ne,is,Fo,ls,ds,Gt,cs,ps,hs,Te,ms,ze,rn;return l=new ae({}),Me=new ae({}),Se=new ae({}),He=new ae({}),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 ae({}),Re=new re({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/v4.25.1/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/v4.25.1/src/transformers/models/codegen/configuration_codegen.py#L44"}}),fe=new Ot({props:{anchor:"transformers.CodeGenConfig.example",$$slots:{default:[Mi]},$$scope:{ctx:E}}}),Je=new ae({}),Qe=new re({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.25.1/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 re({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.25.1/src/transformers/models/codegen/tokenization_codegen.py#L283"}}),eo=new ae({}),oo=new re({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.25.1/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:[Li]},$$scope:{ctx:E}}}),ao=new re({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/v4.25.1/src/transformers/models/codegen/tokenization_codegen_fast.py#L184",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),lo=new ae({}),co=new re({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.25.1/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.25.1/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.25.1/src/transformers/models/codegen/modeling_codegen.py#L426"}}),mo=new re({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 <a href="/docs/transformers/v4.25.1/en/model_doc/gpt2#transformers.GPT2Tokenizer">GPT2Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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.25.1/src/transformers/models/codegen/modeling_codegen.py#L449",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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.25.1/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.25.1/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:[Ai]},$$scope:{ctx:E}}}),ye=new Ot({props:{anchor:"transformers.CodeGenModel.forward.example",$$slots:{default:[Oi]},$$scope:{ctx:E}}}),fo=new ae({}),uo=new re({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.25.1/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.25.1/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.25.1/src/transformers/models/codegen/modeling_codegen.py#L618"}}),vo=new re({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 <a href="/docs/transformers/v4.25.1/en/model_doc/gpt2#transformers.GPT2Tokenizer">GPT2Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/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/v4.25.1/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.25.1/src/transformers/models/codegen/modeling_codegen.py#L663",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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.25.1/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.25.1/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(),A=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"),Ln=s("The Pile"),An=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: "),Le=n("a"),Dn=s("this https URL"),Nn=s("."),Wt=p(),W=n("p"),In=s("This model was contributed by "),Ae=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}"),er=s(", where"),Ie=n("ul"),q=n("li"),Vo=n("code"),or=s("size"),tr=s(": "),Ro=n("code"),nr=s("350M"),rr=s(", "),Yo=n("code"),ar=s("2B"),sr=s(", "),Jo=n("code"),ir=s("6B"),lr=s(", "),Qo=n("code"),dr=s("16B"),cr=p(),Be=n("li"),Xo=n("code"),pr=s("data"),hr=s(": "),J=n("ul"),Co=n("li"),Zo=n("code"),mr=s("nl"),fr=s(": Pre-trained on the Pile"),ur=p(),ce=n("li"),Ko=n("code"),gr=s("multi"),_r=s(": Initialized with "),et=n("code"),vr=s("nl"),kr=s(", then further pre-trained on multiple programming languages data"),br=p(),pe=n("li"),ot=n("code"),wr=s("mono"),$r=s(": Initialized with "),tt=n("code"),yr=s("multi"),Cr=s(", then further pre-trained on Python data"),Tr=p(),We=n("li"),zr=s("For example, "),nt=n("code"),Gr=s("Salesforce/codegen-350M-mono"),Er=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"),rt=n("span"),b(He.$$.fragment),xr=p(),at=n("span"),Pr=s("How to use"),Rt=p(),b(Ue.$$.fragment),Yt=p(),X=n("h2"),me=n("a"),st=n("span"),b(Ve.$$.fragment),Mr=p(),it=n("span"),Fr=s("CodeGenConfig"),Jt=p(),I=n("div"),b(Re.$$.fragment),qr=p(),j=n("p"),jr=s("This is the configuration class to store the configuration of a "),To=n("a"),Lr=s("CodeGenModel"),Ar=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"),Or=s("Salesforce/codegen-2B-mono"),Sr=s(` architecture. Configuration objects
inherit from `),zo=n("a"),Dr=s("PretrainedConfig"),Nr=s(` and can be used to control the model outputs. Read the documentation from
`),Go=n("a"),Ir=s("PretrainedConfig"),Br=s(" for more information."),Wr=p(),b(fe.$$.fragment),Qt=p(),Z=n("h2"),ue=n("a"),lt=n("span"),b(Je.$$.fragment),Hr=p(),dt=n("span"),Ur=s("CodeGenTokenizer"),Xt=p(),z=n("div"),b(Qe.$$.fragment),Vr=p(),ct=n("p"),Rr=s("Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),Yr=p(),pt=n("p"),Jr=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Qr=p(),b(ge.$$.fragment),Xr=p(),Xe=n("p"),Zr=s("You can get around that behavior by passing "),ht=n("code"),Kr=s("add_prefix_space=True"),ea=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.`),oa=p(),b(_e.$$.fragment),ta=p(),Ze=n("p"),na=s("This tokenizer inherits from "),Eo=n("a"),ra=s("PreTrainedTokenizer"),aa=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),sa=p(),xo=n("div"),b(Ke.$$.fragment),Zt=p(),K=n("h2"),ve=n("a"),mt=n("span"),b(eo.$$.fragment),ia=p(),ft=n("span"),la=s("CodeGenTokenizerFast"),Kt=p(),G=n("div"),b(oo.$$.fragment),da=p(),to=n("p"),ca=s("Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),ut=n("em"),pa=s("tokenizers"),ha=s(` library). Based on byte-level
Byte-Pair-Encoding.`),ma=p(),gt=n("p"),fa=s("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),ua=p(),b(ke.$$.fragment),ga=p(),no=n("p"),_a=s("You can get around that behavior by passing "),_t=n("code"),va=s("add_prefix_space=True"),ka=s(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),ba=p(),b(be.$$.fragment),wa=p(),ro=n("p"),$a=s("This tokenizer inherits from "),Po=n("a"),ya=s("PreTrainedTokenizerFast"),Ca=s(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ta=p(),O=n("div"),b(ao.$$.fragment),za=p(),vt=n("p"),Ga=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.`),Ea=p(),so=n("p"),xa=s("Similar to doing "),kt=n("code"),Pa=s("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ma=s("."),Fa=p(),io=n("p"),qa=s("\u201D]`.\nkwargs (additional keyword arguments, "),bt=n("em"),ja=s("optional"),La=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),Aa=p(),$t=n("span"),Oa=s("CodeGenModel"),on=p(),B=n("div"),b(co.$$.fragment),Sa=p(),po=n("p"),Da=s(`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=n("a"),Na=s("torch.nn.Module"),Ia=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.`),Ba=p(),S=n("div"),b(mo.$$.fragment),Wa=p(),oe=n("p"),Ha=s("The "),Mo=n("a"),Ua=s("CodeGenModel"),Va=s(" forward method, overrides the "),yt=n("code"),Ra=s("__call__"),Ya=s(" special method."),Ja=p(),b($e.$$.fragment),Qa=p(),b(ye.$$.fragment),tn=p(),te=n("h2"),Ce=n("a"),Ct=n("span"),b(fo.$$.fragment),Xa=p(),Tt=n("span"),Za=s("CodeGenForCausalLM"),nn=p(),L=n("div"),b(uo.$$.fragment),Ka=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"),rs=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.`),as=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=r(f,"META",{name:!0,content:!0}),f.forEach(t),k=h(o),g=r(o,"H1",{class:!0});var ko=a(g);m=r(ko,"A",{id:!0,class:!0,href:!0});var Et=a(m);v=r(Et,"SPAN",{});var xt=a(v);w(l.$$.fragment,xt),xt.forEach(t),Et.forEach(t),u=h(ko),x=r(ko,"SPAN",{});var Pt=a(x);R=i(Pt,"CodeGen"),Pt.forEach(t),ko.forEach(t),F=h(o),A=r(o,"H2",{class:!0});var bo=a(A);N=r(bo,"A",{id:!0,class:!0,href:!0});var Mt=a(N);Io=r(Mt,"SPAN",{});var Ft=a(Io);w(Me.$$.fragment,Ft),Ft.forEach(t),Mt.forEach(t),xn=h(bo),Bo=r(bo,"SPAN",{});var qt=a(Bo);Pn=i(qt,"Overview"),qt.forEach(t),bo.forEach(t),Dt=h(o),se=r(o,"P",{});var wo=a(se);Mn=i(wo,"The CodeGen model was proposed in "),Fe=r(wo,"A",{href:!0,rel:!0});var us=a(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=r(o,"P",{});var an=a(ie);jn=i(an,"CodeGen is an autoregressive language model for program synthesis trained sequentially on "),qe=r(an,"A",{href:!0,rel:!0});var gs=a(qe);Ln=i(gs,"The Pile"),gs.forEach(t),An=i(an,", BigQuery, and BigPython."),an.forEach(t),It=h(o),$o=r(o,"P",{});var _s=a($o);On=i(_s,"The abstract from the paper is the following:"),_s.forEach(t),Bt=h(o),yo=r(o,"P",{});var vs=a(yo);je=r(vs,"EM",{});var sn=a(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: "),Le=r(sn,"A",{href:!0,rel:!0});var ks=a(Le);Dn=i(ks,"this https URL"),ks.forEach(t),Nn=i(sn,"."),sn.forEach(t),vs.forEach(t),Wt=h(o),W=r(o,"P",{});var qo=a(W);In=i(qo,"This model was contributed by "),Ae=r(qo,"A",{href:!0,rel:!0});var bs=a(Ae);Bn=i(bs,"Hiroaki Hayashi"),bs.forEach(t),Wn=i(qo,`.
The original code can be found `),Oe=r(qo,"A",{href:!0,rel:!0});var ws=a(Oe);Hn=i(ws,"here"),ws.forEach(t),Un=i(qo,"."),qo.forEach(t),Ht=h(o),Y=r(o,"H2",{class:!0});var ln=a(Y);le=r(ln,"A",{id:!0,class:!0,href:!0});var $s=a(le);Wo=r($s,"SPAN",{});var ys=a(Wo);w(Se.$$.fragment,ys),ys.forEach(t),$s.forEach(t),Vn=h(ln),Ho=r(ln,"SPAN",{});var Cs=a(Ho);Rn=i(Cs,"Checkpoint Naming"),Cs.forEach(t),ln.forEach(t),Ut=h(o),H=r(o,"UL",{});var jo=a(H);De=r(jo,"LI",{});var dn=a(De);Yn=i(dn,"CodeGen model "),Ne=r(dn,"A",{href:!0,rel:!0});var Ts=a(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=r(jo,"LI",{});var jt=a(de);Zn=i(jt,"The format is: "),Uo=r(jt,"CODE",{});var zs=a(Uo);Kn=i(zs,"Salesforce/codegen-{size}-{data}"),zs.forEach(t),er=i(jt,", where"),Ie=r(jt,"UL",{});var cn=a(Ie);q=r(cn,"LI",{});var U=a(q);Vo=r(U,"CODE",{});var Gs=a(Vo);or=i(Gs,"size"),Gs.forEach(t),tr=i(U,": "),Ro=r(U,"CODE",{});var Es=a(Ro);nr=i(Es,"350M"),Es.forEach(t),rr=i(U,", "),Yo=r(U,"CODE",{});var xs=a(Yo);ar=i(xs,"2B"),xs.forEach(t),sr=i(U,", "),Jo=r(U,"CODE",{});var Ps=a(Jo);ir=i(Ps,"6B"),Ps.forEach(t),lr=i(U,", "),Qo=r(U,"CODE",{});var Ms=a(Qo);dr=i(Ms,"16B"),Ms.forEach(t),U.forEach(t),cr=h(cn),Be=r(cn,"LI",{});var pn=a(Be);Xo=r(pn,"CODE",{});var Fs=a(Xo);pr=i(Fs,"data"),Fs.forEach(t),hr=i(pn,": "),J=r(pn,"UL",{});var Lo=a(J);Co=r(Lo,"LI",{});var fs=a(Co);Zo=r(fs,"CODE",{});var qs=a(Zo);mr=i(qs,"nl"),qs.forEach(t),fr=i(fs,": Pre-trained on the Pile"),fs.forEach(t),ur=h(Lo),ce=r(Lo,"LI",{});var Lt=a(ce);Ko=r(Lt,"CODE",{});var js=a(Ko);gr=i(js,"multi"),js.forEach(t),_r=i(Lt,": Initialized with "),et=r(Lt,"CODE",{});var Ls=a(et);vr=i(Ls,"nl"),Ls.forEach(t),kr=i(Lt,", then further pre-trained on multiple programming languages data"),Lt.forEach(t),br=h(Lo),pe=r(Lo,"LI",{});var At=a(pe);ot=r(At,"CODE",{});var As=a(ot);wr=i(As,"mono"),As.forEach(t),$r=i(At,": Initialized with "),tt=r(At,"CODE",{});var Os=a(tt);yr=i(Os,"multi"),Os.forEach(t),Cr=i(At,", then further pre-trained on Python data"),At.forEach(t),Lo.forEach(t),pn.forEach(t),cn.forEach(t),jt.forEach(t),Tr=h(jo),We=r(jo,"LI",{});var hn=a(We);zr=i(hn,"For example, "),nt=r(hn,"CODE",{});var Ss=a(nt);Gr=i(Ss,"Salesforce/codegen-350M-mono"),Ss.forEach(t),Er=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=r(o,"H2",{class:!0});var mn=a(Q);he=r(mn,"A",{id:!0,class:!0,href:!0});var Ds=a(he);rt=r(Ds,"SPAN",{});var Ns=a(rt);w(He.$$.fragment,Ns),Ns.forEach(t),Ds.forEach(t),xr=h(mn),at=r(mn,"SPAN",{});var Is=a(at);Pr=i(Is,"How to use"),Is.forEach(t),mn.forEach(t),Rt=h(o),w(Ue.$$.fragment,o),Yt=h(o),X=r(o,"H2",{class:!0});var fn=a(X);me=r(fn,"A",{id:!0,class:!0,href:!0});var Bs=a(me);st=r(Bs,"SPAN",{});var Ws=a(st);w(Ve.$$.fragment,Ws),Ws.forEach(t),Bs.forEach(t),Mr=h(fn),it=r(fn,"SPAN",{});var Hs=a(it);Fr=i(Hs,"CodeGenConfig"),Hs.forEach(t),fn.forEach(t),Jt=h(o),I=r(o,"DIV",{class:!0});var Ao=a(I);w(Re.$$.fragment,Ao),qr=h(Ao),j=r(Ao,"P",{});var V=a(j);jr=i(V,"This is the configuration class to store the configuration of a "),To=r(V,"A",{href:!0});var Us=a(To);Lr=i(Us,"CodeGenModel"),Us.forEach(t),Ar=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=r(V,"A",{href:!0,rel:!0});var Vs=a(Ye);Or=i(Vs,"Salesforce/codegen-2B-mono"),Vs.forEach(t),Sr=i(V,` architecture. Configuration objects
inherit from `),zo=r(V,"A",{href:!0});var Rs=a(zo);Dr=i(Rs,"PretrainedConfig"),Rs.forEach(t),Nr=i(V,` and can be used to control the model outputs. Read the documentation from
`),Go=r(V,"A",{href:!0});var Ys=a(Go);Ir=i(Ys,"PretrainedConfig"),Ys.forEach(t),Br=i(V," for more information."),V.forEach(t),Wr=h(Ao),w(fe.$$.fragment,Ao),Ao.forEach(t),Qt=h(o),Z=r(o,"H2",{class:!0});var un=a(Z);ue=r(un,"A",{id:!0,class:!0,href:!0});var Js=a(ue);lt=r(Js,"SPAN",{});var Qs=a(lt);w(Je.$$.fragment,Qs),Qs.forEach(t),Js.forEach(t),Hr=h(un),dt=r(un,"SPAN",{});var Xs=a(dt);Ur=i(Xs,"CodeGenTokenizer"),Xs.forEach(t),un.forEach(t),Xt=h(o),z=r(o,"DIV",{class:!0});var P=a(z);w(Qe.$$.fragment,P),Vr=h(P),ct=r(P,"P",{});var Zs=a(ct);Rr=i(Zs,"Construct a CodeGen tokenizer. Based on byte-level Byte-Pair-Encoding."),Zs.forEach(t),Yr=h(P),pt=r(P,"P",{});var Ks=a(pt);Jr=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),Qr=h(P),w(ge.$$.fragment,P),Xr=h(P),Xe=r(P,"P",{});var gn=a(Xe);Zr=i(gn,"You can get around that behavior by passing "),ht=r(gn,"CODE",{});var ei=a(ht);Kr=i(ei,"add_prefix_space=True"),ei.forEach(t),ea=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),oa=h(P),w(_e.$$.fragment,P),ta=h(P),Ze=r(P,"P",{});var _n=a(Ze);na=i(_n,"This tokenizer inherits from "),Eo=r(_n,"A",{href:!0});var oi=a(Eo);ra=i(oi,"PreTrainedTokenizer"),oi.forEach(t),aa=i(_n,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_n.forEach(t),sa=h(P),xo=r(P,"DIV",{class:!0});var ti=a(xo);w(Ke.$$.fragment,ti),ti.forEach(t),P.forEach(t),Zt=h(o),K=r(o,"H2",{class:!0});var vn=a(K);ve=r(vn,"A",{id:!0,class:!0,href:!0});var ni=a(ve);mt=r(ni,"SPAN",{});var ri=a(mt);w(eo.$$.fragment,ri),ri.forEach(t),ni.forEach(t),ia=h(vn),ft=r(vn,"SPAN",{});var ai=a(ft);la=i(ai,"CodeGenTokenizerFast"),ai.forEach(t),vn.forEach(t),Kt=h(o),G=r(o,"DIV",{class:!0});var M=a(G);w(oo.$$.fragment,M),da=h(M),to=r(M,"P",{});var kn=a(to);ca=i(kn,"Construct a \u201Cfast\u201D CodeGen tokenizer (backed by HuggingFace\u2019s "),ut=r(kn,"EM",{});var si=a(ut);pa=i(si,"tokenizers"),si.forEach(t),ha=i(kn,` library). Based on byte-level
Byte-Pair-Encoding.`),kn.forEach(t),ma=h(M),gt=r(M,"P",{});var ii=a(gt);fa=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),ua=h(M),w(ke.$$.fragment,M),ga=h(M),no=r(M,"P",{});var bn=a(no);_a=i(bn,"You can get around that behavior by passing "),_t=r(bn,"CODE",{});var li=a(_t);va=i(li,"add_prefix_space=True"),li.forEach(t),ka=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),ba=h(M),w(be.$$.fragment,M),wa=h(M),ro=r(M,"P",{});var wn=a(ro);$a=i(wn,"This tokenizer inherits from "),Po=r(wn,"A",{href:!0});var di=a(Po);ya=i(di,"PreTrainedTokenizerFast"),di.forEach(t),Ca=i(wn,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),wn.forEach(t),Ta=h(M),O=r(M,"DIV",{class:!0});var Ge=a(O);w(ao.$$.fragment,Ge),za=h(Ge),vt=r(Ge,"P",{});var ci=a(vt);Ga=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),Ea=h(Ge),so=r(Ge,"P",{});var $n=a(so);xa=i($n,"Similar to doing "),kt=r($n,"CODE",{});var pi=a(kt);Pa=i(pi,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),pi.forEach(t),Ma=i($n,"."),$n.forEach(t),Fa=h(Ge),io=r(Ge,"P",{});var yn=a(io);qa=i(yn,"\u201D]`.\nkwargs (additional keyword arguments, "),bt=r(yn,"EM",{});var hi=a(bt);ja=i(hi,"optional"),hi.forEach(t),La=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=r(o,"H2",{class:!0});var Cn=a(ee);we=r(Cn,"A",{id:!0,class:!0,href:!0});var mi=a(we);wt=r(mi,"SPAN",{});var fi=a(wt);w(lo.$$.fragment,fi),fi.forEach(t),mi.forEach(t),Aa=h(Cn),$t=r(Cn,"SPAN",{});var ui=a($t);Oa=i(ui,"CodeGenModel"),ui.forEach(t),Cn.forEach(t),on=h(o),B=r(o,"DIV",{class:!0});var Oo=a(B);w(co.$$.fragment,Oo),Sa=h(Oo),po=r(Oo,"P",{});var Tn=a(po);Da=i(Tn,`The bare CodeGen Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ho=r(Tn,"A",{href:!0,rel:!0});var gi=a(ho);Na=i(gi,"torch.nn.Module"),gi.forEach(t),Ia=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),Ba=h(Oo),S=r(Oo,"DIV",{class:!0});var Ee=a(S);w(mo.$$.fragment,Ee),Wa=h(Ee),oe=r(Ee,"P",{});var So=a(oe);Ha=i(So,"The "),Mo=r(So,"A",{href:!0});var _i=a(Mo);Ua=i(_i,"CodeGenModel"),_i.forEach(t),Va=i(So," forward method, overrides the "),yt=r(So,"CODE",{});var vi=a(yt);Ra=i(vi,"__call__"),vi.forEach(t),Ya=i(So," special method."),So.forEach(t),Ja=h(Ee),w($e.$$.fragment,Ee),Qa=h(Ee),w(ye.$$.fragment,Ee),Ee.forEach(t),Oo.forEach(t),tn=h(o),te=r(o,"H2",{class:!0});var zn=a(te);Ce=r(zn,"A",{id:!0,class:!0,href:!0});var ki=a(Ce);Ct=r(ki,"SPAN",{});var bi=a(Ct);w(fo.$$.fragment,bi),bi.forEach(t),ki.forEach(t),Xa=h(zn),Tt=r(zn,"SPAN",{});var wi=a(Tt);Za=i(wi,"CodeGenForCausalLM"),wi.forEach(t),zn.forEach(t),nn=h(o),L=r(o,"DIV",{class:!0});var xe=a(L);w(uo.$$.fragment,xe),Ka=h(xe),zt=r(xe,"P",{});var $i=a(zt);es=i($i,"The CodeGen Model transformer with a language modeling head on top."),$i.forEach(t),os=h(xe),go=r(xe,"P",{});var Gn=a(go);ts=i(Gn,"This model is a PyTorch "),_o=r(Gn,"A",{href:!0,rel:!0});var yi=a(_o);ns=i(yi,"torch.nn.Module"),yi.forEach(t),rs=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),as=h(xe),D=r(xe,"DIV",{class:!0});var Pe=a(D);w(vo.$$.fragment,Pe),ss=h(Pe),ne=r(Pe,"P",{});var Do=a(ne);is=i(Do,"The "),Fo=r(Do,"A",{href:!0});var Ci=a(Fo);ls=i(Ci,"CodeGenForCausalLM"),Ci.forEach(t),ds=i(Do," forward method, overrides the "),Gt=r(Do,"CODE",{});var Ti=a(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(A,"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(Le,"href","https://github.com/salesforce/codegen"),c(Le,"rel","nofollow"),c(Ae,"href","https://huggingface.co/rooa"),c(Ae,"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/v4.25.1/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/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(Go,"href","/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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/v4.25.1/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(L,"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,A,f),e(A,N),e(N,Io),$(Me,Io,null),e(A,xn),e(A,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,Ln),e(ie,An),_(o,It,f),_(o,$o,f),e($o,On),_(o,Bt,f),_(o,yo,f),e(yo,je),e(je,Sn),e(je,Le),e(Le,Dn),e(je,Nn),_(o,Wt,f),_(o,W,f),e(W,In),e(W,Ae),e(Ae,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,er),e(de,Ie),e(Ie,q),e(q,Vo),e(Vo,or),e(q,tr),e(q,Ro),e(Ro,nr),e(q,rr),e(q,Yo),e(Yo,ar),e(q,sr),e(q,Jo),e(Jo,ir),e(q,lr),e(q,Qo),e(Qo,dr),e(Ie,cr),e(Ie,Be),e(Be,Xo),e(Xo,pr),e(Be,hr),e(Be,J),e(J,Co),e(Co,Zo),e(Zo,mr),e(Co,fr),e(J,ur),e(J,ce),e(ce,Ko),e(Ko,gr),e(ce,_r),e(ce,et),e(et,vr),e(ce,kr),e(J,br),e(J,pe),e(pe,ot),e(ot,wr),e(pe,$r),e(pe,tt),e(tt,yr),e(pe,Cr),e(H,Tr),e(H,We),e(We,zr),e(We,nt),e(nt,Gr),e(We,Er),_(o,Vt,f),_(o,Q,f),e(Q,he),e(he,rt),$(He,rt,null),e(Q,xr),e(Q,at),e(at,Pr),_(o,Rt,f),$(Ue,o,f),_(o,Yt,f),_(o,X,f),e(X,me),e(me,st),$(Ve,st,null),e(X,Mr),e(X,it),e(it,Fr),_(o,Jt,f),_(o,I,f),$(Re,I,null),e(I,qr),e(I,j),e(j,jr),e(j,To),e(To,Lr),e(j,Ar),e(j,Ye),e(Ye,Or),e(j,Sr),e(j,zo),e(zo,Dr),e(j,Nr),e(j,Go),e(Go,Ir),e(j,Br),e(I,Wr),$(fe,I,null),_(o,Qt,f),_(o,Z,f),e(Z,ue),e(ue,lt),$(Je,lt,null),e(Z,Hr),e(Z,dt),e(dt,Ur),_(o,Xt,f),_(o,z,f),$(Qe,z,null),e(z,Vr),e(z,ct),e(ct,Rr),e(z,Yr),e(z,pt),e(pt,Jr),e(z,Qr),$(ge,z,null),e(z,Xr),e(z,Xe),e(Xe,Zr),e(Xe,ht),e(ht,Kr),e(Xe,ea),e(z,oa),$(_e,z,null),e(z,ta),e(z,Ze),e(Ze,na),e(Ze,Eo),e(Eo,ra),e(Ze,aa),e(z,sa),e(z,xo),$(Ke,xo,null),_(o,Zt,f),_(o,K,f),e(K,ve),e(ve,mt),$(eo,mt,null),e(K,ia),e(K,ft),e(ft,la),_(o,Kt,f),_(o,G,f),$(oo,G,null),e(G,da),e(G,to),e(to,ca),e(to,ut),e(ut,pa),e(to,ha),e(G,ma),e(G,gt),e(gt,fa),e(G,ua),$(ke,G,null),e(G,ga),e(G,no),e(no,_a),e(no,_t),e(_t,va),e(no,ka),e(G,ba),$(be,G,null),e(G,wa),e(G,ro),e(ro,$a),e(ro,Po),e(Po,ya),e(ro,Ca),e(G,Ta),e(G,O),$(ao,O,null),e(O,za),e(O,vt),e(vt,Ga),e(O,Ea),e(O,so),e(so,xa),e(so,kt),e(kt,Pa),e(so,Ma),e(O,Fa),e(O,io),e(io,qa),e(io,bt),e(bt,ja),e(io,La),_(o,en,f),_(o,ee,f),e(ee,we),e(we,wt),$(lo,wt,null),e(ee,Aa),e(ee,$t),e($t,Oa),_(o,on,f),_(o,B,f),$(co,B,null),e(B,Sa),e(B,po),e(po,Da),e(po,ho),e(ho,Na),e(po,Ia),e(B,Ba),e(B,S),$(mo,S,null),e(S,Wa),e(S,oe),e(oe,Ha),e(oe,Mo),e(Mo,Ua),e(oe,Va),e(oe,yt),e(yt,Ra),e(oe,Ya),e(S,Ja),$($e,S,null),e(S,Qa),$(ye,S,null),_(o,tn,f),_(o,te,f),e(te,Ce),e(Ce,Ct),$(fo,Ct,null),e(te,Xa),e(te,Tt),e(Tt,Za),_(o,nn,f),_(o,L,f),$(uo,L,null),e(L,Ka),e(L,zt),e(zt,es),e(L,os),e(L,go),e(go,ts),e(go,_o),e(_o,ns),e(go,rs),e(L,as),e(L,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),rn=!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){rn||(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(ao.$$.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),rn=!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(ao.$$.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),rn=!1},d(o){t(d),o&&t(k),o&&t(g),T(l),o&&t(F),o&&t(A),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(ao),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(L),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};
