import{s as Qr,o as Yr,n as U}from"../chunks/scheduler.25b97de1.js";import{S as Or,i as Dr,g as l,s,r as h,A as Kr,h as d,f as n,c as a,j as $,u as f,x as p,k as x,l as ei,y as i,a as r,v as g,d as _,t as M,w as y}from"../chunks/index.d9030fc9.js";import{T as O}from"../chunks/Tip.baa67368.js";import{D as F}from"../chunks/Docstring.ffac8efa.js";import{C as _e}from"../chunks/CodeBlock.e6cd0d95.js";import{E as oo}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as ti}from"../chunks/PipelineTag.5f100392.js";import{H as j,E as ni}from"../chunks/EditOnGithub.91d95064.js";function oi(v){let o,T;return o=new _e({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(){h(o.$$.fragment)},l(c){f(o.$$.fragment,c)},m(c,u){g(o,c,u),T=!0},p:U,i(c){T||(_(o.$$.fragment,c),T=!0)},o(c){M(o.$$.fragment,c),T=!1},d(c){y(o,c)}}}function si(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function ai(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function ri(v){let o,T="Example:",c,u,w;return u=new _e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNaXN0cmFsRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME1pc3RyYWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1taXN0cmFsJTJGTWlzdHJhbC0yLTdiLWhmJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1ldGEtbWlzdHJhbCUyRk1pc3RyYWwtMi03Yi1oZiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",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;meta-mistral/Mistral-2-7b-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;meta-mistral/Mistral-2-7b-hf&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){o=l("p"),o.textContent=T,c=s(),h(u.$$.fragment)},l(m){o=d(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=T),c=a(m),f(u.$$.fragment,m)},m(m,k){r(m,o,k),r(m,c,k),g(u,m,k),w=!0},p:U,i(m){w||(_(u.$$.fragment,m),w=!0)},o(m){M(u.$$.fragment,m),w=!1},d(m){m&&(n(o),n(c)),y(u,m)}}}function ii(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function li(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function di(v){let o,T="Example:",c,u,w;return u=new _e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNaXN0cmFsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWlzdHJhbGFpJTJGTWlzdHJhbC03Qi12MC4xJTIyKSUwQW1vZGVsJTIwJTNEJTIwTWlzdHJhbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItdjAuMSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MistralForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`,wrap:!1}}),{c(){o=l("p"),o.textContent=T,c=s(),h(u.$$.fragment)},l(m){o=d(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=T),c=a(m),f(u.$$.fragment,m)},m(m,k){r(m,o,k),r(m,c,k),g(u,m,k),w=!0},p:U,i(m){w||(_(u.$$.fragment,m),w=!0)},o(m){M(u.$$.fragment,m),w=!1},d(m){m&&(n(o),n(c)),y(u,m)}}}function ci(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function pi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function ui(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-p3ymc5"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function mi(v){let o,T="Example:",c,u,w;return u=new _e({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=T,c=s(),h(u.$$.fragment)},l(m){o=d(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=T),c=a(m),f(u.$$.fragment,m)},m(m,k){r(m,o,k),r(m,c,k),g(u,m,k),w=!0},p:U,i(m){w||(_(u.$$.fragment,m),w=!0)},o(m){M(u.$$.fragment,m),w=!1},d(m){m&&(n(o),n(c)),y(u,m)}}}function hi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function fi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-p3ymc5"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function gi(v){let o,T="Example:",c,u,w;return u=new _e({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=T,c=s(),h(u.$$.fragment)},l(m){o=d(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=T),c=a(m),f(u.$$.fragment,m)},m(m,k){r(m,o,k),r(m,c,k),g(u,m,k),w=!0},p:U,i(m){w||(_(u.$$.fragment,m),w=!0)},o(m){M(u.$$.fragment,m),w=!1},d(m){m&&(n(o),n(c)),y(u,m)}}}function _i(v){let o,T="TensorFlow models and layers in <code>model</code> accept two formats as input:",c,u,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>",m,k,le=`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,L,de=`<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>`,B,W,ce=`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=T,c=s(),u=l("ul"),u.innerHTML=w,m=s(),k=l("p"),k.innerHTML=le,H=s(),L=l("ul"),L.innerHTML=de,B=s(),W=l("p"),W.innerHTML=ce},l(b){o=d(b,"P",{"data-svelte-h":!0}),p(o)!=="svelte-q09ipl"&&(o.innerHTML=T),c=a(b),u=d(b,"UL",{"data-svelte-h":!0}),p(u)!=="svelte-qm1t26"&&(u.innerHTML=w),m=a(b),k=d(b,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1v9qsc5"&&(k.innerHTML=le),H=a(b),L=d(b,"UL",{"data-svelte-h":!0}),p(L)!=="svelte-15scerc"&&(L.innerHTML=de),B=a(b),W=d(b,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1an3odd"&&(W.innerHTML=ce)},m(b,C){r(b,o,C),r(b,c,C),r(b,u,C),r(b,m,C),r(b,k,C),r(b,H,C),r(b,L,C),r(b,B,C),r(b,W,C)},p:U,d(b){b&&(n(o),n(c),n(u),n(m),n(k),n(H),n(L),n(B),n(W))}}}function Mi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function yi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function Ti(v){let o,T="TensorFlow models and layers in <code>model</code> accept two formats as input:",c,u,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>",m,k,le=`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,L,de=`<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>`,B,W,ce=`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=T,c=s(),u=l("ul"),u.innerHTML=w,m=s(),k=l("p"),k.innerHTML=le,H=s(),L=l("ul"),L.innerHTML=de,B=s(),W=l("p"),W.innerHTML=ce},l(b){o=d(b,"P",{"data-svelte-h":!0}),p(o)!=="svelte-q09ipl"&&(o.innerHTML=T),c=a(b),u=d(b,"UL",{"data-svelte-h":!0}),p(u)!=="svelte-qm1t26"&&(u.innerHTML=w),m=a(b),k=d(b,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1v9qsc5"&&(k.innerHTML=le),H=a(b),L=d(b,"UL",{"data-svelte-h":!0}),p(L)!=="svelte-15scerc"&&(L.innerHTML=de),B=a(b),W=d(b,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1an3odd"&&(W.innerHTML=ce)},m(b,C){r(b,o,C),r(b,c,C),r(b,u,C),r(b,m,C),r(b,k,C),r(b,H,C),r(b,L,C),r(b,B,C),r(b,W,C)},p:U,d(b){b&&(n(o),n(c),n(u),n(m),n(k),n(H),n(L),n(B),n(W))}}}function bi(v){let o,T=`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=T},l(c){o=d(c,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(c,u){r(c,o,u)},p:U,d(c){c&&n(o)}}}function vi(v){let o,T,c,u,w,m,k,le,H,L='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.',de,B,W="The introduction of the blog post says:",ce,b,C="<em>Mistral AI team is proud to release Mistral 7B, the most powerful language model for its size to date.</em>",so,Re,Ua='Mistral-7B is the first large language model (LLM) released by <a href="https://mistral.ai/" rel="nofollow">mistral.ai</a>.',ao,Xe,ro,Ve,La="Mistral-7B is a decoder-only Transformer with the following architectural choices:",io,Ee,Wa="<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>",lo,Qe,Ha='For more details refer to the <a href="https://mistral.ai/news/announcing-mistral-7b/" rel="nofollow">release blog post</a>.',co,Ye,po,Oe,Ba="<code>Mistral-7B</code> is released under the Apache 2.0 license.",uo,De,mo,Ke,Pa="The Mistral team has released 3 checkpoints:",ho,et,Za='<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>',fo,tt,Na="The base model can be used as follows:",go,nt,_o,ot,Ga="The instruction tuned model can be used as follows:",Mo,st,yo,at,Sa='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.',To,rt,bo,it,Aa='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#flash-attention-2">Flash Attention</a>, which is a faster implementation of the attention mechanism used inside the model.',vo,lt,Ra="First, make sure to install the latest version of Flash Attention 2 to include the sliding window attention feature.",ko,dt,wo,ct,Xa='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>)',$o,pt,Va="To load and run a model using Flash Attention-2, refer to the snippet below:",xo,ut,Co,mt,zo,ht,Ea="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.",Fo,$e,Qa='<img src="https://huggingface.co/datasets/ybelkada/documentation-images/resolve/main/mistral-7b-inference-large-seqlen.png"/>',jo,ft,Io,gt,Ya=`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,_t,Oa="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.",qo,Mt,Uo,yt,Da='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.',Lo,Tt,Ka='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):',Wo,bt,Ho,vt,er=`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>.`,Bo,kt,Po,wt,tr="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.",Zo,$t,No,xt,nr='<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>',Go,Ct,So,A,zt,hs,cn,or=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/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.`,fs,pn,sr='<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>',gs,un,ar=`Configuration objects inherit from <a href="/docs/transformers/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,_s,xe,Ao,Ft,Ro,R,jt,Ms,mn,rr=`The bare Mistral Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_30530/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.)`,ys,hn,ir=`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.`,Ts,fn,lr="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>MistralDecoderLayer</code>",bs,pe,It,vs,gn,dr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.MistralModel">MistralModel</a> forward method, overrides the <code>__call__</code> special method.',ks,Ce,Xo,Jt,Vo,Me,qt,ws,se,Ut,$s,_n,cr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.MistralForCausalLM">MistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',xs,ze,Cs,Fe,Eo,Lt,Qo,I,Wt,zs,Mn,pr="The Mistral Model transformer with a sequence classification head on top (linear layer).",Fs,yn,ur=`<a href="/docs/transformers/pr_30530/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.`,js,Tn,mr=`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).`,Is,bn,hr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,Js,vn,fr=`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,ue,Ht,Us,kn,gr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.MistralForSequenceClassification">MistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ls,je,Yo,Bt,Oo,X,Pt,Ws,wn,_r=`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.`,Hs,$n,Mr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,Bs,xn,yr=`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.`,Ps,ae,Zt,Zs,Cn,Tr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.MistralForTokenClassification">MistralForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Ns,Ie,Gs,Je,Do,Nt,Ko,V,Gt,Ss,zn,br=`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>).`,As,Fn,vr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,Rs,jn,kr=`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.`,Xs,me,St,Vs,In,wr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.MistralForQuestionAnswering">MistralForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Es,qe,es,At,$r="<li>forward</li>",ts,Rt,ns,J,Xt,Qs,Jn,xr="The bare Mistral Model transformer outputting raw hidden-states without any specific head on top.",Ys,qn,Cr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,Os,Un,zr=`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.`,Ds,Ln,Fr="Finally, this model supports inherent JAX features such as:",Ks,Wn,jr='<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>',ea,Q,Vt,ta,Hn,Ir="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",na,Ue,oa,Le,sa,We,os,Et,ss,q,Qt,aa,Bn,Jr="The Mistral Model transformer with a language modeling head (linear layer) on top.",ra,Pn,qr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,ia,Zn,Ur=`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.`,la,Nn,Lr="Finally, this model supports inherent JAX features such as:",da,Gn,Wr='<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>',ca,Y,Yt,pa,Sn,Hr="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",ua,He,ma,Be,ha,Pe,as,Ot,rs,P,Dt,fa,An,Br="The bare Mistral Model outputting raw hidden-states without any specific head on top.",ga,Rn,Pr=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,_a,Xn,Zr=`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.`,Ma,Ze,ya,he,Kt,Ta,Vn,Nr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.TFMistralModel">TFMistralModel</a> forward method, overrides the <code>__call__</code> special method.',ba,Ne,is,en,ls,ye,tn,va,fe,nn,ka,En,Gr='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.TFMistralForCausalLM">TFMistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',wa,Ge,ds,on,cs,z,sn,$a,Qn,Sr="The Mistral Model transformer with a sequence classification head on top (linear layer).",xa,Yn,Ar=`<a href="/docs/transformers/pr_30530/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.`,Ca,On,Rr=`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).`,za,Dn,Xr=`This model inherits from <a href="/docs/transformers/pr_30530/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,Kn,Vr=`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.`,ja,Se,Ia,ge,an,Ja,eo,Er='The <a href="/docs/transformers/pr_30530/en/model_doc/mistral#transformers.TFMistralForSequenceClassification">TFMistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',qa,Ae,ps,rn,us,no,ms;return w=new j({props:{title:"Mistral",local:"mistral",headingTag:"h1"}}),k=new j({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Xe=new j({props:{title:"Architectural details",local:"architectural-details",headingTag:"h3"}}),Ye=new j({props:{title:"License",local:"license",headingTag:"h3"}}),De=new j({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),nt=new _e({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}}),st=new _e({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}}),rt=new j({props:{title:"Speeding up Mistral by using Flash Attention",local:"speeding-up-mistral-by-using-flash-attention",headingTag:"h2"}}),dt=new _e({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),ut=new _e({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}}),mt=new j({props:{title:"Expected speedups",local:"expected-speedups",headingTag:"h3"}}),ft=new j({props:{title:"Sliding window Attention",local:"sliding-window-attention",headingTag:"h3"}}),Mt=new j({props:{title:"Shrinking down Mistral using quantization",local:"shrinking-down-mistral-using-quantization",headingTag:"h2"}}),bt=new _e({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}}),kt=new j({props:{title:"Resources",local:"resources",headingTag:"h2"}}),$t=new ti({props:{pipeline:"text-generation"}}),Ct=new j({props:{title:"MistralConfig",local:"transformers.MistralConfig",headingTag:"h2"}}),zt=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/pr_30530/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/vr_30530/src/transformers/models/mistral/configuration_mistral.py#L24"}}),xe=new oo({props:{anchor:"transformers.MistralConfig.example",$$slots:{default:[oi]},$$scope:{ctx:v}}}),Ft=new j({props:{title:"MistralModel",local:"transformers.MistralModel",headingTag:"h2"}}),jt=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/pr_30530/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/pr_30530/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.MistralModel.config",description:"<strong>config</strong> &#x2014; MistralConfig",name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L457"}}),It=new F({props:{name:"forward",anchor:"transformers.MistralModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[transformers.cache_utils.Cache] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**flash_attn_kwargs",val:": typing_extensions.Unpack[transformers.modeling_flash_attention_utils.FlashAttentionKwargs]"}],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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L491"}}),Ce=new O({props:{$$slots:{default:[si]},$$scope:{ctx:v}}}),Jt=new j({props:{title:"MistralForCausalLM",local:"transformers.MistralForCausalLM",headingTag:"h2"}}),qt=new F({props:{name:"class transformers.MistralForCausalLM",anchor:"transformers.MistralForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L752"}}),Ut=new F({props:{name:"forward",anchor:"transformers.MistralForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"num_logits_to_keep",val:": int = 0"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.mistral.modeling_mistral.KwargsForCausalLM]"}],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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.MistralForCausalLM.forward.Args",description:`<strong>Args</strong> &#x2014;
labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all
<code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that
token can save memory, which becomes pretty significant for long sequences or large vocabulary size.`,name:"Args"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L783",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ze=new O({props:{$$slots:{default:[ai]},$$scope:{ctx:v}}}),Fe=new oo({props:{anchor:"transformers.MistralForCausalLM.forward.example",$$slots:{default:[ri]},$$scope:{ctx:v}}}),Lt=new j({props:{title:"MistralForSequenceClassification",local:"transformers.MistralForSequenceClassification",headingTag:"h2"}}),Wt=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/pr_30530/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/pr_30530/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L961"}}),Ht=new F({props:{name:"forward",anchor:"transformers.MistralForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForSequenceClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.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/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L992"}}),je=new O({props:{$$slots:{default:[ii]},$$scope:{ctx:v}}}),Bt=new j({props:{title:"MistralForTokenClassification",local:"transformers.MistralForTokenClassification",headingTag:"h2"}}),Pt=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/pr_30530/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/pr_30530/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L873"}}),Zt=new F({props:{name:"forward",anchor:"transformers.MistralForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForTokenClassification.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.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/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L903",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new O({props:{$$slots:{default:[li]},$$scope:{ctx:v}}}),Je=new oo({props:{anchor:"transformers.MistralForTokenClassification.forward.example",$$slots:{default:[di]},$$scope:{ctx:v}}}),Nt=new j({props:{title:"MistralForQuestionAnswering",local:"transformers.MistralForQuestionAnswering",headingTag:"h2"}}),Gt=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/pr_30530/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/pr_30530/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L1065"}}),St=new F({props:{name:"forward",anchor:"transformers.MistralForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MistralForQuestionAnswering.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.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/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L1089"}}),qe=new O({props:{$$slots:{default:[ci]},$$scope:{ctx:v}}}),Rt=new j({props:{title:"FlaxMistralModel",local:"transformers.FlaxMistralModel",headingTag:"h2"}}),Xt=new F({props:{name:"class transformers.FlaxMistralModel",anchor:"transformers.FlaxMistralModel",parameters:[{name:"config",val:": MistralConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMistralModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/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/pr_30530/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/pr_30530/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L636"}}),Vt=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:": <function PRNGKey at 0x7f3f1120e290> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/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/pr_30530/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/pr_30530/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ue=new O({props:{$$slots:{default:[pi]},$$scope:{ctx:v}}}),Le=new O({props:{warning:!0,$$slots:{default:[ui]},$$scope:{ctx:v}}}),We=new oo({props:{anchor:"transformers.FlaxMistralModel.__call__.example",$$slots:{default:[mi]},$$scope:{ctx:v}}}),Et=new j({props:{title:"FlaxMistralForCausalLM",local:"transformers.FlaxMistralForCausalLM",headingTag:"h2"}}),Qt=new F({props:{name:"class transformers.FlaxMistralForCausalLM",anchor:"transformers.FlaxMistralForCausalLM",parameters:[{name:"config",val:": MistralConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxMistralForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/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/pr_30530/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/pr_30530/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L698"}}),Yt=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:": <function PRNGKey at 0x7f3f1120e290> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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