import{s as Es,o as Rs,n as j}from"../chunks/scheduler.9bc65507.js";import{S as Hs,i as Ls,g as a,s as d,u as g,A as Qs,h as r,f as o,c,j as v,v as _,y as f,k as h,o as s,a as m,w as T,d as b,t as y,x as M}from"../chunks/index.78c82d43.js";import{T as Je}from"../chunks/Tip.87d55b76.js";import{D as Z}from"../chunks/Docstring.f3d04bd2.js";import{C as L}from"../chunks/CodeBlock.48618ec2.js";import{I as q}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Pe}from"../chunks/ExampleCodeBlock.872b014d.js";function Ss(k){let t,u;return t=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hDb25maWclMkMlMjBHUFROZW9YTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwR1BUTmVvWCUyMGdwdC1uZW94LTIwYiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBHUFROZW9YQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGdwdC1uZW94LTIwYiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwR1BUTmVvWE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXConfig, GPTNeoXModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a GPTNeoX gpt-neox-20b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = GPTNeoXConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the gpt-neox-20b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXModel(configuration)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){g(t.$$.fragment)},l(l){_(t.$$.fragment,l)},m(l,p){T(t,l,p),u=!0},p:j,i(l){u||(b(t.$$.fragment,l),u=!0)},o(l){y(t.$$.fragment,l),u=!1},d(l){M(t,l)}}}function As(k){let t,u="be encoded differently whether it is at the beginning of the sentence (without space) or not:",l,p,w;return p=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hUb2tlbml6ZXJGYXN0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwR1BUTmVvWFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDIlMjIpJTBBdG9rZW5pemVyKCUyMkhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBdG9rZW5pemVyKCUyMiUyMEhlbGxvJTIwd29ybGQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = GPTNeoXTokenizerFast.from_pretrained(<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">15496</span>, <span class="hljs-number">995</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">18435</span>, <span class="hljs-number">995</span>]`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-12atnao"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function Ys(k){let t,u="When used with <code>is_split_into_words=True</code>, this tokenizer needs to be instantiated with <code>add_prefix_space=True</code>.";return{c(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-9gg91e"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function Os(k){let t,u=`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(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function Ds(k){let t,u=`This example uses a random model as the real ones are all very big. To get proper results, you should use
EleutherAI/gpt-neox-20b instead of trl-internal-testing/tiny-random-GPTNeoXForCausalLM. If you get out-of-memory when loading that checkpoint, you can try
adding <code>device_map=&quot;auto&quot;</code> in the <code>from_pretrained</code> call.`;return{c(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1lgpfzy"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function Ks(k){let t,u="Example:",l,p,w;return p=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnRybC1pbnRlcm5hbC10ZXN0aW5nJTJGdGlueS1yYW5kb20tR1BUTmVvWEZvckNhdXNhbExNJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUTmVvWE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJ0cmwtaW50ZXJuYWwtdGVzdGluZyUyRnRpbnktcmFuZG9tLUdQVE5lb1hGb3JDYXVzYWxMTSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXModel.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function ea(k){let t,u=`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(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function ta(k){let t,u="Example:",l,p,w;return p=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YRm9yQ2F1c2FsTE0lMkMlMjBHUFROZW9YQ29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJFbGV1dGhlckFJJTJGZ3B0LW5lb3gtMjBiJTIyKSUwQWNvbmZpZyUyMCUzRCUyMEdQVE5lb1hDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMkVsZXV0aGVyQUklMkZncHQtbmVveC0yMGIlMjIpJTBBY29uZmlnLmlzX2RlY29kZXIlMjAlM0QlMjBUcnVlJTBBbW9kZWwlMjAlM0QlMjBHUFROZW9YRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMkVsZXV0aGVyQUklMkZncHQtbmVveC0yMGIlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXForCausalLM, GPTNeoXConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = GPTNeoXConfig.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForCausalLM.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>, config=config)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function oa(k){let t,u=`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(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function na(k){let t,u=`This example uses a random model as the real ones are all very big. To get proper results, you should use
EleutherAI/gpt-neox-20b instead of trl-internal-testing/tiny-random-GPTNeoXForCausalLM. If you get out-of-memory when loading that checkpoint, you can try
adding <code>device_map=&quot;auto&quot;</code> in the <code>from_pretrained</code> call.`;return{c(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1lgpfzy"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function sa(k){let t,u="Example:",l,p,w;return p=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnRybC1pbnRlcm5hbC10ZXN0aW5nJTJGdGlueS1yYW5kb20tR1BUTmVvWEZvckNhdXNhbExNJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUTmVvWEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJ0cmwtaW50ZXJuYWwtdGVzdGluZyUyRnRpbnktcmFuZG9tLUdQVE5lb1hGb3JDYXVzYWxMTSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function aa(k){let t,u=`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(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function ra(k){let t,u="Example of single-label classification:",l,p,w;return p=new L({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEdQVE5lb1hGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydHJsLWludGVybmFsLXRlc3RpbmclMkZ0aW55LXJhbmRvbS1HUFROZW9YRm9yQ2F1c2FsTE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBHUFROZW9YRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydHJsLWludGVybmFsLXRlc3RpbmclMkZ0aW55LXJhbmRvbS1HUFROZW9YRm9yQ2F1c2FsTE0lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEdQVE5lb1hGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ0cmwtaW50ZXJuYWwtdGVzdGluZyUyRnRpbnktcmFuZG9tLUdQVE5lb1hGb3JDYXVzYWxMTSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-ykxpe4"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function la(k){let t,u="Example of multi-label classification:",l,p,w;return p=new L({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEdQVE5lb1hGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydHJsLWludGVybmFsLXRlc3RpbmclMkZ0aW55LXJhbmRvbS1HUFROZW9YRm9yQ2F1c2FsTE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBHUFROZW9YRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydHJsLWludGVybmFsLXRlc3RpbmclMkZ0aW55LXJhbmRvbS1HUFROZW9YRm9yQ2F1c2FsTE0lMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEdQVE5lb1hGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ0cmwtaW50ZXJuYWwtdGVzdGluZyUyRnRpbnktcmFuZG9tLUdQVE5lb1hGb3JDYXVzYWxMTSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;trl-internal-testing/tiny-random-GPTNeoXForCausalLM&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1l8e32d"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function ia(k){let t,u=`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(){t=a("p"),t.innerHTML=u},l(l){t=r(l,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,p){m(l,t,p)},p:j,d(l){l&&o(t)}}}function da(k){let t,u="Example:",l,p,w;return p=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyTGFyc0pvbmFzc29uJTJGcHl0aGlhLTQxMG0tZGVkdXBlZC1zZnQtc3dlZGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMEdQVE5lb1hGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJMYXJzSm9uYXNzb24lMkZweXRoaWEtNDEwbS1kZWR1cGVkLXNmdC1zd2VkaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;LarsJonasson/pythia-410m-deduped-sft-swedish&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForTokenClassification.from_pretrained(<span class="hljs-string">&quot;LarsJonasson/pythia-410m-deduped-sft-swedish&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.25</span>`}}),{c(){t=a("p"),t.textContent=u,l=d(),g(p.$$.fragment)},l(n){t=r(n,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=u),l=c(n),_(p.$$.fragment,n)},m(n,$){m(n,t,$),m(n,l,$),T(p,n,$),w=!0},p:j,i(n){w||(b(p.$$.fragment,n),w=!0)},o(n){y(p.$$.fragment,n),w=!1},d(n){n&&(o(t),o(l)),M(p,n)}}}function ca(k){let t,u,l,p,w,n,$,ze,Oo,_t,An="GPT-NeoX",_o,Q,se,At,Ue,Do,Tt,Yn="Overview",To,We,On=`We introduce GPT-NeoX-20B, a 20 billion parameter autoregressive language model trained on the Pile, whose weights will
be made freely and openly available to the public through a permissive license. It is, to the best of our knowledge,
the largest dense autoregressive model that has publicly available weights at the time of submission. In this work,
we describe GPT-NeoX-20B’s architecture and training and evaluate its performance on a range of language-understanding,
mathematics, and knowledge-based tasks. We find that GPT-NeoX-20B is a particularly powerful few-shot reasoner and
gains far more in performance when evaluated five-shot than similarly sized GPT-3 and FairSeq models. We open-source
the training and evaluation code, as well as the model weights, at <a href="https://github.com/EleutherAI/gpt-neox" rel="nofollow">https://github.com/EleutherAI/gpt-neox</a>.`,bo,Ze,Dn=`Development of the model was led by Sid Black, Stella Biderman and Eric Hallahan, and the model was trained with
generous the support of <a href="https://www.coreweave.com/" rel="nofollow">CoreWeave</a>.`,yo,Ie,Kn="GPT-NeoX-20B was trained with fp16, thus it is recommended to initialize the model as follows:",Mo,Ve,vo,Be,es=`GPT-NeoX-20B also has a different tokenizer from the one used in GPT-J-6B and GPT-Neo. The new tokenizer allocates
additional tokens to whitespace characters, making the model more suitable for certain tasks like code generation.`,wo,S,ae,Yt,qe,Ko,bt,ts="Generation",ko,Ee,os="The <code>generate()</code> method can be used to generate text using GPT Neo model.",$o,Re,Go,A,re,Ot,He,en,yt,ns="Documentation resources",No,Le,ss='<li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',jo,Y,le,Dt,Qe,tn,Mt,as="GPTNeoXConfig",Co,J,Se,on,vt,rs=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXModel">GPTNeoXModel</a>. It is used to instantiate an
GPTNeoX 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 GPTNeoX
<a href="https://huggingface.co/EleutherAI/gpt-neox-20b" rel="nofollow">EleutherAI/gpt-neox-20b</a> architecture.`,nn,wt,ls=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,sn,ie,Xo,O,de,Kt,Ae,an,kt,is="GPTNeoXTokenizerFast",xo,G,Ye,rn,$t,ds=`Construct a “fast” GPT-NeoX-20B tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on byte-level
Byte-Pair-Encoding.`,ln,Gt,cs="This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will",dn,ce,cn,Nt,ps=`You can get around that behavior by passing <code>add_prefix_space=True</code> when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`,pn,pe,mn,jt,ms=`This tokenizer inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Fo,D,me,eo,Oe,hn,Ct,hs="GPTNeoXModel",Jo,I,De,un,Xt,us=`The bare GPTNeoX Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,fn,C,Ke,gn,xt,fs='The <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXModel">GPTNeoXModel</a> forward method, overrides the <code>__call__</code> special method.',_n,he,Tn,ue,bn,fe,Po,K,ge,to,et,yn,Ft,gs="GPTNeoXForCausalLM",zo,V,tt,Mn,Jt,_s=`GPTNeoX Model with a <code>language modeling</code> head on top for CLM fine-tuning.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,vn,z,ot,wn,Pt,Ts='The <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForCausalLM">GPTNeoXForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',kn,_e,$n,Te,Uo,ee,be,oo,nt,Gn,zt,bs="GPTNeoXForQuestionAnswering",Wo,P,st,Nn,Ut,ys=`The GPT-NeoX 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>).`,jn,Wt,Ms=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Cn,X,at,Xn,Zt,vs='The <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForQuestionAnswering">GPTNeoXForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',xn,ye,Fn,Me,Jn,ve,Zo,te,we,no,rt,Pn,It,ws="GPTNeoXForSequenceClassification",Io,N,lt,zn,Vt,ks="The GPTNeoX Model transformer with a sequence classification head on top (linear layer).",Un,Bt,$s=`<a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForSequenceClassification">GPTNeoXForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`,Wn,qt,Gs=`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).`,Zn,Et,Ns=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,In,x,it,Vn,Rt,js='The <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForSequenceClassification">GPTNeoXForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Bn,ke,qn,$e,En,Ge,Vo,oe,Ne,so,dt,Rn,Ht,Cs="GPTNeoXForTokenClassification",Bo,ne,ct,Hn,U,pt,Ln,Lt,Xs='The <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForTokenClassification">GPTNeoXForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Qn,je,Sn,Ce,qo,ao,Eo;return ze=new q({}),Ue=new q({}),Ve=new L({props:{code:"bW9kZWwlMjAlM0QlMjBHUFROZW9YRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMkVsZXV0aGVyQUklMkZncHQtbmVveC0yMGIlMjIpLmhhbGYoKS5jdWRhKCk=",highlighted:'model = GPTNeoXForCausalLM.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>).half().cuda()'}}),qe=new q({}),Re=new L({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hGb3JDYXVzYWxMTSUyQyUyMEdQVE5lb1hUb2tlbml6ZXJGYXN0JTBBJTBBbW9kZWwlMjAlM0QlMjBHUFROZW9YRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMkVsZXV0aGVyQUklMkZncHQtbmVveC0yMGIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwR1BUTmVvWFRva2VuaXplckZhc3QuZnJvbV9wcmV0cmFpbmVkKCUyMkVsZXV0aGVyQUklMkZncHQtbmVveC0yMGIlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyR1BUTmVvWDIwQiUyMGlzJTIwYSUyMDIwQi1wYXJhbWV0ZXIlMjBhdXRvcmVncmVzc2l2ZSUyMFRyYW5zZm9ybWVyJTIwbW9kZWwlMjBkZXZlbG9wZWQlMjBieSUyMEVsZXV0aGVyQUkuJTIyJTBBJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUwQWdlbl90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSglMEElMjAlMjAlMjAlMjBpbnB1dF9pZHMlMkMlMEElMjAlMjAlMjAlMjBkb19zYW1wbGUlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdGVtcGVyYXR1cmUlM0QwLjklMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNEMTAwJTJDJTBBKSUwQWdlbl90ZXh0JTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXForCausalLM, GPTNeoXTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GPTNeoXForCausalLM.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = GPTNeoXTokenizerFast.from_pretrained(<span class="hljs-string">&quot;EleutherAI/gpt-neox-20b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;GPTNeoX20B is a 20B-parameter autoregressive Transformer model developed by EleutherAI.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(
<span class="hljs-meta">... </span>    input_ids,
<span class="hljs-meta">... </span>    do_sample=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    temperature=<span class="hljs-number">0.9</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">100</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>gen_text = tokenizer.batch_decode(gen_tokens)[<span class="hljs-number">0</span>]`}}),He=new q({}),Qe=new q({}),Se=new Z({props:{name:"class transformers.GPTNeoXConfig",anchor:"transformers.GPTNeoXConfig",parameters:[{name:"vocab_size",val:" = 50432"},{name:"hidden_size",val:" = 6144"},{name:"num_hidden_layers",val:" = 44"},{name:"num_attention_heads",val:" = 64"},{name:"intermediate_size",val:" = 24576"},{name:"hidden_act",val:" = 'gelu'"},{name:"rotary_pct",val:" = 0.25"},{name:"rotary_emb_base",val:" = 10000"},{name:"attention_dropout",val:" = 0.0"},{name:"hidden_dropout",val:" = 0.0"},{name:"classifier_dropout",val:" = 0.1"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"tie_word_embeddings",val:" = False"},{name:"use_parallel_residual",val:" = True"},{name:"rope_scaling",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50432) &#x2014;
Vocabulary size of the GPTNeoX model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXModel">GPTNeoXModel</a>.`,name:"vocab_size"},{anchor:"transformers.GPTNeoXConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.GPTNeoXConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 44) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.GPTNeoXConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.GPTNeoXConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 24576) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.GPTNeoXConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.GPTNeoXConfig.rotary_pct",description:`<strong>rotary_pct</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
percentage of hidden dimensions to allocate to rotary embeddings`,name:"rotary_pct"},{anchor:"transformers.GPTNeoXConfig.rotary_emb_base",description:`<strong>rotary_emb_base</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) &#x2014;
base for computing rotary embeddings frequency`,name:"rotary_emb_base"},{anchor:"transformers.GPTNeoXConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio probability of the attention score.`,name:"attention_dropout"},{anchor:"transformers.GPTNeoXConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio of (1) the word embeddings, (2) the post-attention hidden states, and (3) the post-mlp
hidden states.`,name:"hidden_dropout"},{anchor:"transformers.GPTNeoXConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Argument used when doing token classification, used in the model <a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXForTokenClassification">GPTNeoXForTokenClassification</a>.</p>
<p>The dropout ratio for the hidden layer.`,name:"classifier_dropout"},{anchor:"transformers.GPTNeoXConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.GPTNeoXConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.GPTNeoXConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.GPTNeoXConfig.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.GPTNeoXConfig.use_parallel_residual",description:`<strong>use_parallel_residual</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use a &#x201C;parallel&#x201D; formulation in each Transformer layer, which can provide a slight training
speedup at large scales (e.g. 20B).`,name:"use_parallel_residual"},{anchor:"transformers.GPTNeoXConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
strategies: linear and dynamic. Their scaling factor must be an float greater than 1. The expected format
is <code>{&quot;type&quot;: strategy name, &quot;factor&quot;: scaling factor}</code>. When using this flag, don&#x2019;t update
<code>max_position_embeddings</code> to the expected new maximum. See the following thread for more information on how
these scaling strategies behave:
<a href="https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/" rel="nofollow">https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/</a>. This is an
experimental feature, subject to breaking API changes in future versions.</p>
<p>Example &#x2014;`,name:"rope_scaling"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/configuration_gpt_neox.py#L29"}}),ie=new Pe({props:{anchor:"transformers.GPTNeoXConfig.example",$$slots:{default:[Ss]},$$scope:{ctx:k}}}),Ae=new q({}),Ye=new Z({props:{name:"class transformers.GPTNeoXTokenizerFast",anchor:"transformers.GPTNeoXTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"add_prefix_space",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.GPTNeoXTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.GPTNeoXTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.GPTNeoXTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.GPTNeoXTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.GPTNeoXTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.GPTNeoXTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (GPTNeoX tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.GPTNeoXTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the post-processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/tokenization_gpt_neox_fast.py#L44"}}),ce=new Pe({props:{anchor:"transformers.GPTNeoXTokenizerFast.example",$$slots:{default:[As]},$$scope:{ctx:k}}}),pe=new Je({props:{$$slots:{default:[Ys]},$$scope:{ctx:k}}}),Oe=new q({}),De=new Z({props:{name:"class transformers.GPTNeoXModel",anchor:"transformers.GPTNeoXModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig">~GPTNeoXConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L509"}}),Ke=new Z({props:{name:"forward",anchor:"transformers.GPTNeoXModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.GPTNeoXModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXModel.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.GPTNeoXModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTNeoXModel.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXModel.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.GPTNeoXModel.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.GPTNeoXModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_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>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GPTNeoXModel.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"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L530",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig"
>GPTNeoXConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new Je({props:{$$slots:{default:[Os]},$$scope:{ctx:k}}}),ue=new Je({props:{warning:!0,$$slots:{default:[Ds]},$$scope:{ctx:k}}}),fe=new Pe({props:{anchor:"transformers.GPTNeoXModel.forward.example",$$slots:{default:[Ks]},$$scope:{ctx:k}}}),et=new q({}),tt=new Z({props:{name:"class transformers.GPTNeoXForCausalLM",anchor:"transformers.GPTNeoXForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig">~GPTNeoXConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L688"}}),ot=new Z({props:{name:"forward",anchor:"transformers.GPTNeoXForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.GPTNeoXForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXForCausalLM.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.GPTNeoXForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTNeoXForCausalLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXForCausalLM.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.GPTNeoXForCausalLM.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.GPTNeoXForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXForCausalLM.forward.past_key_values",description:`<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>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. The two additional tensors are
only required when the model is used as a decoder in a Sequence to Sequence model.</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>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_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>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GPTNeoXForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (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 n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.GPTNeoXForCausalLM.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"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L706",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig"
>GPTNeoXConfig</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:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_e=new Je({props:{$$slots:{default:[ea]},$$scope:{ctx:k}}}),Te=new Pe({props:{anchor:"transformers.GPTNeoXForCausalLM.forward.example",$$slots:{default:[ta]},$$scope:{ctx:k}}}),nt=new q({}),st=new Z({props:{name:"class transformers.GPTNeoXForQuestionAnswering",anchor:"transformers.GPTNeoXForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig">~GPTNeoXConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L1058"}}),at=new Z({props:{name:"forward",anchor:"transformers.GPTNeoXForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.GPTNeoXForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXForQuestionAnswering.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.GPTNeoXForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTNeoXForQuestionAnswering.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXForQuestionAnswering.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.GPTNeoXForQuestionAnswering.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.GPTNeoXForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXForQuestionAnswering.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.GPTNeoXForQuestionAnswering.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/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L1068",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig"
>GPTNeoXConfig</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) — Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new Je({props:{$$slots:{default:[oa]},$$scope:{ctx:k}}}),Me=new Je({props:{warning:!0,$$slots:{default:[na]},$$scope:{ctx:k}}}),ve=new Pe({props:{anchor:"transformers.GPTNeoXForQuestionAnswering.forward.example",$$slots:{default:[sa]},$$scope:{ctx:k}}}),rt=new q({}),lt=new Z({props:{name:"class transformers.GPTNeoXForSequenceClassification",anchor:"transformers.GPTNeoXForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig">~GPTNeoXConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L862"}}),it=new Z({props:{name:"forward",anchor:"transformers.GPTNeoXForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.GPTNeoXForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</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.GPTNeoXForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTNeoXForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXForSequenceClassification.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.GPTNeoXForSequenceClassification.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.GPTNeoXForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXForSequenceClassification.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/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L872",returnDescription:`
<p>A <code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig"
>GPTNeoXConfig</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) — Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (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:`
<p><code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new Je({props:{$$slots:{default:[aa]},$$scope:{ctx:k}}}),$e=new Pe({props:{anchor:"transformers.GPTNeoXForSequenceClassification.forward.example",$$slots:{default:[ra]},$$scope:{ctx:k}}}),Ge=new Pe({props:{anchor:"transformers.GPTNeoXForSequenceClassification.forward.example-2",$$slots:{default:[la]},$$scope:{ctx:k}}}),dt=new q({}),ct=new Z({props:{name:"class transformers.GPTNeoXForTokenClassification",anchor:"transformers.GPTNeoXForTokenClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L974"}}),pt=new Z({props:{name:"forward",anchor:"transformers.GPTNeoXForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.GPTNeoXForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</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.GPTNeoXForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.GPTNeoXForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, 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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXForTokenClassification.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.GPTNeoXForTokenClassification.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.GPTNeoXForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/gpt_neox/modeling_gpt_neox.py#L986",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/gpt_neox#transformers.GPTNeoXConfig"
>GPTNeoXConfig</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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new Je({props:{$$slots:{default:[ia]},$$scope:{ctx:k}}}),Ce=new Pe({props:{anchor:"transformers.GPTNeoXForTokenClassification.forward.example",$$slots:{default:[da]},$$scope:{ctx:k}}}),{c(){t=a("meta"),u=d(),l=a("p"),p=d(),w=a("h1"),n=a("a"),$=a("span"),g(ze.$$.fragment),Oo=d(),_t=a("span"),_t.textContent=An,_o=d(),Q=a("h2"),se=a("a"),At=a("span"),g(Ue.$$.fragment),Do=d(),Tt=a("span"),Tt.textContent=Yn,To=d(),We=a("p"),We.innerHTML=On,bo=d(),Ze=a("p"),Ze.innerHTML=Dn,yo=d(),Ie=a("p"),Ie.textContent=Kn,Mo=d(),g(Ve.$$.fragment),vo=d(),Be=a("p"),Be.textContent=es,wo=d(),S=a("h3"),ae=a("a"),Yt=a("span"),g(qe.$$.fragment),Ko=d(),bt=a("span"),bt.textContent=ts,ko=d(),Ee=a("p"),Ee.innerHTML=os,$o=d(),g(Re.$$.fragment),Go=d(),A=a("h2"),re=a("a"),Ot=a("span"),g(He.$$.fragment),en=d(),yt=a("span"),yt.textContent=ns,No=d(),Le=a("ul"),Le.innerHTML=ss,jo=d(),Y=a("h2"),le=a("a"),Dt=a("span"),g(Qe.$$.fragment),tn=d(),Mt=a("span"),Mt.textContent=as,Co=d(),J=a("div"),g(Se.$$.fragment),on=d(),vt=a("p"),vt.innerHTML=rs,nn=d(),wt=a("p"),wt.innerHTML=ls,sn=d(),g(ie.$$.fragment),Xo=d(),O=a("h2"),de=a("a"),Kt=a("span"),g(Ae.$$.fragment),an=d(),kt=a("span"),kt.textContent=is,xo=d(),G=a("div"),g(Ye.$$.fragment),rn=d(),$t=a("p"),$t.innerHTML=ds,ln=d(),Gt=a("p"),Gt.textContent=cs,dn=d(),g(ce.$$.fragment),cn=d(),Nt=a("p"),Nt.innerHTML=ps,pn=d(),g(pe.$$.fragment),mn=d(),jt=a("p"),jt.innerHTML=ms,Fo=d(),D=a("h2"),me=a("a"),eo=a("span"),g(Oe.$$.fragment),hn=d(),Ct=a("span"),Ct.textContent=hs,Jo=d(),I=a("div"),g(De.$$.fragment),un=d(),Xt=a("p"),Xt.innerHTML=us,fn=d(),C=a("div"),g(Ke.$$.fragment),gn=d(),xt=a("p"),xt.innerHTML=fs,_n=d(),g(he.$$.fragment),Tn=d(),g(ue.$$.fragment),bn=d(),g(fe.$$.fragment),Po=d(),K=a("h2"),ge=a("a"),to=a("span"),g(et.$$.fragment),yn=d(),Ft=a("span"),Ft.textContent=gs,zo=d(),V=a("div"),g(tt.$$.fragment),Mn=d(),Jt=a("p"),Jt.innerHTML=_s,vn=d(),z=a("div"),g(ot.$$.fragment),wn=d(),Pt=a("p"),Pt.innerHTML=Ts,kn=d(),g(_e.$$.fragment),$n=d(),g(Te.$$.fragment),Uo=d(),ee=a("h2"),be=a("a"),oo=a("span"),g(nt.$$.fragment),Gn=d(),zt=a("span"),zt.textContent=bs,Wo=d(),P=a("div"),g(st.$$.fragment),Nn=d(),Ut=a("p"),Ut.innerHTML=ys,jn=d(),Wt=a("p"),Wt.innerHTML=Ms,Cn=d(),X=a("div"),g(at.$$.fragment),Xn=d(),Zt=a("p"),Zt.innerHTML=vs,xn=d(),g(ye.$$.fragment),Fn=d(),g(Me.$$.fragment),Jn=d(),g(ve.$$.fragment),Zo=d(),te=a("h2"),we=a("a"),no=a("span"),g(rt.$$.fragment),Pn=d(),It=a("span"),It.textContent=ws,Io=d(),N=a("div"),g(lt.$$.fragment),zn=d(),Vt=a("p"),Vt.textContent=ks,Un=d(),Bt=a("p"),Bt.innerHTML=$s,Wn=d(),qt=a("p"),qt.innerHTML=Gs,Zn=d(),Et=a("p"),Et.innerHTML=Ns,In=d(),x=a("div"),g(it.$$.fragment),Vn=d(),Rt=a("p"),Rt.innerHTML=js,Bn=d(),g(ke.$$.fragment),qn=d(),g($e.$$.fragment),En=d(),g(Ge.$$.fragment),Vo=d(),oe=a("h2"),Ne=a("a"),so=a("span"),g(dt.$$.fragment),Rn=d(),Ht=a("span"),Ht.textContent=Cs,Bo=d(),ne=a("div"),g(ct.$$.fragment),Hn=d(),U=a("div"),g(pt.$$.fragment),Ln=d(),Lt=a("p"),Lt.innerHTML=Xs,Qn=d(),g(je.$$.fragment),Sn=d(),g(Ce.$$.fragment),qo=d(),ao=a("p"),this.h()},l(e){const i=Qs("svelte-1phssyn",document.head);t=r(i,"META",{name:!0,content:!0}),i.forEach(o),u=c(e),l=r(e,"P",{}),v(l).forEach(o),p=c(e),w=r(e,"H1",{class:!0});var mt=v(w);n=r(mt,"A",{id:!0,class:!0,href:!0});var ro=v(n);$=r(ro,"SPAN",{});var lo=v($);_(ze.$$.fragment,lo),lo.forEach(o),ro.forEach(o),Oo=c(mt),_t=r(mt,"SPAN",{"data-svelte-h":!0}),f(_t)!=="svelte-4uxweb"&&(_t.textContent=An),mt.forEach(o),_o=c(e),Q=r(e,"H2",{class:!0});var ht=v(Q);se=r(ht,"A",{id:!0,class:!0,href:!0});var io=v(se);At=r(io,"SPAN",{});var co=v(At);_(Ue.$$.fragment,co),co.forEach(o),io.forEach(o),Do=c(ht),Tt=r(ht,"SPAN",{"data-svelte-h":!0}),f(Tt)!=="svelte-1jsw1pg"&&(Tt.textContent=Yn),ht.forEach(o),To=c(e),We=r(e,"P",{"data-svelte-h":!0}),f(We)!=="svelte-utq0jy"&&(We.innerHTML=On),bo=c(e),Ze=r(e,"P",{"data-svelte-h":!0}),f(Ze)!=="svelte-ar2m2l"&&(Ze.innerHTML=Dn),yo=c(e),Ie=r(e,"P",{"data-svelte-h":!0}),f(Ie)!=="svelte-1fkanz5"&&(Ie.textContent=Kn),Mo=c(e),_(Ve.$$.fragment,e),vo=c(e),Be=r(e,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-cswlyd"&&(Be.textContent=es),wo=c(e),S=r(e,"H3",{class:!0});var ut=v(S);ae=r(ut,"A",{id:!0,class:!0,href:!0});var po=v(ae);Yt=r(po,"SPAN",{});var mo=v(Yt);_(qe.$$.fragment,mo),mo.forEach(o),po.forEach(o),Ko=c(ut),bt=r(ut,"SPAN",{"data-svelte-h":!0}),f(bt)!=="svelte-j76oon"&&(bt.textContent=ts),ut.forEach(o),ko=c(e),Ee=r(e,"P",{"data-svelte-h":!0}),f(Ee)!=="svelte-mhi95y"&&(Ee.innerHTML=os),$o=c(e),_(Re.$$.fragment,e),Go=c(e),A=r(e,"H2",{class:!0});var ft=v(A);re=r(ft,"A",{id:!0,class:!0,href:!0});var ho=v(re);Ot=r(ho,"SPAN",{});var uo=v(Ot);_(He.$$.fragment,uo),uo.forEach(o),ho.forEach(o),en=c(ft),yt=r(ft,"SPAN",{"data-svelte-h":!0}),f(yt)!=="svelte-n3f0j0"&&(yt.textContent=ns),ft.forEach(o),No=c(e),Le=r(e,"UL",{"data-svelte-h":!0}),f(Le)!=="svelte-162aebv"&&(Le.innerHTML=ss),jo=c(e),Y=r(e,"H2",{class:!0});var gt=v(Y);le=r(gt,"A",{id:!0,class:!0,href:!0});var fo=v(le);Dt=r(fo,"SPAN",{});var go=v(Dt);_(Qe.$$.fragment,go),go.forEach(o),fo.forEach(o),tn=c(gt),Mt=r(gt,"SPAN",{"data-svelte-h":!0}),f(Mt)!=="svelte-10ou622"&&(Mt.textContent=as),gt.forEach(o),Co=c(e),J=r(e,"DIV",{class:!0});var B=v(J);_(Se.$$.fragment,B),on=c(B),vt=r(B,"P",{"data-svelte-h":!0}),f(vt)!=="svelte-15uf7ol"&&(vt.innerHTML=rs),nn=c(B),wt=r(B,"P",{"data-svelte-h":!0}),f(wt)!=="svelte-cfh5wl"&&(wt.innerHTML=ls),sn=c(B),_(ie.$$.fragment,B),B.forEach(o),Xo=c(e),O=r(e,"H2",{class:!0});var Ro=v(O);de=r(Ro,"A",{id:!0,class:!0,href:!0});var xs=v(de);Kt=r(xs,"SPAN",{});var Fs=v(Kt);_(Ae.$$.fragment,Fs),Fs.forEach(o),xs.forEach(o),an=c(Ro),kt=r(Ro,"SPAN",{"data-svelte-h":!0}),f(kt)!=="svelte-ob9miz"&&(kt.textContent=is),Ro.forEach(o),xo=c(e),G=r(e,"DIV",{class:!0});var F=v(G);_(Ye.$$.fragment,F),rn=c(F),$t=r(F,"P",{"data-svelte-h":!0}),f($t)!=="svelte-1w4843d"&&($t.innerHTML=ds),ln=c(F),Gt=r(F,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1s077p3"&&(Gt.textContent=cs),dn=c(F),_(ce.$$.fragment,F),cn=c(F),Nt=r(F,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-1afeqmz"&&(Nt.innerHTML=ps),pn=c(F),_(pe.$$.fragment,F),mn=c(F),jt=r(F,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-10uwgx2"&&(jt.innerHTML=ms),F.forEach(o),Fo=c(e),D=r(e,"H2",{class:!0});var Ho=v(D);me=r(Ho,"A",{id:!0,class:!0,href:!0});var Js=v(me);eo=r(Js,"SPAN",{});var Ps=v(eo);_(Oe.$$.fragment,Ps),Ps.forEach(o),Js.forEach(o),hn=c(Ho),Ct=r(Ho,"SPAN",{"data-svelte-h":!0}),f(Ct)!=="svelte-xoog2t"&&(Ct.textContent=hs),Ho.forEach(o),Jo=c(e),I=r(e,"DIV",{class:!0});var Qt=v(I);_(De.$$.fragment,Qt),un=c(Qt),Xt=r(Qt,"P",{"data-svelte-h":!0}),f(Xt)!=="svelte-qega57"&&(Xt.innerHTML=us),fn=c(Qt),C=r(Qt,"DIV",{class:!0});var E=v(C);_(Ke.$$.fragment,E),gn=c(E),xt=r(E,"P",{"data-svelte-h":!0}),f(xt)!=="svelte-1uvcjkh"&&(xt.innerHTML=fs),_n=c(E),_(he.$$.fragment,E),Tn=c(E),_(ue.$$.fragment,E),bn=c(E),_(fe.$$.fragment,E),E.forEach(o),Qt.forEach(o),Po=c(e),K=r(e,"H2",{class:!0});var Lo=v(K);ge=r(Lo,"A",{id:!0,class:!0,href:!0});var zs=v(ge);to=r(zs,"SPAN",{});var Us=v(to);_(et.$$.fragment,Us),Us.forEach(o),zs.forEach(o),yn=c(Lo),Ft=r(Lo,"SPAN",{"data-svelte-h":!0}),f(Ft)!=="svelte-4sbvat"&&(Ft.textContent=gs),Lo.forEach(o),zo=c(e),V=r(e,"DIV",{class:!0});var St=v(V);_(tt.$$.fragment,St),Mn=c(St),Jt=r(St,"P",{"data-svelte-h":!0}),f(Jt)!=="svelte-5dl4wd"&&(Jt.innerHTML=_s),vn=c(St),z=r(St,"DIV",{class:!0});var Xe=v(z);_(ot.$$.fragment,Xe),wn=c(Xe),Pt=r(Xe,"P",{"data-svelte-h":!0}),f(Pt)!=="svelte-12oe4mx"&&(Pt.innerHTML=Ts),kn=c(Xe),_(_e.$$.fragment,Xe),$n=c(Xe),_(Te.$$.fragment,Xe),Xe.forEach(o),St.forEach(o),Uo=c(e),ee=r(e,"H2",{class:!0});var Qo=v(ee);be=r(Qo,"A",{id:!0,class:!0,href:!0});var Ws=v(be);oo=r(Ws,"SPAN",{});var Zs=v(oo);_(nt.$$.fragment,Zs),Zs.forEach(o),Ws.forEach(o),Gn=c(Qo),zt=r(Qo,"SPAN",{"data-svelte-h":!0}),f(zt)!=="svelte-15mmnt7"&&(zt.textContent=bs),Qo.forEach(o),Wo=c(e),P=r(e,"DIV",{class:!0});var xe=v(P);_(st.$$.fragment,xe),Nn=c(xe),Ut=r(xe,"P",{"data-svelte-h":!0}),f(Ut)!=="svelte-1ednh70"&&(Ut.innerHTML=ys),jn=c(xe),Wt=r(xe,"P",{"data-svelte-h":!0}),f(Wt)!=="svelte-68lg8f"&&(Wt.innerHTML=Ms),Cn=c(xe),X=r(xe,"DIV",{class:!0});var R=v(X);_(at.$$.fragment,R),Xn=c(R),Zt=r(R,"P",{"data-svelte-h":!0}),f(Zt)!=="svelte-1pklqat"&&(Zt.innerHTML=vs),xn=c(R),_(ye.$$.fragment,R),Fn=c(R),_(Me.$$.fragment,R),Jn=c(R),_(ve.$$.fragment,R),R.forEach(o),xe.forEach(o),Zo=c(e),te=r(e,"H2",{class:!0});var So=v(te);we=r(So,"A",{id:!0,class:!0,href:!0});var Is=v(we);no=r(Is,"SPAN",{});var Vs=v(no);_(rt.$$.fragment,Vs),Vs.forEach(o),Is.forEach(o),Pn=c(So),It=r(So,"SPAN",{"data-svelte-h":!0}),f(It)!=="svelte-hau3to"&&(It.textContent=ws),So.forEach(o),Io=c(e),N=r(e,"DIV",{class:!0});var W=v(N);_(lt.$$.fragment,W),zn=c(W),Vt=r(W,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-16cei4n"&&(Vt.textContent=ks),Un=c(W),Bt=r(W,"P",{"data-svelte-h":!0}),f(Bt)!=="svelte-iaka7x"&&(Bt.innerHTML=$s),Wn=c(W),qt=r(W,"P",{"data-svelte-h":!0}),f(qt)!=="svelte-10ugs3m"&&(qt.innerHTML=Gs),Zn=c(W),Et=r(W,"P",{"data-svelte-h":!0}),f(Et)!=="svelte-68lg8f"&&(Et.innerHTML=Ns),In=c(W),x=r(W,"DIV",{class:!0});var H=v(x);_(it.$$.fragment,H),Vn=c(H),Rt=r(H,"P",{"data-svelte-h":!0}),f(Rt)!=="svelte-1jts3o3"&&(Rt.innerHTML=js),Bn=c(H),_(ke.$$.fragment,H),qn=c(H),_($e.$$.fragment,H),En=c(H),_(Ge.$$.fragment,H),H.forEach(o),W.forEach(o),Vo=c(e),oe=r(e,"H2",{class:!0});var Ao=v(oe);Ne=r(Ao,"A",{id:!0,class:!0,href:!0});var Bs=v(Ne);so=r(Bs,"SPAN",{});var qs=v(so);_(dt.$$.fragment,qs),qs.forEach(o),Bs.forEach(o),Rn=c(Ao),Ht=r(Ao,"SPAN",{"data-svelte-h":!0}),f(Ht)!=="svelte-k2jnzg"&&(Ht.textContent=Cs),Ao.forEach(o),Bo=c(e),ne=r(e,"DIV",{class:!0});var Yo=v(ne);_(ct.$$.fragment,Yo),Hn=c(Yo),U=r(Yo,"DIV",{class:!0});var Fe=v(U);_(pt.$$.fragment,Fe),Ln=c(Fe),Lt=r(Fe,"P",{"data-svelte-h":!0}),f(Lt)!=="svelte-k5y2w1"&&(Lt.innerHTML=Xs),Qn=c(Fe),_(je.$$.fragment,Fe),Sn=c(Fe),_(Ce.$$.fragment,Fe),Fe.forEach(o),Yo.forEach(o),qo=c(e),ao=r(e,"P",{}),v(ao).forEach(o),this.h()},h(){h(t,"name","hf:doc:metadata"),h(t,"content",JSON.stringify(pa)),h(n,"id","gptneox"),h(n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(n,"href","#gptneox"),h(w,"class","relative group"),h(se,"id","overview"),h(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(se,"href","#overview"),h(Q,"class","relative group"),h(ae,"id","generation"),h(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ae,"href","#generation"),h(S,"class","relative group"),h(re,"id","documentation-resources"),h(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(re,"href","#documentation-resources"),h(A,"class","relative group"),h(le,"id","transformers.GPTNeoXConfig"),h(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(le,"href","#transformers.GPTNeoXConfig"),h(Y,"class","relative group"),h(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(de,"id","transformers.GPTNeoXTokenizerFast"),h(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(de,"href","#transformers.GPTNeoXTokenizerFast"),h(O,"class","relative group"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(me,"id","transformers.GPTNeoXModel"),h(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(me,"href","#transformers.GPTNeoXModel"),h(D,"class","relative group"),h(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ge,"id","transformers.GPTNeoXForCausalLM"),h(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ge,"href","#transformers.GPTNeoXForCausalLM"),h(K,"class","relative group"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(be,"id","transformers.GPTNeoXForQuestionAnswering"),h(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(be,"href","#transformers.GPTNeoXForQuestionAnswering"),h(ee,"class","relative group"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(we,"id","transformers.GPTNeoXForSequenceClassification"),h(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(we,"href","#transformers.GPTNeoXForSequenceClassification"),h(te,"class","relative group"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ne,"id","transformers.GPTNeoXForTokenClassification"),h(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Ne,"href","#transformers.GPTNeoXForTokenClassification"),h(oe,"class","relative group"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ne,"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,i){s(document.head,t),m(e,u,i),m(e,l,i),m(e,p,i),m(e,w,i),s(w,n),s(n,$),T(ze,$,null),s(w,Oo),s(w,_t),m(e,_o,i),m(e,Q,i),s(Q,se),s(se,At),T(Ue,At,null),s(Q,Do),s(Q,Tt),m(e,To,i),m(e,We,i),m(e,bo,i),m(e,Ze,i),m(e,yo,i),m(e,Ie,i),m(e,Mo,i),T(Ve,e,i),m(e,vo,i),m(e,Be,i),m(e,wo,i),m(e,S,i),s(S,ae),s(ae,Yt),T(qe,Yt,null),s(S,Ko),s(S,bt),m(e,ko,i),m(e,Ee,i),m(e,$o,i),T(Re,e,i),m(e,Go,i),m(e,A,i),s(A,re),s(re,Ot),T(He,Ot,null),s(A,en),s(A,yt),m(e,No,i),m(e,Le,i),m(e,jo,i),m(e,Y,i),s(Y,le),s(le,Dt),T(Qe,Dt,null),s(Y,tn),s(Y,Mt),m(e,Co,i),m(e,J,i),T(Se,J,null),s(J,on),s(J,vt),s(J,nn),s(J,wt),s(J,sn),T(ie,J,null),m(e,Xo,i),m(e,O,i),s(O,de),s(de,Kt),T(Ae,Kt,null),s(O,an),s(O,kt),m(e,xo,i),m(e,G,i),T(Ye,G,null),s(G,rn),s(G,$t),s(G,ln),s(G,Gt),s(G,dn),T(ce,G,null),s(G,cn),s(G,Nt),s(G,pn),T(pe,G,null),s(G,mn),s(G,jt),m(e,Fo,i),m(e,D,i),s(D,me),s(me,eo),T(Oe,eo,null),s(D,hn),s(D,Ct),m(e,Jo,i),m(e,I,i),T(De,I,null),s(I,un),s(I,Xt),s(I,fn),s(I,C),T(Ke,C,null),s(C,gn),s(C,xt),s(C,_n),T(he,C,null),s(C,Tn),T(ue,C,null),s(C,bn),T(fe,C,null),m(e,Po,i),m(e,K,i),s(K,ge),s(ge,to),T(et,to,null),s(K,yn),s(K,Ft),m(e,zo,i),m(e,V,i),T(tt,V,null),s(V,Mn),s(V,Jt),s(V,vn),s(V,z),T(ot,z,null),s(z,wn),s(z,Pt),s(z,kn),T(_e,z,null),s(z,$n),T(Te,z,null),m(e,Uo,i),m(e,ee,i),s(ee,be),s(be,oo),T(nt,oo,null),s(ee,Gn),s(ee,zt),m(e,Wo,i),m(e,P,i),T(st,P,null),s(P,Nn),s(P,Ut),s(P,jn),s(P,Wt),s(P,Cn),s(P,X),T(at,X,null),s(X,Xn),s(X,Zt),s(X,xn),T(ye,X,null),s(X,Fn),T(Me,X,null),s(X,Jn),T(ve,X,null),m(e,Zo,i),m(e,te,i),s(te,we),s(we,no),T(rt,no,null),s(te,Pn),s(te,It),m(e,Io,i),m(e,N,i),T(lt,N,null),s(N,zn),s(N,Vt),s(N,Un),s(N,Bt),s(N,Wn),s(N,qt),s(N,Zn),s(N,Et),s(N,In),s(N,x),T(it,x,null),s(x,Vn),s(x,Rt),s(x,Bn),T(ke,x,null),s(x,qn),T($e,x,null),s(x,En),T(Ge,x,null),m(e,Vo,i),m(e,oe,i),s(oe,Ne),s(Ne,so),T(dt,so,null),s(oe,Rn),s(oe,Ht),m(e,Bo,i),m(e,ne,i),T(ct,ne,null),s(ne,Hn),s(ne,U),T(pt,U,null),s(U,Ln),s(U,Lt),s(U,Qn),T(je,U,null),s(U,Sn),T(Ce,U,null),m(e,qo,i),m(e,ao,i),Eo=!0},p(e,[i]){const mt={};i&2&&(mt.$$scope={dirty:i,ctx:e}),ie.$set(mt);const ro={};i&2&&(ro.$$scope={dirty:i,ctx:e}),ce.$set(ro);const lo={};i&2&&(lo.$$scope={dirty:i,ctx:e}),pe.$set(lo);const ht={};i&2&&(ht.$$scope={dirty:i,ctx:e}),he.$set(ht);const io={};i&2&&(io.$$scope={dirty:i,ctx:e}),ue.$set(io);const co={};i&2&&(co.$$scope={dirty:i,ctx:e}),fe.$set(co);const ut={};i&2&&(ut.$$scope={dirty:i,ctx:e}),_e.$set(ut);const po={};i&2&&(po.$$scope={dirty:i,ctx:e}),Te.$set(po);const mo={};i&2&&(mo.$$scope={dirty:i,ctx:e}),ye.$set(mo);const ft={};i&2&&(ft.$$scope={dirty:i,ctx:e}),Me.$set(ft);const ho={};i&2&&(ho.$$scope={dirty:i,ctx:e}),ve.$set(ho);const uo={};i&2&&(uo.$$scope={dirty:i,ctx:e}),ke.$set(uo);const gt={};i&2&&(gt.$$scope={dirty:i,ctx:e}),$e.$set(gt);const fo={};i&2&&(fo.$$scope={dirty:i,ctx:e}),Ge.$set(fo);const go={};i&2&&(go.$$scope={dirty:i,ctx:e}),je.$set(go);const B={};i&2&&(B.$$scope={dirty:i,ctx:e}),Ce.$set(B)},i(e){Eo||(b(ze.$$.fragment,e),b(Ue.$$.fragment,e),b(Ve.$$.fragment,e),b(qe.$$.fragment,e),b(Re.$$.fragment,e),b(He.$$.fragment,e),b(Qe.$$.fragment,e),b(Se.$$.fragment,e),b(ie.$$.fragment,e),b(Ae.$$.fragment,e),b(Ye.$$.fragment,e),b(ce.$$.fragment,e),b(pe.$$.fragment,e),b(Oe.$$.fragment,e),b(De.$$.fragment,e),b(Ke.$$.fragment,e),b(he.$$.fragment,e),b(ue.$$.fragment,e),b(fe.$$.fragment,e),b(et.$$.fragment,e),b(tt.$$.fragment,e),b(ot.$$.fragment,e),b(_e.$$.fragment,e),b(Te.$$.fragment,e),b(nt.$$.fragment,e),b(st.$$.fragment,e),b(at.$$.fragment,e),b(ye.$$.fragment,e),b(Me.$$.fragment,e),b(ve.$$.fragment,e),b(rt.$$.fragment,e),b(lt.$$.fragment,e),b(it.$$.fragment,e),b(ke.$$.fragment,e),b($e.$$.fragment,e),b(Ge.$$.fragment,e),b(dt.$$.fragment,e),b(ct.$$.fragment,e),b(pt.$$.fragment,e),b(je.$$.fragment,e),b(Ce.$$.fragment,e),Eo=!0)},o(e){y(ze.$$.fragment,e),y(Ue.$$.fragment,e),y(Ve.$$.fragment,e),y(qe.$$.fragment,e),y(Re.$$.fragment,e),y(He.$$.fragment,e),y(Qe.$$.fragment,e),y(Se.$$.fragment,e),y(ie.$$.fragment,e),y(Ae.$$.fragment,e),y(Ye.$$.fragment,e),y(ce.$$.fragment,e),y(pe.$$.fragment,e),y(Oe.$$.fragment,e),y(De.$$.fragment,e),y(Ke.$$.fragment,e),y(he.$$.fragment,e),y(ue.$$.fragment,e),y(fe.$$.fragment,e),y(et.$$.fragment,e),y(tt.$$.fragment,e),y(ot.$$.fragment,e),y(_e.$$.fragment,e),y(Te.$$.fragment,e),y(nt.$$.fragment,e),y(st.$$.fragment,e),y(at.$$.fragment,e),y(ye.$$.fragment,e),y(Me.$$.fragment,e),y(ve.$$.fragment,e),y(rt.$$.fragment,e),y(lt.$$.fragment,e),y(it.$$.fragment,e),y(ke.$$.fragment,e),y($e.$$.fragment,e),y(Ge.$$.fragment,e),y(dt.$$.fragment,e),y(ct.$$.fragment,e),y(pt.$$.fragment,e),y(je.$$.fragment,e),y(Ce.$$.fragment,e),Eo=!1},d(e){e&&(o(u),o(l),o(p),o(w),o(_o),o(Q),o(To),o(We),o(bo),o(Ze),o(yo),o(Ie),o(Mo),o(vo),o(Be),o(wo),o(S),o(ko),o(Ee),o($o),o(Go),o(A),o(No),o(Le),o(jo),o(Y),o(Co),o(J),o(Xo),o(O),o(xo),o(G),o(Fo),o(D),o(Jo),o(I),o(Po),o(K),o(zo),o(V),o(Uo),o(ee),o(Wo),o(P),o(Zo),o(te),o(Io),o(N),o(Vo),o(oe),o(Bo),o(ne),o(qo),o(ao)),o(t),M(ze),M(Ue),M(Ve,e),M(qe),M(Re,e),M(He),M(Qe),M(Se),M(ie),M(Ae),M(Ye),M(ce),M(pe),M(Oe),M(De),M(Ke),M(he),M(ue),M(fe),M(et),M(tt),M(ot),M(_e),M(Te),M(nt),M(st),M(at),M(ye),M(Me),M(ve),M(rt),M(lt),M(it),M(ke),M($e),M(Ge),M(dt),M(ct),M(pt),M(je),M(Ce)}}}const pa={local:"gptneox",sections:[{local:"overview",sections:[{local:"generation",title:"Generation"}],title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.GPTNeoXConfig",title:"GPTNeoXConfig"},{local:"transformers.GPTNeoXTokenizerFast",title:"GPTNeoXTokenizerFast"},{local:"transformers.GPTNeoXModel",title:"GPTNeoXModel"},{local:"transformers.GPTNeoXForCausalLM",title:"GPTNeoXForCausalLM"},{local:"transformers.GPTNeoXForQuestionAnswering",title:"GPTNeoXForQuestionAnswering"},{local:"transformers.GPTNeoXForSequenceClassification",title:"GPTNeoXForSequenceClassification"},{local:"transformers.GPTNeoXForTokenClassification",title:"GPTNeoXForTokenClassification"}],title:"GPT-NeoX"};function ma(k){return Rs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ya extends Hs{constructor(t){super(),Ls(this,t,ma,ca,Es,{})}}export{ya as component};
