import{s as Un,o as Pn,n as Xe}from"../chunks/scheduler.25b97de1.js";import{S as Hn,i as qn,g as i,s,r as p,A as jn,h as d,f as o,c as a,j as z,u as h,x as m,k as I,y as l,a as n,v as u,d as f,t as g,w as _}from"../chunks/index.d9030fc9.js";import{T as yt}from"../chunks/Tip.baa67368.js";import{D as H}from"../chunks/Docstring.e257edda.js";import{C as uo}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Fn}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as k,E as Wn}from"../chunks/EditOnGithub.91d95064.js";function Bn(M){let r,b;return r=new uo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5lbW90cm9uTW9kZWwlMkMlMjBOZW1vdHJvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBOZW1vdHJvbiUyMG5lbW90cm9uLTE1YiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBOZW1vdHJvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMG5lbW90cm9uLTE1YiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwTmVtb3Ryb25Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NemotronModel, NemotronConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Nemotron nemotron-15b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = NemotronConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the nemotron-15b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = NemotronModel(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(){p(r.$$.fragment)},l(c){h(r.$$.fragment,c)},m(c,v){u(r,c,v),b=!0},p:Xe,i(c){b||(f(r.$$.fragment,c),b=!0)},o(c){g(r.$$.fragment,c),b=!1},d(c){_(r,c)}}}function Sn(M){let r,b=`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(){r=i("p"),r.innerHTML=b},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(c,v){n(c,r,v)},p:Xe,d(c){c&&o(r)}}}function Zn(M){let r,b=`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(){r=i("p"),r.innerHTML=b},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(c,v){n(c,r,v)},p:Xe,d(c){c&&o(r)}}}function An(M){let r,b="Example:",c,v,J;return v=new uo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBOZW1vdHJvbkZvckNhdXNhbExNJTBBJTBBbW9kZWwlMjAlM0QlMjBOZW1vdHJvbkZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZuZW1vdHJvbi0zLThiLWJhc2UtNGstaGYlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGbmVtb3Ryb24tMy04Yi1iYXNlLTRrLWhmJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkhleSUyQyUyMGFyZSUyMHlvdSUyMGNvbnNjaW91cyUzRiUyMENhbiUyMHlvdSUyMHRhbGslMjB0byUyMG1lJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIzJTIwR2VuZXJhdGUlMEFnZW5lcmF0ZV9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMuaW5wdXRfaWRzJTJDJTIwbWF4X2xlbmd0aCUzRDMwKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUlMkMlMjBjbGVhbl91cF90b2tlbml6YXRpb25fc3BhY2VzJTNERmFsc2UpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, NemotronForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = NemotronForCausalLM.from_pretrained(<span class="hljs-string">&quot;nvidia/nemotron-3-8b-base-4k-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;nvidia/nemotron-3-8b-base-4k-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){r=i("p"),r.textContent=b,c=s(),p(v.$$.fragment)},l(y){r=d(y,"P",{"data-svelte-h":!0}),m(r)!=="svelte-11lpom8"&&(r.textContent=b),c=a(y),h(v.$$.fragment,y)},m(y,F){n(y,r,F),n(y,c,F),u(v,y,F),J=!0},p:Xe,i(y){J||(f(v.$$.fragment,y),J=!0)},o(y){g(v.$$.fragment,y),J=!1},d(y){y&&(o(r),o(c)),_(v,y)}}}function Gn(M){let r,b=`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(){r=i("p"),r.innerHTML=b},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(c,v){n(c,r,v)},p:Xe,d(c){c&&o(r)}}}function Qn(M){let r,b=`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(){r=i("p"),r.innerHTML=b},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(c,v){n(c,r,v)},p:Xe,d(c){c&&o(r)}}}function En(M){let r,b=`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(){r=i("p"),r.innerHTML=b},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(c,v){n(c,r,v)},p:Xe,d(c){c&&o(r)}}}function Rn(M){let r,b,c,v,J,y,F,Tt,ee,kt,te,Ro='The use of this model is governed by the <a href="https://developer.nvidia.com/downloads/nv-ai-foundation-models-license" rel="nofollow">NVIDIA AI Foundation Models Community License Agreement</a>.',wt,oe,Mt,ne,Vo='Nemotron-4 is a family of enterprise ready generative text models compatible with <a href="https://www.nvidia.com/en-us/ai-data-science/generative-ai/nemo-framework/" rel="nofollow">NVIDIA NeMo Framework</a>.',$t,se,Oo='NVIDIA NeMo is an end-to-end, cloud-native platform to build, customize, and deploy generative AI models anywhere. It includes training and inferencing frameworks, guardrailing toolkits, data curation tools, and pretrained models, offering enterprises an easy, cost-effective, and fast way to adopt generative AI. To get access to NeMo Framework, please sign up at <a href="https://developer.nvidia.com/nemo-framework/join" rel="nofollow">this link</a>.',Nt,ae,Ct,re,Xo='<a href="https://developer.nvidia.com/blog/nvidia-ai-foundation-models-build-custom-enterprise-chatbots-and-co-pilots-with-production-ready-llms/" rel="nofollow">Announcement Blog</a>',xt,ie,zt,de,Do="<strong>Architecture Type:</strong> Transformer",It,le,Yo="<strong>Network Architecture:</strong> Transformer Decoder (auto-regressive language model).",Jt,ce,Lt,me,Ft,pe,Ko='Minitron is a family of small language models (SLMs) obtained by pruning NVIDIA’s <a href="https://arxiv.org/abs/2402.16819" rel="nofollow">Nemotron-4 15B</a> model. We prune model embedding size, attention heads, and MLP intermediate dimension, following which, we perform continued training with distillation to arrive at the final models.',Ut,he,en='Deriving the Minitron 8B and 4B models from the base 15B model using our approach requires up to <strong>40x fewer training tokens</strong> per model compared to training from scratch; this results in <strong>compute cost savings of 1.8x</strong> for training the full model family (15B, 8B, and 4B). Minitron models exhibit up to a 16% improvement in MMLU scores compared to training from scratch, perform comparably to other community models such as Mistral 7B, Gemma 7B and Llama-3 8B, and outperform state-of-the-art compression techniques from the literature. Please refer to our <a href="https://arxiv.org/abs/2407.14679" rel="nofollow">arXiv paper</a> for more details.',Pt,ue,tn="Minitron models are for research and development only.",Ht,fe,qt,ge,on="The following code provides an example of how to load the Minitron-4B model and use it to perform text generation.",jt,_e,Wt,be,Bt,ve,nn='Minitron is released under the <a href="https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf" rel="nofollow">NVIDIA Open Model License Agreement</a>.',St,ye,Zt,Te,sn='<em>5-shot performance.</em> Language Understanding evaluated using <a href="https://arxiv.org/abs/2009.03300" rel="nofollow">Massive Multitask Language Understanding</a>:',At,ke,an='<thead><tr><th align="left">Average</th></tr></thead> <tbody><tr><td align="left">58.6</td></tr></tbody>',Gt,we,rn='<em>Zero-shot performance.</em> Evaluated using select datasets from the <a href="https://github.com/EleutherAI/lm-evaluation-harness" rel="nofollow">LM Evaluation Harness</a> with additions:',Qt,Me,dn='<thead><tr><th align="left">HellaSwag</th> <th align="left">Winogrande</th> <th align="left">GSM8K</th> <th align="left">ARC-C</th> <th align="left">XLSum</th></tr></thead> <tbody><tr><td align="left">75.0</td> <td align="left">74.0</td> <td align="left">24.1</td> <td align="left">50.9</td> <td align="left">29.5</td></tr></tbody>',Et,$e,ln='<em>Code generation performance</em>. Evaluated using <a href="https://github.com/openai/human-eval" rel="nofollow">HumanEval</a>:',Rt,Ne,cn='<thead><tr><th align="left">p@1, 0-Shot</th></tr></thead> <tbody><tr><td align="left">23.3</td></tr></tbody>',Vt,Ce,mn='Please refer to our <a href="https://arxiv.org/abs/2407.14679" rel="nofollow">paper</a> for the full set of results.',Ot,xe,Xt,ze,pn="If you find our work helpful, please consider citing our paper:",Dt,Ie,Yt,Je,Kt,U,Le,fo,De,hn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronModel">NemotronModel</a>. It is used to instantiate an Nemotron
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 Nemotron-8B.
e.g. <a href="https://huggingface.co/nvidia/nemotron-3-8b-base-4k-hf" rel="nofollow">nvidia/nemotron-3-8b-base-4k-hf</a>.
Configuration objects inherit from <a href="/docs/transformers/pr_30079/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_30079/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,go,R,eo,Fe,to,$,Ue,_o,Ye,un=`The bare Nemotron Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_30079/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.)`,bo,Ke,fn=`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.`,vo,et,gn="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>NemotronDecoderLayer</code>",yo,q,Pe,To,tt,_n='The <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronModel">NemotronModel</a> forward method, overrides the <code>__call__</code> special method.',ko,V,oo,He,no,A,qe,wo,L,je,Mo,ot,bn='The <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronForCausalLM">NemotronForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',$o,O,No,X,so,We,ao,T,Be,Co,nt,vn="The Nemotron Model transformer with a sequence classification head on top (linear layer).",xo,st,yn=`<a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronForSequenceClassification">NemotronForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,zo,at,Tn=`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).`,Io,rt,kn=`This model inherits from <a href="/docs/transformers/pr_30079/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.)`,Jo,it,wn=`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.`,Lo,j,Se,Fo,dt,Mn='The <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronForSequenceClassification">NemotronForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Uo,D,ro,Ze,io,N,Ae,Po,lt,$n=`The Nemotron Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layer on top of the hidden-states output to compute <code>span start logits</code> and <code>span end logits</code>).`,Ho,ct,Nn=`This model inherits from <a href="/docs/transformers/pr_30079/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.)`,qo,mt,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.`,jo,W,Ge,Wo,pt,xn='The <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronForQuestionAnswering">NemotronForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Bo,Y,lo,Qe,co,C,Ee,So,ht,zn=`The Nemotron Model transformer 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.`,Zo,ut,In=`This model inherits from <a href="/docs/transformers/pr_30079/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.)`,Ao,ft,Jn=`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.`,Go,B,Re,Qo,gt,Ln='The <a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronForTokenClassification">NemotronForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Eo,K,mo,Ve,po,vt,ho;return J=new k({props:{title:"Nemotron",local:"nemotron",headingTag:"h1"}}),F=new k({props:{title:"Nemotron",local:"nemotron",headingTag:"h2"}}),ee=new k({props:{title:"License",local:"license",headingTag:"h3"}}),oe=new k({props:{title:"Description",local:"description",headingTag:"h3"}}),ae=new k({props:{title:"References",local:"references",headingTag:"h3"}}),ie=new k({props:{title:"Model Architecture",local:"model-architecture",headingTag:"h3"}}),ce=new k({props:{title:"Minitron",local:"minitron",headingTag:"h2"}}),me=new k({props:{title:"Minitron 4B Base",local:"minitron-4b-base",headingTag:"h3"}}),fe=new k({props:{title:"HuggingFace Quickstart",local:"huggingface-quickstart",headingTag:"h3"}}),_e=new uo({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBJTBBJTIzJTIwTG9hZCUyMHRoZSUyMHRva2VuaXplciUyMGFuZCUyMG1vZGVsJTBBbW9kZWxfcGF0aCUyMCUzRCUyMCdudmlkaWElMkZNaW5pdHJvbi00Qi1CYXNlJyUwQXRva2VuaXplciUyMCUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX3BhdGgpJTBBJTBBZGV2aWNlJTIwJTNEJTIwJ2N1ZGEnJTBBZHR5cGUlMjAlMjAlM0QlMjB0b3JjaC5iZmxvYXQxNiUwQW1vZGVsJTIwJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX3BhdGglMkMlMjB0b3JjaF9kdHlwZSUzRGR0eXBlJTJDJTIwZGV2aWNlX21hcCUzRGRldmljZSklMEElMEElMjMlMjBQcmVwYXJlJTIwdGhlJTIwaW5wdXQlMjB0ZXh0JTBBcHJvbXB0JTIwJTNEJTIwJ0NvbXBsZXRlJTIwdGhlJTIwcGFyYWdyYXBoJTNBJTIwb3VyJTIwc29sYXIlMjBzeXN0ZW0lMjBpcyclMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIuZW5jb2RlKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJ3B0JykudG8obW9kZWwuZGV2aWNlKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTIwdGhlJTIwb3V0cHV0JTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyUyQyUyMG1heF9sZW5ndGglM0QyMCklMEElMEElMjMlMjBEZWNvZGUlMjBhbmQlMjBwcmludCUyMHRoZSUyMG91dHB1dCUwQW91dHB1dF90ZXh0JTIwJTNEJTIwdG9rZW5pemVyLmRlY29kZShvdXRwdXRzJTVCMCU1RCklMEFwcmludChvdXRwdXRfdGV4dCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForCausalLM

