Buckets:
| import{s as Ho,o as So,n as xe}from"../chunks/scheduler.25b97de1.js";import{S as Ro,i as Vo,g as d,s as n,r as u,A as Eo,h as l,f as o,c as s,j as L,u as g,x as m,k as U,l as Oo,y as i,a as r,v as f,d as _,t as T,w as b}from"../chunks/index.d9030fc9.js";import{T as xt}from"../chunks/Tip.baa67368.js";import{D as R}from"../chunks/Docstring.ffac8efa.js";import{C as Ke}from"../chunks/CodeBlock.e6cd0d95.js";import{E as lo}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H,E as Ao}from"../chunks/EditOnGithub.91d95064.js";function Do(M){let a,y="Example:",p,h,v;return h=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVEJpZ0NvZGVDb25maWclMkMlMjBHUFRCaWdDb2RlTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwR1BUQmlnQ29kZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwR1BUQmlnQ29kZUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBHUFRCaWdDb2RlTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTBigCodeConfig, GPTBigCodeModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a GPTBigCode configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = GPTBigCodeConfig() | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span> | |
| <span class="hljs-meta">>>> </span>model = GPTBigCodeModel(configuration) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Accessing the model configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = model.config`,wrap:!1}}),{c(){a=d("p"),a.textContent=y,p=n(),u(h.$$.fragment)},l(c){a=l(c,"P",{"data-svelte-h":!0}),m(a)!=="svelte-11lpom8"&&(a.textContent=y),p=s(c),g(h.$$.fragment,c)},m(c,k){r(c,a,k),r(c,p,k),f(h,c,k),v=!0},p:xe,i(c){v||(_(h.$$.fragment,c),v=!0)},o(c){T(h.$$.fragment,c),v=!1},d(c){c&&(o(a),o(p)),b(h,c)}}}function Xo(M){let a,y=`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=d("p"),a.innerHTML=y},l(p){a=l(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(p,h){r(p,a,h)},p:xe,d(p){p&&o(a)}}}function Qo(M){let a,y="Example:",p,h,v;return h=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFRCaWdDb2RlTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUQmlnQ29kZU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiaWdjb2RlJTJGZ3B0X2JpZ2NvZGUtc2FudGFjb2RlciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTBigCodeModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>) | |
| <span class="hljs-meta">>>> </span>model = GPTBigCodeModel.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"Hello, my dog is cute"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){a=d("p"),a.textContent=y,p=n(),u(h.$$.fragment)},l(c){a=l(c,"P",{"data-svelte-h":!0}),m(a)!=="svelte-11lpom8"&&(a.textContent=y),p=s(c),g(h.$$.fragment,c)},m(c,k){r(c,a,k),r(c,p,k),f(h,c,k),v=!0},p:xe,i(c){v||(_(h.$$.fragment,c),v=!0)},o(c){T(h.$$.fragment,c),v=!1},d(c){c&&(o(a),o(p)),b(h,c)}}}function Yo(M){let a,y=`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=d("p"),a.innerHTML=y},l(p){a=l(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(p,h){r(p,a,h)},p:xe,d(p){p&&o(a)}}}function Ko(M){let a,y="Example:",p,h,v;return h=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEdQVEJpZ0NvZGVGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUQmlnQ29kZUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJiaWdjb2RlJTJGZ3B0X2JpZ2NvZGUtc2FudGFjb2RlciUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTBigCodeForCausalLM | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>) | |
| <span class="hljs-meta">>>> </span>model = GPTBigCodeForCausalLM.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"Hello, my dog is cute"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">"input_ids"</span>]) | |
| <span class="hljs-meta">>>> </span>loss = outputs.loss | |
| <span class="hljs-meta">>>> </span>logits = outputs.logits`,wrap:!1}}),{c(){a=d("p"),a.textContent=y,p=n(),u(h.$$.fragment)},l(c){a=l(c,"P",{"data-svelte-h":!0}),m(a)!=="svelte-11lpom8"&&(a.textContent=y),p=s(c),g(h.$$.fragment,c)},m(c,k){r(c,a,k),r(c,p,k),f(h,c,k),v=!0},p:xe,i(c){v||(_(h.$$.fragment,c),v=!0)},o(c){T(h.$$.fragment,c),v=!1},d(c){c&&(o(a),o(p)),b(h,c)}}}function en(M){let a,y=`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=d("p"),a.innerHTML=y},l(p){a=l(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(p,h){r(p,a,h)},p:xe,d(p){p&&o(a)}}}function tn(M){let a,y=`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=d("p"),a.innerHTML=y},l(p){a=l(p,"P",{"data-svelte-h":!0}),m(a)!=="svelte-fincs2"&&(a.innerHTML=y)},m(p,h){r(p,a,h)},p:xe,d(p){p&&o(a)}}}function on(M){let a,y,p,h,v,c,k,et,K,co='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.',tt,ee,po="The abstract from the paper is the following:",ot,te,mo='<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>',nt,oe,ho='The model is an optimized <a href="https://huggingface.co/docs/transformers/model_doc/gpt2" rel="nofollow">GPT2 model</a> with support for Multi-Query Attention.',st,ne,at,se,uo="The main differences compared to GPT2.",rt,ae,go="<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>-><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 openai-community/gpt2 model).</li>",it,re,fo='You can read more about the optimizations in the <a href="https://github.com/huggingface/transformers/pull/22575" rel="nofollow">original pull request</a>',dt,ie,lt,de,_o="First, make sure to install the latest version of Flash Attention 2 to include the sliding window attention feature.",ct,le,pt,ce,To="Make also sure that you have a hardware that is compatible with Flash-Attention 2. Read more about it in the official documentation of flash-attn repository. Make also sure to load your model in half-precision (e.g. `torch.float16“)",mt,pe,bo="To load and run a model using Flash Attention 2, refer to the snippet below:",ht,me,ut,he,gt,ue,yo="Below is a expected speedup diagram that compares pure inference time between the native implementation in transformers using <code>bigcode/starcoder</code> checkpoint and the Flash Attention 2 version of the model using two different sequence lengths.",ft,V,vo='<img src="https://huggingface.co/datasets/ybelkada/documentation-images/resolve/main/starcoder-speedup.png"/>',_t,ge,Tt,B,fe,zt,ze,ko=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_36049/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.`,Ft,Fe,Co=`Configuration objects inherit from <a href="/docs/transformers/pr_36049/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/pr_36049/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,qt,E,bt,_e,yt,$,Te,It,qe,wo="The bare GPT_BIGCODE Model transformer outputting raw hidden-states without any specific head on top.",Jt,Ie,Mo=`This model inherits from <a href="/docs/transformers/pr_36049/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.)`,jt,Je,$o=`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.`,Lt,F,be,Ut,je,Po='The <a href="/docs/transformers/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeModel">GPTBigCodeModel</a> forward method, overrides the <code>__call__</code> special method.',Wt,O,Zt,A,vt,ye,kt,P,ve,Nt,Le,Go=`The GPT_BIGCODE Model transformer with a language modeling head on top (linear layer with weights tied to the input | |
| embeddings).`,Ht,Ue,Bo=`This model inherits from <a href="/docs/transformers/pr_36049/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.)`,St,We,xo=`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.`,Rt,q,ke,Vt,Ze,zo='The <a href="/docs/transformers/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForCausalLM">GPTBigCodeForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Et,D,Ot,X,Ct,Ce,wt,C,we,At,Ne,Fo="The GPTBigCode Model transformer with a sequence classification head on top (linear layer).",Dt,He,qo=`<a href="/docs/transformers/pr_36049/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.`,Xt,Se,Io=`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).`,Qt,Re,Jo=`This model inherits from <a href="/docs/transformers/pr_36049/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.)`,Yt,Ve,jo=`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.`,Kt,W,Me,eo,Ee,Lo='The <a href="/docs/transformers/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForSequenceClassification">GPTBigCodeForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',to,Q,Mt,$e,$t,G,Pe,oo,Oe,Uo=`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.`,no,Ae,Wo=`This model inherits from <a href="/docs/transformers/pr_36049/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.)`,so,De,Zo=`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.`,ao,Z,Ge,ro,Xe,No='The <a href="/docs/transformers/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeForTokenClassification">GPTBigCodeForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',io,Y,Pt,Be,Gt,Ye,Bt;return v=new H({props:{title:"GPTBigCode",local:"gptbigcode",headingTag:"h1"}}),k=new H({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ne=new H({props:{title:"Implementation details",local:"implementation-details",headingTag:"h2"}}),ie=new H({props:{title:"Combining Starcoder and Flash Attention 2",local:"combining-starcoder-and-flash-attention-2",headingTag:"h2"}}),le=new Ke({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),me=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUyMCUyMyUyMHRoZSUyMGRldmljZSUyMHRvJTIwbG9hZCUyMHRoZSUyMG1vZGVsJTIwb250byUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMmZsYXNoX2F0dGVudGlvbl8yJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ2NvZGUlMkZncHRfYmlnY29kZS1zYW50YWNvZGVyJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmRlZiUyMGhlbGxvX3dvcmxkKCklM0ElMjIlMEElMEFtb2RlbF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8oZGV2aWNlKSUwQW1vZGVsLnRvKGRldmljZSklMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKiptb2RlbF9pbnB1dHMlMkMlMjBtYXhfbmV3X3Rva2VucyUzRDMwJTJDJTIwZG9fc2FtcGxlJTNERmFsc2UpJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer | |
| <span class="hljs-meta">>>> </span>device = <span class="hljs-string">"cuda"</span> <span class="hljs-comment"># the device to load the model onto</span> | |
| <span class="hljs-meta">>>> </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>, torch_dtype=torch.float16, attn_implementation=<span class="hljs-string">"flash_attention_2"</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"bigcode/gpt_bigcode-santacoder"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"def hello_world():"</span> | |
| <span class="hljs-meta">>>> </span>model_inputs = tokenizer([prompt], return_tensors=<span class="hljs-string">"pt"</span>).to(device) | |
| <span class="hljs-meta">>>> </span>model.to(device) | |
| <span class="hljs-meta">>>> </span>generated_ids = model.generate(**model_inputs, max_new_tokens=<span class="hljs-number">30</span>, do_sample=<span class="hljs-literal">False</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer.batch_decode(generated_ids)[<span class="hljs-number">0</span>] | |
| <span class="hljs-string">'def hello_world():\\n print("hello world")\\n\\nif __name__ == "__main__":\\n print("hello world")\\n<|endoftext|>'</span>`,wrap:!1}}),he=new H({props:{title:"Expected speedups",local:"expected-speedups",headingTag:"h3"}}),ge=new H({props:{title:"GPTBigCodeConfig",local:"transformers.GPTBigCodeConfig",headingTag:"h2"}}),fe=new R({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) — | |
| 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/pr_36049/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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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>"gelu_pytorch_tanh"</code>) — | |
| Activation function, to be selected in the list <code>["relu", "silu", "gelu", "tanh", "gelu_new", "gelu_pytorch_tanh"]</code>.`,name:"activation_function"},{anchor:"transformers.GPTBigCodeConfig.resid_pdrop",description:`<strong>resid_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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/vr_36049/src/transformers/models/gpt_bigcode/configuration_gpt_bigcode.py#L24"}}),E=new lo({props:{anchor:"transformers.GPTBigCodeConfig.example",$$slots:{default:[Do]},$$scope:{ctx:M}}}),_e=new H({props:{title:"GPTBigCodeModel",local:"transformers.GPTBigCodeModel",headingTag:"h2"}}),Te=new R({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/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) — 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/pr_36049/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/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L787"}}),be=new R({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>) — | |
| <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/pr_36049/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_36049/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_36049/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.GPTBigCodeModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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’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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_36049/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L823",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_36049/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/pr_36049/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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_36049/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions" | |
| >transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),O=new xt({props:{$$slots:{default:[Xo]},$$scope:{ctx:M}}}),A=new lo({props:{anchor:"transformers.GPTBigCodeModel.forward.example",$$slots:{default:[Qo]},$$scope:{ctx:M}}}),ye=new H({props:{title:"GPTBigCodeForCausalLM",local:"transformers.GPTBigCodeForCausalLM",headingTag:"h2"}}),ve=new R({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/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) — 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/pr_36049/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/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1036"}}),ke=new R({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>) — | |
| <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/pr_36049/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_36049/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_36049/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.GPTBigCodeForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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’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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_36049/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>) — | |
| 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/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1129",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_36049/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/pr_36049/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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_36049/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions" | |
| >transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),D=new xt({props:{$$slots:{default:[Yo]},$$scope:{ctx:M}}}),X=new lo({props:{anchor:"transformers.GPTBigCodeForCausalLM.forward.example",$$slots:{default:[Ko]},$$scope:{ctx:M}}}),Ce=new H({props:{title:"GPTBigCodeForSequenceClassification",local:"transformers.GPTBigCodeForSequenceClassification",headingTag:"h2"}}),we=new R({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/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) — 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/pr_36049/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/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1213"}}),Me=new R({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>) — | |
| <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/pr_36049/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_36049/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_36049/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.GPTBigCodeForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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’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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_36049/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>) — | |
| 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 > 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1238"}}),Q=new xt({props:{$$slots:{default:[en]},$$scope:{ctx:M}}}),$e=new H({props:{title:"GPTBigCodeForTokenClassification",local:"transformers.GPTBigCodeForTokenClassification",headingTag:"h2"}}),Pe=new R({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/pr_36049/en/model_doc/gpt_bigcode#transformers.GPTBigCodeConfig">GPTBigCodeConfig</a>) — 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/pr_36049/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/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1340"}}),Ge=new R({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>) — | |
| <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/pr_36049/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_36049/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_36049/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.GPTBigCodeForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[torch.Tensor]</code> of length <code>config.n_layers</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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’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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_36049/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>) — | |
| 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 > 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_36049/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py#L1365"}}),Y=new xt({props:{$$slots:{default:[tn]},$$scope:{ctx:M}}}),Be=new Ao({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/gpt_bigcode.md"}}),{c(){a=d("meta"),y=n(),p=d("p"),h=n(),u(v.$$.fragment),c=n(),u(k.$$.fragment),et=n(),K=d("p"),K.innerHTML=co,tt=n(),ee=d("p"),ee.textContent=po,ot=n(),te=d("p"),te.innerHTML=mo,nt=n(),oe=d("p"),oe.innerHTML=ho,st=n(),u(ne.$$.fragment),at=n(),se=d("p"),se.textContent=uo,rt=n(),ae=d("ul"),ae.innerHTML=go,it=n(),re=d("p"),re.innerHTML=fo,dt=n(),u(ie.$$.fragment),lt=n(),de=d("p"),de.textContent=_o,ct=n(),u(le.$$.fragment),pt=n(),ce=d("p"),ce.textContent=To,mt=n(),pe=d("p"),pe.textContent=bo,ht=n(),u(me.$$.fragment),ut=n(),u(he.$$.fragment),gt=n(),ue=d("p"),ue.innerHTML=yo,ft=n(),V=d("div"),V.innerHTML=vo,_t=n(),u(ge.$$.fragment),Tt=n(),B=d("div"),u(fe.$$.fragment),zt=n(),ze=d("p"),ze.innerHTML=ko,Ft=n(),Fe=d("p"),Fe.innerHTML=Co,qt=n(),u(E.$$.fragment),bt=n(),u(_e.$$.fragment),yt=n(),$=d("div"),u(Te.$$.fragment),It=n(),qe=d("p"),qe.textContent=wo,Jt=n(),Ie=d("p"),Ie.innerHTML=Mo,jt=n(),Je=d("p"),Je.innerHTML=$o,Lt=n(),F=d("div"),u(be.$$.fragment),Ut=n(),je=d("p"),je.innerHTML=Po,Wt=n(),u(O.$$.fragment),Zt=n(),u(A.$$.fragment),vt=n(),u(ye.$$.fragment),kt=n(),P=d("div"),u(ve.$$.fragment),Nt=n(),Le=d("p"),Le.textContent=Go,Ht=n(),Ue=d("p"),Ue.innerHTML=Bo,St=n(),We=d("p"),We.innerHTML=xo,Rt=n(),q=d("div"),u(ke.$$.fragment),Vt=n(),Ze=d("p"),Ze.innerHTML=zo,Et=n(),u(D.$$.fragment),Ot=n(),u(X.$$.fragment),Ct=n(),u(Ce.$$.fragment),wt=n(),C=d("div"),u(we.$$.fragment),At=n(),Ne=d("p"),Ne.textContent=Fo,Dt=n(),He=d("p"),He.innerHTML=qo,Xt=n(),Se=d("p"),Se.innerHTML=Io,Qt=n(),Re=d("p"),Re.innerHTML=Jo,Yt=n(),Ve=d("p"),Ve.innerHTML=jo,Kt=n(),W=d("div"),u(Me.$$.fragment),eo=n(),Ee=d("p"),Ee.innerHTML=Lo,to=n(),u(Q.$$.fragment),Mt=n(),u($e.$$.fragment),$t=n(),G=d("div"),u(Pe.$$.fragment),oo=n(),Oe=d("p"),Oe.textContent=Uo,no=n(),Ae=d("p"),Ae.innerHTML=Wo,so=n(),De=d("p"),De.innerHTML=Zo,ao=n(),Z=d("div"),u(Ge.$$.fragment),ro=n(),Xe=d("p"),Xe.innerHTML=No,io=n(),u(Y.$$.fragment),Pt=n(),u(Be.$$.fragment),Gt=n(),Ye=d("p"),this.h()},l(e){const t=Eo("svelte-u9bgzb",document.head);a=l(t,"META",{name:!0,content:!0}),t.forEach(o),y=s(e),p=l(e,"P",{}),L(p).forEach(o),h=s(e),g(v.$$.fragment,e),c=s(e),g(k.$$.fragment,e),et=s(e),K=l(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1y7x4r1"&&(K.innerHTML=co),tt=s(e),ee=l(e,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-vfdo9a"&&(ee.textContent=po),ot=s(e),te=l(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-smsn49"&&(te.innerHTML=mo),nt=s(e),oe=l(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-1v15zxi"&&(oe.innerHTML=ho),st=s(e),g(ne.$$.fragment,e),at=s(e),se=l(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-kswcp9"&&(se.textContent=uo),rt=s(e),ae=l(e,"UL",{"data-svelte-h":!0}),m(ae)!=="svelte-ll4zqs"&&(ae.innerHTML=go),it=s(e),re=l(e,"P",{"data-svelte-h":!0}),m(re)!=="svelte-4sqm6f"&&(re.innerHTML=fo),dt=s(e),g(ie.$$.fragment,e),lt=s(e),de=l(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-o3pzzu"&&(de.textContent=_o),ct=s(e),g(le.$$.fragment,e),pt=s(e),ce=l(e,"P",{"data-svelte-h":!0}),m(ce)!=="svelte-enej3y"&&(ce.textContent=To),mt=s(e),pe=l(e,"P",{"data-svelte-h":!0}),m(pe)!=="svelte-14hchid"&&(pe.textContent=bo),ht=s(e),g(me.$$.fragment,e),ut=s(e),g(he.$$.fragment,e),gt=s(e),ue=l(e,"P",{"data-svelte-h":!0}),m(ue)!=="svelte-15phqwn"&&(ue.innerHTML=yo),ft=s(e),V=l(e,"DIV",{style:!0,"data-svelte-h":!0}),m(V)!=="svelte-1sxfobm"&&(V.innerHTML=vo),_t=s(e),g(ge.$$.fragment,e),Tt=s(e),B=l(e,"DIV",{class:!0});var I=L(B);g(fe.$$.fragment,I),zt=s(I),ze=l(I,"P",{"data-svelte-h":!0}),m(ze)!=="svelte-xnbwyk"&&(ze.innerHTML=ko),Ft=s(I),Fe=l(I,"P",{"data-svelte-h":!0}),m(Fe)!=="svelte-fh21ub"&&(Fe.innerHTML=Co),qt=s(I),g(E.$$.fragment,I),I.forEach(o),bt=s(e),g(_e.$$.fragment,e),yt=s(e),$=l(e,"DIV",{class:!0});var x=L($);g(Te.$$.fragment,x),It=s(x),qe=l(x,"P",{"data-svelte-h":!0}),m(qe)!=="svelte-ig0mxc"&&(qe.textContent=wo),Jt=s(x),Ie=l(x,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-1ts7qh8"&&(Ie.innerHTML=Mo),jt=s(x),Je=l(x,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-hswkmf"&&(Je.innerHTML=$o),Lt=s(x),F=l(x,"DIV",{class:!0});var J=L(F);g(be.$$.fragment,J),Ut=s(J),je=l(J,"P",{"data-svelte-h":!0}),m(je)!=="svelte-ccy3dm"&&(je.innerHTML=Po),Wt=s(J),g(O.$$.fragment,J),Zt=s(J),g(A.$$.fragment,J),J.forEach(o),x.forEach(o),vt=s(e),g(ye.$$.fragment,e),kt=s(e),P=l(e,"DIV",{class:!0});var z=L(P);g(ve.$$.fragment,z),Nt=s(z),Le=l(z,"P",{"data-svelte-h":!0}),m(Le)!=="svelte-ckfo62"&&(Le.textContent=Go),Ht=s(z),Ue=l(z,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-1ts7qh8"&&(Ue.innerHTML=Bo),St=s(z),We=l(z,"P",{"data-svelte-h":!0}),m(We)!=="svelte-hswkmf"&&(We.innerHTML=xo),Rt=s(z),q=l(z,"DIV",{class:!0});var j=L(q);g(ke.$$.fragment,j),Vt=s(j),Ze=l(j,"P",{"data-svelte-h":!0}),m(Ze)!=="svelte-1to5xa6"&&(Ze.innerHTML=zo),Et=s(j),g(D.$$.fragment,j),Ot=s(j),g(X.$$.fragment,j),j.forEach(o),z.forEach(o),Ct=s(e),g(Ce.$$.fragment,e),wt=s(e),C=l(e,"DIV",{class:!0});var w=L(C);g(we.$$.fragment,w),At=s(w),Ne=l(w,"P",{"data-svelte-h":!0}),m(Ne)!=="svelte-x1zjre"&&(Ne.textContent=Fo),Dt=s(w),He=l(w,"P",{"data-svelte-h":!0}),m(He)!=="svelte-vk71og"&&(He.innerHTML=qo),Xt=s(w),Se=l(w,"P",{"data-svelte-h":!0}),m(Se)!=="svelte-10ugs3m"&&(Se.innerHTML=Io),Qt=s(w),Re=l(w,"P",{"data-svelte-h":!0}),m(Re)!=="svelte-1ts7qh8"&&(Re.innerHTML=Jo),Yt=s(w),Ve=l(w,"P",{"data-svelte-h":!0}),m(Ve)!=="svelte-hswkmf"&&(Ve.innerHTML=jo),Kt=s(w),W=l(w,"DIV",{class:!0});var S=L(W);g(Me.$$.fragment,S),eo=s(S),Ee=l(S,"P",{"data-svelte-h":!0}),m(Ee)!=="svelte-cowg7q"&&(Ee.innerHTML=Lo),to=s(S),g(Q.$$.fragment,S),S.forEach(o),w.forEach(o),Mt=s(e),g($e.$$.fragment,e),$t=s(e),G=l(e,"DIV",{class:!0});var N=L(G);g(Pe.$$.fragment,N),oo=s(N),Oe=l(N,"P",{"data-svelte-h":!0}),m(Oe)!=="svelte-1hph7pq"&&(Oe.textContent=Uo),no=s(N),Ae=l(N,"P",{"data-svelte-h":!0}),m(Ae)!=="svelte-1ts7qh8"&&(Ae.innerHTML=Wo),so=s(N),De=l(N,"P",{"data-svelte-h":!0}),m(De)!=="svelte-hswkmf"&&(De.innerHTML=Zo),ao=s(N),Z=l(N,"DIV",{class:!0});var Qe=L(Z);g(Ge.$$.fragment,Qe),ro=s(Qe),Xe=l(Qe,"P",{"data-svelte-h":!0}),m(Xe)!=="svelte-19w3zmu"&&(Xe.innerHTML=No),io=s(Qe),g(Y.$$.fragment,Qe),Qe.forEach(o),N.forEach(o),Pt=s(e),g(Be.$$.fragment,e),Gt=s(e),Ye=l(e,"P",{}),L(Ye).forEach(o),this.h()},h(){U(a,"name","hf:doc:metadata"),U(a,"content",nn),Oo(V,"text-align","center"),U(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(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,t){i(document.head,a),r(e,y,t),r(e,p,t),r(e,h,t),f(v,e,t),r(e,c,t),f(k,e,t),r(e,et,t),r(e,K,t),r(e,tt,t),r(e,ee,t),r(e,ot,t),r(e,te,t),r(e,nt,t),r(e,oe,t),r(e,st,t),f(ne,e,t),r(e,at,t),r(e,se,t),r(e,rt,t),r(e,ae,t),r(e,it,t),r(e,re,t),r(e,dt,t),f(ie,e,t),r(e,lt,t),r(e,de,t),r(e,ct,t),f(le,e,t),r(e,pt,t),r(e,ce,t),r(e,mt,t),r(e,pe,t),r(e,ht,t),f(me,e,t),r(e,ut,t),f(he,e,t),r(e,gt,t),r(e,ue,t),r(e,ft,t),r(e,V,t),r(e,_t,t),f(ge,e,t),r(e,Tt,t),r(e,B,t),f(fe,B,null),i(B,zt),i(B,ze),i(B,Ft),i(B,Fe),i(B,qt),f(E,B,null),r(e,bt,t),f(_e,e,t),r(e,yt,t),r(e,$,t),f(Te,$,null),i($,It),i($,qe),i($,Jt),i($,Ie),i($,jt),i($,Je),i($,Lt),i($,F),f(be,F,null),i(F,Ut),i(F,je),i(F,Wt),f(O,F,null),i(F,Zt),f(A,F,null),r(e,vt,t),f(ye,e,t),r(e,kt,t),r(e,P,t),f(ve,P,null),i(P,Nt),i(P,Le),i(P,Ht),i(P,Ue),i(P,St),i(P,We),i(P,Rt),i(P,q),f(ke,q,null),i(q,Vt),i(q,Ze),i(q,Et),f(D,q,null),i(q,Ot),f(X,q,null),r(e,Ct,t),f(Ce,e,t),r(e,wt,t),r(e,C,t),f(we,C,null),i(C,At),i(C,Ne),i(C,Dt),i(C,He),i(C,Xt),i(C,Se),i(C,Qt),i(C,Re),i(C,Yt),i(C,Ve),i(C,Kt),i(C,W),f(Me,W,null),i(W,eo),i(W,Ee),i(W,to),f(Q,W,null),r(e,Mt,t),f($e,e,t),r(e,$t,t),r(e,G,t),f(Pe,G,null),i(G,oo),i(G,Oe),i(G,no),i(G,Ae),i(G,so),i(G,De),i(G,ao),i(G,Z),f(Ge,Z,null),i(Z,ro),i(Z,Xe),i(Z,io),f(Y,Z,null),r(e,Pt,t),f(Be,e,t),r(e,Gt,t),r(e,Ye,t),Bt=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),E.$set(I);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),O.$set(x);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),A.$set(J);const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),D.$set(z);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),X.$set(j);const w={};t&2&&(w.$$scope={dirty:t,ctx:e}),Q.$set(w);const S={};t&2&&(S.$$scope={dirty:t,ctx:e}),Y.$set(S)},i(e){Bt||(_(v.$$.fragment,e),_(k.$$.fragment,e),_(ne.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(me.$$.fragment,e),_(he.$$.fragment,e),_(ge.$$.fragment,e),_(fe.$$.fragment,e),_(E.$$.fragment,e),_(_e.$$.fragment,e),_(Te.$$.fragment,e),_(be.$$.fragment,e),_(O.$$.fragment,e),_(A.$$.fragment,e),_(ye.$$.fragment,e),_(ve.$$.fragment,e),_(ke.$$.fragment,e),_(D.$$.fragment,e),_(X.$$.fragment,e),_(Ce.$$.fragment,e),_(we.$$.fragment,e),_(Me.$$.fragment,e),_(Q.$$.fragment,e),_($e.$$.fragment,e),_(Pe.$$.fragment,e),_(Ge.$$.fragment,e),_(Y.$$.fragment,e),_(Be.$$.fragment,e),Bt=!0)},o(e){T(v.$$.fragment,e),T(k.$$.fragment,e),T(ne.$$.fragment,e),T(ie.$$.fragment,e),T(le.$$.fragment,e),T(me.$$.fragment,e),T(he.$$.fragment,e),T(ge.$$.fragment,e),T(fe.$$.fragment,e),T(E.$$.fragment,e),T(_e.$$.fragment,e),T(Te.$$.fragment,e),T(be.$$.fragment,e),T(O.$$.fragment,e),T(A.$$.fragment,e),T(ye.$$.fragment,e),T(ve.$$.fragment,e),T(ke.$$.fragment,e),T(D.$$.fragment,e),T(X.$$.fragment,e),T(Ce.$$.fragment,e),T(we.$$.fragment,e),T(Me.$$.fragment,e),T(Q.$$.fragment,e),T($e.$$.fragment,e),T(Pe.$$.fragment,e),T(Ge.$$.fragment,e),T(Y.$$.fragment,e),T(Be.$$.fragment,e),Bt=!1},d(e){e&&(o(y),o(p),o(h),o(c),o(et),o(K),o(tt),o(ee),o(ot),o(te),o(nt),o(oe),o(st),o(at),o(se),o(rt),o(ae),o(it),o(re),o(dt),o(lt),o(de),o(ct),o(pt),o(ce),o(mt),o(pe),o(ht),o(ut),o(gt),o(ue),o(ft),o(V),o(_t),o(Tt),o(B),o(bt),o(yt),o($),o(vt),o(kt),o(P),o(Ct),o(wt),o(C),o(Mt),o($t),o(G),o(Pt),o(Gt),o(Ye)),o(a),b(v,e),b(k,e),b(ne,e),b(ie,e),b(le,e),b(me,e),b(he,e),b(ge,e),b(fe),b(E),b(_e,e),b(Te),b(be),b(O),b(A),b(ye,e),b(ve),b(ke),b(D),b(X),b(Ce,e),b(we),b(Me),b(Q),b($e,e),b(Pe),b(Ge),b(Y),b(Be,e)}}}const nn='{"title":"GPTBigCode","local":"gptbigcode","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Implementation details","local":"implementation-details","sections":[],"depth":2},{"title":"Combining Starcoder and Flash Attention 2","local":"combining-starcoder-and-flash-attention-2","sections":[{"title":"Expected speedups","local":"expected-speedups","sections":[],"depth":3}],"depth":2},{"title":"GPTBigCodeConfig","local":"transformers.GPTBigCodeConfig","sections":[],"depth":2},{"title":"GPTBigCodeModel","local":"transformers.GPTBigCodeModel","sections":[],"depth":2},{"title":"GPTBigCodeForCausalLM","local":"transformers.GPTBigCodeForCausalLM","sections":[],"depth":2},{"title":"GPTBigCodeForSequenceClassification","local":"transformers.GPTBigCodeForSequenceClassification","sections":[],"depth":2},{"title":"GPTBigCodeForTokenClassification","local":"transformers.GPTBigCodeForTokenClassification","sections":[],"depth":2}],"depth":1}';function sn(M){return So(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hn extends Ro{constructor(a){super(),Vo(this,a,sn,on,Ho,{})}}export{hn as component}; | |
Xet Storage Details
- Size:
- 82.7 kB
- Xet hash:
- 9a4b50a283cb058b77f9c7df10337a2cc2c3f8ffed40b9da4d374ab6cb32c2c7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.