import{s as va,o as ka,n as E}from"../chunks/scheduler.25b97de1.js";import{S as ya,i as Ta,g as d,s as n,r as h,A as $a,h as l,f as i,c as a,j as M,u as f,x as p,k as w,y as o,a as m,v as g,d as _,t as b,w as v}from"../chunks/index.d9030fc9.js";import{T as st}from"../chunks/Tip.baa67368.js";import{D as q}from"../chunks/Docstring.ffac8efa.js";import{C as At}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Bt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as Y,E as Ma}from"../chunks/EditOnGithub.91d95064.js";function wa(y){let t,k;return t=new At({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdlbW1hTW9kZWwlMkMlMjBHZW1tYUNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBHZW1tYSUyMGdlbW1hLTdiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEdlbW1hQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwZ2VtbWEtN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEdlbW1hTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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,u){g(t,s,u),k=!0},p:E,i(s){k||(_(t.$$.fragment,s),k=!0)},o(s){b(t.$$.fragment,s),k=!1},d(s){v(t,s)}}}function xa(y){let t,k="sequence pair mask has the following format:",s,u,T;return u=new At({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=d("p"),t.textContent=k,s=n(),h(u.$$.fragment)},l(c){t=l(c,"P",{"data-svelte-h":!0}),p(t)!=="svelte-16klr56"&&(t.textContent=k),s=a(c),f(u.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(u,c,$),T=!0},p:E,i(c){T||(_(u.$$.fragment,c),T=!0)},o(c){b(u.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),v(u,c)}}}function za(y){let t,k;return t=new At({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,u){g(t,s,u),k=!0},p:E,i(s){k||(_(t.$$.fragment,s),k=!0)},o(s){b(t.$$.fragment,s),k=!1},d(s){v(t,s)}}}function Ga(y){let t,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function Ca(y){let t,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function Fa(y){let t,k="Example:",s,u,T;return u=new At({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=d("p"),t.textContent=k,s=n(),h(u.$$.fragment)},l(c){t=l(c,"P",{"data-svelte-h":!0}),p(t)!=="svelte-11lpom8"&&(t.textContent=k),s=a(c),f(u.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(u,c,$),T=!0},p:E,i(c){T||(_(u.$$.fragment,c),T=!0)},o(c){b(u.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),v(u,c)}}}function qa(y){let t,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function La(y){let t,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function ja(y){let t,k=`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=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-i4y11c"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function Ia(y){let t,k="Example:",s,u,T;return u=new At({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=d("p"),t.textContent=k,s=n(),h(u.$$.fragment)},l(c){t=l(c,"P",{"data-svelte-h":!0}),p(t)!=="svelte-11lpom8"&&(t.textContent=k),s=a(c),f(u.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(u,c,$),T=!0},p:E,i(c){T||(_(u.$$.fragment,c),T=!0)},o(c){b(u.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),v(u,c)}}}function Pa(y){let t,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function Wa(y){let t,k=`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=d("p"),t.innerHTML=k},l(s){t=l(s,"P",{"data-svelte-h":!0}),p(t)!=="svelte-i4y11c"&&(t.innerHTML=k)},m(s,u){m(s,t,u)},p:E,d(s){s&&i(t)}}}function Ua(y){let t,k="Example:",s,u,T;return u=new At({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=d("p"),t.textContent=k,s=n(),h(u.$$.fragment)},l(c){t=l(c,"P",{"data-svelte-h":!0}),p(t)!=="svelte-11lpom8"&&(t.textContent=k),s=a(c),f(u.$$.fragment,c)},m(c,$){m(c,t,$),m(c,s,$),g(u,c,$),T=!0},p:E,i(c){T||(_(u.$$.fragment,c),T=!0)},o(c){b(u.$$.fragment,c),T=!1},d(c){c&&(i(t),i(s)),v(u,c)}}}function Ha(y){let t,k,s,u,T,c,$,Rt,ve,Cn=`The Gemma model was proposed in <a href="https://blog.google/technology/developers/gemma-open-models/" rel="nofollow">Gemma: Open Models Based on Gemini Technology and Research</a> by Gemma Team, Google.
Gemma models are trained on 6T tokens, and released with 2 versions, 2b and 7b.`,Ot,ke,Fn="The abstract from the paper is the following:",Xt,ye,qn="<em>This work introduces Gemma, a new family of open language models demonstrating strong performance across academic benchmarks for language understanding, reasoning, and safety. We release two sizes of models (2 billion and 7 billion parameters), and provide both pretrained and fine-tuned checkpoints. Gemma outperforms similarly sized open models on 11 out of 18 text-based tasks, and we present comprehensive evaluations of safety and responsibility aspects of the models, alongside a detailed description of our model development. We believe the responsible release of LLMs is critical for improving the safety of frontier models, and for enabling the next wave of LLM innovations</em>",Qt,Te,Ln="Tips:",Yt,$e,jn="<li>The original checkpoints can be converted using the conversion script <code>src/transformers/models/gemma/convert_gemma_weights_to_hf.py</code></li>",Kt,Me,In='This model was contributed by <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>.',eo,we,to,I,xe,ko,rt,Pn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.41.0/en/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.`,yo,it,Wn='e.g. <a href="https://huggingface.co/google/gemma-7b" rel="nofollow">google/gemma-7b</a>',To,dt,Un=`Configuration objects inherit from <a href="/docs/transformers/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,$o,te,oo,ze,no,x,Ge,Mo,lt,Hn=`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.`,wo,oe,Ce,xo,ct,Jn="Converts a sequence of tokens (string) in a single string.",zo,V,Fe,Go,mt,Sn="Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT",Co,ne,Fo,pt,Nn="if token_ids_1 is None, only returns the first portion of the mask (0s).",qo,ae,qe,Lo,ut,Zn=`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.`,jo,se,Le,Io,ht,En="Returns vocab as a dict",Po,re,je,Wo,ft,Vn="Save the vocabulary and special tokens file to a directory.",ao,Ie,so,z,Pe,Uo,gt,Bn="Construct a Gemma tokenizer fast. Based on byte-level Byte-Pair-Encoding.",Ho,_t,An="This uses notably ByteFallback and no prefix space. Normalization is applied to replace  <code>&quot; &quot;</code> with <code>&quot;▁&quot;</code>",Jo,ie,So,bt,Dn=`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.`,No,vt,Rn=`This tokenizer inherits from <a href="/docs/transformers/v4.41.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Zo,de,We,Eo,kt,On="Updates the underlying post processor with the current <code>bos_token</code> and <code>eos_token</code>.",ro,Ue,io,P,He,Vo,yt,Xn=`The bare Gemma Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Bo,Tt,Qn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ao,$t,Yn="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>GemmaDecoderLayer</code>",Do,R,Je,Ro,Mt,Kn='The <a href="/docs/transformers/v4.41.0/en/model_doc/gemma#transformers.GemmaModel">GemmaModel</a> forward method, overrides the <code>__call__</code> special method.',Oo,le,lo,Se,co,K,Ne,Xo,B,Ze,Qo,wt,ea='The <a href="/docs/transformers/v4.41.0/en/model_doc/gemma#transformers.GemmaForCausalLM">GemmaForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Yo,ce,Ko,me,mo,Ee,po,G,Ve,en,xt,ta="The Gemma Model transformer with a sequence classification head on top (linear layer).",tn,zt,oa=`<a href="/docs/transformers/v4.41.0/en/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.`,on,Gt,na=`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).`,nn,Ct,aa=`This model inherits from <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,an,Ft,sa=`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.`,sn,O,Be,rn,qt,ra='The <a href="/docs/transformers/v4.41.0/en/model_doc/gemma#transformers.GemmaForSequenceClassification">GemmaForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',dn,pe,uo,Ae,ho,C,De,ln,Lt,ia="The bare Gemma Model transformer outputting raw hidden-states without any specific head on top.",cn,jt,da=`This model inherits from <a href="/docs/transformers/v4.41.0/en/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.)`,mn,It,la=`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.`,pn,Pt,ca="Finally, this model supports inherent JAX features such as:",un,Wt,ma='<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>',hn,W,Re,fn,Ut,pa="The <code>FlaxGemmaPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",gn,ue,_n,he,bn,fe,fo,Oe,go,F,Xe,vn,Ht,ua="The Gemma Model transformer with a language modeling head (linear layer) on top.",kn,Jt,ha=`This model inherits from <a href="/docs/transformers/v4.41.0/en/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.)`,yn,St,fa=`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.`,Tn,Nt,ga="Finally, this model supports inherent JAX features such as:",$n,Zt,_a='<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>',Mn,U,Qe,wn,Et,ba="The <code>FlaxGemmaPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",xn,ge,zn,_e,Gn,be,_o,Ye,bo,Dt,vo;return T=new Y({props:{title:"Gemma",local:"gemma",headingTag:"h1"}}),$=new Y({props:{title:"Overview",local:"overview",headingTag:"h2"}}),we=new Y({props:{title:"GemmaConfig",local:"transformers.GemmaConfig",headingTag:"h2"}}),xe=new q({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/v4.41.0/en/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 the model will use Multi Query Attention (MQA) otherwise GQA is used. When converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed by meanpooling all the original heads within that group. For more details checkout [this paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to </code>num_attention_heads\`.`,name:"num_key_value_heads"},{anchor:"transformers.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/v4.41.0/src/transformers/models/gemma/configuration_gemma.py#L24"}}),te=new Bt({props:{anchor:"transformers.GemmaConfig.example",$$slots:{default:[wa]},$$scope:{ctx:y}}}),ze=new Y({props:{title:"GemmaTokenizer",local:"transformers.GemmaTokenizer",headingTag:"h2"}}),Ge=new q({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:": Optional = 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/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L37"}}),Ce=new q({props:{name:"convert_tokens_to_string",anchor:"transformers.GemmaTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L202"}}),Fe=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L295",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>
`}}),ne=new Bt({props:{anchor:"transformers.GemmaTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[xa]},$$scope:{ctx:y}}}),qe=new q({props:{name:"get_special_tokens_mask",anchor:"transformers.GemmaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L257",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>
`}}),Le=new q({props:{name:"get_vocab",anchor:"transformers.GemmaTokenizer.get_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L150"}}),je=new q({props:{name:"save_vocabulary",anchor:"transformers.GemmaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:""},{name:"filename_prefix",val:": Optional = 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/v4.41.0/src/transformers/models/gemma/tokenization_gemma.py#L217",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>
`}}),Ie=new Y({props:{title:"GemmaTokenizerFast",local:"transformers.GemmaTokenizerFast",headingTag:"h2"}}),Pe=new q({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/v4.41.0/src/transformers/models/gemma/tokenization_gemma_fast.py#L37"}}),ie=new Bt({props:{anchor:"transformers.GemmaTokenizerFast.example",$$slots:{default:[za]},$$scope:{ctx:y}}}),We=new q({props:{name:"update_post_processor",anchor:"transformers.GemmaTokenizerFast.update_post_processor",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/tokenization_gemma_fast.py#L125"}}),Ue=new Y({props:{title:"GemmaModel",local:"transformers.GemmaModel",headingTag:"h2"}}),He=new q({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/v4.41.0/en/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/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; GemmaConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L785"}}),Je=new q({props:{name:"forward",anchor:"transformers.GemmaModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/v4.41.0/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</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/v4.41.0/en/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/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L818"}}),le=new st({props:{$$slots:{default:[Ga]},$$scope:{ctx:y}}}),Se=new Y({props:{title:"GemmaForCausalLM",local:"transformers.GemmaForCausalLM",headingTag:"h2"}}),Ne=new q({props:{name:"class transformers.GemmaForCausalLM",anchor:"transformers.GemmaForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L1019"}}),Ze=new q({props:{name:"forward",anchor:"transformers.GemmaForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/v4.41.0/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</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/v4.41.0/en/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.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L1050",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ce=new st({props:{$$slots:{default:[Ca]},$$scope:{ctx:y}}}),me=new Bt({props:{anchor:"transformers.GemmaForCausalLM.forward.example",$$slots:{default:[Fa]},$$scope:{ctx:y}}}),Ee=new Y({props:{title:"GemmaForSequenceClassification",local:"transformers.GemmaForSequenceClassification",headingTag:"h2"}}),Ve=new q({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/v4.41.0/en/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/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L1227"}}),Be=new q({props:{name:"forward",anchor:"transformers.GemmaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/v4.41.0/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</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/v4.41.0/en/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/v4.41.0/src/transformers/models/gemma/modeling_gemma.py#L1259"}}),pe=new st({props:{$$slots:{default:[qa]},$$scope:{ctx:y}}}),Ae=new Y({props:{title:"FlaxGemmaModel",local:"transformers.FlaxGemmaModel",headingTag:"h2"}}),De=new q({props:{name:"class transformers.FlaxGemmaModel",anchor:"transformers.FlaxGemmaModel",parameters:[{name:"config",val:": GemmaConfig"},{name:"input_shape",val:": 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/v4.41.0/en/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/v4.41.0/en/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/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_flax_gemma.py#L662"}}),Re=new q({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:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>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/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_flax_gemma.py#L481",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/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/v4.41.0/en/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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new st({props:{$$slots:{default:[La]},$$scope:{ctx:y}}}),he=new st({props:{warning:!0,$$slots:{default:[ja]},$$scope:{ctx:y}}}),fe=new Bt({props:{anchor:"transformers.FlaxGemmaModel.__call__.example",$$slots:{default:[Ia]},$$scope:{ctx:y}}}),Oe=new Y({props:{title:"FlaxGemmaForCausalLM",local:"transformers.FlaxGemmaForCausalLM",headingTag:"h2"}}),Xe=new q({props:{name:"class transformers.FlaxGemmaForCausalLM",anchor:"transformers.FlaxGemmaForCausalLM",parameters:[{name:"config",val:": GemmaConfig"},{name:"input_shape",val:": 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/v4.41.0/en/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/v4.41.0/en/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/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_flax_gemma.py#L730"}}),Qe=new q({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:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>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/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/gemma/modeling_flax_gemma.py#L481",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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