import{s as Nn,o as Sn,n as We}from"../chunks/scheduler.9bc65507.js";import{S as Wn,i as Hn,g as n,s as r,u as g,A as jn,h as s,f as t,c as i,j as f,v as _,y as u,k as h,o,a as l,w as v,d as T,t as y,x as b}from"../chunks/index.78c82d43.js";import{T as Kt}from"../chunks/Tip.87d55b76.js";import{D as Z}from"../chunks/Docstring.4e7352e2.js";import{C as Ao}from"../chunks/CodeBlock.73e038be.js";import{I as ce}from"../chunks/IconCopyLink.bedaa44d.js";import{E as jo}from"../chunks/ExampleCodeBlock.872b014d.js";function An(P){let a,k="Example:",p,m,C;return m=new Ao({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVEJpZ0NvZGVDb25maWclMkMlMjBHUFRCaWdDb2RlTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwR1BUQmlnQ29kZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwR1BUQmlnQ29kZUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBHUFRCaWdDb2RlTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTBigCodeConfig, GPTBigCodeModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a GPTBigCode configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = GPTBigCodeConfig()

<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 = GPTBigCodeModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){a=n("p"),a.textContent=k,p=r(),g(m.$$.fragment)},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-11lpom8"&&(a.textContent=k),p=i(c),_(m.$$.fragment,c)},m(c,M){l(c,a,M),l(c,p,M),v(m,c,M),C=!0},p:We,i(c){C||(T(m.$$.fragment,c),C=!0)},o(c){y(m.$$.fragment,c),C=!1},d(c){c&&(t(a),t(p)),b(m,c)}}}function En(P){let a,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){a=n("p"),a.innerHTML=k},l(p){a=s(p,"P",{"data-svelte-h":!0}),u(a)!=="svelte-fincs2"&&(a.innerHTML=k)},m(p,m){l(p,a,m)},p:We,d(p){p&&t(a)}}}function Jn(P){let a,k="Example:",p,m,C;return m=new Ao({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFRCaWdDb2RlTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUQmlnQ29kZU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiaWdjb2RlJTJGZ3B0X2JpZ2NvZGUtc2FudGFjb2RlciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTBigCodeModel
<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;bigcode/gpt_bigcode-santacoder&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTBigCodeModel.from_pretrained(<span class="hljs-string">&quot;bigcode/gpt_bigcode-santacoder&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`,wrap:!1}}),{c(){a=n("p"),a.textContent=k,p=r(),g(m.$$.fragment)},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-11lpom8"&&(a.textContent=k),p=i(c),_(m.$$.fragment,c)},m(c,M){l(c,a,M),l(c,p,M),v(m,c,M),C=!0},p:We,i(c){C||(T(m.$$.fragment,c),C=!0)},o(c){y(m.$$.fragment,c),C=!1},d(c){c&&(t(a),t(p)),b(m,c)}}}function Un(P){let a,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){a=n("p"),a.innerHTML=k},l(p){a=s(p,"P",{"data-svelte-h":!0}),u(a)!=="svelte-fincs2"&&(a.innerHTML=k)},m(p,m){l(p,a,m)},p:We,d(p){p&&t(a)}}}function On(P){let a,k="Example:",p,m,C;return m=new Ao({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEdQVEJpZ0NvZGVGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUQmlnQ29kZUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJiaWdjb2RlJTJGZ3B0X2JpZ2NvZGUtc2FudGFjb2RlciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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, GPTBigCodeForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigcode/gpt_bigcode-santacoder&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTBigCodeForCausalLM.from_pretrained(<span class="hljs-string">&quot;bigcode/gpt_bigcode-santacoder&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`,wrap:!1}}),{c(){a=n("p"),a.textContent=k,p=r(),g(m.$$.fragment)},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-11lpom8"&&(a.textContent=k),p=i(c),_(m.$$.fragment,c)},m(c,M){l(c,a,M),l(c,p,M),v(m,c,M),C=!0},p:We,i(c){C||(T(m.$$.fragment,c),C=!0)},o(c){y(m.$$.fragment,c),C=!1},d(c){c&&(t(a),t(p)),b(m,c)}}}function Zn(P){let a,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){a=n("p"),a.innerHTML=k},l(p){a=s(p,"P",{"data-svelte-h":!0}),u(a)!=="svelte-fincs2"&&(a.innerHTML=k)},m(p,m){l(p,a,m)},p:We,d(p){p&&t(a)}}}function Vn(P){let a,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){a=n("p"),a.innerHTML=k},l(p){a=s(p,"P",{"data-svelte-h":!0}),u(a)!=="svelte-fincs2"&&(a.innerHTML=k)},m(p,m){l(p,a,m)},p:We,d(p){p&&t(a)}}}function Dn(P){let a,k,p,m,C,c,M,pe,eo,He,Eo="GPTBigCode",$t,H,V,ft,he,to,je,Jo="Overview",xt,ue,Uo='The GPTBigCode model was proposed in <a href="https://arxiv.org/abs/2301.03988" rel="nofollow">SantaCoder: don’t reach for the stars!</a> by BigCode. The listed authors are: Loubna Ben Allal, Raymond Li, Denis Kocetkov, Chenghao Mou, Christopher Akiki, Carlos Munoz Ferrandis, Niklas Muennighoff, Mayank Mishra, Alex Gu, Manan Dey, Logesh Kumar Umapathi, Carolyn Jane Anderson, Yangtian Zi, Joel Lamy Poirier, Hailey Schoelkopf, Sergey Troshin, Dmitry Abulkhanov, Manuel Romero, Michael Lappert, Francesco De Toni, Bernardo García del Río, Qian Liu, Shamik Bose, Urvashi Bhattacharyya, Terry Yue Zhuo, Ian Yu, Paulo Villegas, Marco Zocca, Sourab Mangrulkar, David Lansky, Huu Nguyen, Danish Contractor, Luis Villa, Jia Li, Dzmitry Bahdanau, Yacine Jernite, Sean Hughes, Daniel Fried, Arjun Guha, Harm de Vries, Leandro von Werra.',Gt,me,Oo="The abstract from the paper is the following:uery",Bt,fe,Zo='<em>The BigCode project is an open-scientific collaboration working on the responsible development of large language models for code. This tech report describes the progress of the collaboration until December 2022, outlining the current state of the Personally Identifiable Information (PII) redaction pipeline, the experiments conducted to de-risk the model architecture, and the experiments investigating better preprocessing methods for the training data. We train 1.1B parameter models on the Java, JavaScript, and Python subsets of The Stack and evaluate them on the MultiPL-E text-to-code benchmark. We find that more aggressive filtering of near-duplicates can further boost performance and, surprisingly, that selecting files from repositories with 5+ GitHub stars deteriorates performance significantly. Our best model outperforms previous open-source multilingual code generation models (InCoder-6.7B and CodeGen-Multi-2.7B) in both left-to-right generation and infilling on the Java, JavaScript, and Python portions of MultiPL-E, despite being a substantially smaller model. All models are released under an OpenRAIL license at <a href="https://huggingface.co/bigcode" rel="nofollow">this https URL.</a></em>',zt,ge,Vo='The model is a an optimized <a href="https://huggingface.co/docs/transformers/model_doc/gpt2" rel="nofollow">GPT2 model</a> with support for Multi-Query Attention.',Ft,j,D,gt,_e,oo,Ae,Do="Technical details",qt,ve,Ro="The main differences compared to GPT2.",It,Te,Qo="<li>Added support for Multi-Query Attention.</li> <li>Use <code>gelu_pytorch_tanh</code> instead of classic <code>gelu</code>.</li> <li>Avoid unnecessary synchronizations (this has since been added to GPT2 in #20061, but wasn’t in the reference codebase).</li> <li>Use Linear layers instead of Conv1D (good speedup but makes the checkpoints incompatible).</li> <li>Merge <code>_attn</code> and <code>_upcast_and_reordered_attn</code>. Always merge the matmul with scaling. Rename <code>reorder_and_upcast_attn</code>-&gt;<code>attention_softmax_in_fp32</code></li> <li>Cache the attention mask value to avoid recreating it every time.</li> <li>Use jit to fuse the attention fp32 casting, masking, softmax, and scaling.</li> <li>Combine the attention and causal masks into a single one, pre-computed for the whole model instead of every layer.</li> <li>Merge the key and value caches into one (this changes the format of layer_past/ present, does it risk creating problems?)</li> <li>Use the memory layout (self.num_heads, 3, self.head_dim) instead of <code>(3, self.num_heads, self.head_dim)</code> for the QKV tensor with MHA. (prevents an overhead with the merged key and values, but makes the checkpoints incompatible with the original gpt2 model).</li>",Lt,ye,Xo='You can read more about the optimizations in the <a href="https://github.com/huggingface/transformers/pull/22575" rel="nofollow">original pull request</a>',Nt,A,R,_t,be,no,Ee,Yo="GPTBigCodeConfig",St,z,ke,so,Je,Ko=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeModel">GPTBigCodeModel</a>. It is used to instantiate a
GPTBigCode 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 GPTBigCode
<a href="https://huggingface.co/gpt_bigcode" rel="nofollow">gpt_bigcode</a> architecture.`,ao,Ue,en=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ro,Q,Wt,E,X,vt,Ce,io,Oe,tn="GPTBigCodeModel",Ht,$,we,lo,Ze,on="The bare GPT_BIGCODE Model transformer outputting raw hidden-states without any specific head on top.",co,Ve,nn=`This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,po,De,sn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ho,F,Me,uo,Re,an='The <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeModel">GPTBigCodeModel</a> forward method, overrides the <code>__call__</code> special method.',mo,Y,fo,K,jt,J,ee,Tt,Pe,go,Qe,rn="GPTBigCodeForCausalLM",At,x,$e,_o,Xe,dn=`The GPT_BIGCODE Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`,vo,Ye,ln=`This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,To,Ke,cn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,yo,q,xe,bo,et,pn='The <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForCausalLM">GPTBigCodeForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',ko,te,Co,oe,Et,U,ne,yt,Ge,wo,tt,hn="GPTBigCodeForSequenceClassification",Jt,w,Be,Mo,ot,un="The GPTBigCode Model transformer with a sequence classification head on top (linear layer).",Po,nt,mn=`<a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForSequenceClassification">GPTBigCodeForSequenceClassification</a> uses the last token in order to do the classification, as other causal
models (e.g. GPT-1) do.`,$o,st,fn=`Since it does classification on the last token, it requires to know the position of the last token. If a
<code>pad_token_id</code> is defined in the configuration, it finds the last token that is not a padding token in each row. If
no <code>pad_token_id</code> is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when <code>inputs_embeds</code> are passed instead of <code>input_ids</code>, it does the same (take the last value in
each row of the batch).`,xo,at,gn=`This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Go,rt,_n=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Bo,I,ze,zo,it,vn='The <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForSequenceClassification">GPTBigCodeForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Fo,se,Ut,O,ae,bt,Fe,qo,dt,Tn="GPTBigCodeForTokenClassification",Ot,G,qe,Io,lt,yn=`GPT_BIGCODE Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`,Lo,ct,bn=`This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,No,pt,kn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,So,L,Ie,Wo,ht,Cn='The <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForTokenClassification">GPTBigCodeForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Ho,re,Zt,kt,Vt;return pe=new ce({}),he=new ce({}),_e=new ce({}),be=new ce({}),ke=new Z({props:{name:"class transformers.GPTBigCodeConfig",anchor:"transformers.GPTBigCodeConfig",parameters:[{name:"vocab_size",val:" = 50257"},{name:"n_positions",val:" = 1024"},{name:"n_embd",val:" = 768"},{name:"n_layer",val:" = 12"},{name:"n_head",val:" = 12"},{name:"n_inner",val:" = None"},{name:"activation_function",val:" = 'gelu_pytorch_tanh'"},{name:"resid_pdrop",val:" = 0.1"},{name:"embd_pdrop",val:" = 0.1"},{name:"attn_pdrop",val:" = 0.1"},{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:"attention_softmax_in_fp32",val:" = True"},{name:"scale_attention_softmax_in_fp32",val:" = True"},{name:"multi_query",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTBigCodeConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
Vocabulary size of the GPT-2 model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeModel">GPTBigCodeModel</a>.`,name:"vocab_size"},{anchor:"transformers.GPTBigCodeConfig.n_positions",description:`<strong>n_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#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.GPTBigCodeConfig.n_embd",description:`<strong>n_embd</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the embeddings and hidden states.`,name:"n_embd"},{anchor:"transformers.GPTBigCodeConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.GPTBigCodeConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.GPTBigCodeConfig.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.GPTBigCodeConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu_pytorch_tanh&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;, &quot;gelu_pytorch_tanh&quot;]</code>.`,name:"activation_function"},{anchor:"transformers.GPTBigCodeConfig.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.GPTBigCodeConfig.embd_pdrop",description:`<strong>embd_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the embeddings.`,name:"embd_pdrop"},{anchor:"transformers.GPTBigCodeConfig.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.GPTBigCodeConfig.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.GPTBigCodeConfig.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.GPTBigCodeConfig.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.GPTBigCodeConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.GPTBigCodeConfig.attention_softmax_in_fp32",description:`<strong>attention_softmax_in_fp32</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to call the fused softmax in float32.`,name:"attention_softmax_in_fp32"},{anchor:"transformers.GPTBigCodeConfig.scale_attention_softmax_in_fp32",description:`<strong>scale_attention_softmax_in_fp32</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to scale the attention softmax in float32.`,name:"scale_attention_softmax_in_fp32"},{anchor:"transformers.GPTBigCodeConfig.attention_type",description:`<strong>attention_type</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use Multi-Query Attion (<code>True</code>) or Multi-Head Attention (<code>False</code>).`,name:"attention_type"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/configuration_gpt_bigcode.py#L28"}}),Q=new jo({props:{anchor:"transformers.GPTBigCodeConfig.example",$$slots:{default:[An]},$$scope:{ctx:P}}}),Ce=new ce({}),we=new Z({props:{name:"class transformers.GPTBigCodeModel",anchor:"transformers.GPTBigCodeModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTBigCodeModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L502"}}),Me=new Z({props:{name:"forward",anchor:"transformers.GPTBigCodeModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = 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.GPTBigCodeModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else
<code>past_key_values[0][0].shape[-2]</code> (<code>sequence_length</code> of input past key value states). Indices of input
sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GPTBigCodeModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"past_key_values"},{anchor:"transformers.GPTBigCodeModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>If <code>past_key_values</code> is used, <code>attention_mask</code> needs to contain the masking strategy that was used for
<code>past_key_values</code>. In other words, the <code>attention_mask</code> always has to have the length:
<code>len(past_key_values) + len(input_ids)</code></p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTBigCodeModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_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.GPTBigCodeModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.GPTBigCodeModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTBigCodeModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.GPTBigCodeModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GPTBigCodeModel.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.GPTBigCodeModel.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.GPTBigCodeModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L531",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig"
>GPTBigCodeConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) 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>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Y=new Kt({props:{$$slots:{default:[En]},$$scope:{ctx:P}}}),K=new jo({props:{anchor:"transformers.GPTBigCodeModel.forward.example",$$slots:{default:[Jn]},$$scope:{ctx:P}}}),Pe=new ce({}),$e=new Z({props:{name:"class transformers.GPTBigCodeForCausalLM",anchor:"transformers.GPTBigCodeForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTBigCodeForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L723"}}),xe=new Z({props:{name:"forward",anchor:"transformers.GPTBigCodeForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.GPTBigCodeForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else
<code>past_key_values[0][0].shape[-2]</code> (<code>sequence_length</code> of input past key value states). Indices of input
sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"past_key_values"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>If <code>past_key_values</code> is used, <code>attention_mask</code> needs to contain the masking strategy that was used for
<code>past_key_values</code>. In other words, the <code>attention_mask</code> always has to have the length:
<code>len(past_key_values) + len(input_ids)</code></p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_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.GPTBigCodeForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GPTBigCodeForCausalLM.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.GPTBigCodeForCausalLM.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.GPTBigCodeForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTBigCodeForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</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.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L777",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig"
>GPTBigCodeConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new Kt({props:{$$slots:{default:[Un]},$$scope:{ctx:P}}}),oe=new jo({props:{anchor:"transformers.GPTBigCodeForCausalLM.forward.example",$$slots:{default:[On]},$$scope:{ctx:P}}}),Ge=new ce({}),Be=new Z({props:{name:"class transformers.GPTBigCodeForSequenceClassification",anchor:"transformers.GPTBigCodeForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTBigCodeForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L876"}}),ze=new Z({props:{name:"forward",anchor:"transformers.GPTBigCodeForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.GPTBigCodeForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else
<code>past_key_values[0][0].shape[-2]</code> (<code>sequence_length</code> of input past key value states). Indices of input
sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"past_key_values"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>If <code>past_key_values</code> is used, <code>attention_mask</code> needs to contain the masking strategy that was used for
<code>past_key_values</code>. In other words, the <code>attention_mask</code> always has to have the length:
<code>len(past_key_values) + len(input_ids)</code></p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_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.GPTBigCodeForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GPTBigCodeForSequenceClassification.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.GPTBigCodeForSequenceClassification.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.GPTBigCodeForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTBigCodeForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L886"}}),se=new Kt({props:{$$slots:{default:[Zn]},$$scope:{ctx:P}}}),Fe=new ce({}),qe=new Z({props:{name:"class transformers.GPTBigCodeForTokenClassification",anchor:"transformers.GPTBigCodeForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTBigCodeForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L994"}}),Ie=new Z({props:{name:"forward",anchor:"transformers.GPTBigCodeForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.GPTBigCodeForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else
<code>past_key_values[0][0].shape[-2]</code> (<code>sequence_length</code> of input past key value states). Indices of input
sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"past_key_values"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>If <code>past_key_values</code> is used, <code>attention_mask</code> needs to contain the masking strategy that was used for
<code>past_key_values</code>. In other words, the <code>attention_mask</code> always has to have the length:
<code>len(past_key_values) + len(input_ids)</code></p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, input_ids_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.GPTBigCodeForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.Tensor</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.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GPTBigCodeForTokenClassification.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.GPTBigCodeForTokenClassification.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.GPTBigCodeForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTBigCodeForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1012"}}),re=new Kt({props:{$$slots:{default:[Vn]},$$scope:{ctx:P}}}),{c(){a=n("meta"),k=r(),p=n("p"),m=r(),C=n("h1"),c=n("a"),M=n("span"),g(pe.$$.fragment),eo=r(),He=n("span"),He.textContent=Eo,$t=r(),H=n("h2"),V=n("a"),ft=n("span"),g(he.$$.fragment),to=r(),je=n("span"),je.textContent=Jo,xt=r(),ue=n("p"),ue.innerHTML=Uo,Gt=r(),me=n("p"),me.textContent=Oo,Bt=r(),fe=n("p"),fe.innerHTML=Zo,zt=r(),ge=n("p"),ge.innerHTML=Vo,Ft=r(),j=n("h2"),D=n("a"),gt=n("span"),g(_e.$$.fragment),oo=r(),Ae=n("span"),Ae.textContent=Do,qt=r(),ve=n("p"),ve.textContent=Ro,It=r(),Te=n("ul"),Te.innerHTML=Qo,Lt=r(),ye=n("p"),ye.innerHTML=Xo,Nt=r(),A=n("h2"),R=n("a"),_t=n("span"),g(be.$$.fragment),no=r(),Ee=n("span"),Ee.textContent=Yo,St=r(),z=n("div"),g(ke.$$.fragment),so=r(),Je=n("p"),Je.innerHTML=Ko,ao=r(),Ue=n("p"),Ue.innerHTML=en,ro=r(),g(Q.$$.fragment),Wt=r(),E=n("h2"),X=n("a"),vt=n("span"),g(Ce.$$.fragment),io=r(),Oe=n("span"),Oe.textContent=tn,Ht=r(),$=n("div"),g(we.$$.fragment),lo=r(),Ze=n("p"),Ze.textContent=on,co=r(),Ve=n("p"),Ve.innerHTML=nn,po=r(),De=n("p"),De.innerHTML=sn,ho=r(),F=n("div"),g(Me.$$.fragment),uo=r(),Re=n("p"),Re.innerHTML=an,mo=r(),g(Y.$$.fragment),fo=r(),g(K.$$.fragment),jt=r(),J=n("h2"),ee=n("a"),Tt=n("span"),g(Pe.$$.fragment),go=r(),Qe=n("span"),Qe.textContent=rn,At=r(),x=n("div"),g($e.$$.fragment),_o=r(),Xe=n("p"),Xe.textContent=dn,vo=r(),Ye=n("p"),Ye.innerHTML=ln,To=r(),Ke=n("p"),Ke.innerHTML=cn,yo=r(),q=n("div"),g(xe.$$.fragment),bo=r(),et=n("p"),et.innerHTML=pn,ko=r(),g(te.$$.fragment),Co=r(),g(oe.$$.fragment),Et=r(),U=n("h2"),ne=n("a"),yt=n("span"),g(Ge.$$.fragment),wo=r(),tt=n("span"),tt.textContent=hn,Jt=r(),w=n("div"),g(Be.$$.fragment),Mo=r(),ot=n("p"),ot.textContent=un,Po=r(),nt=n("p"),nt.innerHTML=mn,$o=r(),st=n("p"),st.innerHTML=fn,xo=r(),at=n("p"),at.innerHTML=gn,Go=r(),rt=n("p"),rt.innerHTML=_n,Bo=r(),I=n("div"),g(ze.$$.fragment),zo=r(),it=n("p"),it.innerHTML=vn,Fo=r(),g(se.$$.fragment),Ut=r(),O=n("h2"),ae=n("a"),bt=n("span"),g(Fe.$$.fragment),qo=r(),dt=n("span"),dt.textContent=Tn,Ot=r(),G=n("div"),g(qe.$$.fragment),Io=r(),lt=n("p"),lt.textContent=yn,Lo=r(),ct=n("p"),ct.innerHTML=bn,No=r(),pt=n("p"),pt.innerHTML=kn,So=r(),L=n("div"),g(Ie.$$.fragment),Wo=r(),ht=n("p"),ht.innerHTML=Cn,Ho=r(),g(re.$$.fragment),Zt=r(),kt=n("p"),this.h()},l(e){const d=jn("svelte-1phssyn",document.head);a=s(d,"META",{name:!0,content:!0}),d.forEach(t),k=i(e),p=s(e,"P",{}),f(p).forEach(t),m=i(e),C=s(e,"H1",{class:!0});var Le=f(C);c=s(Le,"A",{id:!0,class:!0,href:!0});var Ct=f(c);M=s(Ct,"SPAN",{});var wt=f(M);_(pe.$$.fragment,wt),wt.forEach(t),Ct.forEach(t),eo=i(Le),He=s(Le,"SPAN",{"data-svelte-h":!0}),u(He)!=="svelte-1fhz9s9"&&(He.textContent=Eo),Le.forEach(t),$t=i(e),H=s(e,"H2",{class:!0});var Ne=f(H);V=s(Ne,"A",{id:!0,class:!0,href:!0});var Mt=f(V);ft=s(Mt,"SPAN",{});var Pt=f(ft);_(he.$$.fragment,Pt),Pt.forEach(t),Mt.forEach(t),to=i(Ne),je=s(Ne,"SPAN",{"data-svelte-h":!0}),u(je)!=="svelte-1jsw1pg"&&(je.textContent=Jo),Ne.forEach(t),xt=i(e),ue=s(e,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-1y7x4r1"&&(ue.innerHTML=Uo),Gt=i(e),me=s(e,"P",{"data-svelte-h":!0}),u(me)!=="svelte-k7314l"&&(me.textContent=Oo),Bt=i(e),fe=s(e,"P",{"data-svelte-h":!0}),u(fe)!=="svelte-smsn49"&&(fe.innerHTML=Zo),zt=i(e),ge=s(e,"P",{"data-svelte-h":!0}),u(ge)!=="svelte-1vgmnyb"&&(ge.innerHTML=Vo),Ft=i(e),j=s(e,"H2",{class:!0});var Se=f(j);D=s(Se,"A",{id:!0,class:!0,href:!0});var wn=f(D);gt=s(wn,"SPAN",{});var Mn=f(gt);_(_e.$$.fragment,Mn),Mn.forEach(t),wn.forEach(t),oo=i(Se),Ae=s(Se,"SPAN",{"data-svelte-h":!0}),u(Ae)!=="svelte-kg1s66"&&(Ae.textContent=Do),Se.forEach(t),qt=i(e),ve=s(e,"P",{"data-svelte-h":!0}),u(ve)!=="svelte-kswcp9"&&(ve.textContent=Ro),It=i(e),Te=s(e,"UL",{"data-svelte-h":!0}),u(Te)!=="svelte-1nib397"&&(Te.innerHTML=Qo),Lt=i(e),ye=s(e,"P",{"data-svelte-h":!0}),u(ye)!=="svelte-4sqm6f"&&(ye.innerHTML=Xo),Nt=i(e),A=s(e,"H2",{class:!0});var Dt=f(A);R=s(Dt,"A",{id:!0,class:!0,href:!0});var Pn=f(R);_t=s(Pn,"SPAN",{});var $n=f(_t);_(be.$$.fragment,$n),$n.forEach(t),Pn.forEach(t),no=i(Dt),Ee=s(Dt,"SPAN",{"data-svelte-h":!0}),u(Ee)!=="svelte-1r4yzvn"&&(Ee.textContent=Yo),Dt.forEach(t),St=i(e),z=s(e,"DIV",{class:!0});var ie=f(z);_(ke.$$.fragment,ie),so=i(ie),Je=s(ie,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-fzvz3y"&&(Je.innerHTML=Ko),ao=i(ie),Ue=s(ie,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-10kqkkl"&&(Ue.innerHTML=en),ro=i(ie),_(Q.$$.fragment,ie),ie.forEach(t),Wt=i(e),E=s(e,"H2",{class:!0});var Rt=f(E);X=s(Rt,"A",{id:!0,class:!0,href:!0});var xn=f(X);vt=s(xn,"SPAN",{});var Gn=f(vt);_(Ce.$$.fragment,Gn),Gn.forEach(t),xn.forEach(t),io=i(Rt),Oe=s(Rt,"SPAN",{"data-svelte-h":!0}),u(Oe)!=="svelte-pp4exi"&&(Oe.textContent=tn),Rt.forEach(t),Ht=i(e),$=s(e,"DIV",{class:!0});var N=f($);_(we.$$.fragment,N),lo=i(N),Ze=s(N,"P",{"data-svelte-h":!0}),u(Ze)!=="svelte-ig0mxc"&&(Ze.textContent=on),co=i(N),Ve=s(N,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-hmtw9k"&&(Ve.innerHTML=nn),po=i(N),De=s(N,"P",{"data-svelte-h":!0}),u(De)!=="svelte-hswkmf"&&(De.innerHTML=sn),ho=i(N),F=s(N,"DIV",{class:!0});var de=f(F);_(Me.$$.fragment,de),uo=i(de),Re=s(de,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-14cs3vq"&&(Re.innerHTML=an),mo=i(de),_(Y.$$.fragment,de),fo=i(de),_(K.$$.fragment,de),de.forEach(t),N.forEach(t),jt=i(e),J=s(e,"H2",{class:!0});var Qt=f(J);ee=s(Qt,"A",{id:!0,class:!0,href:!0});var Bn=f(ee);Tt=s(Bn,"SPAN",{});var zn=f(Tt);_(Pe.$$.fragment,zn),zn.forEach(t),Bn.forEach(t),go=i(Qt),Qe=s(Qt,"SPAN",{"data-svelte-h":!0}),u(Qe)!=="svelte-hbqsh2"&&(Qe.textContent=rn),Qt.forEach(t),At=i(e),x=s(e,"DIV",{class:!0});var S=f(x);_($e.$$.fragment,S),_o=i(S),Xe=s(S,"P",{"data-svelte-h":!0}),u(Xe)!=="svelte-ckfo62"&&(Xe.textContent=dn),vo=i(S),Ye=s(S,"P",{"data-svelte-h":!0}),u(Ye)!=="svelte-hmtw9k"&&(Ye.innerHTML=ln),To=i(S),Ke=s(S,"P",{"data-svelte-h":!0}),u(Ke)!=="svelte-hswkmf"&&(Ke.innerHTML=cn),yo=i(S),q=s(S,"DIV",{class:!0});var le=f(q);_(xe.$$.fragment,le),bo=i(le),et=s(le,"P",{"data-svelte-h":!0}),u(et)!=="svelte-1509h6a"&&(et.innerHTML=pn),ko=i(le),_(te.$$.fragment,le),Co=i(le),_(oe.$$.fragment,le),le.forEach(t),S.forEach(t),Et=i(e),U=s(e,"H2",{class:!0});var Xt=f(U);ne=s(Xt,"A",{id:!0,class:!0,href:!0});var Fn=f(ne);yt=s(Fn,"SPAN",{});var qn=f(yt);_(Ge.$$.fragment,qn),qn.forEach(t),Fn.forEach(t),wo=i(Xt),tt=s(Xt,"SPAN",{"data-svelte-h":!0}),u(tt)!=="svelte-1pzmwk1"&&(tt.textContent=hn),Xt.forEach(t),Jt=i(e),w=s(e,"DIV",{class:!0});var B=f(w);_(Be.$$.fragment,B),Mo=i(B),ot=s(B,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-x1zjre"&&(ot.textContent=un),Po=i(B),nt=s(B,"P",{"data-svelte-h":!0}),u(nt)!=="svelte-tr8xyu"&&(nt.innerHTML=mn),$o=i(B),st=s(B,"P",{"data-svelte-h":!0}),u(st)!=="svelte-10ugs3m"&&(st.innerHTML=fn),xo=i(B),at=s(B,"P",{"data-svelte-h":!0}),u(at)!=="svelte-hmtw9k"&&(at.innerHTML=gn),Go=i(B),rt=s(B,"P",{"data-svelte-h":!0}),u(rt)!=="svelte-hswkmf"&&(rt.innerHTML=_n),Bo=i(B),I=s(B,"DIV",{class:!0});var ut=f(I);_(ze.$$.fragment,ut),zo=i(ut),it=s(ut,"P",{"data-svelte-h":!0}),u(it)!=="svelte-i4ko6y"&&(it.innerHTML=vn),Fo=i(ut),_(se.$$.fragment,ut),ut.forEach(t),B.forEach(t),Ut=i(e),O=s(e,"H2",{class:!0});var Yt=f(O);ae=s(Yt,"A",{id:!0,class:!0,href:!0});var In=f(ae);bt=s(In,"SPAN",{});var Ln=f(bt);_(Fe.$$.fragment,Ln),Ln.forEach(t),In.forEach(t),qo=i(Yt),dt=s(Yt,"SPAN",{"data-svelte-h":!0}),u(dt)!=="svelte-1hg78gx"&&(dt.textContent=Tn),Yt.forEach(t),Ot=i(e),G=s(e,"DIV",{class:!0});var W=f(G);_(qe.$$.fragment,W),Io=i(W),lt=s(W,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-1hph7pq"&&(lt.textContent=yn),Lo=i(W),ct=s(W,"P",{"data-svelte-h":!0}),u(ct)!=="svelte-hmtw9k"&&(ct.innerHTML=bn),No=i(W),pt=s(W,"P",{"data-svelte-h":!0}),u(pt)!=="svelte-hswkmf"&&(pt.innerHTML=kn),So=i(W),L=s(W,"DIV",{class:!0});var mt=f(L);_(Ie.$$.fragment,mt),Wo=i(mt),ht=s(mt,"P",{"data-svelte-h":!0}),u(ht)!=="svelte-6fwaoa"&&(ht.innerHTML=Cn),Ho=i(mt),_(re.$$.fragment,mt),mt.forEach(t),W.forEach(t),Zt=i(e),kt=s(e,"P",{}),f(kt).forEach(t),this.h()},h(){h(a,"name","hf:doc:metadata"),h(a,"content",JSON.stringify(Rn)),h(c,"id","gptbigcode"),h(c,"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"),h(c,"href","#gptbigcode"),h(C,"class","relative group"),h(V,"id","overview"),h(V,"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"),h(V,"href","#overview"),h(H,"class","relative group"),h(D,"id","technical-details"),h(D,"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"),h(D,"href","#technical-details"),h(j,"class","relative group"),h(R,"id","transformers.GPTBigCodeConfig"),h(R,"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"),h(R,"href","#transformers.GPTBigCodeConfig"),h(A,"class","relative group"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(X,"id","transformers.GPTBigCodeModel"),h(X,"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"),h(X,"href","#transformers.GPTBigCodeModel"),h(E,"class","relative group"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ee,"id","transformers.GPTBigCodeForCausalLM"),h(ee,"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"),h(ee,"href","#transformers.GPTBigCodeForCausalLM"),h(J,"class","relative group"),h(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ne,"id","transformers.GPTBigCodeForSequenceClassification"),h(ne,"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"),h(ne,"href","#transformers.GPTBigCodeForSequenceClassification"),h(U,"class","relative group"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ae,"id","transformers.GPTBigCodeForTokenClassification"),h(ae,"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"),h(ae,"href","#transformers.GPTBigCodeForTokenClassification"),h(O,"class","relative group"),h(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,d){o(document.head,a),l(e,k,d),l(e,p,d),l(e,m,d),l(e,C,d),o(C,c),o(c,M),v(pe,M,null),o(C,eo),o(C,He),l(e,$t,d),l(e,H,d),o(H,V),o(V,ft),v(he,ft,null),o(H,to),o(H,je),l(e,xt,d),l(e,ue,d),l(e,Gt,d),l(e,me,d),l(e,Bt,d),l(e,fe,d),l(e,zt,d),l(e,ge,d),l(e,Ft,d),l(e,j,d),o(j,D),o(D,gt),v(_e,gt,null),o(j,oo),o(j,Ae),l(e,qt,d),l(e,ve,d),l(e,It,d),l(e,Te,d),l(e,Lt,d),l(e,ye,d),l(e,Nt,d),l(e,A,d),o(A,R),o(R,_t),v(be,_t,null),o(A,no),o(A,Ee),l(e,St,d),l(e,z,d),v(ke,z,null),o(z,so),o(z,Je),o(z,ao),o(z,Ue),o(z,ro),v(Q,z,null),l(e,Wt,d),l(e,E,d),o(E,X),o(X,vt),v(Ce,vt,null),o(E,io),o(E,Oe),l(e,Ht,d),l(e,$,d),v(we,$,null),o($,lo),o($,Ze),o($,co),o($,Ve),o($,po),o($,De),o($,ho),o($,F),v(Me,F,null),o(F,uo),o(F,Re),o(F,mo),v(Y,F,null),o(F,fo),v(K,F,null),l(e,jt,d),l(e,J,d),o(J,ee),o(ee,Tt),v(Pe,Tt,null),o(J,go),o(J,Qe),l(e,At,d),l(e,x,d),v($e,x,null),o(x,_o),o(x,Xe),o(x,vo),o(x,Ye),o(x,To),o(x,Ke),o(x,yo),o(x,q),v(xe,q,null),o(q,bo),o(q,et),o(q,ko),v(te,q,null),o(q,Co),v(oe,q,null),l(e,Et,d),l(e,U,d),o(U,ne),o(ne,yt),v(Ge,yt,null),o(U,wo),o(U,tt),l(e,Jt,d),l(e,w,d),v(Be,w,null),o(w,Mo),o(w,ot),o(w,Po),o(w,nt),o(w,$o),o(w,st),o(w,xo),o(w,at),o(w,Go),o(w,rt),o(w,Bo),o(w,I),v(ze,I,null),o(I,zo),o(I,it),o(I,Fo),v(se,I,null),l(e,Ut,d),l(e,O,d),o(O,ae),o(ae,bt),v(Fe,bt,null),o(O,qo),o(O,dt),l(e,Ot,d),l(e,G,d),v(qe,G,null),o(G,Io),o(G,lt),o(G,Lo),o(G,ct),o(G,No),o(G,pt),o(G,So),o(G,L),v(Ie,L,null),o(L,Wo),o(L,ht),o(L,Ho),v(re,L,null),l(e,Zt,d),l(e,kt,d),Vt=!0},p(e,[d]){const Le={};d&2&&(Le.$$scope={dirty:d,ctx:e}),Q.$set(Le);const Ct={};d&2&&(Ct.$$scope={dirty:d,ctx:e}),Y.$set(Ct);const wt={};d&2&&(wt.$$scope={dirty:d,ctx:e}),K.$set(wt);const Ne={};d&2&&(Ne.$$scope={dirty:d,ctx:e}),te.$set(Ne);const Mt={};d&2&&(Mt.$$scope={dirty:d,ctx:e}),oe.$set(Mt);const Pt={};d&2&&(Pt.$$scope={dirty:d,ctx:e}),se.$set(Pt);const Se={};d&2&&(Se.$$scope={dirty:d,ctx:e}),re.$set(Se)},i(e){Vt||(T(pe.$$.fragment,e),T(he.$$.fragment,e),T(_e.$$.fragment,e),T(be.$$.fragment,e),T(ke.$$.fragment,e),T(Q.$$.fragment,e),T(Ce.$$.fragment,e),T(we.$$.fragment,e),T(Me.$$.fragment,e),T(Y.$$.fragment,e),T(K.$$.fragment,e),T(Pe.$$.fragment,e),T($e.$$.fragment,e),T(xe.$$.fragment,e),T(te.$$.fragment,e),T(oe.$$.fragment,e),T(Ge.$$.fragment,e),T(Be.$$.fragment,e),T(ze.$$.fragment,e),T(se.$$.fragment,e),T(Fe.$$.fragment,e),T(qe.$$.fragment,e),T(Ie.$$.fragment,e),T(re.$$.fragment,e),Vt=!0)},o(e){y(pe.$$.fragment,e),y(he.$$.fragment,e),y(_e.$$.fragment,e),y(be.$$.fragment,e),y(ke.$$.fragment,e),y(Q.$$.fragment,e),y(Ce.$$.fragment,e),y(we.$$.fragment,e),y(Me.$$.fragment,e),y(Y.$$.fragment,e),y(K.$$.fragment,e),y(Pe.$$.fragment,e),y($e.$$.fragment,e),y(xe.$$.fragment,e),y(te.$$.fragment,e),y(oe.$$.fragment,e),y(Ge.$$.fragment,e),y(Be.$$.fragment,e),y(ze.$$.fragment,e),y(se.$$.fragment,e),y(Fe.$$.fragment,e),y(qe.$$.fragment,e),y(Ie.$$.fragment,e),y(re.$$.fragment,e),Vt=!1},d(e){e&&(t(k),t(p),t(m),t(C),t($t),t(H),t(xt),t(ue),t(Gt),t(me),t(Bt),t(fe),t(zt),t(ge),t(Ft),t(j),t(qt),t(ve),t(It),t(Te),t(Lt),t(ye),t(Nt),t(A),t(St),t(z),t(Wt),t(E),t(Ht),t($),t(jt),t(J),t(At),t(x),t(Et),t(U),t(Jt),t(w),t(Ut),t(O),t(Ot),t(G),t(Zt),t(kt)),t(a),b(pe),b(he),b(_e),b(be),b(ke),b(Q),b(Ce),b(we),b(Me),b(Y),b(K),b(Pe),b($e),b(xe),b(te),b(oe),b(Ge),b(Be),b(ze),b(se),b(Fe),b(qe),b(Ie),b(re)}}}const Rn={local:"gptbigcode",sections:[{local:"overview",title:"Overview"},{local:"technical-details",title:"Technical details"},{local:"transformers.GPTBigCodeConfig",title:"GPTBigCodeConfig"},{local:"transformers.GPTBigCodeModel",title:"GPTBigCodeModel"},{local:"transformers.GPTBigCodeForCausalLM",title:"GPTBigCodeForCausalLM"},{local:"transformers.GPTBigCodeForSequenceClassification",title:"GPTBigCodeForSequenceClassification"},{local:"transformers.GPTBigCodeForTokenClassification",title:"GPTBigCodeForTokenClassification"}],title:"GPTBigCode"};function Qn(P){return Sn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ss extends Wn{constructor(a){super(),Hn(this,a,Qn,Dn,Nn,{})}}export{ss as component};
