import{s as Xa,o as Oa,n as W}from"../chunks/scheduler.bdbef820.js";import{S as Qa,i as Ya,g as l,s as n,r as h,A as Ka,h as d,f as i,c as a,j as w,u as f,x as u,k as M,y as o,a as m,v as g,d as _,t as k,w as b}from"../chunks/index.33f81d56.js";import{T as xe}from"../chunks/Tip.34194030.js";import{D as x}from"../chunks/Docstring.64554317.js";import{C as yt}from"../chunks/CodeBlock.362b34a4.js";import{E as bt}from"../chunks/ExampleCodeBlock.4f2252c6.js";import{H as X,E as es}from"../chunks/EditOnGithub.a9246e21.js";function ts(v){let t,y;return t=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdlbW1hTW9kZWwlMkMlMjBHZW1tYUNvbmZpZyUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBHZW1tYSUyMGdlbW1hLTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEdlbW1hQ29uZmlnKCklMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwZ2VtbWEtN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEdlbW1hTW9kZWwoY29uZmlndXJhdGlvbiklMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GemmaModel, GemmaConfig
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Gemma gemma-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = GemmaConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the gemma-7b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GemmaModel(configuration)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){h(t.$$.fragment)},l(s){f(t.$$.fragment,s)},m(s,p){g(t,s,p),y=!0},p:W,i(s){y||(_(t.$$.fragment,s),y=!0)},o(s){k(t.$$.fragment,s),y=!1},d(s){b(t,s)}}}function os(v){let t,y="sequence pair mask has the following format:",s,p,T;return p=new yt({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`,wrap:!1}}),{c(){t=l("p"),t.textContent=y,s=n(),h(p.$$.fragment)},l(c){t=d(c,"P",{"data-svelte-h":!0}),u(t)!=="svelte-16klr56"&&(t.textContent=y),s=a(c),f(p.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(p,c,$),T=!0},p:W,i(c){T||(_(p.$$.fragment,c),T=!0)},o(c){k(p.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),b(p,c)}}}function ns(v){let t,y;return t=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdlbW1hVG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEdlbW1hVG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmR1bW15LWdlbW1hJTIyKSUwQXRva2VuaXplci5lbmNvZGUoJTIySGVsbG8lMjB0aGlzJTIwaXMlMjBhJTIwdGVzdCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GemmaTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = GemmaTokenizerFast.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/dummy-gemma&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.encode(<span class="hljs-string">&quot;Hello this is a test&quot;</span>)
[<span class="hljs-number">2</span>, <span class="hljs-number">4521</span>, <span class="hljs-number">736</span>, <span class="hljs-number">603</span>, <span class="hljs-number">476</span>, <span class="hljs-number">2121</span>]`,wrap:!1}}),{c(){h(t.$$.fragment)},l(s){f(t.$$.fragment,s)},m(s,p){g(t,s,p),y=!0},p:W,i(s){y||(_(t.$$.fragment,s),y=!0)},o(s){k(t.$$.fragment,s),y=!1},d(s){b(t,s)}}}function as(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function ss(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function rs(v){let t,y="Example:",s,p,T;return p=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHZW1tYUZvckNhdXNhbExNJTBBJTBBbW9kZWwlMjAlM0QlMjBHZW1tYUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZnZW1tYS03YiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZnZW1tYS03YiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJXaGF0JTIwaXMlMjB5b3VyJTIwZmF2b3JpdGUlMjBjb25kaW1lbnQlM0YlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cy5pbnB1dF9pZHMlMkMlMjBtYXhfbGVuZ3RoJTNEMzApJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GemmaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = GemmaForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/gemma-7b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/gemma-7b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;What is your favorite condiment?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;What is your favorite condiment?&quot;</span>`,wrap:!1}}),{c(){t=l("p"),t.textContent=y,s=n(),h(p.$$.fragment)},l(c){t=d(c,"P",{"data-svelte-h":!0}),u(t)!=="svelte-11lpom8"&&(t.textContent=y),s=a(c),f(p.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(p,c,$),T=!0},p:W,i(c){T||(_(p.$$.fragment,c),T=!0)},o(c){k(p.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),b(p,c)}}}function is(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function ls(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function ds(v){let t,y="Example:",s,p,T;return p=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHZW1tYUZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmdlbW1hLTdiJTIyKSUwQW1vZGVsJTIwJTNEJTIwR2VtbWFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZnZW1tYS03YiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GemmaForTokenClassification
<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;google/gemma-7b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = GemmaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/gemma-7b&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`,wrap:!1}}),{c(){t=l("p"),t.textContent=y,s=n(),h(p.$$.fragment)},l(c){t=d(c,"P",{"data-svelte-h":!0}),u(t)!=="svelte-11lpom8"&&(t.textContent=y),s=a(c),f(p.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(p,c,$),T=!0},p:W,i(c){T||(_(p.$$.fragment,c),T=!0)},o(c){k(p.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),b(p,c)}}}function cs(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function ms(v){let t,y=`This example uses a random model as the real ones are all very big. To get proper results, you should use
openlm-research/open_llama_3b_v2 instead of google/gemma-2b. 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=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-i4y11c"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function ps(v){let t,y="Example:",s,p,T;return p=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4R2VtbWFNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmdlbW1hLTJiJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEdlbW1hTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmdlbW1hLTJiJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxGemmaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/gemma-2b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxGemmaModel.from_pretrained(<span class="hljs-string">&quot;google/gemma-2b&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;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){t=l("p"),t.textContent=y,s=n(),h(p.$$.fragment)},l(c){t=d(c,"P",{"data-svelte-h":!0}),u(t)!=="svelte-11lpom8"&&(t.textContent=y),s=a(c),f(p.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(p,c,$),T=!0},p:W,i(c){T||(_(p.$$.fragment,c),T=!0)},o(c){k(p.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),b(p,c)}}}function us(v){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function hs(v){let t,y=`This example uses a random model as the real ones are all very big. To get proper results, you should use
openlm-research/open_llama_3b_v2 instead of google/gemma-2b. 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=l("p"),t.innerHTML=y},l(s){t=d(s,"P",{"data-svelte-h":!0}),u(t)!=="svelte-i4y11c"&&(t.innerHTML=y)},m(s,p){m(s,t,p)},p:W,d(s){s&&i(t)}}}function fs(v){let t,y="Example:",s,p,T;return p=new yt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4R2VtbWFGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmdlbW1hLTJiJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEdlbW1hRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmdlbW1hLTJiJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBsb2d0cyUyMGZvciUyMG5leHQlMjB0b2tlbiUwQW5leHRfdG9rZW5fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlNUIlM0ElMkMlMjAtMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxGemmaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/gemma-2b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxGemmaForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/gemma-2b&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`,wrap:!1}}),{c(){t=l("p"),t.textContent=y,s=n(),h(p.$$.fragment)},l(c){t=d(c,"P",{"data-svelte-h":!0}),u(t)!=="svelte-11lpom8"&&(t.textContent=y),s=a(c),f(p.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(p,c,$),T=!0},p:W,i(c){T||(_(p.$$.fragment,c),T=!0)},o(c){k(p.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),b(p,c)}}}function gs(v){let t,y,s,p,T,c,$,mo,ze,ta='Gemma 모델은 Google의 Gemma 팀이 작성한 <a href="https://blog.google/technology/developers/gemma-open-models/" rel="nofollow">Gemma: Open Models Based on Gemini Technology and Research</a>에서 제안되었습니다.',po,Ge,oa="Gemma 모델은 6조 토큰으로 학습되었으며, 2b와 7b의 두 가지 버전으로 출시되었습니다.",uo,Ce,na="논문의 초록은 다음과 같습니다:",ho,Fe,aa="<em>이 연구는 언어 이해, 추론 및 안전성에 대한 학술 벤치마크에서 뛰어난 성능을 보이는 새로운 오픈 언어 모델 계열인 Gemma를 소개합니다. 우리는 두 가지 크기(20억 및 70억 매개변수)의 모델을 출시하며, 사전 학습된 체크포인트와 미세 조정된 체크포인트를 모두 제공합니다. Gemma는 18개의 텍스트 기반 작업 중 11개에서 유사한 크기의 오픈 모델을 능가하며, 우리는 모델 개발에 대한 상세한 설명과 함께 안전성과 책임 측면에 대한 종합적인 평가를 제공합니다. 우리는 LLM의 책임감 있는 공개가 최첨단 모델의 안전성을 향상시키고 다음 세대의 LLM 혁신을 가능하게 하는 데 중요하다고 믿습니다.</em>",fo,je,sa="팁:",go,Ie,ra="<li>원본 체크포인트는 변환 스크립트 <code>src/transformers/models/gemma/convert_gemma_weights_to_hf.py</code>를 사용하여 변환할 수 있습니다.</li>",_o,Le,ia='이 모델은 <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a>, <a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a>, <a href="https://huggingface.co/sanchit-gandhi" rel="nofollow">Sanchit Gandhi</a>, <a href="https://huggingface.co/pcuenq" rel="nofollow">Pedro Cuenca</a>가 기여했습니다.',ko,qe,bo,A,Ue,Ho,vt,la=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaModel">GemmaModel</a>. It is used to instantiate an Gemma
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 Gemma-7B.
e.g. <a href="https://huggingface.co/google/gemma-7b" rel="nofollow">google/gemma-7b</a>
Configuration objects inherit from <a href="/docs/transformers/pr_30530/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30530/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Zo,ae,yo,Pe,vo,z,We,No,Tt,da=`Construct a Gemma tokenizer. Based on byte-level Byte-Pair-Encoding. The default padding token is unset as there is
no padding token in the original model.`,So,se,Je,Bo,$t,ca="Converts a sequence of tokens (string) in a single string.",Vo,B,He,Eo,wt,ma="Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT",Ao,re,Ro,Mt,pa="if token_ids_1 is None, only returns the first portion of the mask (0s).",Do,ie,Ze,Xo,xt,ua=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Oo,le,Ne,Qo,zt,ha="Returns vocab as a dict",Yo,de,Se,Ko,Gt,fa="Save the vocabulary and special tokens file to a directory.",en,ce,Be,tn,Ct,ga="Simply calls PreTrainedTokenizer’s method",To,Ve,$o,G,Ee,on,Ft,_a="Construct a Gemma tokenizer fast. Based on byte-level Byte-Pair-Encoding.",nn,jt,ka="This uses notably ByteFallback and no prefix space. Normalization is applied to replace  <code>&quot; &quot;</code> with <code>&quot;▁&quot;</code>",an,me,sn,It,ba=`If you want to change the <code>bos_token</code> or the <code>eos_token</code>, make sure to specify them when initializing the model, or
call <code>tokenizer.update_post_processor()</code> to make sure that the post-processing is correctly done (otherwise the
values of the first token and final token of an encoded sequence will not be correct). For more details, checkout
[post-processors] (<a href="https://huggingface.co/docs/tokenizers/api/post-processors" rel="nofollow">https://huggingface.co/docs/tokenizers/api/post-processors</a>) documentation.`,rn,Lt,ya=`This tokenizer inherits from <code>PreTrainedTokenizerFast</code> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,ln,pe,Ae,dn,qt,va="Updates the underlying post processor with the current <code>bos_token</code> and <code>eos_token</code>.",wo,Re,Mo,U,De,cn,Ut,Ta=`The bare Gemma Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,mn,Pt,$a=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,pn,Wt,wa="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>GemmaDecoderLayer</code>",un,O,Xe,hn,Jt,Ma='The <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaModel">GemmaModel</a> forward method, overrides the <code>__call__</code> special method.',fn,ue,xo,Oe,zo,te,Qe,gn,V,Ye,_n,Ht,xa='The <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaForCausalLM">GemmaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',kn,he,bn,fe,Go,Ke,Co,C,et,yn,Zt,za="The Gemma Model transformer with a sequence classification head on top (linear layer).",vn,Nt,Ga=`<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaForSequenceClassification">GemmaForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,Tn,St,Ca=`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).`,$n,Bt,Fa=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,wn,Vt,ja=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Mn,Q,tt,xn,Et,Ia='The <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaForSequenceClassification">GemmaForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',zn,ge,Fo,ot,jo,P,nt,Gn,At,La=`The Gemma Model transformer with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`,Cn,Rt,qa=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Fn,Dt,Ua=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,jn,E,at,In,Xt,Pa='The <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaForTokenClassification">GemmaForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Ln,_e,qn,ke,Io,st,Lo,F,rt,Un,Ot,Wa="The bare Gemma Model transformer outputting raw hidden-states without any specific head on top.",Pn,Qt,Ja=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Wn,Yt,Ha=`This model is also a Flax Linen
<a href="https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html" rel="nofollow">flax.nn.Module</a> subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`,Jn,Kt,Za="Finally, this model supports inherent JAX features such as:",Hn,eo,Na='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',Zn,J,it,Nn,to,Sa="The <code>FlaxGemmaPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Sn,be,Bn,ye,Vn,ve,qo,lt,Uo,j,dt,En,oo,Ba="The Gemma Model transformer with a language modeling head (linear layer) on top.",An,no,Va=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Rn,ao,Ea=`This model is also a Flax Linen
<a href="https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html" rel="nofollow">flax.nn.Module</a> subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`,Dn,so,Aa="Finally, this model supports inherent JAX features such as:",Xn,ro,Ra='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',On,H,ct,Qn,io,Da="The <code>FlaxGemmaPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Yn,Te,Kn,$e,ea,we,Po,mt,Wo,co,Jo;return T=new X({props:{title:"Gemma",local:"gemma",headingTag:"h1"}}),$=new X({props:{title:"개요",local:"overview",headingTag:"h2"}}),qe=new X({props:{title:"GemmaConfig",local:"transformers.GemmaConfig ][ transformers.GemmaConfig",headingTag:"h2"}}),Ue=new x({props:{name:"class transformers.GemmaConfig",anchor:"transformers.GemmaConfig",parameters:[{name:"vocab_size",val:" = 256000"},{name:"hidden_size",val:" = 3072"},{name:"intermediate_size",val:" = 24576"},{name:"num_hidden_layers",val:" = 28"},{name:"num_attention_heads",val:" = 16"},{name:"num_key_value_heads",val:" = 16"},{name:"head_dim",val:" = 256"},{name:"hidden_act",val:" = 'gelu_pytorch_tanh'"},{name:"hidden_activation",val:" = None"},{name:"max_position_embeddings",val:" = 8192"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-06"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"eos_token_id",val:" = 1"},{name:"bos_token_id",val:" = 2"},{name:"tie_word_embeddings",val:" = True"},{name:"rope_theta",val:" = 10000.0"},{name:"attention_bias",val:" = False"},{name:"attention_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GemmaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256000) &#x2014;
Vocabulary size of the Gemma model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaModel">GemmaModel</a>`,name:"vocab_size"},{anchor:"transformers.GemmaConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.GemmaConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 24576) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.GemmaConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 28) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.GemmaConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.GemmaConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
<code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if
<code>num_key_value_heads=1</code> the model will use Multi Query Attention (MQA) otherwise GQA is used. When
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
by meanpooling all the original heads within that group. For more details checkout <a href="https://arxiv.org/pdf/2305.13245.pdf" rel="nofollow">this
paper</a>. If it is not specified, will default to
<code>num_attention_heads</code>.`,name:"num_key_value_heads"},{anchor:"transformers.GemmaConfig.head_dim",description:`<strong>head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The attention head dimension.`,name:"head_dim"},{anchor:"transformers.GemmaConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_pytorch_tanh&quot;</code>) &#x2014;
The legacy activation function. It is overwritten by the <code>hidden_activation</code>.`,name:"hidden_act"},{anchor:"transformers.GemmaConfig.hidden_activation",description:`<strong>hidden_activation</strong> (<code>str</code> or <code>function</code>, <em>optional</em>) &#x2014;
The non-linear activation function (function or string) in the decoder. Will default to <code>&quot;gelu_pytorch_tanh&quot;</code>
if not specified. <code>&quot;gelu_pytorch_tanh&quot;</code> uses an approximation of the <code>&quot;gelu&quot;</code> activation function.`,name:"hidden_activation"},{anchor:"transformers.GemmaConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 8192) &#x2014;
The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.GemmaConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.GemmaConfig.rms_norm_eps",description:`<strong>rms_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the rms normalization layers.`,name:"rms_norm_eps"},{anchor:"transformers.GemmaConfig.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.GemmaConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.GemmaConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.GemmaConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.GemmaConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings"},{anchor:"transformers.GemmaConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.GemmaConfig.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, defaults to <code>False</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in the query, key, value and output projection layers during self-attention.`,name:"attention_bias"},{anchor:"transformers.GemmaConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/configuration_gemma.py#L27"}}),ae=new bt({props:{anchor:"transformers.GemmaConfig.example",$$slots:{default:[ts]},$$scope:{ctx:v}}}),Pe=new X({props:{title:"GemmaTokenizer",local:"transformers.GemmaTokenizer ][ transformers.GemmaTokenizer",headingTag:"h2"}}),We=new x({props:{name:"class transformers.GemmaTokenizer",anchor:"transformers.GemmaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<bos>'"},{name:"eos_token",val:" = '<eos>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sp_model_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"add_bos_token",val:" = True"},{name:"add_eos_token",val:" = False"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"use_default_system_prompt",val:" = False"},{name:"spaces_between_special_tokens",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GemmaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.GemmaTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</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.GemmaTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;bos&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.`,name:"bos_token"},{anchor:"transformers.GemmaTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;eos&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.GemmaTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation.`,name:"pad_token"},{anchor:"transformers.GemmaTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>Dict[str, Any]</code>, <code>Optional</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.GemmaTokenizer.add_bos_token",description:`<strong>add_bos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add an <code>bos_token</code> at the start of sequences.`,name:"add_bos_token"},{anchor:"transformers.GemmaTokenizer.add_eos_token",description:`<strong>add_eos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an <code>eos_token</code> at the end of sequences.`,name:"add_eos_token"},{anchor:"transformers.GemmaTokenizer.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to cleanup spaces after decoding, cleanup consists in removing potential artifacts like
extra spaces.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.GemmaTokenizer.use_default_system_prompt",description:`<strong>use_default_system_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the default system prompt for Gemma should be used.`,name:"use_default_system_prompt"},{anchor:"transformers.GemmaTokenizer.spaces_between_special_tokens",description:`<strong>spaces_between_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add spaces between special tokens.`,name:"spaces_between_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L42"}}),Je=new x({props:{name:"convert_tokens_to_string",anchor:"transformers.GemmaTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L181"}}),He=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L270",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),re=new bt({props:{anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[os]},$$scope:{ctx:v}}}),Ze=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.GemmaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.GemmaTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.GemmaTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.GemmaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L233",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Ne=new x({props:{name:"get_vocab",anchor:"transformers.GemmaTokenizer.get_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L150"}}),Se=new x({props:{name:"save_vocabulary",anchor:"transformers.GemmaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:""},{name:"filename_prefix",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.GemmaTokenizer.save_vocabulary.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
The directory in which to save the vocabulary.`,name:"save_directory"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L195",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Paths to the files saved.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tuple(str)</code></p>
`}}),Be=new x({props:{name:"tokenize",anchor:"transformers.GemmaTokenizer.tokenize",parameters:[{name:"text",val:": TextInput"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GemmaTokenizer.tokenize.text",description:"<strong>text</strong> &#x2014; TextInput",name:"text"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma.py#L156"}}),Ve=new X({props:{title:"GemmaTokenizerFast",local:"transformers.GemmaTokenizerFast ][ transformers.GemmaTokenizerFast",headingTag:"h2"}}),Ee=new x({props:{name:"class transformers.GemmaTokenizerFast",anchor:"transformers.GemmaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<bos>'"},{name:"eos_token",val:" = '<eos>'"},{name:"pad_token",val:" = '<pad>'"},{name:"add_bos_token",val:" = True"},{name:"add_eos_token",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GemmaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .model extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.GemmaTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/huggingface/tokenizers" rel="nofollow">tokenizers</a> file (generally has a .json extension) that
contains everything needed to load the tokenizer.`,name:"tokenizer_file"},{anchor:"transformers.GemmaTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to cleanup spaces after decoding, cleanup consists in removing potential artifacts like
extra spaces.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.GemmaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</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.GemmaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;bos&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.`,name:"bos_token"},{anchor:"transformers.GemmaTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>, defaults to <code>&quot;&lt;eos&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.GemmaTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The padding token`,name:"pad_token"},{anchor:"transformers.GemmaTokenizerFast.add_bos_token",description:`<strong>add_bos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add an <code>bos_token</code> at the start of sequences.`,name:"add_bos_token"},{anchor:"transformers.GemmaTokenizerFast.add_eos_token",description:`<strong>add_eos_token</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an <code>eos_token</code> at the end of sequences.`,name:"add_eos_token"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma_fast.py#L37"}}),me=new bt({props:{anchor:"transformers.GemmaTokenizerFast.example",$$slots:{default:[ns]},$$scope:{ctx:v}}}),Ae=new x({props:{name:"update_post_processor",anchor:"transformers.GemmaTokenizerFast.update_post_processor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/tokenization_gemma_fast.py#L125"}}),Re=new X({props:{title:"GemmaModel",local:"transformers.GemmaModel ][ transformers.GemmaModel",headingTag:"h2"}}),De=new x({props:{name:"class transformers.GemmaModel",anchor:"transformers.GemmaModel",parameters:[{name:"config",val:": GemmaConfig"}],parametersDescription:[{anchor:"transformers.GemmaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig">GemmaConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.GemmaModel.config",description:"<strong>config</strong> &#x2014; GemmaConfig",name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L701"}}),Xe=new x({props:{name:"forward",anchor:"transformers.GemmaModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.GemmaModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GemmaModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.GemmaModel.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.GemmaModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30530/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GemmaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GemmaModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GemmaModel.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.GemmaModel.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.GemmaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GemmaModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L737"}}),ue=new xe({props:{$$slots:{default:[as]},$$scope:{ctx:v}}}),Oe=new X({props:{title:"GemmaForCausalLM",local:"transformers.GemmaForCausalLM ][ transformers.GemmaForCausalLM",headingTag:"h2"}}),Qe=new x({props:{name:"class transformers.GemmaForCausalLM",anchor:"transformers.GemmaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L986"}}),Ye=new x({props:{name:"forward",anchor:"transformers.GemmaForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = 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"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"**loss_kwargs",val:""}],parametersDescription:[{anchor:"transformers.GemmaForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GemmaForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.GemmaForCausalLM.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.GemmaForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30530/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GemmaForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GemmaForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GemmaForCausalLM.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.GemmaForCausalLM.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.GemmaForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GemmaForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.GemmaForCausalLM.forward.Args",description:`<strong>Args</strong> &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"Args"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L1017",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig"
>GemmaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new xe({props:{$$slots:{default:[ss]},$$scope:{ctx:v}}}),fe=new bt({props:{anchor:"transformers.GemmaForCausalLM.forward.example",$$slots:{default:[rs]},$$scope:{ctx:v}}}),Ke=new X({props:{title:"GemmaForSequenceClassification",local:"transformers.GemmaForSequenceClassification ][ transformers.GemmaForSequenceClassification",headingTag:"h2"}}),et=new x({props:{name:"class transformers.GemmaForSequenceClassification",anchor:"transformers.GemmaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GemmaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig">GemmaConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L1106"}}),tt=new x({props:{name:"forward",anchor:"transformers.GemmaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = 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.GemmaForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GemmaForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.GemmaForSequenceClassification.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.GemmaForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30530/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GemmaForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GemmaForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GemmaForSequenceClassification.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.GemmaForSequenceClassification.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.GemmaForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GemmaForSequenceClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.GemmaForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L1137"}}),ge=new xe({props:{$$slots:{default:[is]},$$scope:{ctx:v}}}),ot=new X({props:{title:"GemmaForTokenClassification",local:"transformers.GemmaForTokenClassification ][ transformers.GemmaForTokenClassification",headingTag:"h2"}}),nt=new x({props:{name:"class transformers.GemmaForTokenClassification",anchor:"transformers.GemmaForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GemmaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig">GemmaConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L1210"}}),at=new x({props:{name:"forward",anchor:"transformers.GemmaForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[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.GemmaForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.GemmaForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.GemmaForTokenClassification.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.GemmaForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/pr_30530/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GemmaForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GemmaForTokenClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.GemmaForTokenClassification.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.GemmaForTokenClassification.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.GemmaForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GemmaForTokenClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.GemmaForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_gemma.py#L1240",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/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/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig"
>GemmaConfig</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_e=new xe({props:{$$slots:{default:[ls]},$$scope:{ctx:v}}}),ke=new bt({props:{anchor:"transformers.GemmaForTokenClassification.forward.example",$$slots:{default:[ds]},$$scope:{ctx:v}}}),st=new X({props:{title:"FlaxGemmaModel",local:"transformers.FlaxGemmaModel ][ transformers.FlaxGemmaModel",headingTag:"h2"}}),rt=new x({props:{name:"class transformers.FlaxGemmaModel",anchor:"transformers.FlaxGemmaModel",parameters:[{name:"config",val:": GemmaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxGemmaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig">GemmaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxGemmaModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code>, or
<code>jax.numpy.bfloat16</code>.</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_flax_gemma.py#L663"}}),it=new x({props:{name:"__call__",anchor:"transformers.FlaxGemmaModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"past_key_values",val:": dict = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8ce155d360> = None"},{name:"train",val:": bool = False"},{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.FlaxGemmaModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxGemmaModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlaxGemmaModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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.FlaxGemmaModel.__call__.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxGemmaModel.__call__.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.FlaxGemmaModel.__call__.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.FlaxGemmaModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_flax_gemma.py#L482",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig"
>GemmaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new xe({props:{$$slots:{default:[cs]},$$scope:{ctx:v}}}),ye=new xe({props:{warning:!0,$$slots:{default:[ms]},$$scope:{ctx:v}}}),ve=new bt({props:{anchor:"transformers.FlaxGemmaModel.__call__.example",$$slots:{default:[ps]},$$scope:{ctx:v}}}),lt=new X({props:{title:"FlaxGemmaForCausalLM",local:"transformers.FlaxGemmaForCausalLM ][ transformers.FlaxGemmaForCausalLM",headingTag:"h2"}}),dt=new x({props:{name:"class transformers.FlaxGemmaForCausalLM",anchor:"transformers.FlaxGemmaForCausalLM",parameters:[{name:"config",val:": GemmaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxGemmaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig">GemmaConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxGemmaForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code>, or
<code>jax.numpy.bfloat16</code>.</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_flax_gemma.py#L731"}}),ct=new x({props:{name:"__call__",anchor:"transformers.FlaxGemmaForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"position_ids",val:" = None"},{name:"params",val:": dict = None"},{name:"past_key_values",val:": dict = None"},{name:"dropout_rng",val:": <function PRNGKey at 0x7f8ce155d360> = None"},{name:"train",val:": bool = False"},{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.FlaxGemmaForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxGemmaForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.FlaxGemmaForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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.FlaxGemmaForCausalLM.__call__.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxGemmaForCausalLM.__call__.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.FlaxGemmaForCausalLM.__call__.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.FlaxGemmaForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/gemma/modeling_flax_gemma.py#L482",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/ko/model_doc/gemma#transformers.GemmaConfig"
>GemmaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new xe({props:{$$slots:{default:[us]},$$scope:{ctx:v}}}),$e=new xe({props:{warning:!0,$$slots:{default:[hs]},$$scope:{ctx:v}}}),we=new bt({props:{anchor:"transformers.FlaxGemmaForCausalLM.__call__.example",$$slots:{default:[fs]},$$scope:{ctx:v}}}),mt=new es({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/gemma.md"}}),{c(){t=l("meta"),y=n(),s=l("p"),p=n(),h(T.$$.fragment),c=n(),h($.$$.fragment),mo=n(),ze=l("p"),ze.innerHTML=ta,po=n(),Ge=l("p"),Ge.textContent=oa,uo=n(),Ce=l("p"),Ce.textContent=na,ho=n(),Fe=l("p"),Fe.innerHTML=aa,fo=n(),je=l("p"),je.textContent=sa,go=n(),Ie=l("ul"),Ie.innerHTML=ra,_o=n(),Le=l("p"),Le.innerHTML=ia,ko=n(),h(qe.$$.fragment),bo=n(),A=l("div"),h(Ue.$$.fragment),Ho=n(),vt=l("p"),vt.innerHTML=la,Zo=n(),h(ae.$$.fragment),yo=n(),h(Pe.$$.fragment),vo=n(),z=l("div"),h(We.$$.fragment),No=n(),Tt=l("p"),Tt.textContent=da,So=n(),se=l("div"),h(Je.$$.fragment),Bo=n(),$t=l("p"),$t.textContent=ca,Vo=n(),B=l("div"),h(He.$$.fragment),Eo=n(),wt=l("p"),wt.textContent=ma,Ao=n(),h(re.$$.fragment),Ro=n(),Mt=l("p"),Mt.textContent=pa,Do=n(),ie=l("div"),h(Ze.$$.fragment),Xo=n(),xt=l("p"),xt.innerHTML=ua,Oo=n(),le=l("div"),h(Ne.$$.fragment),Qo=n(),zt=l("p"),zt.textContent=ha,Yo=n(),de=l("div"),h(Se.$$.fragment),Ko=n(),Gt=l("p"),Gt.textContent=fa,en=n(),ce=l("div"),h(Be.$$.fragment),tn=n(),Ct=l("p"),Ct.textContent=ga,To=n(),h(Ve.$$.fragment),$o=n(),G=l("div"),h(Ee.$$.fragment),on=n(),Ft=l("p"),Ft.textContent=_a,nn=n(),jt=l("p"),jt.innerHTML=ka,an=n(),h(me.$$.fragment),sn=n(),It=l("p"),It.innerHTML=ba,rn=n(),Lt=l("p"),Lt.innerHTML=ya,ln=n(),pe=l("div"),h(Ae.$$.fragment),dn=n(),qt=l("p"),qt.innerHTML=va,wo=n(),h(Re.$$.fragment),Mo=n(),U=l("div"),h(De.$$.fragment),cn=n(),Ut=l("p"),Ut.innerHTML=Ta,mn=n(),Pt=l("p"),Pt.innerHTML=$a,pn=n(),Wt=l("p"),Wt.innerHTML=wa,un=n(),O=l("div"),h(Xe.$$.fragment),hn=n(),Jt=l("p"),Jt.innerHTML=Ma,fn=n(),h(ue.$$.fragment),xo=n(),h(Oe.$$.fragment),zo=n(),te=l("div"),h(Qe.$$.fragment),gn=n(),V=l("div"),h(Ye.$$.fragment),_n=n(),Ht=l("p"),Ht.innerHTML=xa,kn=n(),h(he.$$.fragment),bn=n(),h(fe.$$.fragment),Go=n(),h(Ke.$$.fragment),Co=n(),C=l("div"),h(et.$$.fragment),yn=n(),Zt=l("p"),Zt.textContent=za,vn=n(),Nt=l("p"),Nt.innerHTML=Ga,Tn=n(),St=l("p"),St.innerHTML=Ca,$n=n(),Bt=l("p"),Bt.innerHTML=Fa,wn=n(),Vt=l("p"),Vt.innerHTML=ja,Mn=n(),Q=l("div"),h(tt.$$.fragment),xn=n(),Et=l("p"),Et.innerHTML=Ia,zn=n(),h(ge.$$.fragment),Fo=n(),h(ot.$$.fragment),jo=n(),P=l("div"),h(nt.$$.fragment),Gn=n(),At=l("p"),At.textContent=La,Cn=n(),Rt=l("p"),Rt.innerHTML=qa,Fn=n(),Dt=l("p"),Dt.innerHTML=Ua,jn=n(),E=l("div"),h(at.$$.fragment),In=n(),Xt=l("p"),Xt.innerHTML=Pa,Ln=n(),h(_e.$$.fragment),qn=n(),h(ke.$$.fragment),Io=n(),h(st.$$.fragment),Lo=n(),F=l("div"),h(rt.$$.fragment),Un=n(),Ot=l("p"),Ot.textContent=Wa,Pn=n(),Qt=l("p"),Qt.innerHTML=Ja,Wn=n(),Yt=l("p"),Yt.innerHTML=Ha,Jn=n(),Kt=l("p"),Kt.textContent=Za,Hn=n(),eo=l("ul"),eo.innerHTML=Na,Zn=n(),J=l("div"),h(it.$$.fragment),Nn=n(),to=l("p"),to.innerHTML=Sa,Sn=n(),h(be.$$.fragment),Bn=n(),h(ye.$$.fragment),Vn=n(),h(ve.$$.fragment),qo=n(),h(lt.$$.fragment),Uo=n(),j=l("div"),h(dt.$$.fragment),En=n(),oo=l("p"),oo.textContent=Ba,An=n(),no=l("p"),no.innerHTML=Va,Rn=n(),ao=l("p"),ao.innerHTML=Ea,Dn=n(),so=l("p"),so.textContent=Aa,Xn=n(),ro=l("ul"),ro.innerHTML=Ra,On=n(),H=l("div"),h(ct.$$.fragment),Qn=n(),io=l("p"),io.innerHTML=Da,Yn=n(),h(Te.$$.fragment),Kn=n(),h($e.$$.fragment),ea=n(),h(we.$$.fragment),Po=n(),h(mt.$$.fragment),Wo=n(),co=l("p"),this.h()},l(e){const r=Ka("svelte-u9bgzb",document.head);t=d(r,"META",{name:!0,content:!0}),r.forEach(i),y=a(e),s=d(e,"P",{}),w(s).forEach(i),p=a(e),f(T.$$.fragment,e),c=a(e),f($.$$.fragment,e),mo=a(e),ze=d(e,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-1ieup5f"&&(ze.innerHTML=ta),po=a(e),Ge=d(e,"P",{"data-svelte-h":!0}),u(Ge)!=="svelte-99cpdj"&&(Ge.textContent=oa),uo=a(e),Ce=d(e,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-e5r8wp"&&(Ce.textContent=na),ho=a(e),Fe=d(e,"P",{"data-svelte-h":!0}),u(Fe)!=="svelte-1eyopk6"&&(Fe.innerHTML=aa),fo=a(e),je=d(e,"P",{"data-svelte-h":!0}),u(je)!=="svelte-k6v9m1"&&(je.textContent=sa),go=a(e),Ie=d(e,"UL",{"data-svelte-h":!0}),u(Ie)!=="svelte-1vk3ps1"&&(Ie.innerHTML=ra),_o=a(e),Le=d(e,"P",{"data-svelte-h":!0}),u(Le)!=="svelte-jx67hz"&&(Le.innerHTML=ia),ko=a(e),f(qe.$$.fragment,e),bo=a(e),A=d(e,"DIV",{class:!0});var oe=w(A);f(Ue.$$.fragment,oe),Ho=a(oe),vt=d(oe,"P",{"data-svelte-h":!0}),u(vt)!=="svelte-1ezbt22"&&(vt.innerHTML=la),Zo=a(oe),f(ae.$$.fragment,oe),oe.forEach(i),yo=a(e),f(Pe.$$.fragment,e),vo=a(e),z=d(e,"DIV",{class:!0});var I=w(z);f(We.$$.fragment,I),No=a(I),Tt=d(I,"P",{"data-svelte-h":!0}),u(Tt)!=="svelte-33lcdu"&&(Tt.textContent=da),So=a(I),se=d(I,"DIV",{class:!0});var pt=w(se);f(Je.$$.fragment,pt),Bo=a(pt),$t=d(pt,"P",{"data-svelte-h":!0}),u($t)!=="svelte-b3k2yi"&&($t.textContent=ca),pt.forEach(i),Vo=a(I),B=d(I,"DIV",{class:!0});var R=w(B);f(He.$$.fragment,R),Eo=a(R),wt=d(R,"P",{"data-svelte-h":!0}),u(wt)!=="svelte-13bfd60"&&(wt.textContent=ma),Ao=a(R),f(re.$$.fragment,R),Ro=a(R),Mt=d(R,"P",{"data-svelte-h":!0}),u(Mt)!=="svelte-wtrslu"&&(Mt.textContent=pa),R.forEach(i),Do=a(I),ie=d(I,"DIV",{class:!0});var ut=w(ie);f(Ze.$$.fragment,ut),Xo=a(ut),xt=d(ut,"P",{"data-svelte-h":!0}),u(xt)!=="svelte-1f4f5kp"&&(xt.innerHTML=ua),ut.forEach(i),Oo=a(I),le=d(I,"DIV",{class:!0});var ht=w(le);f(Ne.$$.fragment,ht),Qo=a(ht),zt=d(ht,"P",{"data-svelte-h":!0}),u(zt)!=="svelte-iwelht"&&(zt.textContent=ha),ht.forEach(i),Yo=a(I),de=d(I,"DIV",{class:!0});var ft=w(de);f(Se.$$.fragment,ft),Ko=a(ft),Gt=d(ft,"P",{"data-svelte-h":!0}),u(Gt)!=="svelte-1slb66l"&&(Gt.textContent=fa),ft.forEach(i),en=a(I),ce=d(I,"DIV",{class:!0});var gt=w(ce);f(Be.$$.fragment,gt),tn=a(gt),Ct=d(gt,"P",{"data-svelte-h":!0}),u(Ct)!=="svelte-15czuwn"&&(Ct.textContent=ga),gt.forEach(i),I.forEach(i),To=a(e),f(Ve.$$.fragment,e),$o=a(e),G=d(e,"DIV",{class:!0});var L=w(G);f(Ee.$$.fragment,L),on=a(L),Ft=d(L,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-m9hkz6"&&(Ft.textContent=_a),nn=a(L),jt=d(L,"P",{"data-svelte-h":!0}),u(jt)!=="svelte-1l3z03t"&&(jt.innerHTML=ka),an=a(L),f(me.$$.fragment,L),sn=a(L),It=d(L,"P",{"data-svelte-h":!0}),u(It)!=="svelte-cnb6q1"&&(It.innerHTML=ba),rn=a(L),Lt=d(L,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-1ndfe3e"&&(Lt.innerHTML=ya),ln=a(L),pe=d(L,"DIV",{class:!0});var _t=w(pe);f(Ae.$$.fragment,_t),dn=a(_t),qt=d(_t,"P",{"data-svelte-h":!0}),u(qt)!=="svelte-nfci2w"&&(qt.innerHTML=va),_t.forEach(i),L.forEach(i),wo=a(e),f(Re.$$.fragment,e),Mo=a(e),U=d(e,"DIV",{class:!0});var S=w(U);f(De.$$.fragment,S),cn=a(S),Ut=d(S,"P",{"data-svelte-h":!0}),u(Ut)!=="svelte-1rh3tzl"&&(Ut.innerHTML=Ta),mn=a(S),Pt=d(S,"P",{"data-svelte-h":!0}),u(Pt)!=="svelte-hswkmf"&&(Pt.innerHTML=$a),pn=a(S),Wt=d(S,"P",{"data-svelte-h":!0}),u(Wt)!=="svelte-9h4hrw"&&(Wt.innerHTML=wa),un=a(S),O=d(S,"DIV",{class:!0});var ne=w(O);f(Xe.$$.fragment,ne),hn=a(ne),Jt=d(ne,"P",{"data-svelte-h":!0}),u(Jt)!=="svelte-zt1dpo"&&(Jt.innerHTML=Ma),fn=a(ne),f(ue.$$.fragment,ne),ne.forEach(i),S.forEach(i),xo=a(e),f(Oe.$$.fragment,e),zo=a(e),te=d(e,"DIV",{class:!0});var kt=w(te);f(Qe.$$.fragment,kt),gn=a(kt),V=d(kt,"DIV",{class:!0});var D=w(V);f(Ye.$$.fragment,D),_n=a(D),Ht=d(D,"P",{"data-svelte-h":!0}),u(Ht)!=="svelte-1ghaqj8"&&(Ht.innerHTML=xa),kn=a(D),f(he.$$.fragment,D),bn=a(D),f(fe.$$.fragment,D),D.forEach(i),kt.forEach(i),Go=a(e),f(Ke.$$.fragment,e),Co=a(e),C=d(e,"DIV",{class:!0});var q=w(C);f(et.$$.fragment,q),yn=a(q),Zt=d(q,"P",{"data-svelte-h":!0}),u(Zt)!=="svelte-1140lml"&&(Zt.textContent=za),vn=a(q),Nt=d(q,"P",{"data-svelte-h":!0}),u(Nt)!=="svelte-1qla49v"&&(Nt.innerHTML=Ga),Tn=a(q),St=d(q,"P",{"data-svelte-h":!0}),u(St)!=="svelte-10ugs3m"&&(St.innerHTML=Ca),$n=a(q),Bt=d(q,"P",{"data-svelte-h":!0}),u(Bt)!=="svelte-5skutq"&&(Bt.innerHTML=Fa),wn=a(q),Vt=d(q,"P",{"data-svelte-h":!0}),u(Vt)!=="svelte-hswkmf"&&(Vt.innerHTML=ja),Mn=a(q),Q=d(q,"DIV",{class:!0});var lo=w(Q);f(tt.$$.fragment,lo),xn=a(lo),Et=d(lo,"P",{"data-svelte-h":!0}),u(Et)!=="svelte-ejlqju"&&(Et.innerHTML=Ia),zn=a(lo),f(ge.$$.fragment,lo),lo.forEach(i),q.forEach(i),Fo=a(e),f(ot.$$.fragment,e),jo=a(e),P=d(e,"DIV",{class:!0});var Y=w(P);f(nt.$$.fragment,Y),Gn=a(Y),At=d(Y,"P",{"data-svelte-h":!0}),u(At)!=="svelte-1b4l2ay"&&(At.textContent=La),Cn=a(Y),Rt=d(Y,"P",{"data-svelte-h":!0}),u(Rt)!=="svelte-5skutq"&&(Rt.innerHTML=qa),Fn=a(Y),Dt=d(Y,"P",{"data-svelte-h":!0}),u(Dt)!=="svelte-hswkmf"&&(Dt.innerHTML=Ua),jn=a(Y),E=d(Y,"DIV",{class:!0});var Me=w(E);f(at.$$.fragment,Me),In=a(Me),Xt=d(Me,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-1j7m4ro"&&(Xt.innerHTML=Pa),Ln=a(Me),f(_e.$$.fragment,Me),qn=a(Me),f(ke.$$.fragment,Me),Me.forEach(i),Y.forEach(i),Io=a(e),f(st.$$.fragment,e),Lo=a(e),F=d(e,"DIV",{class:!0});var Z=w(F);f(rt.$$.fragment,Z),Un=a(Z),Ot=d(Z,"P",{"data-svelte-h":!0}),u(Ot)!=="svelte-toiqik"&&(Ot.textContent=Wa),Pn=a(Z),Qt=d(Z,"P",{"data-svelte-h":!0}),u(Qt)!=="svelte-1fwpmve"&&(Qt.innerHTML=Ja),Wn=a(Z),Yt=d(Z,"P",{"data-svelte-h":!0}),u(Yt)!=="svelte-idybz1"&&(Yt.innerHTML=Ha),Jn=a(Z),Kt=d(Z,"P",{"data-svelte-h":!0}),u(Kt)!=="svelte-1pplc4a"&&(Kt.textContent=Za),Hn=a(Z),eo=d(Z,"UL",{"data-svelte-h":!0}),u(eo)!=="svelte-1w7z84m"&&(eo.innerHTML=Na),Zn=a(Z),J=d(Z,"DIV",{class:!0});var K=w(J);f(it.$$.fragment,K),Nn=a(K),to=d(K,"P",{"data-svelte-h":!0}),u(to)!=="svelte-1y60y2q"&&(to.innerHTML=Sa),Sn=a(K),f(be.$$.fragment,K),Bn=a(K),f(ye.$$.fragment,K),Vn=a(K),f(ve.$$.fragment,K),K.forEach(i),Z.forEach(i),qo=a(e),f(lt.$$.fragment,e),Uo=a(e),j=d(e,"DIV",{class:!0});var N=w(j);f(dt.$$.fragment,N),En=a(N),oo=d(N,"P",{"data-svelte-h":!0}),u(oo)!=="svelte-3xz13p"&&(oo.textContent=Ba),An=a(N),no=d(N,"P",{"data-svelte-h":!0}),u(no)!=="svelte-1fwpmve"&&(no.innerHTML=Va),Rn=a(N),ao=d(N,"P",{"data-svelte-h":!0}),u(ao)!=="svelte-idybz1"&&(ao.innerHTML=Ea),Dn=a(N),so=d(N,"P",{"data-svelte-h":!0}),u(so)!=="svelte-1pplc4a"&&(so.textContent=Aa),Xn=a(N),ro=d(N,"UL",{"data-svelte-h":!0}),u(ro)!=="svelte-1w7z84m"&&(ro.innerHTML=Ra),On=a(N),H=d(N,"DIV",{class:!0});var ee=w(H);f(ct.$$.fragment,ee),Qn=a(ee),io=d(ee,"P",{"data-svelte-h":!0}),u(io)!=="svelte-1y60y2q"&&(io.innerHTML=Da),Yn=a(ee),f(Te.$$.fragment,ee),Kn=a(ee),f($e.$$.fragment,ee),ea=a(ee),f(we.$$.fragment,ee),ee.forEach(i),N.forEach(i),Po=a(e),f(mt.$$.fragment,e),Wo=a(e),co=d(e,"P",{}),w(co).forEach(i),this.h()},h(){M(t,"name","hf:doc:metadata"),M(t,"content",_s),M(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"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,r){o(document.head,t),m(e,y,r),m(e,s,r),m(e,p,r),g(T,e,r),m(e,c,r),g($,e,r),m(e,mo,r),m(e,ze,r),m(e,po,r),m(e,Ge,r),m(e,uo,r),m(e,Ce,r),m(e,ho,r),m(e,Fe,r),m(e,fo,r),m(e,je,r),m(e,go,r),m(e,Ie,r),m(e,_o,r),m(e,Le,r),m(e,ko,r),g(qe,e,r),m(e,bo,r),m(e,A,r),g(Ue,A,null),o(A,Ho),o(A,vt),o(A,Zo),g(ae,A,null),m(e,yo,r),g(Pe,e,r),m(e,vo,r),m(e,z,r),g(We,z,null),o(z,No),o(z,Tt),o(z,So),o(z,se),g(Je,se,null),o(se,Bo),o(se,$t),o(z,Vo),o(z,B),g(He,B,null),o(B,Eo),o(B,wt),o(B,Ao),g(re,B,null),o(B,Ro),o(B,Mt),o(z,Do),o(z,ie),g(Ze,ie,null),o(ie,Xo),o(ie,xt),o(z,Oo),o(z,le),g(Ne,le,null),o(le,Qo),o(le,zt),o(z,Yo),o(z,de),g(Se,de,null),o(de,Ko),o(de,Gt),o(z,en),o(z,ce),g(Be,ce,null),o(ce,tn),o(ce,Ct),m(e,To,r),g(Ve,e,r),m(e,$o,r),m(e,G,r),g(Ee,G,null),o(G,on),o(G,Ft),o(G,nn),o(G,jt),o(G,an),g(me,G,null),o(G,sn),o(G,It),o(G,rn),o(G,Lt),o(G,ln),o(G,pe),g(Ae,pe,null),o(pe,dn),o(pe,qt),m(e,wo,r),g(Re,e,r),m(e,Mo,r),m(e,U,r),g(De,U,null),o(U,cn),o(U,Ut),o(U,mn),o(U,Pt),o(U,pn),o(U,Wt),o(U,un),o(U,O),g(Xe,O,null),o(O,hn),o(O,Jt),o(O,fn),g(ue,O,null),m(e,xo,r),g(Oe,e,r),m(e,zo,r),m(e,te,r),g(Qe,te,null),o(te,gn),o(te,V),g(Ye,V,null),o(V,_n),o(V,Ht),o(V,kn),g(he,V,null),o(V,bn),g(fe,V,null),m(e,Go,r),g(Ke,e,r),m(e,Co,r),m(e,C,r),g(et,C,null),o(C,yn),o(C,Zt),o(C,vn),o(C,Nt),o(C,Tn),o(C,St),o(C,$n),o(C,Bt),o(C,wn),o(C,Vt),o(C,Mn),o(C,Q),g(tt,Q,null),o(Q,xn),o(Q,Et),o(Q,zn),g(ge,Q,null),m(e,Fo,r),g(ot,e,r),m(e,jo,r),m(e,P,r),g(nt,P,null),o(P,Gn),o(P,At),o(P,Cn),o(P,Rt),o(P,Fn),o(P,Dt),o(P,jn),o(P,E),g(at,E,null),o(E,In),o(E,Xt),o(E,Ln),g(_e,E,null),o(E,qn),g(ke,E,null),m(e,Io,r),g(st,e,r),m(e,Lo,r),m(e,F,r),g(rt,F,null),o(F,Un),o(F,Ot),o(F,Pn),o(F,Qt),o(F,Wn),o(F,Yt),o(F,Jn),o(F,Kt),o(F,Hn),o(F,eo),o(F,Zn),o(F,J),g(it,J,null),o(J,Nn),o(J,to),o(J,Sn),g(be,J,null),o(J,Bn),g(ye,J,null),o(J,Vn),g(ve,J,null),m(e,qo,r),g(lt,e,r),m(e,Uo,r),m(e,j,r),g(dt,j,null),o(j,En),o(j,oo),o(j,An),o(j,no),o(j,Rn),o(j,ao),o(j,Dn),o(j,so),o(j,Xn),o(j,ro),o(j,On),o(j,H),g(ct,H,null),o(H,Qn),o(H,io),o(H,Yn),g(Te,H,null),o(H,Kn),g($e,H,null),o(H,ea),g(we,H,null),m(e,Po,r),g(mt,e,r),m(e,Wo,r),m(e,co,r),Jo=!0},p(e,[r]){const oe={};r&2&&(oe.$$scope={dirty:r,ctx:e}),ae.$set(oe);const I={};r&2&&(I.$$scope={dirty:r,ctx:e}),re.$set(I);const pt={};r&2&&(pt.$$scope={dirty:r,ctx:e}),me.$set(pt);const R={};r&2&&(R.$$scope={dirty:r,ctx:e}),ue.$set(R);const ut={};r&2&&(ut.$$scope={dirty:r,ctx:e}),he.$set(ut);const ht={};r&2&&(ht.$$scope={dirty:r,ctx:e}),fe.$set(ht);const ft={};r&2&&(ft.$$scope={dirty:r,ctx:e}),ge.$set(ft);const gt={};r&2&&(gt.$$scope={dirty:r,ctx:e}),_e.$set(gt);const L={};r&2&&(L.$$scope={dirty:r,ctx:e}),ke.$set(L);const _t={};r&2&&(_t.$$scope={dirty:r,ctx:e}),be.$set(_t);const S={};r&2&&(S.$$scope={dirty:r,ctx:e}),ye.$set(S);const ne={};r&2&&(ne.$$scope={dirty:r,ctx:e}),ve.$set(ne);const kt={};r&2&&(kt.$$scope={dirty:r,ctx:e}),Te.$set(kt);const D={};r&2&&(D.$$scope={dirty:r,ctx:e}),$e.$set(D);const q={};r&2&&(q.$$scope={dirty:r,ctx:e}),we.$set(q)},i(e){Jo||(_(T.$$.fragment,e),_($.$$.fragment,e),_(qe.$$.fragment,e),_(Ue.$$.fragment,e),_(ae.$$.fragment,e),_(Pe.$$.fragment,e),_(We.$$.fragment,e),_(Je.$$.fragment,e),_(He.$$.fragment,e),_(re.$$.fragment,e),_(Ze.$$.fragment,e),_(Ne.$$.fragment,e),_(Se.$$.fragment,e),_(Be.$$.fragment,e),_(Ve.$$.fragment,e),_(Ee.$$.fragment,e),_(me.$$.fragment,e),_(Ae.$$.fragment,e),_(Re.$$.fragment,e),_(De.$$.fragment,e),_(Xe.$$.fragment,e),_(ue.$$.fragment,e),_(Oe.$$.fragment,e),_(Qe.$$.fragment,e),_(Ye.$$.fragment,e),_(he.$$.fragment,e),_(fe.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ge.$$.fragment,e),_(ot.$$.fragment,e),_(nt.$$.fragment,e),_(at.$$.fragment,e),_(_e.$$.fragment,e),_(ke.$$.fragment,e),_(st.$$.fragment,e),_(rt.$$.fragment,e),_(it.$$.fragment,e),_(be.$$.fragment,e),_(ye.$$.fragment,e),_(ve.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),_(ct.$$.fragment,e),_(Te.$$.fragment,e),_($e.$$.fragment,e),_(we.$$.fragment,e),_(mt.$$.fragment,e),Jo=!0)},o(e){k(T.$$.fragment,e),k($.$$.fragment,e),k(qe.$$.fragment,e),k(Ue.$$.fragment,e),k(ae.$$.fragment,e),k(Pe.$$.fragment,e),k(We.$$.fragment,e),k(Je.$$.fragment,e),k(He.$$.fragment,e),k(re.$$.fragment,e),k(Ze.$$.fragment,e),k(Ne.$$.fragment,e),k(Se.$$.fragment,e),k(Be.$$.fragment,e),k(Ve.$$.fragment,e),k(Ee.$$.fragment,e),k(me.$$.fragment,e),k(Ae.$$.fragment,e),k(Re.$$.fragment,e),k(De.$$.fragment,e),k(Xe.$$.fragment,e),k(ue.$$.fragment,e),k(Oe.$$.fragment,e),k(Qe.$$.fragment,e),k(Ye.$$.fragment,e),k(he.$$.fragment,e),k(fe.$$.fragment,e),k(Ke.$$.fragment,e),k(et.$$.fragment,e),k(tt.$$.fragment,e),k(ge.$$.fragment,e),k(ot.$$.fragment,e),k(nt.$$.fragment,e),k(at.$$.fragment,e),k(_e.$$.fragment,e),k(ke.$$.fragment,e),k(st.$$.fragment,e),k(rt.$$.fragment,e),k(it.$$.fragment,e),k(be.$$.fragment,e),k(ye.$$.fragment,e),k(ve.$$.fragment,e),k(lt.$$.fragment,e),k(dt.$$.fragment,e),k(ct.$$.fragment,e),k(Te.$$.fragment,e),k($e.$$.fragment,e),k(we.$$.fragment,e),k(mt.$$.fragment,e),Jo=!1},d(e){e&&(i(y),i(s),i(p),i(c),i(mo),i(ze),i(po),i(Ge),i(uo),i(Ce),i(ho),i(Fe),i(fo),i(je),i(go),i(Ie),i(_o),i(Le),i(ko),i(bo),i(A),i(yo),i(vo),i(z),i(To),i($o),i(G),i(wo),i(Mo),i(U),i(xo),i(zo),i(te),i(Go),i(Co),i(C),i(Fo),i(jo),i(P),i(Io),i(Lo),i(F),i(qo),i(Uo),i(j),i(Po),i(Wo),i(co)),i(t),b(T,e),b($,e),b(qe,e),b(Ue),b(ae),b(Pe,e),b(We),b(Je),b(He),b(re),b(Ze),b(Ne),b(Se),b(Be),b(Ve,e),b(Ee),b(me),b(Ae),b(Re,e),b(De),b(Xe),b(ue),b(Oe,e),b(Qe),b(Ye),b(he),b(fe),b(Ke,e),b(et),b(tt),b(ge),b(ot,e),b(nt),b(at),b(_e),b(ke),b(st,e),b(rt),b(it),b(be),b(ye),b(ve),b(lt,e),b(dt),b(ct),b(Te),b($e),b(we),b(mt,e)}}}const _s='{"title":"Gemma","local":"gemma","sections":[{"title":"개요","local":"overview","sections":[],"depth":2},{"title":"GemmaConfig","local":"transformers.GemmaConfig ][ transformers.GemmaConfig","sections":[],"depth":2},{"title":"GemmaTokenizer","local":"transformers.GemmaTokenizer ][ transformers.GemmaTokenizer","sections":[],"depth":2},{"title":"GemmaTokenizerFast","local":"transformers.GemmaTokenizerFast ][ transformers.GemmaTokenizerFast","sections":[],"depth":2},{"title":"GemmaModel","local":"transformers.GemmaModel ][ transformers.GemmaModel","sections":[],"depth":2},{"title":"GemmaForCausalLM","local":"transformers.GemmaForCausalLM ][ transformers.GemmaForCausalLM","sections":[],"depth":2},{"title":"GemmaForSequenceClassification","local":"transformers.GemmaForSequenceClassification ][ transformers.GemmaForSequenceClassification","sections":[],"depth":2},{"title":"GemmaForTokenClassification","local":"transformers.GemmaForTokenClassification ][ transformers.GemmaForTokenClassification","sections":[],"depth":2},{"title":"FlaxGemmaModel","local":"transformers.FlaxGemmaModel ][ transformers.FlaxGemmaModel","sections":[],"depth":2},{"title":"FlaxGemmaForCausalLM","local":"transformers.FlaxGemmaForCausalLM ][ transformers.FlaxGemmaForCausalLM","sections":[],"depth":2}],"depth":1}';function ks(v){return Oa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends Qa{constructor(t){super(),Ya(this,t,ks,gs,Xa,{})}}export{xs as component};