<span class="hljs-comment"># Load the tokenizer and model</span>
model_path = <span class="hljs-string">&#x27;nvidia/Minitron-4B-Base&#x27;</span>
tokenizer  = AutoTokenizer.from_pretrained(model_path)

device = <span class="hljs-string">&#x27;cuda&#x27;</span>
dtype  = torch.bfloat16
model  = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)

<span class="hljs-comment"># Prepare the input text</span>
prompt = <span class="hljs-string">&#x27;Complete the paragraph: our solar system is&#x27;</span>
inputs = tokenizer.encode(prompt, return_tensors=<span class="hljs-string">&#x27;pt&#x27;</span>).to(model.device)

<span class="hljs-comment"># Generate the output</span>
outputs = model.generate(inputs, max_length=<span class="hljs-number">20</span>)

<span class="hljs-comment"># Decode and print the output</span>
output_text = tokenizer.decode(outputs[<span class="hljs-number">0</span>])
<span class="hljs-built_in">print</span>(output_text)`,wrap:!1}}),be=new k({props:{title:"License",local:"license",headingTag:"h3"}}),ye=new k({props:{title:"Evaluation Results",local:"evaluation-results",headingTag:"h3"}}),xe=new k({props:{title:"Citation",local:"citation",headingTag:"h3"}}),Ie=new uo({props:{code:"JTQwYXJ0aWNsZSU3Qm1pbml0cm9uMjAyNCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMHRpdGxlJTNEJTdCQ29tcGFjdCUyMExhbmd1YWdlJTIwTW9kZWxzJTIwdmlhJTIwUHJ1bmluZyUyMGFuZCUyMEtub3dsZWRnZSUyMERpc3RpbGxhdGlvbiU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMGF1dGhvciUzRCU3QlNhdXJhdiUyME11cmFsaWRoYXJhbiUyMGFuZCUyMFNoYXJhdGglMjBUdXJ1dmVrZXJlJTIwU3JlZW5pdmFzJTIwYW5kJTIwUmF2aXJhaiUyMEpvc2hpJTIwYW5kJTIwTWFyY2luJTIwQ2hvY2hvd3NraSUyMGFuZCUyME1vc3RvZmElMjBQYXR3YXJ5JTIwYW5kJTIwTW9oYW1tYWQlMjBTaG9leWJpJTIwYW5kJTIwQnJ5YW4lMjBDYXRhbnphcm8lMjBhbmQlMjBKYW4lMjBLYXV0eiUyMGFuZCUyMFBhdmxvJTIwTW9sY2hhbm92JTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwam91cm5hbCUzRCU3QmFyWGl2JTIwcHJlcHJpbnQlMjBhclhpdiUzQTI0MDcuMTQ2NzklN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjB5ZWFyJTNEJTdCMjAyNCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMHVybCUzRCU3Qmh0dHBzJTNBJTJGJTJGYXJ4aXYub3JnJTJGYWJzJTJGMjQwNy4xNDY3OSU3RCUyQyUwQSU3RA==",highlighted:`<span class="hljs-comment">@article{minitron2024,</span>
      title={Compact Language Models via Pruning <span class="hljs-keyword">and</span> Knowledge Distillation},
      author={Saurav Muralidharan <span class="hljs-keyword">and</span> Sharath Turuvekere Sreenivas <span class="hljs-keyword">and</span> Raviraj Joshi <span class="hljs-keyword">and</span> Marcin Chochowski <span class="hljs-keyword">and</span> Mostofa Patwary <span class="hljs-keyword">and</span> Mohammad Shoeybi <span class="hljs-keyword">and</span> Bryan Catanzaro <span class="hljs-keyword">and</span> Jan Kautz <span class="hljs-keyword">and</span> Pavlo Molchanov},
      journal={arXiv preprint arXiv:<span class="hljs-number">2407</span>.<span class="hljs-number">14679</span>},
      year={<span class="hljs-number">2024</span>},
      url={https:<span class="hljs-comment">//arxiv.org/abs/2407.14679},</span>
}`,wrap:!1}}),Je=new k({props:{title:"NemotronConfig",local:"transformers.NemotronConfig",headingTag:"h2"}}),Le=new H({props:{name:"class transformers.NemotronConfig",anchor:"transformers.NemotronConfig",parameters:[{name:"vocab_size",val:" = 256000"},{name:"hidden_size",val:" = 6144"},{name:"intermediate_size",val:" = 24576"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 48"},{name:"head_dim",val:" = None"},{name:"num_key_value_heads",val:" = None"},{name:"hidden_act",val:" = 'relu2'"},{name:"max_position_embeddings",val:" = 4096"},{name:"initializer_range",val:" = 0.0134"},{name:"norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = None"},{name:"bos_token_id",val:" = 2"},{name:"eos_token_id",val:" = 3"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 10000.0"},{name:"partial_rotary_factor",val:" = 0.5"},{name:"attention_bias",val:" = False"},{name:"attention_dropout",val:" = 0.0"},{name:"mlp_bias",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NemotronConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256000) &#x2014;
Vocabulary size of the Nemotron 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_30079/en/model_doc/nemotron#transformers.NemotronModel">NemotronModel</a>`,name:"vocab_size"},{anchor:"transformers.NemotronConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.NemotronConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 24576) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.NemotronConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.NemotronConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 48) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.NemotronConfig.head_dim",description:`<strong>head_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Projection weights dimension in multi-head attention. Set to hidden_size // num_attention_heads if None`,name:"head_dim"},{anchor:"transformers.NemotronConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
<code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if
<code>num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed by meanpooling all the original heads within that group. For more details checkout [this paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to </code>num_attention_heads\`.`,name:"num_key_value_heads"},{anchor:"transformers.NemotronConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu2&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.NemotronConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.NemotronConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0134) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.NemotronConfig.norm_eps",description:`<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the normalization layers.`,name:"norm_eps"},{anchor:"transformers.NemotronConfig.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). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.NemotronConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.NemotronConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.NemotronConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.NemotronConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings"},{anchor:"transformers.NemotronConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.NemotronConfig.partial_rotary_factor",description:"<strong>partial_rotary_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014; Percentage of the query and keys which will have rotary embedding.",name:"partial_rotary_factor"},{anchor:"transformers.NemotronConfig.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in the query, key, value and output projection layers during self-attention.`,name:"attention_bias"},{anchor:"transformers.NemotronConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.NemotronConfig.mlp_bias",description:`<strong>mlp_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in up_proj and down_proj layers in the MLP layers.`,name:"mlp_bias"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/configuration_nemotron.py#L26"}}),R=new Fn({props:{anchor:"transformers.NemotronConfig.example",$$slots:{default:[Bn]},$$scope:{ctx:M}}}),Fe=new k({props:{title:"NemotronModel",local:"transformers.NemotronModel",headingTag:"h2"}}),Ue=new H({props:{name:"class transformers.NemotronModel",anchor:"transformers.NemotronModel",parameters:[{name:"config",val:": NemotronConfig"}],parametersDescription:[{anchor:"transformers.NemotronModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronConfig">NemotronConfig</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/pr_30079/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; NemotronConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L772"}}),Pe=new H({props:{name:"forward",anchor:"transformers.NemotronModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.NemotronModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/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.NemotronModel.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><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</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:"attention_mask"},{anchor:"transformers.NemotronModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.NemotronModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30079/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.NemotronModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.`,name:"inputs_embeds"},{anchor:"transformers.NemotronModel.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.NemotronModel.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.NemotronModel.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.NemotronModel.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/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.NemotronModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L806"}}),V=new yt({props:{$$slots:{default:[Sn]},$$scope:{ctx:M}}}),He=new k({props:{title:"NemotronForCausalLM",local:"transformers.NemotronForCausalLM",headingTag:"h2"}}),qe=new H({props:{name:"class transformers.NemotronForCausalLM",anchor:"transformers.NemotronForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L983"}}),je=new H({props:{name:"forward",anchor:"transformers.NemotronForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"}],parametersDescription:[{anchor:"transformers.NemotronForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/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.NemotronForCausalLM.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><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</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:"attention_mask"},{anchor:"transformers.NemotronForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.NemotronForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30079/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.NemotronForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.`,name:"inputs_embeds"},{anchor:"transformers.NemotronForCausalLM.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.NemotronForCausalLM.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.NemotronForCausalLM.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.NemotronForCausalLM.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/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.NemotronForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1013",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30079/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronConfig"
>NemotronConfig</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>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>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — 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>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30079/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),O=new yt({props:{$$slots:{default:[Zn]},$$scope:{ctx:M}}}),X=new Fn({props:{anchor:"transformers.NemotronForCausalLM.forward.example",$$slots:{default:[An]},$$scope:{ctx:M}}}),We=new k({props:{title:"NemotronForSequenceClassification",local:"transformers.NemotronForSequenceClassification",headingTag:"h2"}}),Be=new H({props:{name:"class transformers.NemotronForSequenceClassification",anchor:"transformers.NemotronForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.NemotronForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronConfig">NemotronConfig</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/pr_30079/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_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1193"}}),Se=new H({props:{name:"forward",anchor:"transformers.NemotronForSequenceClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.NemotronForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/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.NemotronForSequenceClassification.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><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</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:"attention_mask"},{anchor:"transformers.NemotronForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.NemotronForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30079/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.NemotronForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.`,name:"inputs_embeds"},{anchor:"transformers.NemotronForSequenceClassification.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.NemotronForSequenceClassification.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.NemotronForSequenceClassification.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.NemotronForSequenceClassification.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/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.NemotronForSequenceClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.NemotronForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</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/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1225"}}),D=new yt({props:{$$slots:{default:[Gn]},$$scope:{ctx:M}}}),Ze=new k({props:{title:"NemotronForQuestionAnswering",local:"transformers.NemotronForQuestionAnswering",headingTag:"h2"}}),Ae=new H({props:{name:"class transformers.NemotronForQuestionAnswering",anchor:"transformers.NemotronForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.NemotronForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronConfig">NemotronConfig</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/pr_30079/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_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1317"}}),Ge=new H({props:{name:"forward",anchor:"transformers.NemotronForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"start_positions",val:": Optional = None"},{name:"end_positions",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.NemotronForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/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.NemotronForQuestionAnswering.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><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</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:"attention_mask"},{anchor:"transformers.NemotronForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.NemotronForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30079/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.NemotronForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.`,name:"inputs_embeds"},{anchor:"transformers.NemotronForQuestionAnswering.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.NemotronForQuestionAnswering.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.NemotronForQuestionAnswering.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.NemotronForQuestionAnswering.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/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.NemotronForQuestionAnswering.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.NemotronForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.NemotronForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1343"}}),Y=new yt({props:{$$slots:{default:[Qn]},$$scope:{ctx:M}}}),Qe=new k({props:{title:"NemotronForTokenClassification",local:"transformers.NemotronForTokenClassification",headingTag:"h2"}}),Ee=new H({props:{name:"class transformers.NemotronForTokenClassification",anchor:"transformers.NemotronForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.NemotronForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30079/en/model_doc/nemotron#transformers.NemotronConfig">NemotronConfig</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/pr_30079/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_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1417"}}),Re=new H({props:{name:"forward",anchor:"transformers.NemotronForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.NemotronForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/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.NemotronForTokenClassification.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><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30079/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30079/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</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:"attention_mask"},{anchor:"transformers.NemotronForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.NemotronForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30079/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.NemotronForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.`,name:"inputs_embeds"},{anchor:"transformers.NemotronForTokenClassification.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.NemotronForTokenClassification.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.NemotronForTokenClassification.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.NemotronForTokenClassification.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/pr_30079/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.NemotronForTokenClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.NemotronForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</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/vr_30079/src/transformers/models/nemotron/modeling_nemotron.py#L1448"}}),K=new yt({props:{$$slots:{default:[En]},$$scope:{ctx:M}}}),Ve=new Wn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/nemotron.md"}}),{c(){r=i("meta"),b=s(),c=i("p"),v=s(),p(J.$$.fragment),y=s(),p(F.$$.fragment),Tt=s(),p(ee.$$.fragment),kt=s(),te=i("p"),te.innerHTML=Ro,wt=s(),p(oe.$$.fragment),Mt=s(),ne=i("p"),ne.innerHTML=Vo,$t=s(),se=i("p"),se.innerHTML=Oo,Nt=s(),p(ae.$$.fragment),Ct=s(),re=i("p"),re.innerHTML=Xo,xt=s(),p(ie.$$.fragment),zt=s(),de=i("p"),de.innerHTML=Do,It=s(),le=i("p"),le.innerHTML=Yo,Jt=s(),p(ce.$$.fragment),Lt=s(),p(me.$$.fragment),Ft=s(),pe=i("p"),pe.innerHTML=Ko,Ut=s(),he=i("p"),he.innerHTML=en,Pt=s(),ue=i("p"),ue.textContent=tn,Ht=s(),p(fe.$$.fragment),qt=s(),ge=i("p"),ge.textContent=on,jt=s(),p(_e.$$.fragment),Wt=s(),p(be.$$.fragment),Bt=s(),ve=i("p"),ve.innerHTML=nn,St=s(),p(ye.$$.fragment),Zt=s(),Te=i("p"),Te.innerHTML=sn,At=s(),ke=i("table"),ke.innerHTML=an,Gt=s(),we=i("p"),we.innerHTML=rn,Qt=s(),Me=i("table"),Me.innerHTML=dn,Et=s(),$e=i("p"),$e.innerHTML=ln,Rt=s(),Ne=i("table"),Ne.innerHTML=cn,Vt=s(),Ce=i("p"),Ce.innerHTML=mn,Ot=s(),p(xe.$$.fragment),Xt=s(),ze=i("p"),ze.textContent=pn,Dt=s(),p(Ie.$$.fragment),Yt=s(),p(Je.$$.fragment),Kt=s(),U=i("div"),p(Le.$$.fragment),fo=s(),De=i("p"),De.innerHTML=hn,go=s(),p(R.$$.fragment),eo=s(),p(Fe.$$.fragment),to=s(),$=i("div"),p(Ue.$$.fragment),_o=s(),Ye=i("p"),Ye.innerHTML=un,bo=s(),Ke=i("p"),Ke.innerHTML=fn,vo=s(),et=i("p"),et.innerHTML=gn,yo=s(),q=i("div"),p(Pe.$$.fragment),To=s(),tt=i("p"),tt.innerHTML=_n,ko=s(),p(V.$$.fragment),oo=s(),p(He.$$.fragment),no=s(),A=i("div"),p(qe.$$.fragment),wo=s(),L=i("div"),p(je.$$.fragment),Mo=s(),ot=i("p"),ot.innerHTML=bn,$o=s(),p(O.$$.fragment),No=s(),p(X.$$.fragment),so=s(),p(We.$$.fragment),ao=s(),T=i("div"),p(Be.$$.fragment),Co=s(),nt=i("p"),nt.textContent=vn,xo=s(),st=i("p"),st.innerHTML=yn,zo=s(),at=i("p"),at.innerHTML=Tn,Io=s(),rt=i("p"),rt.innerHTML=kn,Jo=s(),it=i("p"),it.innerHTML=wn,Lo=s(),j=i("div"),p(Se.$$.fragment),Fo=s(),dt=i("p"),dt.innerHTML=Mn,Uo=s(),p(D.$$.fragment),ro=s(),p(Ze.$$.fragment),io=s(),N=i("div"),p(Ae.$$.fragment),Po=s(),lt=i("p"),lt.innerHTML=$n,Ho=s(),ct=i("p"),ct.innerHTML=Nn,qo=s(),mt=i("p"),mt.innerHTML=Cn,jo=s(),W=i("div"),p(Ge.$$.fragment),Wo=s(),pt=i("p"),pt.innerHTML=xn,Bo=s(),p(Y.$$.fragment),lo=s(),p(Qe.$$.fragment),co=s(),C=i("div"),p(Ee.$$.fragment),So=s(),ht=i("p"),ht.textContent=zn,Zo=s(),ut=i("p"),ut.innerHTML=In,Ao=s(),ft=i("p"),ft.innerHTML=Jn,Go=s(),B=i("div"),p(Re.$$.fragment),Qo=s(),gt=i("p"),gt.innerHTML=Ln,Eo=s(),p(K.$$.fragment),mo=s(),p(Ve.$$.fragment),po=s(),vt=i("p"),this.h()},l(e){const t=jn("svelte-u9bgzb",document.head);r=d(t,"META",{name:!0,content:!0}),t.forEach(o),b=a(e),c=d(e,"P",{}),z(c).forEach(o),v=a(e),h(J.$$.fragment,e),y=a(e),h(F.$$.fragment,e),Tt=a(e),h(ee.$$.fragment,e),kt=a(e),te=d(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-5ltir7"&&(te.innerHTML=Ro),wt=a(e),h(oe.$$.fragment,e),Mt=a(e),ne=d(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-18vqkxz"&&(ne.innerHTML=Vo),$t=a(e),se=d(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-1inbdxl"&&(se.innerHTML=Oo),Nt=a(e),h(ae.$$.fragment,e),Ct=a(e),re=d(e,"P",{"data-svelte-h":!0}),m(re)!=="svelte-eh2pqk"&&(re.innerHTML=Xo),xt=a(e),h(ie.$$.fragment,e),zt=a(e),de=d(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-1afrym1"&&(de.innerHTML=Do),It=a(e),le=d(e,"P",{"data-svelte-h":!0}),m(le)!=="svelte-8mone6"&&(le.innerHTML=Yo),Jt=a(e),h(ce.$$.fragment,e),Lt=a(e),h(me.$$.fragment,e),Ft=a(e),pe=d(e,"P",{"data-svelte-h":!0}),m(pe)!=="svelte-6qg38c"&&(pe.innerHTML=Ko),Ut=a(e),he=d(e,"P",{"data-svelte-h":!0}),m(he)!=="svelte-nugv14"&&(he.innerHTML=en),Pt=a(e),ue=d(e,"P",{"data-svelte-h":!0}),m(ue)!=="svelte-1890ku0"&&(ue.textContent=tn),Ht=a(e),h(fe.$$.fragment,e),qt=a(e),ge=d(e,"P",{"data-svelte-h":!0}),m(ge)!=="svelte-1ltrinh"&&(ge.textContent=on),jt=a(e),h(_e.$$.fragment,e),Wt=a(e),h(be.$$.fragment,e),Bt=a(e),ve=d(e,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-1smp3z2"&&(ve.innerHTML=nn),St=a(e),h(ye.$$.fragment,e),Zt=a(e),Te=d(e,"P",{"data-svelte-h":!0}),m(Te)!=="svelte-1jomx29"&&(Te.innerHTML=sn),At=a(e),ke=d(e,"TABLE",{"data-svelte-h":!0}),m(ke)!=="svelte-rg1rpw"&&(ke.innerHTML=an),Gt=a(e),we=d(e,"P",{"data-svelte-h":!0}),m(we)!=="svelte-tkg6bs"&&(we.innerHTML=rn),Qt=a(e),Me=d(e,"TABLE",{"data-svelte-h":!0}),m(Me)!=="svelte-kgjah5"&&(Me.innerHTML=dn),Et=a(e),$e=d(e,"P",{"data-svelte-h":!0}),m($e)!=="svelte-oe9pwo"&&($e.innerHTML=ln),Rt=a(e),Ne=d(e,"TABLE",{"data-svelte-h":!0}),m(Ne)!=="svelte-xb08ow"&&(Ne.innerHTML=cn),Vt=a(e),Ce=d(e,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-lze01h"&&(Ce.innerHTML=mn),Ot=a(e),h(xe.$$.fragment,e),Xt=a(e),ze=d(e,"P",{"data-svelte-h":!0}),m(ze)!=="svelte-1viguyj"&&(ze.textContent=pn),Dt=a(e),h(Ie.$$.fragment,e),Yt=a(e),h(Je.$$.fragment,e),Kt=a(e),U=d(e,"DIV",{class:!0});var G=z(U);h(Le.$$.fragment,G),fo=a(G),De=d(G,"P",{"data-svelte-h":!0}),m(De)!=="svelte-1thvpu5"&&(De.innerHTML=hn),go=a(G),h(R.$$.fragment,G),G.forEach(o),eo=a(e),h(Fe.$$.fragment,e),to=a(e),$=d(e,"DIV",{class:!0});var x=z($);h(Ue.$$.fragment,x),_o=a(x),Ye=d(x,"P",{"data-svelte-h":!0}),m(Ye)!=="svelte-1d6xy0b"&&(Ye.innerHTML=un),bo=a(x),Ke=d(x,"P",{"data-svelte-h":!0}),m(Ke)!=="svelte-hswkmf"&&(Ke.innerHTML=fn),vo=a(x),et=d(x,"P",{"data-svelte-h":!0}),m(et)!=="svelte-996czx"&&(et.innerHTML=gn),yo=a(x),q=d(x,"DIV",{class:!0});var Q=z(q);h(Pe.$$.fragment,Q),To=a(Q),tt=d(Q,"P",{"data-svelte-h":!0}),m(tt)!=="svelte-1oa0kq6"&&(tt.innerHTML=_n),ko=a(Q),h(V.$$.fragment,Q),Q.forEach(o),x.forEach(o),oo=a(e),h(He.$$.fragment,e),no=a(e),A=d(e,"DIV",{class:!0});var Oe=z(A);h(qe.$$.fragment,Oe),wo=a(Oe),L=d(Oe,"DIV",{class:!0});var P=z(L);h(je.$$.fragment,P),Mo=a(P),ot=d(P,"P",{"data-svelte-h":!0}),m(ot)!=="svelte-1yi22yq"&&(ot.innerHTML=bn),$o=a(P),h(O.$$.fragment,P),No=a(P),h(X.$$.fragment,P),P.forEach(o),Oe.forEach(o),so=a(e),h(We.$$.fragment,e),ao=a(e),T=d(e,"DIV",{class:!0});var w=z(T);h(Be.$$.fragment,w),Co=a(w),nt=d(w,"P",{"data-svelte-h":!0}),m(nt)!=="svelte-7mvho4"&&(nt.textContent=vn),xo=a(w),st=d(w,"P",{"data-svelte-h":!0}),m(st)!=="svelte-17h104f"&&(st.innerHTML=yn),zo=a(w),at=d(w,"P",{"data-svelte-h":!0}),m(at)!=="svelte-10ugs3m"&&(at.innerHTML=Tn),Io=a(w),rt=d(w,"P",{"data-svelte-h":!0}),m(rt)!=="svelte-1vfgzs5"&&(rt.innerHTML=kn),Jo=a(w),it=d(w,"P",{"data-svelte-h":!0}),m(it)!=="svelte-hswkmf"&&(it.innerHTML=wn),Lo=a(w),j=d(w,"DIV",{class:!0});var E=z(j);h(Se.$$.fragment,E),Fo=a(E),dt=d(E,"P",{"data-svelte-h":!0}),m(dt)!=="svelte-t9b5za"&&(dt.innerHTML=Mn),Uo=a(E),h(D.$$.fragment,E),E.forEach(o),w.forEach(o),ro=a(e),h(Ze.$$.fragment,e),io=a(e),N=d(e,"DIV",{class:!0});var S=z(N);h(Ae.$$.fragment,S),Po=a(S),lt=d(S,"P",{"data-svelte-h":!0}),m(lt)!=="svelte-1xev29k"&&(lt.innerHTML=$n),Ho=a(S),ct=d(S,"P",{"data-svelte-h":!0}),m(ct)!=="svelte-1vfgzs5"&&(ct.innerHTML=Nn),qo=a(S),mt=d(S,"P",{"data-svelte-h":!0}),m(mt)!=="svelte-hswkmf"&&(mt.innerHTML=Cn),jo=a(S),W=d(S,"DIV",{class:!0});var _t=z(W);h(Ge.$$.fragment,_t),Wo=a(_t),pt=d(_t,"P",{"data-svelte-h":!0}),m(pt)!=="svelte-r3heoo"&&(pt.innerHTML=xn),Bo=a(_t),h(Y.$$.fragment,_t),_t.forEach(o),S.forEach(o),lo=a(e),h(Qe.$$.fragment,e),co=a(e),C=d(e,"DIV",{class:!0});var Z=z(C);h(Ee.$$.fragment,Z),So=a(Z),ht=d(Z,"P",{"data-svelte-h":!0}),m(ht)!=="svelte-1vrynnl"&&(ht.textContent=zn),Zo=a(Z),ut=d(Z,"P",{"data-svelte-h":!0}),m(ut)!=="svelte-1vfgzs5"&&(ut.innerHTML=In),Ao=a(Z),ft=d(Z,"P",{"data-svelte-h":!0}),m(ft)!=="svelte-hswkmf"&&(ft.innerHTML=Jn),Go=a(Z),B=d(Z,"DIV",{class:!0});var bt=z(B);h(Re.$$.fragment,bt),Qo=a(bt),gt=d(bt,"P",{"data-svelte-h":!0}),m(gt)!=="svelte-ix93a2"&&(gt.innerHTML=Ln),Eo=a(bt),h(K.$$.fragment,bt),bt.forEach(o),Z.forEach(o),mo=a(e),h(Ve.$$.fragment,e),po=a(e),vt=d(e,"P",{}),z(vt).forEach(o),this.h()},h(){I(r,"name","hf:doc:metadata"),I(r,"content",Vn),I(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(C,"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){l(document.head,r),n(e,b,t),n(e,c,t),n(e,v,t),u(J,e,t),n(e,y,t),u(F,e,t),n(e,Tt,t),u(ee,e,t),n(e,kt,t),n(e,te,t),n(e,wt,t),u(oe,e,t),n(e,Mt,t),n(e,ne,t),n(e,$t,t),n(e,se,t),n(e,Nt,t),u(ae,e,t),n(e,Ct,t),n(e,re,t),n(e,xt,t),u(ie,e,t),n(e,zt,t),n(e,de,t),n(e,It,t),n(e,le,t),n(e,Jt,t),u(ce,e,t),n(e,Lt,t),u(me,e,t),n(e,Ft,t),n(e,pe,t),n(e,Ut,t),n(e,he,t),n(e,Pt,t),n(e,ue,t),n(e,Ht,t),u(fe,e,t),n(e,qt,t),n(e,ge,t),n(e,jt,t),u(_e,e,t),n(e,Wt,t),u(be,e,t),n(e,Bt,t),n(e,ve,t),n(e,St,t),u(ye,e,t),n(e,Zt,t),n(e,Te,t),n(e,At,t),n(e,ke,t),n(e,Gt,t),n(e,we,t),n(e,Qt,t),n(e,Me,t),n(e,Et,t),n(e,$e,t),n(e,Rt,t),n(e,Ne,t),n(e,Vt,t),n(e,Ce,t),n(e,Ot,t),u(xe,e,t),n(e,Xt,t),n(e,ze,t),n(e,Dt,t),u(Ie,e,t),n(e,Yt,t),u(Je,e,t),n(e,Kt,t),n(e,U,t),u(Le,U,null),l(U,fo),l(U,De),l(U,go),u(R,U,null),n(e,eo,t),u(Fe,e,t),n(e,to,t),n(e,$,t),u(Ue,$,null),l($,_o),l($,Ye),l($,bo),l($,Ke),l($,vo),l($,et),l($,yo),l($,q),u(Pe,q,null),l(q,To),l(q,tt),l(q,ko),u(V,q,null),n(e,oo,t),u(He,e,t),n(e,no,t),n(e,A,t),u(qe,A,null),l(A,wo),l(A,L),u(je,L,null),l(L,Mo),l(L,ot),l(L,$o),u(O,L,null),l(L,No),u(X,L,null),n(e,so,t),u(We,e,t),n(e,ao,t),n(e,T,t),u(Be,T,null),l(T,Co),l(T,nt),l(T,xo),l(T,st),l(T,zo),l(T,at),l(T,Io),l(T,rt),l(T,Jo),l(T,it),l(T,Lo),l(T,j),u(Se,j,null),l(j,Fo),l(j,dt),l(j,Uo),u(D,j,null),n(e,ro,t),u(Ze,e,t),n(e,io,t),n(e,N,t),u(Ae,N,null),l(N,Po),l(N,lt),l(N,Ho),l(N,ct),l(N,qo),l(N,mt),l(N,jo),l(N,W),u(Ge,W,null),l(W,Wo),l(W,pt),l(W,Bo),u(Y,W,null),n(e,lo,t),u(Qe,e,t),n(e,co,t),n(e,C,t),u(Ee,C,null),l(C,So),l(C,ht),l(C,Zo),l(C,ut),l(C,Ao),l(C,ft),l(C,Go),l(C,B),u(Re,B,null),l(B,Qo),l(B,gt),l(B,Eo),u(K,B,null),n(e,mo,t),u(Ve,e,t),n(e,po,t),n(e,vt,t),ho=!0},p(e,[t]){const G={};t&2&&(G.$$scope={dirty:t,ctx:e}),R.$set(G);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),V.$set(x);const Q={};t&2&&(Q.$$scope={dirty:t,ctx:e}),O.$set(Q);const Oe={};t&2&&(Oe.$$scope={dirty:t,ctx:e}),X.$set(Oe);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),D.$set(P);const w={};t&2&&(w.$$scope={dirty:t,ctx:e}),Y.$set(w);const E={};t&2&&(E.$$scope={dirty:t,ctx:e}),K.$set(E)},i(e){ho||(f(J.$$.fragment,e),f(F.$$.fragment,e),f(ee.$$.fragment,e),f(oe.$$.fragment,e),f(ae.$$.fragment,e),f(ie.$$.fragment,e),f(ce.$$.fragment,e),f(me.$$.fragment,e),f(fe.$$.fragment,e),f(_e.$$.fragment,e),f(be.$$.fragment,e),f(ye.$$.fragment,e),f(xe.$$.fragment,e),f(Ie.$$.fragment,e),f(Je.$$.fragment,e),f(Le.$$.fragment,e),f(R.$$.fragment,e),f(Fe.$$.fragment,e),f(Ue.$$.fragment,e),f(Pe.$$.fragment,e),f(V.$$.fragment,e),f(He.$$.fragment,e),f(qe.$$.fragment,e),f(je.$$.fragment,e),f(O.$$.fragment,e),f(X.$$.fragment,e),f(We.$$.fragment,e),f(Be.$$.fragment,e),f(Se.$$.fragment,e),f(D.$$.fragment,e),f(Ze.$$.fragment,e),f(Ae.$$.fragment,e),f(Ge.$$.fragment,e),f(Y.$$.fragment,e),f(Qe.$$.fragment,e),f(Ee.$$.fragment,e),f(Re.$$.fragment,e),f(K.$$.fragment,e),f(Ve.$$.fragment,e),ho=!0)},o(e){g(J.$$.fragment,e),g(F.$$.fragment,e),g(ee.$$.fragment,e),g(oe.$$.fragment,e),g(ae.$$.fragment,e),g(ie.$$.fragment,e),g(ce.$$.fragment,e),g(me.$$.fragment,e),g(fe.$$.fragment,e),g(_e.$$.fragment,e),g(be.$$.fragment,e),g(ye.$$.fragment,e),g(xe.$$.fragment,e),g(Ie.$$.fragment,e),g(Je.$$.fragment,e),g(Le.$$.fragment,e),g(R.$$.fragment,e),g(Fe.$$.fragment,e),g(Ue.$$.fragment,e),g(Pe.$$.fragment,e),g(V.$$.fragment,e),g(He.$$.fragment,e),g(qe.$$.fragment,e),g(je.$$.fragment,e),g(O.$$.fragment,e),g(X.$$.fragment,e),g(We.$$.fragment,e),g(Be.$$.fragment,e),g(Se.$$.fragment,e),g(D.$$.fragment,e),g(Ze.$$.fragment,e),g(Ae.$$.fragment,e),g(Ge.$$.fragment,e),g(Y.$$.fragment,e),g(Qe.$$.fragment,e),g(Ee.$$.fragment,e),g(Re.$$.fragment,e),g(K.$$.fragment,e),g(Ve.$$.fragment,e),ho=!1},d(e){e&&(o(b),o(c),o(v),o(y),o(Tt),o(kt),o(te),o(wt),o(Mt),o(ne),o($t),o(se),o(Nt),o(Ct),o(re),o(xt),o(zt),o(de),o(It),o(le),o(Jt),o(Lt),o(Ft),o(pe),o(Ut),o(he),o(Pt),o(ue),o(Ht),o(qt),o(ge),o(jt),o(Wt),o(Bt),o(ve),o(St),o(Zt),o(Te),o(At),o(ke),o(Gt),o(we),o(Qt),o(Me),o(Et),o($e),o(Rt),o(Ne),o(Vt),o(Ce),o(Ot),o(Xt),o(ze),o(Dt),o(Yt),o(Kt),o(U),o(eo),o(to),o($),o(oo),o(no),o(A),o(so),o(ao),o(T),o(ro),o(io),o(N),o(lo),o(co),o(C),o(mo),o(po),o(vt)),o(r),_(J,e),_(F,e),_(ee,e),_(oe,e),_(ae,e),_(ie,e),_(ce,e),_(me,e),_(fe,e),_(_e,e),_(be,e),_(ye,e),_(xe,e),_(Ie,e),_(Je,e),_(Le),_(R),_(Fe,e),_(Ue),_(Pe),_(V),_(He,e),_(qe),_(je),_(O),_(X),_(We,e),_(Be),_(Se),_(D),_(Ze,e),_(Ae),_(Ge),_(Y),_(Qe,e),_(Ee),_(Re),_(K),_(Ve,e)}}}const Vn='{"title":"Nemotron","local":"nemotron","sections":[{"title":"Nemotron","local":"nemotron","sections":[{"title":"License","local":"license","sections":[],"depth":3},{"title":"Description","local":"description","sections":[],"depth":3},{"title":"References","local":"references","sections":[],"depth":3},{"title":"Model Architecture","local":"model-architecture","sections":[],"depth":3}],"depth":2},{"title":"Minitron","local":"minitron","sections":[{"title":"Minitron 4B Base","local":"minitron-4b-base","sections":[],"depth":3},{"title":"HuggingFace Quickstart","local":"huggingface-quickstart","sections":[],"depth":3},{"title":"License","local":"license","sections":[],"depth":3},{"title":"Evaluation Results","local":"evaluation-results","sections":[],"depth":3},{"title":"Citation","local":"citation","sections":[],"depth":3}],"depth":2},{"title":"NemotronConfig","local":"transformers.NemotronConfig","sections":[],"depth":2},{"title":"NemotronModel","local":"transformers.NemotronModel","sections":[],"depth":2},{"title":"NemotronForCausalLM","local":"transformers.NemotronForCausalLM","sections":[],"depth":2},{"title":"NemotronForSequenceClassification","local":"transformers.NemotronForSequenceClassification","sections":[],"depth":2},{"title":"NemotronForQuestionAnswering","local":"transformers.NemotronForQuestionAnswering","sections":[],"depth":2},{"title":"NemotronForTokenClassification","local":"transformers.NemotronForTokenClassification","sections":[],"depth":2}],"depth":1}';function On(M){return Pn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ns extends Hn{constructor(r){super(),qn(this,r,On,Rn,Un,{})}}export{ns as component};
