import{s as Vr,o as Er,n as P}from"../chunks/scheduler.25b97de1.js";import{S as Qr,i as Or,g as l,s,r as m,A as Yr,h as d,f as n,c as a,j as $,u,x as p,k as x,l as Dr,y as i,a as r,v as h,d as f,t as g,w as _}from"../chunks/index.d9030fc9.js";import{T as Y}from"../chunks/Tip.baa67368.js";import{D as F}from"../chunks/Docstring.ffac8efa.js";import{C as ke}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ms}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Kr}from"../chunks/PipelineTag.5f100392.js";import{H as j,E as ei}from"../chunks/EditOnGithub.91d95064.js";function ti(v){let o,y;return o=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1pc3RyYWxNb2RlbCUyQyUyME1pc3RyYWxDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwTWlzdHJhbCUyMDdCJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyME1pc3RyYWxDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBNaXN0cmFsJTIwN0IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME1pc3RyYWxNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MistralModel, MistralConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Mistral 7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MistralConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the Mistral 7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MistralModel(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(){m(o.$$.fragment)},l(c){u(o.$$.fragment,c)},m(c,M){h(o,c,M),y=!0},p:P,i(c){y||(f(o.$$.fragment,c),y=!0)},o(c){g(o.$$.fragment,c),y=!1},d(c){_(o,c)}}}function ni(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function oi(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function si(v){let o,y="Example:",c,M,w;return M=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNaXN0cmFsRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME1pc3RyYWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWlzdHJhbGFpJTJGTWlzdHJhbC03Qi12MC4xJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItdjAuMSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MistralForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = MistralForCausalLM.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){o=l("p"),o.textContent=y,c=s(),m(M.$$.fragment)},l(b){o=d(b,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=y),c=a(b),u(M.$$.fragment,b)},m(b,k){r(b,o,k),r(b,c,k),h(M,b,k),w=!0},p:P,i(b){w||(f(M.$$.fragment,b),w=!0)},o(b){g(M.$$.fragment,b),w=!1},d(b){b&&(n(o),n(c)),_(M,b)}}}function ai(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function ri(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function ii(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function li(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function di(v){let o,y=`This example uses a random model as the real ones are all very big. To get proper results, you should use
mistralai/Mistral-7B-v0.1 instead of ksmcg/Mistral-tiny. 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(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-p3ymc5"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function ci(v){let o,y="Example:",c,M,w;return M=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TWlzdHJhbE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIya3NtY2clMkZNaXN0cmFsLXRpbnklMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4TWlzdHJhbE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJrc21jZyUyRk1pc3RyYWwtdGlueSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMistralModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ksmcg/Mistral-tiny&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMistralModel.from_pretrained(<span class="hljs-string">&quot;ksmcg/Mistral-tiny&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(){o=l("p"),o.textContent=y,c=s(),m(M.$$.fragment)},l(b){o=d(b,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=y),c=a(b),u(M.$$.fragment,b)},m(b,k){r(b,o,k),r(b,c,k),h(M,b,k),w=!0},p:P,i(b){w||(f(M.$$.fragment,b),w=!0)},o(b){g(M.$$.fragment,b),w=!1},d(b){b&&(n(o),n(c)),_(M,b)}}}function pi(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function mi(v){let o,y=`This example uses a random model as the real ones are all very big. To get proper results, you should use
mistralai/Mistral-7B-v0.1 instead of ksmcg/Mistral-tiny. 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(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-p3ymc5"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function ui(v){let o,y="Example:",c,M,w;return M=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4TWlzdHJhbEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIya3NtY2clMkZNaXN0cmFsLXRpbnklMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4TWlzdHJhbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJrc21jZyUyRk1pc3RyYWwtdGlueSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxMistralForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ksmcg/Mistral-tiny&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxMistralForCausalLM.from_pretrained(<span class="hljs-string">&quot;ksmcg/Mistral-tiny&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(){o=l("p"),o.textContent=y,c=s(),m(M.$$.fragment)},l(b){o=d(b,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=y),c=a(b),u(M.$$.fragment,b)},m(b,k){r(b,o,k),r(b,c,k),h(M,b,k),w=!0},p:P,i(b){w||(f(M.$$.fragment,b),w=!0)},o(b){g(M.$$.fragment,b),w=!1},d(b){b&&(n(o),n(c)),_(M,b)}}}function hi(v){let o,y="TensorFlow models and layers in <code>model</code> accept two formats as input:",c,M,w="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",b,k,re=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,H,U,ie=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,W,L,le=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=l("p"),o.innerHTML=y,c=s(),M=l("ul"),M.innerHTML=w,b=s(),k=l("p"),k.innerHTML=re,H=s(),U=l("ul"),U.innerHTML=ie,W=s(),L=l("p"),L.innerHTML=le},l(T){o=d(T,"P",{"data-svelte-h":!0}),p(o)!=="svelte-q09ipl"&&(o.innerHTML=y),c=a(T),M=d(T,"UL",{"data-svelte-h":!0}),p(M)!=="svelte-qm1t26"&&(M.innerHTML=w),b=a(T),k=d(T,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1v9qsc5"&&(k.innerHTML=re),H=a(T),U=d(T,"UL",{"data-svelte-h":!0}),p(U)!=="svelte-15scerc"&&(U.innerHTML=ie),W=a(T),L=d(T,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1an3odd"&&(L.innerHTML=le)},m(T,C){r(T,o,C),r(T,c,C),r(T,M,C),r(T,b,C),r(T,k,C),r(T,H,C),r(T,U,C),r(T,W,C),r(T,L,C)},p:P,d(T){T&&(n(o),n(c),n(M),n(b),n(k),n(H),n(U),n(W),n(L))}}}function fi(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function gi(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function _i(v){let o,y="TensorFlow models and layers in <code>model</code> accept two formats as input:",c,M,w="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",b,k,re=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,H,U,ie=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,W,L,le=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=l("p"),o.innerHTML=y,c=s(),M=l("ul"),M.innerHTML=w,b=s(),k=l("p"),k.innerHTML=re,H=s(),U=l("ul"),U.innerHTML=ie,W=s(),L=l("p"),L.innerHTML=le},l(T){o=d(T,"P",{"data-svelte-h":!0}),p(o)!=="svelte-q09ipl"&&(o.innerHTML=y),c=a(T),M=d(T,"UL",{"data-svelte-h":!0}),p(M)!=="svelte-qm1t26"&&(M.innerHTML=w),b=a(T),k=d(T,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1v9qsc5"&&(k.innerHTML=re),H=a(T),U=d(T,"UL",{"data-svelte-h":!0}),p(U)!=="svelte-15scerc"&&(U.innerHTML=ie),W=a(T),L=d(T,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1an3odd"&&(L.innerHTML=le)},m(T,C){r(T,o,C),r(T,c,C),r(T,M,C),r(T,b,C),r(T,k,C),r(T,H,C),r(T,U,C),r(T,W,C),r(T,L,C)},p:P,d(T){T&&(n(o),n(c),n(M),n(b),n(k),n(H),n(U),n(W),n(L))}}}function Mi(v){let o,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=l("p"),o.innerHTML=y},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=y)},m(c,M){r(c,o,M)},p:P,d(c){c&&n(o)}}}function yi(v){let o,y,c,M,w,b,k,re,H,U='Mistral was introduced in the <a href="https://mistral.ai/news/announcing-mistral-7b/" rel="nofollow">this blogpost</a> by Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed.',ie,W,L="The introduction of the blog post says:",le,T,C="<em>Mistral AI team is proud to release Mistral 7B, the most powerful language model for its size to date.</em>",no,Ae,qa='Mistral-7B is the first large language model (LLM) released by <a href="https://mistral.ai/" rel="nofollow">mistral.ai</a>.',oo,Ge,so,Re,Ja="Mistral-7B is a decoder-only Transformer with the following architectural choices:",ao,Xe,Ua="<li>Sliding Window Attention - Trained with 8k context length and fixed cache size, with a theoretical attention span of 128K tokens</li> <li>GQA (Grouped Query Attention) - allowing faster inference and lower cache size.</li> <li>Byte-fallback BPE tokenizer - ensures that characters are never mapped to out of vocabulary tokens.</li>",ro,Ve,La='For more details refer to the <a href="https://mistral.ai/news/announcing-mistral-7b/" rel="nofollow">release blog post</a>.',io,Ee,lo,Qe,Pa="<code>Mistral-7B</code> is released under the Apache 2.0 license.",co,Oe,po,Ye,Ha="The Mistral team has released 3 checkpoints:",mo,De,Wa='<li>a base model, <a href="https://huggingface.co/mistralai/Mistral-7B-v0.1" rel="nofollow">Mistral-7B-v0.1</a>, which has been pre-trained to predict the next token on internet-scale data.</li> <li>an instruction tuned model, <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1" rel="nofollow">Mistral-7B-Instruct-v0.1</a>, which is the base model optimized for chat purposes using supervised fine-tuning (SFT) and direct preference optimization (DPO).</li> <li>an improved instruction tuned model, <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2" rel="nofollow">Mistral-7B-Instruct-v0.2</a>, which improves upon v1.</li>',uo,Ke,Ba="The base model can be used as follows:",ho,et,fo,tt,Na="The instruction tuned model can be used as follows:",go,nt,_o,ot,Za='As can be seen, the instruction-tuned model requires a <a href="../chat_templating">chat template</a> to be applied to make sure the inputs are prepared in the right format.',Mo,st,yo,at,Sa='The code snippets above showcase inference without any optimization tricks. However, one can drastically speed up the model by leveraging <a href="../perf_train_gpu_one.md#flash-attention-2">Flash Attention</a>, which is a faster implementation of the attention mechanism used inside the model.',bo,rt,Aa="First, make sure to install the latest version of Flash Attention 2 to include the sliding window attention feature.",To,it,vo,lt,Ga='Make also sure that you have a hardware that is compatible with Flash-Attention 2. Read more about it in the official documentation of the <a href="https://github.com/Dao-AILab/flash-attention" rel="nofollow">flash attention repository</a>. Make also sure to load your model in half-precision (e.g. <code>torch.float16</code>)',ko,dt,Ra="To load and run a model using Flash Attention-2, refer to the snippet below:",wo,ct,$o,pt,xo,mt,Xa="Below is a expected speedup diagram that compares pure inference time between the native implementation in transformers using <code>mistralai/Mistral-7B-v0.1</code> checkpoint and the Flash Attention 2 version of the model.",Co,we,Va='<img src="https://huggingface.co/datasets/ybelkada/documentation-images/resolve/main/mistral-7b-inference-large-seqlen.png"/>',zo,ut,Fo,ht,Ea=`The current implementation supports the sliding window attention mechanism and memory efficient cache management.
To enable sliding window attention, just make sure to have a <code>flash-attn</code> version that is compatible with sliding window attention (<code>&gt;=2.3.0</code>).`,jo,ft,Qa="The Flash Attention-2 model uses also a more memory efficient cache slicing mechanism - as recommended per the official implementation of Mistral model that use rolling cache mechanism we keep the cache size fixed (<code>self.config.sliding_window</code>), support batched generation only for <code>padding_side=&quot;left&quot;</code> and use the absolute position of the current token to compute the positional embedding.",Io,gt,qo,_t,Oa='As the Mistral model has 7 billion parameters, that would require about 14GB of GPU RAM in half precision (float16), since each parameter is stored in 2 bytes. However, one can shrink down the size of the model using <a href="../quantization.md">quantization</a>. If the model is quantized to 4 bits (or half a byte per parameter),that requires only about 3.5GB of RAM.',Jo,Mt,Ya='Quantizing a model is as simple as passing a <code>quantization_config</code> to the model. Below, we’ll leverage the BitsAndyBytes quantization (but refer to <a href="../quantization.md">this page</a> for other quantization methods):',Uo,yt,Lo,bt,Da=`This model was contributed by <a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a> and <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a> .
The original code can be found <a href="https://github.com/mistralai/mistral-src" rel="nofollow">here</a>.`,Po,Tt,Ho,vt,Ka="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Mistral. If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",Wo,kt,Bo,wt,er='<li>A demo notebook to perform supervised fine-tuning (SFT) of Mistral-7B can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/Mistral/Supervised_fine_tuning_(SFT)_of_an_LLM_using_Hugging_Face_tooling.ipynb" rel="nofollow">here</a>. 🌎</li> <li>A <a href="https://www.philschmid.de/fine-tune-llms-in-2024-with-trl" rel="nofollow">blog post</a> on how to fine-tune LLMs in 2024 using Hugging Face tooling. 🌎</li> <li>The <a href="https://github.com/huggingface/alignment-handbook" rel="nofollow">Alignment Handbook</a> by Hugging Face includes scripts and recipes to perform supervised fine-tuning (SFT) and direct preference optimization with Mistral-7B. This includes scripts for full fine-tuning, QLoRa on a single GPU as well as multi-GPU fine-tuning.</li> <li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',No,$t,Zo,G,xt,us,ln,tr=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralModel">MistralModel</a>. It is used to instantiate an
Mistral 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 Mistral-7B-v0.1 or Mistral-7B-Instruct-v0.1.`,hs,dn,nr='<a href="https://huggingface.co/mistralai/Mistral-7B-v0.1" rel="nofollow">mistralai/Mistral-7B-v0.1</a> <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1" rel="nofollow">mistralai/Mistral-7B-Instruct-v0.1</a>',fs,cn,or=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,gs,$e,So,Ct,Ao,R,zt,_s,pn,sr=`The bare Mistral Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/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.)`,Ms,mn,ar=`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.`,ys,un,rr="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>MistralDecoderLayer</code>",bs,de,Ft,Ts,hn,ir='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralModel">MistralModel</a> forward method, overrides the <code>__call__</code> special method.',vs,xe,Go,jt,Ro,ge,It,ks,se,qt,ws,fn,lr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForCausalLM">MistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',$s,Ce,xs,ze,Xo,Jt,Vo,I,Ut,Cs,gn,dr="The Mistral Model transformer with a sequence classification head on top (linear layer).",zs,_n,cr=`<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForSequenceClassification">MistralForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,Fs,Mn,pr=`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).`,js,yn,mr=`This model inherits from <a href="/docs/transformers/main/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.)`,Is,bn,ur=`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.`,qs,ce,Lt,Js,Tn,hr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForSequenceClassification">MistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Us,Fe,Eo,Pt,Qo,X,Ht,Ls,vn,fr=`The Mistral Model transformer with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`,Ps,kn,gr=`This model inherits from <a href="/docs/transformers/main/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.)`,Hs,wn,_r=`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.`,Ws,pe,Wt,Bs,$n,Mr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForTokenClassification">MistralForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Ns,je,Oo,Bt,Yo,V,Nt,Zs,xn,yr=`The Mistral Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layer on top of the hidden-states output to compute <code>span start logits</code> and <code>span end logits</code>).`,Ss,Cn,br=`This model inherits from <a href="/docs/transformers/main/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.)`,As,zn,Tr=`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.`,Gs,me,Zt,Rs,Fn,vr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForQuestionAnswering">MistralForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Xs,Ie,Do,St,kr="<li>forward</li>",Ko,At,es,q,Gt,Vs,jn,wr="The bare Mistral Model transformer outputting raw hidden-states without any specific head on top.",Es,In,$r=`This model inherits from <a href="/docs/transformers/main/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.)`,Qs,qn,xr=`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.`,Os,Jn,Cr="Finally, this model supports inherent JAX features such as:",Ys,Un,zr='<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>',Ds,Q,Rt,Ks,Ln,Fr="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",ea,qe,ta,Je,na,Ue,ts,Xt,ns,J,Vt,oa,Pn,jr="The Mistral Model transformer with a language modeling head (linear layer) on top.",sa,Hn,Ir=`This model inherits from <a href="/docs/transformers/main/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.)`,aa,Wn,qr=`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.`,ra,Bn,Jr="Finally, this model supports inherent JAX features such as:",ia,Nn,Ur='<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>',la,O,Et,da,Zn,Lr="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",ca,Le,pa,Pe,ma,He,os,Qt,ss,B,Ot,ua,Sn,Pr="The bare Mistral Model outputting raw hidden-states without any specific head on top.",ha,An,Hr=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</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.)`,fa,Gn,Wr=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,ga,We,_a,ue,Yt,Ma,Rn,Br='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.TFMistralModel">TFMistralModel</a> forward method, overrides the <code>__call__</code> special method.',ya,Be,as,Dt,rs,_e,Kt,ba,he,en,Ta,Xn,Nr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.TFMistralForCausalLM">TFMistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',va,Ne,is,tn,ls,z,nn,ka,Vn,Zr="The Mistral Model transformer with a sequence classification head on top (linear layer).",wa,En,Sr=`<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralForSequenceClassification">MistralForSequenceClassification</a> uses the last token in order to do the classification, as other causal models
(e.g. GPT-2) do.`,$a,Qn,Ar=`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).`,xa,On,Gr=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</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.)`,Ca,Yn,Rr=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,za,Ze,Fa,fe,on,ja,Dn,Xr='The <a href="/docs/transformers/main/en/model_doc/mistral#transformers.TFMistralForSequenceClassification">TFMistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ia,Se,ds,sn,cs,to,ps;return w=new j({props:{title:"Mistral",local:"mistral",headingTag:"h1"}}),k=new j({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ge=new j({props:{title:"Architectural details",local:"architectural-details",headingTag:"h3"}}),Ee=new j({props:{title:"License",local:"license",headingTag:"h3"}}),Oe=new j({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),et=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItdjAuMSUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItdjAuMSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJNeSUyMGZhdm91cml0ZSUyMGNvbmRpbWVudCUyMGlzJTIyJTBBJTBBbW9kZWxfaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKCUyMmN1ZGElMjIpJTBBbW9kZWwudG8oZGV2aWNlKSUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKm1vZGVsX2lucHV0cyUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMTAwJTJDJTIwZG9fc2FtcGxlJTNEVHJ1ZSklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;My favourite condiment is&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer([prompt], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**model_inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;My favourite condiment is to ...&quot;</span>`,wrap:!1}}),nt=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItSW5zdHJ1Y3QtdjAuMiUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItSW5zdHJ1Y3QtdjAuMiUyMiklMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldoYXQlMjBpcyUyMHlvdXIlMjBmYXZvdXJpdGUlMjBjb25kaW1lbnQlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyYXNzaXN0YW50JTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldlbGwlMkMlMjBJJ20lMjBxdWl0ZSUyMHBhcnRpYWwlMjB0byUyMGElMjBnb29kJTIwc3F1ZWV6ZSUyMG9mJTIwZnJlc2glMjBsZW1vbiUyMGp1aWNlLiUyMEl0JTIwYWRkcyUyMGp1c3QlMjB0aGUlMjByaWdodCUyMGFtb3VudCUyMG9mJTIwemVzdHklMjBmbGF2b3VyJTIwdG8lMjB3aGF0ZXZlciUyMEknbSUyMGNvb2tpbmclMjB1cCUyMGluJTIwdGhlJTIwa2l0Y2hlbiElMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJEbyUyMHlvdSUyMGhhdmUlMjBtYXlvbm5haXNlJTIwcmVjaXBlcyUzRiUyMiU3RCUwQSU1RCUwQSUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplci5hcHBseV9jaGF0X3RlbXBsYXRlKG1lc3NhZ2VzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8oJTIyY3VkYSUyMiklMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUobW9kZWxfaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxMDAlMkMlMjBkb19zYW1wbGUlM0RUcnVlKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyklNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-Instruct-v0.2&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-Instruct-v0.2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What is your favourite condiment?&quot;</span>},
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Well, I&#x27;m quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I&#x27;m cooking up in the kitchen!&quot;</span>},
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Do you have mayonnaise recipes?&quot;</span>}
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer.apply_chat_template(messages, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(model_inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Mayonnaise can be made as follows: (...)&quot;</span>`,wrap:!1}}),st=new j({props:{title:"Speeding up Mistral by using Flash Attention",local:"speeding-up-mistral-by-using-flash-attention",headingTag:"h2"}}),it=new ke({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),ct=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWlzdHJhbGFpJTJGTWlzdHJhbC03Qi12MC4xJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMmZsYXNoX2F0dGVudGlvbl8yJTIyJTJDJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWlzdHJhbGFpJTJGTWlzdHJhbC03Qi12MC4xJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMk15JTIwZmF2b3VyaXRlJTIwY29uZGltZW50JTIwaXMlMjIlMEElMEFtb2RlbF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8oJTIyY3VkYSUyMiklMEFtb2RlbC50byhkZXZpY2UpJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqbW9kZWxfaW5wdXRzJTJDJTIwbWF4X25ld190b2tlbnMlM0QxMDAlMkMlMjBkb19zYW1wbGUlM0RUcnVlKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyklNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>, torch_dtype=torch.float16, attn_implementation=<span class="hljs-string">&quot;flash_attention_2&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-v0.1&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;My favourite condiment is&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer([prompt], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(**model_inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;My favourite condiment is to (...)&quot;</span>`,wrap:!1}}),pt=new j({props:{title:"Expected speedups",local:"expected-speedups",headingTag:"h3"}}),ut=new j({props:{title:"Sliding window Attention",local:"sliding-window-attention",headingTag:"h3"}}),gt=new j({props:{title:"Shrinking down Mistral using quantization",local:"shrinking-down-mistral-using-quantization",headingTag:"h2"}}),yt=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0lMkMlMjBBdXRvVG9rZW5pemVyJTJDJTIwQml0c0FuZEJ5dGVzQ29uZmlnJTBBJTBBJTIzJTIwc3BlY2lmeSUyMGhvdyUyMHRvJTIwcXVhbnRpemUlMjB0aGUlMjBtb2RlbCUwQXF1YW50aXphdGlvbl9jb25maWclMjAlM0QlMjBCaXRzQW5kQnl0ZXNDb25maWcoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbG9hZF9pbl80Yml0JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGJuYl80Yml0X3F1YW50X3R5cGUlM0QlMjJuZjQlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBibmJfNGJpdF9jb21wdXRlX2R0eXBlJTNEJTIydG9yY2guZmxvYXQxNiUyMiUyQyUwQSklMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJtaXN0cmFsYWklMkZNaXN0cmFsLTdCLUluc3RydWN0LXYwLjIlMjIlMkMlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEVHJ1ZSUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItSW5zdHJ1Y3QtdjAuMiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJNeSUyMGZhdm91cml0ZSUyMGNvbmRpbWVudCUyMGlzJTIyJTBBJTBBbWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXaGF0JTIwaXMlMjB5b3VyJTIwZmF2b3VyaXRlJTIwY29uZGltZW50JTNGJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMmFzc2lzdGFudCUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXZWxsJTJDJTIwSSdtJTIwcXVpdGUlMjBwYXJ0aWFsJTIwdG8lMjBhJTIwZ29vZCUyMHNxdWVlemUlMjBvZiUyMGZyZXNoJTIwbGVtb24lMjBqdWljZS4lMjBJdCUyMGFkZHMlMjBqdXN0JTIwdGhlJTIwcmlnaHQlMjBhbW91bnQlMjBvZiUyMHplc3R5JTIwZmxhdm91ciUyMHRvJTIwd2hhdGV2ZXIlMjBJJ20lMjBjb29raW5nJTIwdXAlMjBpbiUyMHRoZSUyMGtpdGNoZW4hJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyRG8lMjB5b3UlMjBoYXZlJTIwbWF5b25uYWlzZSUyMHJlY2lwZXMlM0YlMjIlN0QlMEElNUQlMEElMEFtb2RlbF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIuYXBwbHlfY2hhdF90ZW1wbGF0ZShtZXNzYWdlcyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKCUyMmN1ZGElMjIpJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKG1vZGVsX2lucHV0cyUyQyUyMG1heF9uZXdfdG9rZW5zJTNEMTAwJTJDJTIwZG9fc2FtcGxlJTNEVHJ1ZSklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMpJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># specify how to quantize the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>quantization_config = BitsAndBytesConfig(
<span class="hljs-meta">... </span>        load_in_4bit=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>        bnb_4bit_quant_type=<span class="hljs-string">&quot;nf4&quot;</span>,
<span class="hljs-meta">... </span>        bnb_4bit_compute_dtype=<span class="hljs-string">&quot;torch.float16&quot;</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-Instruct-v0.2&quot;</span>, quantization_config=<span class="hljs-literal">True</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;mistralai/Mistral-7B-Instruct-v0.2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;My favourite condiment is&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What is your favourite condiment?&quot;</span>},
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Well, I&#x27;m quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I&#x27;m cooking up in the kitchen!&quot;</span>},
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Do you have mayonnaise recipes?&quot;</span>}
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model_inputs = tokenizer.apply_chat_template(messages, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(model_inputs, max_new_tokens=<span class="hljs-number">100</span>, do_sample=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generated_ids)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;The expected output&quot;</span>`,wrap:!1}}),Tt=new j({props:{title:"Resources",local:"resources",headingTag:"h2"}}),kt=new Kr({props:{pipeline:"text-generation"}}),$t=new j({props:{title:"MistralConfig",local:"transformers.MistralConfig",headingTag:"h2"}}),xt=new F({props:{name:"class transformers.MistralConfig",anchor:"transformers.MistralConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:" = 14336"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"num_key_value_heads",val:" = 8"},{name:"head_dim",val:" = None"},{name:"hidden_act",val:" = 'silu'"},{name:"max_position_embeddings",val:" = 131072"},{name:"initializer_range",val:" = 0.02"},{name:"rms_norm_eps",val:" = 1e-06"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = None"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 10000.0"},{name:"sliding_window",val:" = 4096"},{name:"attention_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MistralConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the Mistral model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralModel">MistralModel</a>`,name:"vocab_size"},{anchor:"transformers.MistralConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.MistralConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 14336) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.MistralConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.MistralConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.MistralConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
<code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if
<code>num_key_value_heads=1</code> the model will use Multi Query Attention (MQA) otherwise GQA is used. When
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
by meanpooling all the original heads within that group. For more details checkout <a href="https://arxiv.org/pdf/2305.13245.pdf" rel="nofollow">this
paper</a>. If it is not specified, will default to <code>8</code>.`,name:"num_key_value_heads"},{anchor:"transformers.MistralConfig.head_dim",description:`<strong>head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>hidden_size // num_attention_heads</code>) &#x2014;
The attention head dimension.`,name:"head_dim"},{anchor:"transformers.MistralConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.MistralConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4096*32</code>) &#x2014;
The maximum sequence length that this model might ever be used with. Mistral&#x2019;s sliding window attention
allows sequence of up to 4096*32 tokens.`,name:"max_position_embeddings"},{anchor:"transformers.MistralConfig.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.MistralConfig.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.MistralConfig.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.MistralConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The id of the padding token.`,name:"pad_token_id"},{anchor:"transformers.MistralConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The id of the &#x201C;beginning-of-sequence&#x201D; token.`,name:"bos_token_id"},{anchor:"transformers.MistralConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the &#x201C;end-of-sequence&#x201D; token.`,name:"eos_token_id"},{anchor:"transformers.MistralConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model&#x2019;s input and output word embeddings should be tied.`,name:"tie_word_embeddings"},{anchor:"transformers.MistralConfig.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.MistralConfig.sliding_window",description:`<strong>sliding_window</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Sliding window attention window size. If not specified, will default to <code>4096</code>.`,name:"sliding_window"},{anchor:"transformers.MistralConfig.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/main/src/transformers/models/mistral/configuration_mistral.py#L24"}}),$e=new ms({props:{anchor:"transformers.MistralConfig.example",$$slots:{default:[ti]},$$scope:{ctx:v}}}),Ct=new j({props:{title:"MistralModel",local:"transformers.MistralModel",headingTag:"h2"}}),zt=new F({props:{name:"class transformers.MistralModel",anchor:"transformers.MistralModel",parameters:[{name:"config",val:": MistralConfig"}],parametersDescription:[{anchor:"transformers.MistralModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; MistralConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L670"}}),Ft=new F({props:{name:"forward",anchor:"transformers.MistralModel.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.MistralModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralModel.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.MistralModel.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/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MistralModel.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.MistralModel.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.MistralModel.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.MistralModel.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.MistralModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L704"}}),xe=new Y({props:{$$slots:{default:[ni]},$$scope:{ctx:v}}}),jt=new j({props:{title:"MistralForCausalLM",local:"transformers.MistralForCausalLM",headingTag:"h2"}}),It=new F({props:{name:"class transformers.MistralForCausalLM",anchor:"transformers.MistralForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L978"}}),qt=new F({props:{name:"forward",anchor:"transformers.MistralForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"}],parametersDescription:[{anchor:"transformers.MistralForCausalLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForCausalLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForCausalLM.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.MistralForCausalLM.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/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MistralForCausalLM.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.MistralForCausalLM.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.MistralForCausalLM.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.MistralForCausalLM.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.MistralForCausalLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L1008",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/mistral#transformers.MistralConfig"
>MistralConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ce=new Y({props:{$$slots:{default:[oi]},$$scope:{ctx:v}}}),ze=new ms({props:{anchor:"transformers.MistralForCausalLM.forward.example",$$slots:{default:[si]},$$scope:{ctx:v}}}),Jt=new j({props:{title:"MistralForSequenceClassification",local:"transformers.MistralForSequenceClassification",headingTag:"h2"}}),Ut=new F({props:{name:"class transformers.MistralForSequenceClassification",anchor:"transformers.MistralForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MistralForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/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/main/src/transformers/models/mistral/modeling_mistral.py#L1108"}}),Lt=new F({props:{name:"forward",anchor:"transformers.MistralForSequenceClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.MistralForSequenceClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForSequenceClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForSequenceClassification.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.MistralForSequenceClassification.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/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MistralForSequenceClassification.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.MistralForSequenceClassification.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.MistralForSequenceClassification.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.MistralForSequenceClassification.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.MistralForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForSequenceClassification.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/main/src/transformers/models/mistral/modeling_mistral.py#L1140"}}),Fe=new Y({props:{$$slots:{default:[ai]},$$scope:{ctx:v}}}),Pt=new j({props:{title:"MistralForTokenClassification",local:"transformers.MistralForTokenClassification",headingTag:"h2"}}),Ht=new F({props:{name:"class transformers.MistralForTokenClassification",anchor:"transformers.MistralForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MistralForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/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/main/src/transformers/models/mistral/modeling_mistral.py#L1213"}}),Wt=new F({props:{name:"forward",anchor:"transformers.MistralForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.MistralForTokenClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForTokenClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForTokenClassification.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.MistralForTokenClassification.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/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MistralForTokenClassification.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.MistralForTokenClassification.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.MistralForTokenClassification.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.MistralForTokenClassification.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.MistralForTokenClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForTokenClassification.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/main/src/transformers/models/mistral/modeling_mistral.py#L1244"}}),je=new Y({props:{$$slots:{default:[ri]},$$scope:{ctx:v}}}),Bt=new j({props:{title:"MistralForQuestionAnswering",local:"transformers.MistralForQuestionAnswering",headingTag:"h2"}}),Nt=new F({props:{name:"class transformers.MistralForQuestionAnswering",anchor:"transformers.MistralForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MistralForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/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/main/src/transformers/models/mistral/modeling_mistral.py#L1297"}}),Zt=new F({props:{name:"forward",anchor:"transformers.MistralForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"start_positions",val:": Optional = None"},{name:"end_positions",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MistralForQuestionAnswering.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForQuestionAnswering.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.MistralForQuestionAnswering.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.MistralForQuestionAnswering.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/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.MistralForQuestionAnswering.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.MistralForQuestionAnswering.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.MistralForQuestionAnswering.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.MistralForQuestionAnswering.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.MistralForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.MistralForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_mistral.py#L1323"}}),Ie=new Y({props:{$$slots:{default:[ii]},$$scope:{ctx:v}}}),At=new j({props:{title:"FlaxMistralModel",local:"transformers.FlaxMistralModel",headingTag:"h2"}}),Gt=new F({props:{name:"class transformers.FlaxMistralModel",anchor:"transformers.FlaxMistralModel",parameters:[{name:"config",val:": MistralConfig"},{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.FlaxMistralModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMistralModel.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_flax_mistral.py#L636"}}),Rt=new F({props:{name:"__call__",anchor:"transformers.FlaxMistralModel.__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.FlaxMistralModel.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.FlaxMistralModel.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.FlaxMistralModel.__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.FlaxMistralModel.__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.FlaxMistralModel.__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.FlaxMistralModel.__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.FlaxMistralModel.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast</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/main/en/model_doc/mistral#transformers.MistralConfig"
>MistralConfig</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>past_key_values</strong> (<code>Dict[str, jnp.ndarray]</code>) — 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>.</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/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qe=new Y({props:{$$slots:{default:[li]},$$scope:{ctx:v}}}),Je=new Y({props:{warning:!0,$$slots:{default:[di]},$$scope:{ctx:v}}}),Ue=new ms({props:{anchor:"transformers.FlaxMistralModel.__call__.example",$$slots:{default:[ci]},$$scope:{ctx:v}}}),Xt=new j({props:{title:"FlaxMistralForCausalLM",local:"transformers.FlaxMistralForCausalLM",headingTag:"h2"}}),Vt=new F({props:{name:"class transformers.FlaxMistralForCausalLM",anchor:"transformers.FlaxMistralForCausalLM",parameters:[{name:"config",val:": MistralConfig"},{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.FlaxMistralForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxMistralForCausalLM.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/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_flax_mistral.py#L698"}}),Et=new F({props:{name:"__call__",anchor:"transformers.FlaxMistralForCausalLM.__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.FlaxMistralForCausalLM.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.FlaxMistralForCausalLM.__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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.FlaxMistralForCausalLM.__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.FlaxMistralForCausalLM.__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.FlaxMistralForCausalLM.__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.FlaxMistralForCausalLM.__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.FlaxMistralForCausalLM.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</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/main/en/model_doc/mistral#transformers.MistralConfig"
>MistralConfig</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>
<li>
<p><strong>cross_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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Le=new Y({props:{$$slots:{default:[pi]},$$scope:{ctx:v}}}),Pe=new Y({props:{warning:!0,$$slots:{default:[mi]},$$scope:{ctx:v}}}),He=new ms({props:{anchor:"transformers.FlaxMistralForCausalLM.__call__.example",$$slots:{default:[ui]},$$scope:{ctx:v}}}),Qt=new j({props:{title:"TFMistralModel",local:"transformers.TFMistralModel",headingTag:"h2"}}),Ot=new F({props:{name:"class transformers.TFMistralModel",anchor:"transformers.TFMistralModel",parameters:[{name:"config",val:": MistralConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMistralModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L760"}}),We=new Y({props:{$$slots:{default:[hi]},$$scope:{ctx:v}}}),Yt=new F({props:{name:"call",anchor:"transformers.TFMistralModel.call",parameters:[{name:"input_ids",val:": Tensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"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.TFMistralModel.call.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralModel.call.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.TFMistralModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(tf.Tensor))</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>One formats is allowed:</p>
<ul>
<li>Tuple of <code>tuple(tf.Tensor)</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.TFMistralModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFMistralModel.call.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.TFMistralModel.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.TFMistralModel.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.TFMistralModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L769"}}),Be=new Y({props:{$$slots:{default:[fi]},$$scope:{ctx:v}}}),Dt=new j({props:{title:"TFMistralForCausalLM",local:"transformers.TFMistralForCausalLM",headingTag:"h2"}}),Kt=new F({props:{name:"class transformers.TFMistralForCausalLM",anchor:"transformers.TFMistralForCausalLM",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L805"}}),en=new F({props:{name:"call",anchor:"transformers.TFMistralForCausalLM.call",parameters:[{name:"input_ids",val:": Tensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.TFMistralForCausalLM.call.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralForCausalLM.call.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.TFMistralForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(tf.Tensor))</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>One formats is allowed:</p>
<ul>
<li>Tuple of <code>tuple(tf.Tensor)</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.TFMistralForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFMistralForCausalLM.call.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.TFMistralForCausalLM.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.TFMistralForCausalLM.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.TFMistralForCausalLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>tf.Tensor</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:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L836"}}),Ne=new Y({props:{$$slots:{default:[gi]},$$scope:{ctx:v}}}),tn=new j({props:{title:"TFMistralForSequenceClassification",local:"transformers.TFMistralForSequenceClassification",headingTag:"h2"}}),nn=new F({props:{name:"class transformers.TFMistralForSequenceClassification",anchor:"transformers.TFMistralForSequenceClassification",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMistralForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mistral#transformers.MistralConfig">MistralConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L928"}}),Ze=new Y({props:{$$slots:{default:[_i]},$$scope:{ctx:v}}}),on=new F({props:{name:"call",anchor:"transformers.TFMistralForSequenceClassification.call",parameters:[{name:"input_ids",val:": Tensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.TFMistralForSequenceClassification.call.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.TFMistralForSequenceClassification.call.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.TFMistralForSequenceClassification.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(tf.Tensor))</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>One formats is allowed:</p>
<ul>
<li>Tuple of <code>tuple(tf.Tensor)</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.TFMistralForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFMistralForSequenceClassification.call.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.TFMistralForSequenceClassification.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.TFMistralForSequenceClassification.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.TFMistralForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
labels (<code>tf.Tensor</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:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mistral/modeling_tf_mistral.py#L962"}}),Se=new Y({props:{$$slots:{default:[Mi]},$$scope:{ctx:v}}}),sn=new ei({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/mistral.md"}}),{c(){o=l("meta"),y=s(),c=l("p"),M=s(),m(w.$$.fragment),b=s(),m(k.$$.fragment),re=s(),H=l("p"),H.innerHTML=U,ie=s(),W=l("p"),W.textContent=L,le=s(),T=l("p"),T.innerHTML=C,no=s(),Ae=l("p"),Ae.innerHTML=qa,oo=s(),m(Ge.$$.fragment),so=s(),Re=l("p"),Re.textContent=Ja,ao=s(),Xe=l("ul"),Xe.innerHTML=Ua,ro=s(),Ve=l("p"),Ve.innerHTML=La,io=s(),m(Ee.$$.fragment),lo=s(),Qe=l("p"),Qe.innerHTML=Pa,co=s(),m(Oe.$$.fragment),po=s(),Ye=l("p"),Ye.textContent=Ha,mo=s(),De=l("ul"),De.innerHTML=Wa,uo=s(),Ke=l("p"),Ke.textContent=Ba,ho=s(),m(et.$$.fragment),fo=s(),tt=l("p"),tt.textContent=Na,go=s(),m(nt.$$.fragment),_o=s(),ot=l("p"),ot.innerHTML=Za,Mo=s(),m(st.$$.fragment),yo=s(),at=l("p"),at.innerHTML=Sa,bo=s(),rt=l("p"),rt.textContent=Aa,To=s(),m(it.$$.fragment),vo=s(),lt=l("p"),lt.innerHTML=Ga,ko=s(),dt=l("p"),dt.textContent=Ra,wo=s(),m(ct.$$.fragment),$o=s(),m(pt.$$.fragment),xo=s(),mt=l("p"),mt.innerHTML=Xa,Co=s(),we=l("div"),we.innerHTML=Va,zo=s(),m(ut.$$.fragment),Fo=s(),ht=l("p"),ht.innerHTML=Ea,jo=s(),ft=l("p"),ft.innerHTML=Qa,Io=s(),m(gt.$$.fragment),qo=s(),_t=l("p"),_t.innerHTML=Oa,Jo=s(),Mt=l("p"),Mt.innerHTML=Ya,Uo=s(),m(yt.$$.fragment),Lo=s(),bt=l("p"),bt.innerHTML=Da,Po=s(),m(Tt.$$.fragment),Ho=s(),vt=l("p"),vt.textContent=Ka,Wo=s(),m(kt.$$.fragment),Bo=s(),wt=l("ul"),wt.innerHTML=er,No=s(),m($t.$$.fragment),Zo=s(),G=l("div"),m(xt.$$.fragment),us=s(),ln=l("p"),ln.innerHTML=tr,hs=s(),dn=l("p"),dn.innerHTML=nr,fs=s(),cn=l("p"),cn.innerHTML=or,gs=s(),m($e.$$.fragment),So=s(),m(Ct.$$.fragment),Ao=s(),R=l("div"),m(zt.$$.fragment),_s=s(),pn=l("p"),pn.innerHTML=sr,Ms=s(),mn=l("p"),mn.innerHTML=ar,ys=s(),un=l("p"),un.innerHTML=rr,bs=s(),de=l("div"),m(Ft.$$.fragment),Ts=s(),hn=l("p"),hn.innerHTML=ir,vs=s(),m(xe.$$.fragment),Go=s(),m(jt.$$.fragment),Ro=s(),ge=l("div"),m(It.$$.fragment),ks=s(),se=l("div"),m(qt.$$.fragment),ws=s(),fn=l("p"),fn.innerHTML=lr,$s=s(),m(Ce.$$.fragment),xs=s(),m(ze.$$.fragment),Xo=s(),m(Jt.$$.fragment),Vo=s(),I=l("div"),m(Ut.$$.fragment),Cs=s(),gn=l("p"),gn.textContent=dr,zs=s(),_n=l("p"),_n.innerHTML=cr,Fs=s(),Mn=l("p"),Mn.innerHTML=pr,js=s(),yn=l("p"),yn.innerHTML=mr,Is=s(),bn=l("p"),bn.innerHTML=ur,qs=s(),ce=l("div"),m(Lt.$$.fragment),Js=s(),Tn=l("p"),Tn.innerHTML=hr,Us=s(),m(Fe.$$.fragment),Eo=s(),m(Pt.$$.fragment),Qo=s(),X=l("div"),m(Ht.$$.fragment),Ls=s(),vn=l("p"),vn.textContent=fr,Ps=s(),kn=l("p"),kn.innerHTML=gr,Hs=s(),wn=l("p"),wn.innerHTML=_r,Ws=s(),pe=l("div"),m(Wt.$$.fragment),Bs=s(),$n=l("p"),$n.innerHTML=Mr,Ns=s(),m(je.$$.fragment),Oo=s(),m(Bt.$$.fragment),Yo=s(),V=l("div"),m(Nt.$$.fragment),Zs=s(),xn=l("p"),xn.innerHTML=yr,Ss=s(),Cn=l("p"),Cn.innerHTML=br,As=s(),zn=l("p"),zn.innerHTML=Tr,Gs=s(),me=l("div"),m(Zt.$$.fragment),Rs=s(),Fn=l("p"),Fn.innerHTML=vr,Xs=s(),m(Ie.$$.fragment),Do=s(),St=l("ul"),St.innerHTML=kr,Ko=s(),m(At.$$.fragment),es=s(),q=l("div"),m(Gt.$$.fragment),Vs=s(),jn=l("p"),jn.textContent=wr,Es=s(),In=l("p"),In.innerHTML=$r,Qs=s(),qn=l("p"),qn.innerHTML=xr,Os=s(),Jn=l("p"),Jn.textContent=Cr,Ys=s(),Un=l("ul"),Un.innerHTML=zr,Ds=s(),Q=l("div"),m(Rt.$$.fragment),Ks=s(),Ln=l("p"),Ln.innerHTML=Fr,ea=s(),m(qe.$$.fragment),ta=s(),m(Je.$$.fragment),na=s(),m(Ue.$$.fragment),ts=s(),m(Xt.$$.fragment),ns=s(),J=l("div"),m(Vt.$$.fragment),oa=s(),Pn=l("p"),Pn.textContent=jr,sa=s(),Hn=l("p"),Hn.innerHTML=Ir,aa=s(),Wn=l("p"),Wn.innerHTML=qr,ra=s(),Bn=l("p"),Bn.textContent=Jr,ia=s(),Nn=l("ul"),Nn.innerHTML=Ur,la=s(),O=l("div"),m(Et.$$.fragment),da=s(),Zn=l("p"),Zn.innerHTML=Lr,ca=s(),m(Le.$$.fragment),pa=s(),m(Pe.$$.fragment),ma=s(),m(He.$$.fragment),os=s(),m(Qt.$$.fragment),ss=s(),B=l("div"),m(Ot.$$.fragment),ua=s(),Sn=l("p"),Sn.textContent=Pr,ha=s(),An=l("p"),An.innerHTML=Hr,fa=s(),Gn=l("p"),Gn.innerHTML=Wr,ga=s(),m(We.$$.fragment),_a=s(),ue=l("div"),m(Yt.$$.fragment),Ma=s(),Rn=l("p"),Rn.innerHTML=Br,ya=s(),m(Be.$$.fragment),as=s(),m(Dt.$$.fragment),rs=s(),_e=l("div"),m(Kt.$$.fragment),ba=s(),he=l("div"),m(en.$$.fragment),Ta=s(),Xn=l("p"),Xn.innerHTML=Nr,va=s(),m(Ne.$$.fragment),is=s(),m(tn.$$.fragment),ls=s(),z=l("div"),m(nn.$$.fragment),ka=s(),Vn=l("p"),Vn.textContent=Zr,wa=s(),En=l("p"),En.innerHTML=Sr,$a=s(),Qn=l("p"),Qn.innerHTML=Ar,xa=s(),On=l("p"),On.innerHTML=Gr,Ca=s(),Yn=l("p"),Yn.innerHTML=Rr,za=s(),m(Ze.$$.fragment),Fa=s(),fe=l("div"),m(on.$$.fragment),ja=s(),Dn=l("p"),Dn.innerHTML=Xr,Ia=s(),m(Se.$$.fragment),ds=s(),m(sn.$$.fragment),cs=s(),to=l("p"),this.h()},l(e){const t=Yr("svelte-u9bgzb",document.head);o=d(t,"META",{name:!0,content:!0}),t.forEach(n),y=a(e),c=d(e,"P",{}),$(c).forEach(n),M=a(e),u(w.$$.fragment,e),b=a(e),u(k.$$.fragment,e),re=a(e),H=d(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-243wvj"&&(H.innerHTML=U),ie=a(e),W=d(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-mxegxd"&&(W.textContent=L),le=a(e),T=d(e,"P",{"data-svelte-h":!0}),p(T)!=="svelte-18rzdn9"&&(T.innerHTML=C),no=a(e),Ae=d(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-lpcx04"&&(Ae.innerHTML=qa),oo=a(e),u(Ge.$$.fragment,e),so=a(e),Re=d(e,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-c9a7d0"&&(Re.textContent=Ja),ao=a(e),Xe=d(e,"UL",{"data-svelte-h":!0}),p(Xe)!=="svelte-hqpplt"&&(Xe.innerHTML=Ua),ro=a(e),Ve=d(e,"P",{"data-svelte-h":!0}),p(Ve)!=="svelte-1urvx68"&&(Ve.innerHTML=La),io=a(e),u(Ee.$$.fragment,e),lo=a(e),Qe=d(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-16fzvdw"&&(Qe.innerHTML=Pa),co=a(e),u(Oe.$$.fragment,e),po=a(e),Ye=d(e,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-1hrvuc7"&&(Ye.textContent=Ha),mo=a(e),De=d(e,"UL",{"data-svelte-h":!0}),p(De)!=="svelte-1sgzbx8"&&(De.innerHTML=Wa),uo=a(e),Ke=d(e,"P",{"data-svelte-h":!0}),p(Ke)!=="svelte-18cq7lr"&&(Ke.textContent=Ba),ho=a(e),u(et.$$.fragment,e),fo=a(e),tt=d(e,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-14idvxg"&&(tt.textContent=Na),go=a(e),u(nt.$$.fragment,e),_o=a(e),ot=d(e,"P",{"data-svelte-h":!0}),p(ot)!=="svelte-11xhi4l"&&(ot.innerHTML=Za),Mo=a(e),u(st.$$.fragment,e),yo=a(e),at=d(e,"P",{"data-svelte-h":!0}),p(at)!=="svelte-1sb6n2y"&&(at.innerHTML=Sa),bo=a(e),rt=d(e,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-o3pzzu"&&(rt.textContent=Aa),To=a(e),u(it.$$.fragment,e),vo=a(e),lt=d(e,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-1ehkek3"&&(lt.innerHTML=Ga),ko=a(e),dt=d(e,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-15f76ro"&&(dt.textContent=Ra),wo=a(e),u(ct.$$.fragment,e),$o=a(e),u(pt.$$.fragment,e),xo=a(e),mt=d(e,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-lhkvj8"&&(mt.innerHTML=Xa),Co=a(e),we=d(e,"DIV",{style:!0,"data-svelte-h":!0}),p(we)!=="svelte-18u0t8d"&&(we.innerHTML=Va),zo=a(e),u(ut.$$.fragment,e),Fo=a(e),ht=d(e,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-10i6fhp"&&(ht.innerHTML=Ea),jo=a(e),ft=d(e,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1bvsrfr"&&(ft.innerHTML=Qa),Io=a(e),u(gt.$$.fragment,e),qo=a(e),_t=d(e,"P",{"data-svelte-h":!0}),p(_t)!=="svelte-izvcpk"&&(_t.innerHTML=Oa),Jo=a(e),Mt=d(e,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-10qhmcu"&&(Mt.innerHTML=Ya),Uo=a(e),u(yt.$$.fragment,e),Lo=a(e),bt=d(e,"P",{"data-svelte-h":!0}),p(bt)!=="svelte-1wxpeky"&&(bt.innerHTML=Da),Po=a(e),u(Tt.$$.fragment,e),Ho=a(e),vt=d(e,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-pv2cmd"&&(vt.textContent=Ka),Wo=a(e),u(kt.$$.fragment,e),Bo=a(e),wt=d(e,"UL",{"data-svelte-h":!0}),p(wt)!=="svelte-jz6yd1"&&(wt.innerHTML=er),No=a(e),u($t.$$.fragment,e),Zo=a(e),G=d(e,"DIV",{class:!0});var D=$(G);u(xt.$$.fragment,D),us=a(D),ln=d(D,"P",{"data-svelte-h":!0}),p(ln)!=="svelte-14v0v0n"&&(ln.innerHTML=tr),hs=a(D),dn=d(D,"P",{"data-svelte-h":!0}),p(dn)!=="svelte-28p57e"&&(dn.innerHTML=nr),fs=a(D),cn=d(D,"P",{"data-svelte-h":!0}),p(cn)!=="svelte-o55m63"&&(cn.innerHTML=or),gs=a(D),u($e.$$.fragment,D),D.forEach(n),So=a(e),u(Ct.$$.fragment,e),Ao=a(e),R=d(e,"DIV",{class:!0});var K=$(R);u(zt.$$.fragment,K),_s=a(K),pn=d(K,"P",{"data-svelte-h":!0}),p(pn)!=="svelte-tk9y80"&&(pn.innerHTML=sr),Ms=a(K),mn=d(K,"P",{"data-svelte-h":!0}),p(mn)!=="svelte-hswkmf"&&(mn.innerHTML=ar),ys=a(K),un=d(K,"P",{"data-svelte-h":!0}),p(un)!=="svelte-1oenqzd"&&(un.innerHTML=rr),bs=a(K),de=d(K,"DIV",{class:!0});var Me=$(de);u(Ft.$$.fragment,Me),Ts=a(Me),hn=d(Me,"P",{"data-svelte-h":!0}),p(hn)!=="svelte-3rq1wp"&&(hn.innerHTML=ir),vs=a(Me),u(xe.$$.fragment,Me),Me.forEach(n),K.forEach(n),Go=a(e),u(jt.$$.fragment,e),Ro=a(e),ge=d(e,"DIV",{class:!0});var an=$(ge);u(It.$$.fragment,an),ks=a(an),se=d(an,"DIV",{class:!0});var ae=$(se);u(qt.$$.fragment,ae),ws=a(ae),fn=d(ae,"P",{"data-svelte-h":!0}),p(fn)!=="svelte-1bgwutx"&&(fn.innerHTML=lr),$s=a(ae),u(Ce.$$.fragment,ae),xs=a(ae),u(ze.$$.fragment,ae),ae.forEach(n),an.forEach(n),Xo=a(e),u(Jt.$$.fragment,e),Vo=a(e),I=d(e,"DIV",{class:!0});var N=$(I);u(Ut.$$.fragment,N),Cs=a(N),gn=d(N,"P",{"data-svelte-h":!0}),p(gn)!=="svelte-1r7clz4"&&(gn.textContent=dr),zs=a(N),_n=d(N,"P",{"data-svelte-h":!0}),p(_n)!=="svelte-oiiwva"&&(_n.innerHTML=cr),Fs=a(N),Mn=d(N,"P",{"data-svelte-h":!0}),p(Mn)!=="svelte-10ugs3m"&&(Mn.innerHTML=pr),js=a(N),yn=d(N,"P",{"data-svelte-h":!0}),p(yn)!=="svelte-6pahdo"&&(yn.innerHTML=mr),Is=a(N),bn=d(N,"P",{"data-svelte-h":!0}),p(bn)!=="svelte-hswkmf"&&(bn.innerHTML=ur),qs=a(N),ce=d(N,"DIV",{class:!0});var ye=$(ce);u(Lt.$$.fragment,ye),Js=a(ye),Tn=d(ye,"P",{"data-svelte-h":!0}),p(Tn)!=="svelte-1bksa9b"&&(Tn.innerHTML=hr),Us=a(ye),u(Fe.$$.fragment,ye),ye.forEach(n),N.forEach(n),Eo=a(e),u(Pt.$$.fragment,e),Qo=a(e),X=d(e,"DIV",{class:!0});var ee=$(X);u(Ht.$$.fragment,ee),Ls=a(ee),vn=d(ee,"P",{"data-svelte-h":!0}),p(vn)!=="svelte-16ihdln"&&(vn.textContent=fr),Ps=a(ee),kn=d(ee,"P",{"data-svelte-h":!0}),p(kn)!=="svelte-6pahdo"&&(kn.innerHTML=gr),Hs=a(ee),wn=d(ee,"P",{"data-svelte-h":!0}),p(wn)!=="svelte-hswkmf"&&(wn.innerHTML=_r),Ws=a(ee),pe=d(ee,"DIV",{class:!0});var be=$(pe);u(Wt.$$.fragment,be),Bs=a(be),$n=d(be,"P",{"data-svelte-h":!0}),p($n)!=="svelte-1lokk4b"&&($n.innerHTML=Mr),Ns=a(be),u(je.$$.fragment,be),be.forEach(n),ee.forEach(n),Oo=a(e),u(Bt.$$.fragment,e),Yo=a(e),V=d(e,"DIV",{class:!0});var te=$(V);u(Nt.$$.fragment,te),Zs=a(te),xn=d(te,"P",{"data-svelte-h":!0}),p(xn)!=="svelte-4y0z7g"&&(xn.innerHTML=yr),Ss=a(te),Cn=d(te,"P",{"data-svelte-h":!0}),p(Cn)!=="svelte-6pahdo"&&(Cn.innerHTML=br),As=a(te),zn=d(te,"P",{"data-svelte-h":!0}),p(zn)!=="svelte-hswkmf"&&(zn.innerHTML=Tr),Gs=a(te),me=d(te,"DIV",{class:!0});var Te=$(me);u(Zt.$$.fragment,Te),Rs=a(Te),Fn=d(Te,"P",{"data-svelte-h":!0}),p(Fn)!=="svelte-1tfvw2n"&&(Fn.innerHTML=vr),Xs=a(Te),u(Ie.$$.fragment,Te),Te.forEach(n),te.forEach(n),Do=a(e),St=d(e,"UL",{"data-svelte-h":!0}),p(St)!=="svelte-n3ow4o"&&(St.innerHTML=kr),Ko=a(e),u(At.$$.fragment,e),es=a(e),q=d(e,"DIV",{class:!0});var Z=$(q);u(Gt.$$.fragment,Z),Vs=a(Z),jn=d(Z,"P",{"data-svelte-h":!0}),p(jn)!=="svelte-1vqhmd7"&&(jn.textContent=wr),Es=a(Z),In=d(Z,"P",{"data-svelte-h":!0}),p(In)!=="svelte-18ki9f4"&&(In.innerHTML=$r),Qs=a(Z),qn=d(Z,"P",{"data-svelte-h":!0}),p(qn)!=="svelte-idybz1"&&(qn.innerHTML=xr),Os=a(Z),Jn=d(Z,"P",{"data-svelte-h":!0}),p(Jn)!=="svelte-1pplc4a"&&(Jn.textContent=Cr),Ys=a(Z),Un=d(Z,"UL",{"data-svelte-h":!0}),p(Un)!=="svelte-1w7z84m"&&(Un.innerHTML=zr),Ds=a(Z),Q=d(Z,"DIV",{class:!0});var ne=$(Q);u(Rt.$$.fragment,ne),Ks=a(ne),Ln=d(ne,"P",{"data-svelte-h":!0}),p(Ln)!=="svelte-dti72j"&&(Ln.innerHTML=Fr),ea=a(ne),u(qe.$$.fragment,ne),ta=a(ne),u(Je.$$.fragment,ne),na=a(ne),u(Ue.$$.fragment,ne),ne.forEach(n),Z.forEach(n),ts=a(e),u(Xt.$$.fragment,e),ns=a(e),J=d(e,"DIV",{class:!0});var S=$(J);u(Vt.$$.fragment,S),oa=a(S),Pn=d(S,"P",{"data-svelte-h":!0}),p(Pn)!=="svelte-lgxco8"&&(Pn.textContent=jr),sa=a(S),Hn=d(S,"P",{"data-svelte-h":!0}),p(Hn)!=="svelte-18ki9f4"&&(Hn.innerHTML=Ir),aa=a(S),Wn=d(S,"P",{"data-svelte-h":!0}),p(Wn)!=="svelte-idybz1"&&(Wn.innerHTML=qr),ra=a(S),Bn=d(S,"P",{"data-svelte-h":!0}),p(Bn)!=="svelte-1pplc4a"&&(Bn.textContent=Jr),ia=a(S),Nn=d(S,"UL",{"data-svelte-h":!0}),p(Nn)!=="svelte-1w7z84m"&&(Nn.innerHTML=Ur),la=a(S),O=d(S,"DIV",{class:!0});var oe=$(O);u(Et.$$.fragment,oe),da=a(oe),Zn=d(oe,"P",{"data-svelte-h":!0}),p(Zn)!=="svelte-dti72j"&&(Zn.innerHTML=Lr),ca=a(oe),u(Le.$$.fragment,oe),pa=a(oe),u(Pe.$$.fragment,oe),ma=a(oe),u(He.$$.fragment,oe),oe.forEach(n),S.forEach(n),os=a(e),u(Qt.$$.fragment,e),ss=a(e),B=d(e,"DIV",{class:!0});var E=$(B);u(Ot.$$.fragment,E),ua=a(E),Sn=d(E,"P",{"data-svelte-h":!0}),p(Sn)!=="svelte-1g3elk2"&&(Sn.textContent=Pr),ha=a(E),An=d(E,"P",{"data-svelte-h":!0}),p(An)!=="svelte-1qaxm70"&&(An.innerHTML=Hr),fa=a(E),Gn=d(E,"P",{"data-svelte-h":!0}),p(Gn)!=="svelte-1be7e3c"&&(Gn.innerHTML=Wr),ga=a(E),u(We.$$.fragment,E),_a=a(E),ue=d(E,"DIV",{class:!0});var ve=$(ue);u(Yt.$$.fragment,ve),Ma=a(ve),Rn=d(ve,"P",{"data-svelte-h":!0}),p(Rn)!=="svelte-mm7urx"&&(Rn.innerHTML=Br),ya=a(ve),u(Be.$$.fragment,ve),ve.forEach(n),E.forEach(n),as=a(e),u(Dt.$$.fragment,e),rs=a(e),_e=d(e,"DIV",{class:!0});var rn=$(_e);u(Kt.$$.fragment,rn),ba=a(rn),he=d(rn,"DIV",{class:!0});var Kn=$(he);u(en.$$.fragment,Kn),Ta=a(Kn),Xn=d(Kn,"P",{"data-svelte-h":!0}),p(Xn)!=="svelte-19bp47d"&&(Xn.innerHTML=Nr),va=a(Kn),u(Ne.$$.fragment,Kn),Kn.forEach(n),rn.forEach(n),is=a(e),u(tn.$$.fragment,e),ls=a(e),z=d(e,"DIV",{class:!0});var A=$(z);u(nn.$$.fragment,A),ka=a(A),Vn=d(A,"P",{"data-svelte-h":!0}),p(Vn)!=="svelte-1r7clz4"&&(Vn.textContent=Zr),wa=a(A),En=d(A,"P",{"data-svelte-h":!0}),p(En)!=="svelte-oiiwva"&&(En.innerHTML=Sr),$a=a(A),Qn=d(A,"P",{"data-svelte-h":!0}),p(Qn)!=="svelte-10ugs3m"&&(Qn.innerHTML=Ar),xa=a(A),On=d(A,"P",{"data-svelte-h":!0}),p(On)!=="svelte-1qaxm70"&&(On.innerHTML=Gr),Ca=a(A),Yn=d(A,"P",{"data-svelte-h":!0}),p(Yn)!=="svelte-1be7e3c"&&(Yn.innerHTML=Rr),za=a(A),u(Ze.$$.fragment,A),Fa=a(A),fe=d(A,"DIV",{class:!0});var eo=$(fe);u(on.$$.fragment,eo),ja=a(eo),Dn=d(eo,"P",{"data-svelte-h":!0}),p(Dn)!=="svelte-yo3kfj"&&(Dn.innerHTML=Xr),Ia=a(eo),u(Se.$$.fragment,eo),eo.forEach(n),A.forEach(n),ds=a(e),u(sn.$$.fragment,e),cs=a(e),to=d(e,"P",{}),$(to).forEach(n),this.h()},h(){x(o,"name","hf:doc:metadata"),x(o,"content",bi),Dr(we,"text-align","center"),x(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){i(document.head,o),r(e,y,t),r(e,c,t),r(e,M,t),h(w,e,t),r(e,b,t),h(k,e,t),r(e,re,t),r(e,H,t),r(e,ie,t),r(e,W,t),r(e,le,t),r(e,T,t),r(e,no,t),r(e,Ae,t),r(e,oo,t),h(Ge,e,t),r(e,so,t),r(e,Re,t),r(e,ao,t),r(e,Xe,t),r(e,ro,t),r(e,Ve,t),r(e,io,t),h(Ee,e,t),r(e,lo,t),r(e,Qe,t),r(e,co,t),h(Oe,e,t),r(e,po,t),r(e,Ye,t),r(e,mo,t),r(e,De,t),r(e,uo,t),r(e,Ke,t),r(e,ho,t),h(et,e,t),r(e,fo,t),r(e,tt,t),r(e,go,t),h(nt,e,t),r(e,_o,t),r(e,ot,t),r(e,Mo,t),h(st,e,t),r(e,yo,t),r(e,at,t),r(e,bo,t),r(e,rt,t),r(e,To,t),h(it,e,t),r(e,vo,t),r(e,lt,t),r(e,ko,t),r(e,dt,t),r(e,wo,t),h(ct,e,t),r(e,$o,t),h(pt,e,t),r(e,xo,t),r(e,mt,t),r(e,Co,t),r(e,we,t),r(e,zo,t),h(ut,e,t),r(e,Fo,t),r(e,ht,t),r(e,jo,t),r(e,ft,t),r(e,Io,t),h(gt,e,t),r(e,qo,t),r(e,_t,t),r(e,Jo,t),r(e,Mt,t),r(e,Uo,t),h(yt,e,t),r(e,Lo,t),r(e,bt,t),r(e,Po,t),h(Tt,e,t),r(e,Ho,t),r(e,vt,t),r(e,Wo,t),h(kt,e,t),r(e,Bo,t),r(e,wt,t),r(e,No,t),h($t,e,t),r(e,Zo,t),r(e,G,t),h(xt,G,null),i(G,us),i(G,ln),i(G,hs),i(G,dn),i(G,fs),i(G,cn),i(G,gs),h($e,G,null),r(e,So,t),h(Ct,e,t),r(e,Ao,t),r(e,R,t),h(zt,R,null),i(R,_s),i(R,pn),i(R,Ms),i(R,mn),i(R,ys),i(R,un),i(R,bs),i(R,de),h(Ft,de,null),i(de,Ts),i(de,hn),i(de,vs),h(xe,de,null),r(e,Go,t),h(jt,e,t),r(e,Ro,t),r(e,ge,t),h(It,ge,null),i(ge,ks),i(ge,se),h(qt,se,null),i(se,ws),i(se,fn),i(se,$s),h(Ce,se,null),i(se,xs),h(ze,se,null),r(e,Xo,t),h(Jt,e,t),r(e,Vo,t),r(e,I,t),h(Ut,I,null),i(I,Cs),i(I,gn),i(I,zs),i(I,_n),i(I,Fs),i(I,Mn),i(I,js),i(I,yn),i(I,Is),i(I,bn),i(I,qs),i(I,ce),h(Lt,ce,null),i(ce,Js),i(ce,Tn),i(ce,Us),h(Fe,ce,null),r(e,Eo,t),h(Pt,e,t),r(e,Qo,t),r(e,X,t),h(Ht,X,null),i(X,Ls),i(X,vn),i(X,Ps),i(X,kn),i(X,Hs),i(X,wn),i(X,Ws),i(X,pe),h(Wt,pe,null),i(pe,Bs),i(pe,$n),i(pe,Ns),h(je,pe,null),r(e,Oo,t),h(Bt,e,t),r(e,Yo,t),r(e,V,t),h(Nt,V,null),i(V,Zs),i(V,xn),i(V,Ss),i(V,Cn),i(V,As),i(V,zn),i(V,Gs),i(V,me),h(Zt,me,null),i(me,Rs),i(me,Fn),i(me,Xs),h(Ie,me,null),r(e,Do,t),r(e,St,t),r(e,Ko,t),h(At,e,t),r(e,es,t),r(e,q,t),h(Gt,q,null),i(q,Vs),i(q,jn),i(q,Es),i(q,In),i(q,Qs),i(q,qn),i(q,Os),i(q,Jn),i(q,Ys),i(q,Un),i(q,Ds),i(q,Q),h(Rt,Q,null),i(Q,Ks),i(Q,Ln),i(Q,ea),h(qe,Q,null),i(Q,ta),h(Je,Q,null),i(Q,na),h(Ue,Q,null),r(e,ts,t),h(Xt,e,t),r(e,ns,t),r(e,J,t),h(Vt,J,null),i(J,oa),i(J,Pn),i(J,sa),i(J,Hn),i(J,aa),i(J,Wn),i(J,ra),i(J,Bn),i(J,ia),i(J,Nn),i(J,la),i(J,O),h(Et,O,null),i(O,da),i(O,Zn),i(O,ca),h(Le,O,null),i(O,pa),h(Pe,O,null),i(O,ma),h(He,O,null),r(e,os,t),h(Qt,e,t),r(e,ss,t),r(e,B,t),h(Ot,B,null),i(B,ua),i(B,Sn),i(B,ha),i(B,An),i(B,fa),i(B,Gn),i(B,ga),h(We,B,null),i(B,_a),i(B,ue),h(Yt,ue,null),i(ue,Ma),i(ue,Rn),i(ue,ya),h(Be,ue,null),r(e,as,t),h(Dt,e,t),r(e,rs,t),r(e,_e,t),h(Kt,_e,null),i(_e,ba),i(_e,he),h(en,he,null),i(he,Ta),i(he,Xn),i(he,va),h(Ne,he,null),r(e,is,t),h(tn,e,t),r(e,ls,t),r(e,z,t),h(nn,z,null),i(z,ka),i(z,Vn),i(z,wa),i(z,En),i(z,$a),i(z,Qn),i(z,xa),i(z,On),i(z,Ca),i(z,Yn),i(z,za),h(Ze,z,null),i(z,Fa),i(z,fe),h(on,fe,null),i(fe,ja),i(fe,Dn),i(fe,Ia),h(Se,fe,null),r(e,ds,t),h(sn,e,t),r(e,cs,t),r(e,to,t),ps=!0},p(e,[t]){const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),$e.$set(D);const K={};t&2&&(K.$$scope={dirty:t,ctx:e}),xe.$set(K);const Me={};t&2&&(Me.$$scope={dirty:t,ctx:e}),Ce.$set(Me);const an={};t&2&&(an.$$scope={dirty:t,ctx:e}),ze.$set(an);const ae={};t&2&&(ae.$$scope={dirty:t,ctx:e}),Fe.$set(ae);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),je.$set(N);const ye={};t&2&&(ye.$$scope={dirty:t,ctx:e}),Ie.$set(ye);const ee={};t&2&&(ee.$$scope={dirty:t,ctx:e}),qe.$set(ee);const be={};t&2&&(be.$$scope={dirty:t,ctx:e}),Je.$set(be);const te={};t&2&&(te.$$scope={dirty:t,ctx:e}),Ue.$set(te);const Te={};t&2&&(Te.$$scope={dirty:t,ctx:e}),Le.$set(Te);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),Pe.$set(Z);const ne={};t&2&&(ne.$$scope={dirty:t,ctx:e}),He.$set(ne);const S={};t&2&&(S.$$scope={dirty:t,ctx:e}),We.$set(S);const oe={};t&2&&(oe.$$scope={dirty:t,ctx:e}),Be.$set(oe);const E={};t&2&&(E.$$scope={dirty:t,ctx:e}),Ne.$set(E);const ve={};t&2&&(ve.$$scope={dirty:t,ctx:e}),Ze.$set(ve);const rn={};t&2&&(rn.$$scope={dirty:t,ctx:e}),Se.$set(rn)},i(e){ps||(f(w.$$.fragment,e),f(k.$$.fragment,e),f(Ge.$$.fragment,e),f(Ee.$$.fragment,e),f(Oe.$$.fragment,e),f(et.$$.fragment,e),f(nt.$$.fragment,e),f(st.$$.fragment,e),f(it.$$.fragment,e),f(ct.$$.fragment,e),f(pt.$$.fragment,e),f(ut.$$.fragment,e),f(gt.$$.fragment,e),f(yt.$$.fragment,e),f(Tt.$$.fragment,e),f(kt.$$.fragment,e),f($t.$$.fragment,e),f(xt.$$.fragment,e),f($e.$$.fragment,e),f(Ct.$$.fragment,e),f(zt.$$.fragment,e),f(Ft.$$.fragment,e),f(xe.$$.fragment,e),f(jt.$$.fragment,e),f(It.$$.fragment,e),f(qt.$$.fragment,e),f(Ce.$$.fragment,e),f(ze.$$.fragment,e),f(Jt.$$.fragment,e),f(Ut.$$.fragment,e),f(Lt.$$.fragment,e),f(Fe.$$.fragment,e),f(Pt.$$.fragment,e),f(Ht.$$.fragment,e),f(Wt.$$.fragment,e),f(je.$$.fragment,e),f(Bt.$$.fragment,e),f(Nt.$$.fragment,e),f(Zt.$$.fragment,e),f(Ie.$$.fragment,e),f(At.$$.fragment,e),f(Gt.$$.fragment,e),f(Rt.$$.fragment,e),f(qe.$$.fragment,e),f(Je.$$.fragment,e),f(Ue.$$.fragment,e),f(Xt.$$.fragment,e),f(Vt.$$.fragment,e),f(Et.$$.fragment,e),f(Le.$$.fragment,e),f(Pe.$$.fragment,e),f(He.$$.fragment,e),f(Qt.$$.fragment,e),f(Ot.$$.fragment,e),f(We.$$.fragment,e),f(Yt.$$.fragment,e),f(Be.$$.fragment,e),f(Dt.$$.fragment,e),f(Kt.$$.fragment,e),f(en.$$.fragment,e),f(Ne.$$.fragment,e),f(tn.$$.fragment,e),f(nn.$$.fragment,e),f(Ze.$$.fragment,e),f(on.$$.fragment,e),f(Se.$$.fragment,e),f(sn.$$.fragment,e),ps=!0)},o(e){g(w.$$.fragment,e),g(k.$$.fragment,e),g(Ge.$$.fragment,e),g(Ee.$$.fragment,e),g(Oe.$$.fragment,e),g(et.$$.fragment,e),g(nt.$$.fragment,e),g(st.$$.fragment,e),g(it.$$.fragment,e),g(ct.$$.fragment,e),g(pt.$$.fragment,e),g(ut.$$.fragment,e),g(gt.$$.fragment,e),g(yt.$$.fragment,e),g(Tt.$$.fragment,e),g(kt.$$.fragment,e),g($t.$$.fragment,e),g(xt.$$.fragment,e),g($e.$$.fragment,e),g(Ct.$$.fragment,e),g(zt.$$.fragment,e),g(Ft.$$.fragment,e),g(xe.$$.fragment,e),g(jt.$$.fragment,e),g(It.$$.fragment,e),g(qt.$$.fragment,e),g(Ce.$$.fragment,e),g(ze.$$.fragment,e),g(Jt.$$.fragment,e),g(Ut.$$.fragment,e),g(Lt.$$.fragment,e),g(Fe.$$.fragment,e),g(Pt.$$.fragment,e),g(Ht.$$.fragment,e),g(Wt.$$.fragment,e),g(je.$$.fragment,e),g(Bt.$$.fragment,e),g(Nt.$$.fragment,e),g(Zt.$$.fragment,e),g(Ie.$$.fragment,e),g(At.$$.fragment,e),g(Gt.$$.fragment,e),g(Rt.$$.fragment,e),g(qe.$$.fragment,e),g(Je.$$.fragment,e),g(Ue.$$.fragment,e),g(Xt.$$.fragment,e),g(Vt.$$.fragment,e),g(Et.$$.fragment,e),g(Le.$$.fragment,e),g(Pe.$$.fragment,e),g(He.$$.fragment,e),g(Qt.$$.fragment,e),g(Ot.$$.fragment,e),g(We.$$.fragment,e),g(Yt.$$.fragment,e),g(Be.$$.fragment,e),g(Dt.$$.fragment,e),g(Kt.$$.fragment,e),g(en.$$.fragment,e),g(Ne.$$.fragment,e),g(tn.$$.fragment,e),g(nn.$$.fragment,e),g(Ze.$$.fragment,e),g(on.$$.fragment,e),g(Se.$$.fragment,e),g(sn.$$.fragment,e),ps=!1},d(e){e&&(n(y),n(c),n(M),n(b),n(re),n(H),n(ie),n(W),n(le),n(T),n(no),n(Ae),n(oo),n(so),n(Re),n(ao),n(Xe),n(ro),n(Ve),n(io),n(lo),n(Qe),n(co),n(po),n(Ye),n(mo),n(De),n(uo),n(Ke),n(ho),n(fo),n(tt),n(go),n(_o),n(ot),n(Mo),n(yo),n(at),n(bo),n(rt),n(To),n(vo),n(lt),n(ko),n(dt),n(wo),n($o),n(xo),n(mt),n(Co),n(we),n(zo),n(Fo),n(ht),n(jo),n(ft),n(Io),n(qo),n(_t),n(Jo),n(Mt),n(Uo),n(Lo),n(bt),n(Po),n(Ho),n(vt),n(Wo),n(Bo),n(wt),n(No),n(Zo),n(G),n(So),n(Ao),n(R),n(Go),n(Ro),n(ge),n(Xo),n(Vo),n(I),n(Eo),n(Qo),n(X),n(Oo),n(Yo),n(V),n(Do),n(St),n(Ko),n(es),n(q),n(ts),n(ns),n(J),n(os),n(ss),n(B),n(as),n(rs),n(_e),n(is),n(ls),n(z),n(ds),n(cs),n(to)),n(o),_(w,e),_(k,e),_(Ge,e),_(Ee,e),_(Oe,e),_(et,e),_(nt,e),_(st,e),_(it,e),_(ct,e),_(pt,e),_(ut,e),_(gt,e),_(yt,e),_(Tt,e),_(kt,e),_($t,e),_(xt),_($e),_(Ct,e),_(zt),_(Ft),_(xe),_(jt,e),_(It),_(qt),_(Ce),_(ze),_(Jt,e),_(Ut),_(Lt),_(Fe),_(Pt,e),_(Ht),_(Wt),_(je),_(Bt,e),_(Nt),_(Zt),_(Ie),_(At,e),_(Gt),_(Rt),_(qe),_(Je),_(Ue),_(Xt,e),_(Vt),_(Et),_(Le),_(Pe),_(He),_(Qt,e),_(Ot),_(We),_(Yt),_(Be),_(Dt,e),_(Kt),_(en),_(Ne),_(tn,e),_(nn),_(Ze),_(on),_(Se),_(sn,e)}}}const bi='{"title":"Mistral","local":"mistral","sections":[{"title":"Overview","local":"overview","sections":[{"title":"Architectural details","local":"architectural-details","sections":[],"depth":3},{"title":"License","local":"license","sections":[],"depth":3}],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Speeding up Mistral by using Flash Attention","local":"speeding-up-mistral-by-using-flash-attention","sections":[{"title":"Expected speedups","local":"expected-speedups","sections":[],"depth":3},{"title":"Sliding window Attention","local":"sliding-window-attention","sections":[],"depth":3}],"depth":2},{"title":"Shrinking down Mistral using quantization","local":"shrinking-down-mistral-using-quantization","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"MistralConfig","local":"transformers.MistralConfig","sections":[],"depth":2},{"title":"MistralModel","local":"transformers.MistralModel","sections":[],"depth":2},{"title":"MistralForCausalLM","local":"transformers.MistralForCausalLM","sections":[],"depth":2},{"title":"MistralForSequenceClassification","local":"transformers.MistralForSequenceClassification","sections":[],"depth":2},{"title":"MistralForTokenClassification","local":"transformers.MistralForTokenClassification","sections":[],"depth":2},{"title":"MistralForQuestionAnswering","local":"transformers.MistralForQuestionAnswering","sections":[],"depth":2},{"title":"FlaxMistralModel","local":"transformers.FlaxMistralModel","sections":[],"depth":2},{"title":"FlaxMistralForCausalLM","local":"transformers.FlaxMistralForCausalLM","sections":[],"depth":2},{"title":"TFMistralModel","local":"transformers.TFMistralModel","sections":[],"depth":2},{"title":"TFMistralForCausalLM","local":"transformers.TFMistralForCausalLM","sections":[],"depth":2},{"title":"TFMistralForSequenceClassification","local":"transformers.TFMistralForSequenceClassification","sections":[],"depth":2}],"depth":1}';function Ti(v){return Er(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ji extends Qr{constructor(o){super(),Or(this,o,Ti,yi,Vr,{})}}export{ji as component};
