import{s as kr,o as vr,n as B}from"../chunks/scheduler.bdbef820.js";import{S as wr,i as $r,g as l,s,r as h,A as Cr,h as d,f as n,c as a,j as x,u as f,x as p,k as j,l as xr,y as i,a as r,v as g,d as _,t as M,w as y}from"../chunks/index.33f81d56.js";import{T as te}from"../chunks/Tip.34194030.js";import{D as q}from"../chunks/Docstring.64554317.js";import{C as he}from"../chunks/CodeBlock.362b34a4.js";import{E as Rn}from"../chunks/ExampleCodeBlock.4f2252c6.js";import{P as jr}from"../chunks/PipelineTag.d2f354cd.js";import{H as F,E as Fr}from"../chunks/EditOnGithub.a9246e21.js";function zr(v){let o,T;return o=new he({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:B,i(c){T||(_(o.$$.fragment,c),T=!0)},o(c){M(o.$$.fragment,c),T=!1},d(c){y(o,c)}}}function Jr(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:B,d(c){c&&n(o)}}}function Ir(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:B,d(c){c&&n(o)}}}function Ur(v){let o,T="Example:",c,u,w;return u=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBNaXN0cmFsRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME1pc3RyYWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWlzdHJhbGFpJTJGTWlzdHJhbC03Qi12MC4xJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1pc3RyYWxhaSUyRk1pc3RyYWwtN0ItdjAuMSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, MistralForCausalLM

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>]
<span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){o=l("p"),o.textContent=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:B,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 qr(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:B,d(c){c&&n(o)}}}function Lr(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:B,d(c){c&&n(o)}}}function Wr(v){let o,T="Example:",c,u,w;return u=new he({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:B,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 Br(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:B,d(c){c&&n(o)}}}function Zr(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:B,d(c){c&&n(o)}}}function Hr(v){let o,T="Example:",c,u,w;return u=new he({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:B,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 Pr(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:B,d(c){c&&n(o)}}}function Gr(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:B,d(c){c&&n(o)}}}function Nr(v){let o,T="Example:",c,u,w;return u=new he({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:B,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 Sr(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,re=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,Z,L,ie=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,H,W,le=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=l("p"),o.innerHTML=T,c=s(),u=l("ul"),u.innerHTML=w,m=s(),k=l("p"),k.innerHTML=re,Z=s(),L=l("ul"),L.innerHTML=ie,H=s(),W=l("p"),W.innerHTML=le},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=re),Z=a(b),L=d(b,"UL",{"data-svelte-h":!0}),p(L)!=="svelte-15scerc"&&(L.innerHTML=ie),H=a(b),W=d(b,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1an3odd"&&(W.innerHTML=le)},m(b,$){r(b,o,$),r(b,c,$),r(b,u,$),r(b,m,$),r(b,k,$),r(b,Z,$),r(b,L,$),r(b,H,$),r(b,W,$)},p:B,d(b){b&&(n(o),n(c),n(u),n(m),n(k),n(Z),n(L),n(H),n(W))}}}function Rr(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:B,d(c){c&&n(o)}}}function Xr(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:B,d(c){c&&n(o)}}}function Vr(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,re=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,Z,L,ie=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,H,W,le=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=l("p"),o.innerHTML=T,c=s(),u=l("ul"),u.innerHTML=w,m=s(),k=l("p"),k.innerHTML=re,Z=s(),L=l("ul"),L.innerHTML=ie,H=s(),W=l("p"),W.innerHTML=le},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=re),Z=a(b),L=d(b,"UL",{"data-svelte-h":!0}),p(L)!=="svelte-15scerc"&&(L.innerHTML=ie),H=a(b),W=d(b,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1an3odd"&&(W.innerHTML=le)},m(b,$){r(b,o,$),r(b,c,$),r(b,u,$),r(b,m,$),r(b,k,$),r(b,Z,$),r(b,L,$),r(b,H,$),r(b,W,$)},p:B,d(b){b&&(n(o),n(c),n(u),n(m),n(k),n(Z),n(L),n(H),n(W))}}}function Er(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:B,d(c){c&&n(o)}}}function Ar(v){let o,T,c,u,w,m,k,re,Z,L='미스트랄은 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가 작성한 <a href="https://mistral.ai/news/announcing-mistral-7b/" rel="nofollow">이 블로그 포스트</a>에서 소개되었습니다.',ie,H,W="블로그 포스트의 서두는 다음과 같습니다:",le,b,$="<em>미스트랄 AI팀은 현존하는 언어 모델 중 크기 대비 가장 강력한 미스트랄7B를 출시하게 되어 자랑스럽습니다.</em>",Xn,Pe,ua='미스트랄-7B는 <a href="https://mistral.ai/" rel="nofollow">mistral.ai</a>에서 출시한 첫 번째 대규모 언어 모델(LLM)입니다.',Vn,Ge,En,Ne,ma="미스트랄-7B는 다음과 같은 구조적 특징을 가진 디코더 전용 트랜스포머입니다:",An,Se,ha="<li>슬라이딩 윈도우 어텐션: 8k 컨텍스트 길이와 고정 캐시 크기로 훈련되었으며, 이론상 128K 토큰의 어텐션 범위를 가집니다.</li> <li>GQA(Grouped Query Attention): 더 빠른 추론이 가능하고 더 작은 크기의 캐시를 사용합니다.</li> <li>바이트 폴백(Byte-fallback) BPE 토크나이저: 문자들이 절대 어휘 목록 외의 토큰으로 매핑되지 않도록 보장합니다.</li>",Qn,Re,fa='더 자세한 내용은 <a href="https://mistral.ai/news/announcing-mistral-7b/" rel="nofollow">출시 블로그 포스트</a>를 참조하세요.',Yn,Xe,On,Ve,ga="<code>미스트랄-7B</code>는 아파치 2.0 라이선스로 출시되었습니다.",Dn,Ee,Kn,Ae,_a="미스트랄 AI팀은 다음 3가지 체크포인트를 공개했습니다:",eo,Qe,Ma='<li>기본 모델인 <a href="https://huggingface.co/mistralai/Mistral-7B-v0.1" rel="nofollow">미스트랄-7B-v0.1</a>은 인터넷 규모의 데이터에서 다음 토큰을 예측하도록 사전 훈련되었습니다.</li> <li>지시 조정 모델인 <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1" rel="nofollow">미스트랄-7B-Instruct-v0.1</a>은 지도 미세 조정(SFT)과 직접 선호도 최적화(DPO)를 사용한 채팅에 최적화된 기본 모델입니다.</li> <li>개선된 지시 조정 모델인 <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2" rel="nofollow">미스트랄-7B-Instruct-v0.2</a>는 v1을 개선한 버전입니다.</li>',to,Ye,ya="기본 모델은 다음과 같이 사용할 수 있습니다:",no,Oe,oo,De,Ta="지시 조정 모델은 다음과 같이 사용할 수 있습니다:",so,Ke,ao,et,ba='지시 조정 모델은 입력이 올바른 형식으로 준비되도록 <a href="../chat_templating">채팅 템플릿</a>을 적용해야 합니다.',ro,tt,io,nt,ka='위의 코드 스니펫들은 어떤 최적화 기법도 사용하지 않은 추론 과정을 보여줍니다. 하지만 모델 내부에서 사용되는 어텐션 메커니즘의 더 빠른 구현인 <a href="../perf_train_gpu_one.md#flash-attention-2">플래시 어텐션2</a>을 활용하면 모델의 속도를 크게 높일 수 있습니다.',lo,ot,va="먼저, 슬라이딩 윈도우 어텐션 기능을 포함하는 플래시 어텐션2의 최신 버전을 설치해야 합니다.",co,st,po,at,wa='하드웨어와 플래시 어텐션2의 호환여부를 확인하세요. 이에 대한 자세한 내용은 <a href="https://github.com/Dao-AILab/flash-attention" rel="nofollow">플래시 어텐션 저장소</a>의 공식 문서에서 확인할 수 있습니다. 또한 모델을 반정밀도(예: <code>torch.float16</code>)로 불러와야합니다.',uo,rt,$a="플래시 어텐션2를 사용하여 모델을 불러오고 실행하려면 아래 코드 스니펫을 참조하세요:",mo,it,ho,lt,fo,dt,Ca="다음은 <code>mistralai/Mistral-7B-v0.1</code> 체크포인트를 사용한 트랜스포머의 기본 구현과 플래시 어텐션2 버전 모델 사이의 순수 추론 시간을 비교한 예상 속도 향상 다이어그램입니다.",go,be,xa='<img src="https://huggingface.co/datasets/ybelkada/documentation-images/resolve/main/mistral-7b-inference-large-seqlen.png"/>',_o,ct,Mo,pt,ja="현재 구현은 슬라이딩 윈도우 어텐션 메커니즘과 메모리 효율적인 캐시 관리 기능을 지원합니다. 슬라이딩 윈도우 어텐션을 활성화하려면, 슬라이딩 윈도우 어텐션과 호환되는<code>flash-attn</code>(<code>&gt;=2.3.0</code>)버전을 사용하면 됩니다.",yo,ut,Fa="또한 플래시 어텐션2 모델은 더 메모리 효율적인 캐시 슬라이싱 메커니즘을 사용합니다. 미스트랄 모델의 공식 구현에서 권장하는 롤링 캐시 메커니즘을 따라, 캐시 크기를 고정(<code>self.config.sliding_window</code>)으로 유지하고, <code>padding_side=&quot;left&quot;</code>인 경우에만 배치 생성(batch generation)을 지원하며, 현재 토큰의 절대 위치를 사용해 위치 임베딩을 계산합니다.",To,mt,bo,ht,za='미스트랄 모델은 70억 개의 파라미터를 가지고 있어, 절반의 정밀도(float16)로 약 14GB의 GPU RAM이 필요합니다. 각 파라미터가 2바이트로 저장되기 때문입니다. 하지만 <a href="../quantization.md">양자화</a>를 사용하면 모델 크기를 줄일 수 있습니다. 모델을 4비트(즉, 파라미터당 반 바이트)로 양자화하면 약 3.5GB의 RAM만 필요합니다.',ko,ft,Ja='모델을 양자화하는 것은 <code>quantization_config</code>를 모델에 전달하는 것만큼 간단합니다. 아래에서는 BitsAndBytes 양자화를 사용하지만, 다른 양자화 방법은 <a href="../quantization.md">이 페이지</a>를 참고하세요:',vo,gt,wo,_t,Ia=`이 모델은 <a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a>와 <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a>가 기여했습니다.
원본 코드는 <a href="https://github.com/mistralai/mistral-src" rel="nofollow">이곳</a>에서 확인할 수 있습니다.`,$o,Mt,Co,yt,Ua="미스트랄을 시작하는 데 도움이 되는 Hugging Face와 community 자료 목록(🌎로 표시됨) 입니다. 여기에 포함될 자료를 제출하고 싶으시다면 PR(Pull Request)를 열어주세요. 리뷰해 드리겠습니다! 자료는 기존 자료를 복제하는 대신 새로운 내용을 담고 있어야 합니다.",xo,Tt,jo,bt,qa='<li>미스트랄-7B의 지도형 미세조정(SFT)을 수행하는 데모 노트북은 <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">이곳</a>에서 확인할 수 있습니다. 🌎</li> <li>2024년에 Hugging Face 도구를 사용해 LLM을 미세 조정하는 방법에 대한 <a href="https://www.philschmid.de/fine-tune-llms-in-2024-with-trl" rel="nofollow">블로그 포스트</a>. 🌎</li> <li>Hugging Face의 <a href="https://github.com/huggingface/alignment-handbook" rel="nofollow">정렬(Alignment) 핸드북</a>에는 미스트랄-7B를 사용한 지도형 미세 조정(SFT) 및 직접 선호 최적화(DPO)를 수행하기 위한 스크립트와 레시피가 포함되어 있습니다. 여기에는 단일 GPU에서 QLoRa 및 다중 GPU를 사용한 전체 미세 조정을 위한 스크립트가 포함되어 있습니다.</li> <li><a href="../tasks/language_modeling">인과적 언어 모델링 작업 가이드</a></li>',Fo,kt,zo,R,vt,Do,en,La=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/ko/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.`,Ko,tn,Wa='<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>',es,nn,Ba=`Configuration objects inherit from <a href="/docs/transformers/pr_30530/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30530/ko/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ts,ke,Jo,wt,Io,X,$t,ns,on,Za=`The bare Mistral Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,os,sn,Ha=`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.`,ss,an,Pa="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>MistralDecoderLayer</code>",as,de,Ct,rs,rn,Ga='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.MistralModel">MistralModel</a> forward method, overrides the <code>__call__</code> special method.',is,ve,Uo,xt,qo,fe,jt,ls,ne,Ft,ds,ln,Na='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.MistralForCausalLM">MistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',cs,we,ps,$e,Lo,zt,Wo,z,Jt,us,dn,Sa="The Mistral Model transformer with a sequence classification head on top (linear layer).",ms,cn,Ra=`<a href="/docs/transformers/pr_30530/ko/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.`,hs,pn,Xa=`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).`,fs,un,Va=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,gs,mn,Ea=`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.`,_s,ce,It,Ms,hn,Aa='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.MistralForSequenceClassification">MistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',ys,Ce,Bo,Ut,Zo,V,qt,Ts,fn,Qa=`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.`,bs,gn,Ya=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ks,_n,Oa=`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.`,vs,oe,Lt,ws,Mn,Da='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.MistralForTokenClassification">MistralForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',$s,xe,Cs,je,Ho,Wt,Po,J,Bt,xs,yn,Ka="The bare Mistral Model transformer outputting raw hidden-states without any specific head on top.",js,Tn,er=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Fs,bn,tr=`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.`,zs,kn,nr="Finally, this model supports inherent JAX features such as:",Js,vn,or='<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>',Is,A,Zt,Us,wn,sr="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",qs,Fe,Ls,ze,Ws,Je,Go,Ht,No,I,Pt,Bs,$n,ar="The Mistral Model transformer with a language modeling head (linear layer) on top.",Zs,Cn,rr=`This model inherits from <a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Hs,xn,ir=`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.`,Ps,jn,lr="Finally, this model supports inherent JAX features such as:",Gs,Fn,dr='<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>',Ns,Q,Gt,Ss,zn,cr="The <code>FlaxMistralPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Rs,Ie,Xs,Ue,Vs,qe,So,Nt,Ro,P,St,Es,Jn,pr="The bare Mistral Model outputting raw hidden-states without any specific head on top.",As,In,ur=`This model inherits from <a href="/docs/transformers/pr_30530/ko/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.)`,Qs,Un,mr=`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.`,Ys,Le,Os,pe,Rt,Ds,qn,hr='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.TFMistralModel">TFMistralModel</a> forward method, overrides the <code>__call__</code> special method.',Ks,We,Xo,Xt,Vo,ge,Vt,ea,ue,Et,ta,Ln,fr='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.TFMistralForCausalLM">TFMistralForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',na,Be,Eo,At,Ao,C,Qt,oa,Wn,gr="The Mistral Model transformer with a sequence classification head on top (linear layer).",sa,Bn,_r=`<a href="/docs/transformers/pr_30530/ko/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.`,aa,Zn,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).`,ra,Hn,yr=`This model inherits from <a href="/docs/transformers/pr_30530/ko/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.)`,ia,Pn,Tr=`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.`,la,Ze,da,me,Yt,ca,Gn,br='The <a href="/docs/transformers/pr_30530/ko/model_doc/mistral#transformers.TFMistralForSequenceClassification">TFMistralForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',pa,He,Qo,Ot,Yo,Sn,Oo;return w=new F({props:{title:"Mistral",local:"mistral",headingTag:"h1"}}),k=new F({props:{title:"개요",local:"overview",headingTag:"h2"}}),Ge=new F({props:{title:"아키텍처 세부사항",local:"architectural-details",headingTag:"h3"}}),Xe=new F({props:{title:"라이선스",local:"license",headingTag:"h3"}}),Ee=new F({props:{title:"사용 팁",local:"usage-tips",headingTag:"h2"}}),Oe=new he({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}}),Ke=new he({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}}),tt=new F({props:{title:"플래시 어텐션을 이용한 미스트랄 속도향상",local:"speeding-up-mistral-by-using-flash-attention",headingTag:"h2"}}),st=new he({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwZmxhc2gtYXR0biUyMC0tbm8tYnVpbGQtaXNvbGF0aW9u",highlighted:"pip install -U flash-attn --no-build-isolation",wrap:!1}}),it=new he({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}}),lt=new F({props:{title:"기대하는 속도 향상",local:"expected-speedups",headingTag:"h3"}}),ct=new F({props:{title:"슬라이딩 윈도우 어텐션",local:"sliding-window-attention",headingTag:"h3"}}),mt=new F({props:{title:"양자화로 미스트랄 크기 줄이기",local:"shrinking-down-mistral-using-quantization",headingTag:"h2"}}),gt=new he({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}}),Mt=new F({props:{title:"리소스",local:"resources",headingTag:"h2"}}),Tt=new jr({props:{pipeline:"text-generation"}}),kt=new F({props:{title:"MistralConfig",local:"transformers.MistralConfig ][ transformers.MistralConfig",headingTag:"h2"}}),vt=new q({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/ko/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"}}),ke=new Rn({props:{anchor:"transformers.MistralConfig.example",$$slots:{default:[zr]},$$scope:{ctx:v}}}),wt=new F({props:{title:"MistralModel",local:"transformers.MistralModel ][ transformers.MistralModel",headingTag:"h2"}}),$t=new q({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/ko/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/ko/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#L676"}}),Ct=new q({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.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.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/ko/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 indicating the position of the input sequence tokens in the sequence. Unlike <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#L710"}}),ve=new te({props:{$$slots:{default:[Jr]},$$scope:{ctx:v}}}),xt=new F({props:{title:"MistralForCausalLM",local:"transformers.MistralForCausalLM ][ transformers.MistralForCausalLM",headingTag:"h2"}}),jt=new q({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#L984"}}),Ft=new q({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"}],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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.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/ko/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 indicating the position of the input sequence tokens in the sequence. Unlike <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#L1014",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/ko/model_doc/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/ko/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new te({props:{$$slots:{default:[Ir]},$$scope:{ctx:v}}}),$e=new Rn({props:{anchor:"transformers.MistralForCausalLM.forward.example",$$slots:{default:[Ur]},$$scope:{ctx:v}}}),zt=new F({props:{title:"MistralForSequenceClassification",local:"transformers.MistralForSequenceClassification ][ transformers.MistralForSequenceClassification",headingTag:"h2"}}),Jt=new q({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/ko/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/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L1114"}}),It=new q({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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.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/ko/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 indicating the position of the input sequence tokens in the sequence. Unlike <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#L1146"}}),Ce=new te({props:{$$slots:{default:[qr]},$$scope:{ctx:v}}}),Ut=new F({props:{title:"MistralForTokenClassification",local:"transformers.MistralForTokenClassification ][ transformers.MistralForTokenClassification",headingTag:"h2"}}),qt=new q({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/ko/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/ko/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_mistral.py#L1219"}}),Lt=new q({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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.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/ko/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 indicating the position of the input sequence tokens in the sequence. Unlike <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#L1250",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30530/ko/model_doc/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/ko/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xe=new te({props:{$$slots:{default:[Lr]},$$scope:{ctx:v}}}),je=new Rn({props:{anchor:"transformers.MistralForTokenClassification.forward.example",$$slots:{default:[Wr]},$$scope:{ctx:v}}}),Wt=new F({props:{title:"FlaxMistralModel",local:"transformers.FlaxMistralModel ][ transformers.FlaxMistralModel",headingTag:"h2"}}),Bt=new q({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/ko/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/ko/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/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L636"}}),Zt=new q({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 0x7f8ce155d360> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.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/ko/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/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fe=new te({props:{$$slots:{default:[Br]},$$scope:{ctx:v}}}),ze=new te({props:{warning:!0,$$slots:{default:[Zr]},$$scope:{ctx:v}}}),Je=new Rn({props:{anchor:"transformers.FlaxMistralModel.__call__.example",$$slots:{default:[Hr]},$$scope:{ctx:v}}}),Ht=new F({props:{title:"FlaxMistralForCausalLM",local:"transformers.FlaxMistralForCausalLM ][ transformers.FlaxMistralForCausalLM",headingTag:"h2"}}),Pt=new q({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/ko/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/ko/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/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L698"}}),Gt=new q({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 0x7f8ce155d360> = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_flax_mistral.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/ko/main_classes/output#transformers.modeling_flax_outputs.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/ko/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/ko/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new te({props:{$$slots:{default:[Pr]},$$scope:{ctx:v}}}),Ue=new te({props:{warning:!0,$$slots:{default:[Gr]},$$scope:{ctx:v}}}),qe=new Rn({props:{anchor:"transformers.FlaxMistralForCausalLM.__call__.example",$$slots:{default:[Nr]},$$scope:{ctx:v}}}),Nt=new F({props:{title:"TFMistralModel",local:"transformers.TFMistralModel ][ transformers.TFMistralModel",headingTag:"h2"}}),St=new q({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/ko/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/ko/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"}}),Le=new te({props:{$$slots:{default:[Sr]},$$scope:{ctx:v}}}),Rt=new q({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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/mistral/modeling_tf_mistral.py#L769"}}),We=new te({props:{$$slots:{default:[Rr]},$$scope:{ctx:v}}}),Xt=new F({props:{title:"TFMistralForCausalLM",local:"transformers.TFMistralForCausalLM ][ transformers.TFMistralForCausalLM",headingTag:"h2"}}),Vt=new q({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"}}),Et=new q({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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/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"}}),Be=new te({props:{$$slots:{default:[Xr]},$$scope:{ctx:v}}}),At=new F({props:{title:"TFMistralForSequenceClassification",local:"transformers.TFMistralForSequenceClassification ][ transformers.TFMistralForSequenceClassification",headingTag:"h2"}}),Qt=new q({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/ko/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/ko/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"}}),Ze=new te({props:{$$slots:{default:[Vr]},$$scope:{ctx:v}}}),Yt=new q({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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/ko/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/ko/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.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/ko/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"}}),He=new te({props:{$$slots:{default:[Er]},$$scope:{ctx:v}}}),Ot=new Fr({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/model_doc/mistral.md"}}),{c(){o=l("meta"),T=s(),c=l("p"),u=s(),h(w.$$.fragment),m=s(),h(k.$$.fragment),re=s(),Z=l("p"),Z.innerHTML=L,ie=s(),H=l("p"),H.textContent=W,le=s(),b=l("p"),b.innerHTML=$,Xn=s(),Pe=l("p"),Pe.innerHTML=ua,Vn=s(),h(Ge.$$.fragment),En=s(),Ne=l("p"),Ne.textContent=ma,An=s(),Se=l("ul"),Se.innerHTML=ha,Qn=s(),Re=l("p"),Re.innerHTML=fa,Yn=s(),h(Xe.$$.fragment),On=s(),Ve=l("p"),Ve.innerHTML=ga,Dn=s(),h(Ee.$$.fragment),Kn=s(),Ae=l("p"),Ae.textContent=_a,eo=s(),Qe=l("ul"),Qe.innerHTML=Ma,to=s(),Ye=l("p"),Ye.textContent=ya,no=s(),h(Oe.$$.fragment),oo=s(),De=l("p"),De.textContent=Ta,so=s(),h(Ke.$$.fragment),ao=s(),et=l("p"),et.innerHTML=ba,ro=s(),h(tt.$$.fragment),io=s(),nt=l("p"),nt.innerHTML=ka,lo=s(),ot=l("p"),ot.textContent=va,co=s(),h(st.$$.fragment),po=s(),at=l("p"),at.innerHTML=wa,uo=s(),rt=l("p"),rt.textContent=$a,mo=s(),h(it.$$.fragment),ho=s(),h(lt.$$.fragment),fo=s(),dt=l("p"),dt.innerHTML=Ca,go=s(),be=l("div"),be.innerHTML=xa,_o=s(),h(ct.$$.fragment),Mo=s(),pt=l("p"),pt.innerHTML=ja,yo=s(),ut=l("p"),ut.innerHTML=Fa,To=s(),h(mt.$$.fragment),bo=s(),ht=l("p"),ht.innerHTML=za,ko=s(),ft=l("p"),ft.innerHTML=Ja,vo=s(),h(gt.$$.fragment),wo=s(),_t=l("p"),_t.innerHTML=Ia,$o=s(),h(Mt.$$.fragment),Co=s(),yt=l("p"),yt.textContent=Ua,xo=s(),h(Tt.$$.fragment),jo=s(),bt=l("ul"),bt.innerHTML=qa,Fo=s(),h(kt.$$.fragment),zo=s(),R=l("div"),h(vt.$$.fragment),Do=s(),en=l("p"),en.innerHTML=La,Ko=s(),tn=l("p"),tn.innerHTML=Wa,es=s(),nn=l("p"),nn.innerHTML=Ba,ts=s(),h(ke.$$.fragment),Jo=s(),h(wt.$$.fragment),Io=s(),X=l("div"),h($t.$$.fragment),ns=s(),on=l("p"),on.innerHTML=Za,os=s(),sn=l("p"),sn.innerHTML=Ha,ss=s(),an=l("p"),an.innerHTML=Pa,as=s(),de=l("div"),h(Ct.$$.fragment),rs=s(),rn=l("p"),rn.innerHTML=Ga,is=s(),h(ve.$$.fragment),Uo=s(),h(xt.$$.fragment),qo=s(),fe=l("div"),h(jt.$$.fragment),ls=s(),ne=l("div"),h(Ft.$$.fragment),ds=s(),ln=l("p"),ln.innerHTML=Na,cs=s(),h(we.$$.fragment),ps=s(),h($e.$$.fragment),Lo=s(),h(zt.$$.fragment),Wo=s(),z=l("div"),h(Jt.$$.fragment),us=s(),dn=l("p"),dn.textContent=Sa,ms=s(),cn=l("p"),cn.innerHTML=Ra,hs=s(),pn=l("p"),pn.innerHTML=Xa,fs=s(),un=l("p"),un.innerHTML=Va,gs=s(),mn=l("p"),mn.innerHTML=Ea,_s=s(),ce=l("div"),h(It.$$.fragment),Ms=s(),hn=l("p"),hn.innerHTML=Aa,ys=s(),h(Ce.$$.fragment),Bo=s(),h(Ut.$$.fragment),Zo=s(),V=l("div"),h(qt.$$.fragment),Ts=s(),fn=l("p"),fn.textContent=Qa,bs=s(),gn=l("p"),gn.innerHTML=Ya,ks=s(),_n=l("p"),_n.innerHTML=Oa,vs=s(),oe=l("div"),h(Lt.$$.fragment),ws=s(),Mn=l("p"),Mn.innerHTML=Da,$s=s(),h(xe.$$.fragment),Cs=s(),h(je.$$.fragment),Ho=s(),h(Wt.$$.fragment),Po=s(),J=l("div"),h(Bt.$$.fragment),xs=s(),yn=l("p"),yn.textContent=Ka,js=s(),Tn=l("p"),Tn.innerHTML=er,Fs=s(),bn=l("p"),bn.innerHTML=tr,zs=s(),kn=l("p"),kn.textContent=nr,Js=s(),vn=l("ul"),vn.innerHTML=or,Is=s(),A=l("div"),h(Zt.$$.fragment),Us=s(),wn=l("p"),wn.innerHTML=sr,qs=s(),h(Fe.$$.fragment),Ls=s(),h(ze.$$.fragment),Ws=s(),h(Je.$$.fragment),Go=s(),h(Ht.$$.fragment),No=s(),I=l("div"),h(Pt.$$.fragment),Bs=s(),$n=l("p"),$n.textContent=ar,Zs=s(),Cn=l("p"),Cn.innerHTML=rr,Hs=s(),xn=l("p"),xn.innerHTML=ir,Ps=s(),jn=l("p"),jn.textContent=lr,Gs=s(),Fn=l("ul"),Fn.innerHTML=dr,Ns=s(),Q=l("div"),h(Gt.$$.fragment),Ss=s(),zn=l("p"),zn.innerHTML=cr,Rs=s(),h(Ie.$$.fragment),Xs=s(),h(Ue.$$.fragment),Vs=s(),h(qe.$$.fragment),So=s(),h(Nt.$$.fragment),Ro=s(),P=l("div"),h(St.$$.fragment),Es=s(),Jn=l("p"),Jn.textContent=pr,As=s(),In=l("p"),In.innerHTML=ur,Qs=s(),Un=l("p"),Un.innerHTML=mr,Ys=s(),h(Le.$$.fragment),Os=s(),pe=l("div"),h(Rt.$$.fragment),Ds=s(),qn=l("p"),qn.innerHTML=hr,Ks=s(),h(We.$$.fragment),Xo=s(),h(Xt.$$.fragment),Vo=s(),ge=l("div"),h(Vt.$$.fragment),ea=s(),ue=l("div"),h(Et.$$.fragment),ta=s(),Ln=l("p"),Ln.innerHTML=fr,na=s(),h(Be.$$.fragment),Eo=s(),h(At.$$.fragment),Ao=s(),C=l("div"),h(Qt.$$.fragment),oa=s(),Wn=l("p"),Wn.textContent=gr,sa=s(),Bn=l("p"),Bn.innerHTML=_r,aa=s(),Zn=l("p"),Zn.innerHTML=Mr,ra=s(),Hn=l("p"),Hn.innerHTML=yr,ia=s(),Pn=l("p"),Pn.innerHTML=Tr,la=s(),h(Ze.$$.fragment),da=s(),me=l("div"),h(Yt.$$.fragment),ca=s(),Gn=l("p"),Gn.innerHTML=br,pa=s(),h(He.$$.fragment),Qo=s(),h(Ot.$$.fragment),Yo=s(),Sn=l("p"),this.h()},l(e){const t=Cr("svelte-u9bgzb",document.head);o=d(t,"META",{name:!0,content:!0}),t.forEach(n),T=a(e),c=d(e,"P",{}),x(c).forEach(n),u=a(e),f(w.$$.fragment,e),m=a(e),f(k.$$.fragment,e),re=a(e),Z=d(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1jq94cn"&&(Z.innerHTML=L),ie=a(e),H=d(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-182fnxo"&&(H.textContent=W),le=a(e),b=d(e,"P",{"data-svelte-h":!0}),p(b)!=="svelte-v56qvn"&&(b.innerHTML=$),Xn=a(e),Pe=d(e,"P",{"data-svelte-h":!0}),p(Pe)!=="svelte-itjfst"&&(Pe.innerHTML=ua),Vn=a(e),f(Ge.$$.fragment,e),En=a(e),Ne=d(e,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-1kc966i"&&(Ne.textContent=ma),An=a(e),Se=d(e,"UL",{"data-svelte-h":!0}),p(Se)!=="svelte-mor5gd"&&(Se.innerHTML=ha),Qn=a(e),Re=d(e,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-1mq8l22"&&(Re.innerHTML=fa),Yn=a(e),f(Xe.$$.fragment,e),On=a(e),Ve=d(e,"P",{"data-svelte-h":!0}),p(Ve)!=="svelte-8fcwwq"&&(Ve.innerHTML=ga),Dn=a(e),f(Ee.$$.fragment,e),Kn=a(e),Ae=d(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-82miud"&&(Ae.textContent=_a),eo=a(e),Qe=d(e,"UL",{"data-svelte-h":!0}),p(Qe)!=="svelte-cesn61"&&(Qe.innerHTML=Ma),to=a(e),Ye=d(e,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-nj92a3"&&(Ye.textContent=ya),no=a(e),f(Oe.$$.fragment,e),oo=a(e),De=d(e,"P",{"data-svelte-h":!0}),p(De)!=="svelte-bi6uua"&&(De.textContent=Ta),so=a(e),f(Ke.$$.fragment,e),ao=a(e),et=d(e,"P",{"data-svelte-h":!0}),p(et)!=="svelte-sfd2l5"&&(et.innerHTML=ba),ro=a(e),f(tt.$$.fragment,e),io=a(e),nt=d(e,"P",{"data-svelte-h":!0}),p(nt)!=="svelte-q7klzk"&&(nt.innerHTML=ka),lo=a(e),ot=d(e,"P",{"data-svelte-h":!0}),p(ot)!=="svelte-ydii05"&&(ot.textContent=va),co=a(e),f(st.$$.fragment,e),po=a(e),at=d(e,"P",{"data-svelte-h":!0}),p(at)!=="svelte-1vqfaar"&&(at.innerHTML=wa),uo=a(e),rt=d(e,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-fhx3bl"&&(rt.textContent=$a),mo=a(e),f(it.$$.fragment,e),ho=a(e),f(lt.$$.fragment,e),fo=a(e),dt=d(e,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-15mvma8"&&(dt.innerHTML=Ca),go=a(e),be=d(e,"DIV",{style:!0,"data-svelte-h":!0}),p(be)!=="svelte-18u0t8d"&&(be.innerHTML=xa),_o=a(e),f(ct.$$.fragment,e),Mo=a(e),pt=d(e,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1a5uezo"&&(pt.innerHTML=ja),yo=a(e),ut=d(e,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-6pz1dp"&&(ut.innerHTML=Fa),To=a(e),f(mt.$$.fragment,e),bo=a(e),ht=d(e,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-mldh40"&&(ht.innerHTML=za),ko=a(e),ft=d(e,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-qdi6jq"&&(ft.innerHTML=Ja),vo=a(e),f(gt.$$.fragment,e),wo=a(e),_t=d(e,"P",{"data-svelte-h":!0}),p(_t)!=="svelte-ha0jr5"&&(_t.innerHTML=Ia),$o=a(e),f(Mt.$$.fragment,e),Co=a(e),yt=d(e,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-ddc6j0"&&(yt.textContent=Ua),xo=a(e),f(Tt.$$.fragment,e),jo=a(e),bt=d(e,"UL",{"data-svelte-h":!0}),p(bt)!=="svelte-gwzwmb"&&(bt.innerHTML=qa),Fo=a(e),f(kt.$$.fragment,e),zo=a(e),R=d(e,"DIV",{class:!0});var Y=x(R);f(vt.$$.fragment,Y),Do=a(Y),en=d(Y,"P",{"data-svelte-h":!0}),p(en)!=="svelte-8uhzgp"&&(en.innerHTML=La),Ko=a(Y),tn=d(Y,"P",{"data-svelte-h":!0}),p(tn)!=="svelte-28p57e"&&(tn.innerHTML=Wa),es=a(Y),nn=d(Y,"P",{"data-svelte-h":!0}),p(nn)!=="svelte-2tye9b"&&(nn.innerHTML=Ba),ts=a(Y),f(ke.$$.fragment,Y),Y.forEach(n),Jo=a(e),f(wt.$$.fragment,e),Io=a(e),X=d(e,"DIV",{class:!0});var O=x(X);f($t.$$.fragment,O),ns=a(O),on=d(O,"P",{"data-svelte-h":!0}),p(on)!=="svelte-1kx9a46"&&(on.innerHTML=Za),os=a(O),sn=d(O,"P",{"data-svelte-h":!0}),p(sn)!=="svelte-hswkmf"&&(sn.innerHTML=Ha),ss=a(O),an=d(O,"P",{"data-svelte-h":!0}),p(an)!=="svelte-1oenqzd"&&(an.innerHTML=Pa),as=a(O),de=d(O,"DIV",{class:!0});var _e=x(de);f(Ct.$$.fragment,_e),rs=a(_e),rn=d(_e,"P",{"data-svelte-h":!0}),p(rn)!=="svelte-1p0bcib"&&(rn.innerHTML=Ga),is=a(_e),f(ve.$$.fragment,_e),_e.forEach(n),O.forEach(n),Uo=a(e),f(xt.$$.fragment,e),qo=a(e),fe=d(e,"DIV",{class:!0});var Dt=x(fe);f(jt.$$.fragment,Dt),ls=a(Dt),ne=d(Dt,"DIV",{class:!0});var se=x(ne);f(Ft.$$.fragment,se),ds=a(se),ln=d(se,"P",{"data-svelte-h":!0}),p(ln)!=="svelte-fsvv47"&&(ln.innerHTML=Na),cs=a(se),f(we.$$.fragment,se),ps=a(se),f($e.$$.fragment,se),se.forEach(n),Dt.forEach(n),Lo=a(e),f(zt.$$.fragment,e),Wo=a(e),z=d(e,"DIV",{class:!0});var G=x(z);f(Jt.$$.fragment,G),us=a(G),dn=d(G,"P",{"data-svelte-h":!0}),p(dn)!=="svelte-1r7clz4"&&(dn.textContent=Sa),ms=a(G),cn=d(G,"P",{"data-svelte-h":!0}),p(cn)!=="svelte-1kbmdx4"&&(cn.innerHTML=Ra),hs=a(G),pn=d(G,"P",{"data-svelte-h":!0}),p(pn)!=="svelte-10ugs3m"&&(pn.innerHTML=Xa),fs=a(G),un=d(G,"P",{"data-svelte-h":!0}),p(un)!=="svelte-5skutq"&&(un.innerHTML=Va),gs=a(G),mn=d(G,"P",{"data-svelte-h":!0}),p(mn)!=="svelte-hswkmf"&&(mn.innerHTML=Ea),_s=a(G),ce=d(G,"DIV",{class:!0});var Me=x(ce);f(It.$$.fragment,Me),Ms=a(Me),hn=d(Me,"P",{"data-svelte-h":!0}),p(hn)!=="svelte-7g5b35"&&(hn.innerHTML=Aa),ys=a(Me),f(Ce.$$.fragment,Me),Me.forEach(n),G.forEach(n),Bo=a(e),f(Ut.$$.fragment,e),Zo=a(e),V=d(e,"DIV",{class:!0});var D=x(V);f(qt.$$.fragment,D),Ts=a(D),fn=d(D,"P",{"data-svelte-h":!0}),p(fn)!=="svelte-16ihdln"&&(fn.textContent=Qa),bs=a(D),gn=d(D,"P",{"data-svelte-h":!0}),p(gn)!=="svelte-5skutq"&&(gn.innerHTML=Ya),ks=a(D),_n=d(D,"P",{"data-svelte-h":!0}),p(_n)!=="svelte-hswkmf"&&(_n.innerHTML=Oa),vs=a(D),oe=d(D,"DIV",{class:!0});var ae=x(oe);f(Lt.$$.fragment,ae),ws=a(ae),Mn=d(ae,"P",{"data-svelte-h":!0}),p(Mn)!=="svelte-1ryd4xx"&&(Mn.innerHTML=Da),$s=a(ae),f(xe.$$.fragment,ae),Cs=a(ae),f(je.$$.fragment,ae),ae.forEach(n),D.forEach(n),Ho=a(e),f(Wt.$$.fragment,e),Po=a(e),J=d(e,"DIV",{class:!0});var N=x(J);f(Bt.$$.fragment,N),xs=a(N),yn=d(N,"P",{"data-svelte-h":!0}),p(yn)!=="svelte-1vqhmd7"&&(yn.textContent=Ka),js=a(N),Tn=d(N,"P",{"data-svelte-h":!0}),p(Tn)!=="svelte-1fwpmve"&&(Tn.innerHTML=er),Fs=a(N),bn=d(N,"P",{"data-svelte-h":!0}),p(bn)!=="svelte-idybz1"&&(bn.innerHTML=tr),zs=a(N),kn=d(N,"P",{"data-svelte-h":!0}),p(kn)!=="svelte-1pplc4a"&&(kn.textContent=nr),Js=a(N),vn=d(N,"UL",{"data-svelte-h":!0}),p(vn)!=="svelte-1w7z84m"&&(vn.innerHTML=or),Is=a(N),A=d(N,"DIV",{class:!0});var K=x(A);f(Zt.$$.fragment,K),Us=a(K),wn=d(K,"P",{"data-svelte-h":!0}),p(wn)!=="svelte-dti72j"&&(wn.innerHTML=sr),qs=a(K),f(Fe.$$.fragment,K),Ls=a(K),f(ze.$$.fragment,K),Ws=a(K),f(Je.$$.fragment,K),K.forEach(n),N.forEach(n),Go=a(e),f(Ht.$$.fragment,e),No=a(e),I=d(e,"DIV",{class:!0});var S=x(I);f(Pt.$$.fragment,S),Bs=a(S),$n=d(S,"P",{"data-svelte-h":!0}),p($n)!=="svelte-lgxco8"&&($n.textContent=ar),Zs=a(S),Cn=d(S,"P",{"data-svelte-h":!0}),p(Cn)!=="svelte-1fwpmve"&&(Cn.innerHTML=rr),Hs=a(S),xn=d(S,"P",{"data-svelte-h":!0}),p(xn)!=="svelte-idybz1"&&(xn.innerHTML=ir),Ps=a(S),jn=d(S,"P",{"data-svelte-h":!0}),p(jn)!=="svelte-1pplc4a"&&(jn.textContent=lr),Gs=a(S),Fn=d(S,"UL",{"data-svelte-h":!0}),p(Fn)!=="svelte-1w7z84m"&&(Fn.innerHTML=dr),Ns=a(S),Q=d(S,"DIV",{class:!0});var ee=x(Q);f(Gt.$$.fragment,ee),Ss=a(ee),zn=d(ee,"P",{"data-svelte-h":!0}),p(zn)!=="svelte-dti72j"&&(zn.innerHTML=cr),Rs=a(ee),f(Ie.$$.fragment,ee),Xs=a(ee),f(Ue.$$.fragment,ee),Vs=a(ee),f(qe.$$.fragment,ee),ee.forEach(n),S.forEach(n),So=a(e),f(Nt.$$.fragment,e),Ro=a(e),P=d(e,"DIV",{class:!0});var E=x(P);f(St.$$.fragment,E),Es=a(E),Jn=d(E,"P",{"data-svelte-h":!0}),p(Jn)!=="svelte-1g3elk2"&&(Jn.textContent=pr),As=a(E),In=d(E,"P",{"data-svelte-h":!0}),p(In)!=="svelte-1108wdq"&&(In.innerHTML=ur),Qs=a(E),Un=d(E,"P",{"data-svelte-h":!0}),p(Un)!=="svelte-1be7e3c"&&(Un.innerHTML=mr),Ys=a(E),f(Le.$$.fragment,E),Os=a(E),pe=d(E,"DIV",{class:!0});var ye=x(pe);f(Rt.$$.fragment,ye),Ds=a(ye),qn=d(ye,"P",{"data-svelte-h":!0}),p(qn)!=="svelte-c8twpb"&&(qn.innerHTML=hr),Ks=a(ye),f(We.$$.fragment,ye),ye.forEach(n),E.forEach(n),Xo=a(e),f(Xt.$$.fragment,e),Vo=a(e),ge=d(e,"DIV",{class:!0});var Kt=x(ge);f(Vt.$$.fragment,Kt),ea=a(Kt),ue=d(Kt,"DIV",{class:!0});var Te=x(ue);f(Et.$$.fragment,Te),ta=a(Te),Ln=d(Te,"P",{"data-svelte-h":!0}),p(Ln)!=="svelte-8ok1mb"&&(Ln.innerHTML=fr),na=a(Te),f(Be.$$.fragment,Te),Te.forEach(n),Kt.forEach(n),Eo=a(e),f(At.$$.fragment,e),Ao=a(e),C=d(e,"DIV",{class:!0});var U=x(C);f(Qt.$$.fragment,U),oa=a(U),Wn=d(U,"P",{"data-svelte-h":!0}),p(Wn)!=="svelte-1r7clz4"&&(Wn.textContent=gr),sa=a(U),Bn=d(U,"P",{"data-svelte-h":!0}),p(Bn)!=="svelte-1kbmdx4"&&(Bn.innerHTML=_r),aa=a(U),Zn=d(U,"P",{"data-svelte-h":!0}),p(Zn)!=="svelte-10ugs3m"&&(Zn.innerHTML=Mr),ra=a(U),Hn=d(U,"P",{"data-svelte-h":!0}),p(Hn)!=="svelte-1108wdq"&&(Hn.innerHTML=yr),ia=a(U),Pn=d(U,"P",{"data-svelte-h":!0}),p(Pn)!=="svelte-1be7e3c"&&(Pn.innerHTML=Tr),la=a(U),f(Ze.$$.fragment,U),da=a(U),me=d(U,"DIV",{class:!0});var Nn=x(me);f(Yt.$$.fragment,Nn),ca=a(Nn),Gn=d(Nn,"P",{"data-svelte-h":!0}),p(Gn)!=="svelte-1svt0yp"&&(Gn.innerHTML=br),pa=a(Nn),f(He.$$.fragment,Nn),Nn.forEach(n),U.forEach(n),Qo=a(e),f(Ot.$$.fragment,e),Yo=a(e),Sn=d(e,"P",{}),x(Sn).forEach(n),this.h()},h(){j(o,"name","hf:doc:metadata"),j(o,"content",Qr),xr(be,"text-align","center"),j(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,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,re,t),r(e,Z,t),r(e,ie,t),r(e,H,t),r(e,le,t),r(e,b,t),r(e,Xn,t),r(e,Pe,t),r(e,Vn,t),g(Ge,e,t),r(e,En,t),r(e,Ne,t),r(e,An,t),r(e,Se,t),r(e,Qn,t),r(e,Re,t),r(e,Yn,t),g(Xe,e,t),r(e,On,t),r(e,Ve,t),r(e,Dn,t),g(Ee,e,t),r(e,Kn,t),r(e,Ae,t),r(e,eo,t),r(e,Qe,t),r(e,to,t),r(e,Ye,t),r(e,no,t),g(Oe,e,t),r(e,oo,t),r(e,De,t),r(e,so,t),g(Ke,e,t),r(e,ao,t),r(e,et,t),r(e,ro,t),g(tt,e,t),r(e,io,t),r(e,nt,t),r(e,lo,t),r(e,ot,t),r(e,co,t),g(st,e,t),r(e,po,t),r(e,at,t),r(e,uo,t),r(e,rt,t),r(e,mo,t),g(it,e,t),r(e,ho,t),g(lt,e,t),r(e,fo,t),r(e,dt,t),r(e,go,t),r(e,be,t),r(e,_o,t),g(ct,e,t),r(e,Mo,t),r(e,pt,t),r(e,yo,t),r(e,ut,t),r(e,To,t),g(mt,e,t),r(e,bo,t),r(e,ht,t),r(e,ko,t),r(e,ft,t),r(e,vo,t),g(gt,e,t),r(e,wo,t),r(e,_t,t),r(e,$o,t),g(Mt,e,t),r(e,Co,t),r(e,yt,t),r(e,xo,t),g(Tt,e,t),r(e,jo,t),r(e,bt,t),r(e,Fo,t),g(kt,e,t),r(e,zo,t),r(e,R,t),g(vt,R,null),i(R,Do),i(R,en),i(R,Ko),i(R,tn),i(R,es),i(R,nn),i(R,ts),g(ke,R,null),r(e,Jo,t),g(wt,e,t),r(e,Io,t),r(e,X,t),g($t,X,null),i(X,ns),i(X,on),i(X,os),i(X,sn),i(X,ss),i(X,an),i(X,as),i(X,de),g(Ct,de,null),i(de,rs),i(de,rn),i(de,is),g(ve,de,null),r(e,Uo,t),g(xt,e,t),r(e,qo,t),r(e,fe,t),g(jt,fe,null),i(fe,ls),i(fe,ne),g(Ft,ne,null),i(ne,ds),i(ne,ln),i(ne,cs),g(we,ne,null),i(ne,ps),g($e,ne,null),r(e,Lo,t),g(zt,e,t),r(e,Wo,t),r(e,z,t),g(Jt,z,null),i(z,us),i(z,dn),i(z,ms),i(z,cn),i(z,hs),i(z,pn),i(z,fs),i(z,un),i(z,gs),i(z,mn),i(z,_s),i(z,ce),g(It,ce,null),i(ce,Ms),i(ce,hn),i(ce,ys),g(Ce,ce,null),r(e,Bo,t),g(Ut,e,t),r(e,Zo,t),r(e,V,t),g(qt,V,null),i(V,Ts),i(V,fn),i(V,bs),i(V,gn),i(V,ks),i(V,_n),i(V,vs),i(V,oe),g(Lt,oe,null),i(oe,ws),i(oe,Mn),i(oe,$s),g(xe,oe,null),i(oe,Cs),g(je,oe,null),r(e,Ho,t),g(Wt,e,t),r(e,Po,t),r(e,J,t),g(Bt,J,null),i(J,xs),i(J,yn),i(J,js),i(J,Tn),i(J,Fs),i(J,bn),i(J,zs),i(J,kn),i(J,Js),i(J,vn),i(J,Is),i(J,A),g(Zt,A,null),i(A,Us),i(A,wn),i(A,qs),g(Fe,A,null),i(A,Ls),g(ze,A,null),i(A,Ws),g(Je,A,null),r(e,Go,t),g(Ht,e,t),r(e,No,t),r(e,I,t),g(Pt,I,null),i(I,Bs),i(I,$n),i(I,Zs),i(I,Cn),i(I,Hs),i(I,xn),i(I,Ps),i(I,jn),i(I,Gs),i(I,Fn),i(I,Ns),i(I,Q),g(Gt,Q,null),i(Q,Ss),i(Q,zn),i(Q,Rs),g(Ie,Q,null),i(Q,Xs),g(Ue,Q,null),i(Q,Vs),g(qe,Q,null),r(e,So,t),g(Nt,e,t),r(e,Ro,t),r(e,P,t),g(St,P,null),i(P,Es),i(P,Jn),i(P,As),i(P,In),i(P,Qs),i(P,Un),i(P,Ys),g(Le,P,null),i(P,Os),i(P,pe),g(Rt,pe,null),i(pe,Ds),i(pe,qn),i(pe,Ks),g(We,pe,null),r(e,Xo,t),g(Xt,e,t),r(e,Vo,t),r(e,ge,t),g(Vt,ge,null),i(ge,ea),i(ge,ue),g(Et,ue,null),i(ue,ta),i(ue,Ln),i(ue,na),g(Be,ue,null),r(e,Eo,t),g(At,e,t),r(e,Ao,t),r(e,C,t),g(Qt,C,null),i(C,oa),i(C,Wn),i(C,sa),i(C,Bn),i(C,aa),i(C,Zn),i(C,ra),i(C,Hn),i(C,ia),i(C,Pn),i(C,la),g(Ze,C,null),i(C,da),i(C,me),g(Yt,me,null),i(me,ca),i(me,Gn),i(me,pa),g(He,me,null),r(e,Qo,t),g(Ot,e,t),r(e,Yo,t),r(e,Sn,t),Oo=!0},p(e,[t]){const Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),ke.$set(Y);const O={};t&2&&(O.$$scope={dirty:t,ctx:e}),ve.$set(O);const _e={};t&2&&(_e.$$scope={dirty:t,ctx:e}),we.$set(_e);const Dt={};t&2&&(Dt.$$scope={dirty:t,ctx:e}),$e.$set(Dt);const se={};t&2&&(se.$$scope={dirty:t,ctx:e}),Ce.$set(se);const G={};t&2&&(G.$$scope={dirty:t,ctx:e}),xe.$set(G);const Me={};t&2&&(Me.$$scope={dirty:t,ctx:e}),je.$set(Me);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),Fe.$set(D);const ae={};t&2&&(ae.$$scope={dirty:t,ctx:e}),ze.$set(ae);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),Je.$set(N);const K={};t&2&&(K.$$scope={dirty:t,ctx:e}),Ie.$set(K);const S={};t&2&&(S.$$scope={dirty:t,ctx:e}),Ue.$set(S);const ee={};t&2&&(ee.$$scope={dirty:t,ctx:e}),qe.$set(ee);const E={};t&2&&(E.$$scope={dirty:t,ctx:e}),Le.$set(E);const ye={};t&2&&(ye.$$scope={dirty:t,ctx:e}),We.$set(ye);const Kt={};t&2&&(Kt.$$scope={dirty:t,ctx:e}),Be.$set(Kt);const Te={};t&2&&(Te.$$scope={dirty:t,ctx:e}),Ze.$set(Te);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),He.$set(U)},i(e){Oo||(_(w.$$.fragment,e),_(k.$$.fragment,e),_(Ge.$$.fragment,e),_(Xe.$$.fragment,e),_(Ee.$$.fragment,e),_(Oe.$$.fragment,e),_(Ke.$$.fragment,e),_(tt.$$.fragment,e),_(st.$$.fragment,e),_(it.$$.fragment,e),_(lt.$$.fragment,e),_(ct.$$.fragment,e),_(mt.$$.fragment,e),_(gt.$$.fragment,e),_(Mt.$$.fragment,e),_(Tt.$$.fragment,e),_(kt.$$.fragment,e),_(vt.$$.fragment,e),_(ke.$$.fragment,e),_(wt.$$.fragment,e),_($t.$$.fragment,e),_(Ct.$$.fragment,e),_(ve.$$.fragment,e),_(xt.$$.fragment,e),_(jt.$$.fragment,e),_(Ft.$$.fragment,e),_(we.$$.fragment,e),_($e.$$.fragment,e),_(zt.$$.fragment,e),_(Jt.$$.fragment,e),_(It.$$.fragment,e),_(Ce.$$.fragment,e),_(Ut.$$.fragment,e),_(qt.$$.fragment,e),_(Lt.$$.fragment,e),_(xe.$$.fragment,e),_(je.$$.fragment,e),_(Wt.$$.fragment,e),_(Bt.$$.fragment,e),_(Zt.$$.fragment,e),_(Fe.$$.fragment,e),_(ze.$$.fragment,e),_(Je.$$.fragment,e),_(Ht.$$.fragment,e),_(Pt.$$.fragment,e),_(Gt.$$.fragment,e),_(Ie.$$.fragment,e),_(Ue.$$.fragment,e),_(qe.$$.fragment,e),_(Nt.$$.fragment,e),_(St.$$.fragment,e),_(Le.$$.fragment,e),_(Rt.$$.fragment,e),_(We.$$.fragment,e),_(Xt.$$.fragment,e),_(Vt.$$.fragment,e),_(Et.$$.fragment,e),_(Be.$$.fragment,e),_(At.$$.fragment,e),_(Qt.$$.fragment,e),_(Ze.$$.fragment,e),_(Yt.$$.fragment,e),_(He.$$.fragment,e),_(Ot.$$.fragment,e),Oo=!0)},o(e){M(w.$$.fragment,e),M(k.$$.fragment,e),M(Ge.$$.fragment,e),M(Xe.$$.fragment,e),M(Ee.$$.fragment,e),M(Oe.$$.fragment,e),M(Ke.$$.fragment,e),M(tt.$$.fragment,e),M(st.$$.fragment,e),M(it.$$.fragment,e),M(lt.$$.fragment,e),M(ct.$$.fragment,e),M(mt.$$.fragment,e),M(gt.$$.fragment,e),M(Mt.$$.fragment,e),M(Tt.$$.fragment,e),M(kt.$$.fragment,e),M(vt.$$.fragment,e),M(ke.$$.fragment,e),M(wt.$$.fragment,e),M($t.$$.fragment,e),M(Ct.$$.fragment,e),M(ve.$$.fragment,e),M(xt.$$.fragment,e),M(jt.$$.fragment,e),M(Ft.$$.fragment,e),M(we.$$.fragment,e),M($e.$$.fragment,e),M(zt.$$.fragment,e),M(Jt.$$.fragment,e),M(It.$$.fragment,e),M(Ce.$$.fragment,e),M(Ut.$$.fragment,e),M(qt.$$.fragment,e),M(Lt.$$.fragment,e),M(xe.$$.fragment,e),M(je.$$.fragment,e),M(Wt.$$.fragment,e),M(Bt.$$.fragment,e),M(Zt.$$.fragment,e),M(Fe.$$.fragment,e),M(ze.$$.fragment,e),M(Je.$$.fragment,e),M(Ht.$$.fragment,e),M(Pt.$$.fragment,e),M(Gt.$$.fragment,e),M(Ie.$$.fragment,e),M(Ue.$$.fragment,e),M(qe.$$.fragment,e),M(Nt.$$.fragment,e),M(St.$$.fragment,e),M(Le.$$.fragment,e),M(Rt.$$.fragment,e),M(We.$$.fragment,e),M(Xt.$$.fragment,e),M(Vt.$$.fragment,e),M(Et.$$.fragment,e),M(Be.$$.fragment,e),M(At.$$.fragment,e),M(Qt.$$.fragment,e),M(Ze.$$.fragment,e),M(Yt.$$.fragment,e),M(He.$$.fragment,e),M(Ot.$$.fragment,e),Oo=!1},d(e){e&&(n(T),n(c),n(u),n(m),n(re),n(Z),n(ie),n(H),n(le),n(b),n(Xn),n(Pe),n(Vn),n(En),n(Ne),n(An),n(Se),n(Qn),n(Re),n(Yn),n(On),n(Ve),n(Dn),n(Kn),n(Ae),n(eo),n(Qe),n(to),n(Ye),n(no),n(oo),n(De),n(so),n(ao),n(et),n(ro),n(io),n(nt),n(lo),n(ot),n(co),n(po),n(at),n(uo),n(rt),n(mo),n(ho),n(fo),n(dt),n(go),n(be),n(_o),n(Mo),n(pt),n(yo),n(ut),n(To),n(bo),n(ht),n(ko),n(ft),n(vo),n(wo),n(_t),n($o),n(Co),n(yt),n(xo),n(jo),n(bt),n(Fo),n(zo),n(R),n(Jo),n(Io),n(X),n(Uo),n(qo),n(fe),n(Lo),n(Wo),n(z),n(Bo),n(Zo),n(V),n(Ho),n(Po),n(J),n(Go),n(No),n(I),n(So),n(Ro),n(P),n(Xo),n(Vo),n(ge),n(Eo),n(Ao),n(C),n(Qo),n(Yo),n(Sn)),n(o),y(w,e),y(k,e),y(Ge,e),y(Xe,e),y(Ee,e),y(Oe,e),y(Ke,e),y(tt,e),y(st,e),y(it,e),y(lt,e),y(ct,e),y(mt,e),y(gt,e),y(Mt,e),y(Tt,e),y(kt,e),y(vt),y(ke),y(wt,e),y($t),y(Ct),y(ve),y(xt,e),y(jt),y(Ft),y(we),y($e),y(zt,e),y(Jt),y(It),y(Ce),y(Ut,e),y(qt),y(Lt),y(xe),y(je),y(Wt,e),y(Bt),y(Zt),y(Fe),y(ze),y(Je),y(Ht,e),y(Pt),y(Gt),y(Ie),y(Ue),y(qe),y(Nt,e),y(St),y(Le),y(Rt),y(We),y(Xt,e),y(Vt),y(Et),y(Be),y(At,e),y(Qt),y(Ze),y(Yt),y(He),y(Ot,e)}}}const Qr='{"title":"Mistral","local":"mistral","sections":[{"title":"개요","local":"overview","sections":[{"title":"아키텍처 세부사항","local":"architectural-details","sections":[],"depth":3},{"title":"라이선스","local":"license","sections":[],"depth":3}],"depth":2},{"title":"사용 팁","local":"usage-tips","sections":[],"depth":2},{"title":"플래시 어텐션을 이용한 미스트랄 속도향상","local":"speeding-up-mistral-by-using-flash-attention","sections":[{"title":"기대하는 속도 향상","local":"expected-speedups","sections":[],"depth":3},{"title":"슬라이딩 윈도우 어텐션","local":"sliding-window-attention","sections":[],"depth":3}],"depth":2},{"title":"양자화로 미스트랄 크기 줄이기","local":"shrinking-down-mistral-using-quantization","sections":[],"depth":2},{"title":"리소스","local":"resources","sections":[],"depth":2},{"title":"MistralConfig","local":"transformers.MistralConfig ][ transformers.MistralConfig","sections":[],"depth":2},{"title":"MistralModel","local":"transformers.MistralModel ][ transformers.MistralModel","sections":[],"depth":2},{"title":"MistralForCausalLM","local":"transformers.MistralForCausalLM ][ transformers.MistralForCausalLM","sections":[],"depth":2},{"title":"MistralForSequenceClassification","local":"transformers.MistralForSequenceClassification ][ transformers.MistralForSequenceClassification","sections":[],"depth":2},{"title":"MistralForTokenClassification","local":"transformers.MistralForTokenClassification ][ transformers.MistralForTokenClassification","sections":[],"depth":2},{"title":"FlaxMistralModel","local":"transformers.FlaxMistralModel ][ transformers.FlaxMistralModel","sections":[],"depth":2},{"title":"FlaxMistralForCausalLM","local":"transformers.FlaxMistralForCausalLM ][ transformers.FlaxMistralForCausalLM","sections":[],"depth":2},{"title":"TFMistralModel","local":"transformers.TFMistralModel ][ transformers.TFMistralModel","sections":[],"depth":2},{"title":"TFMistralForCausalLM","local":"transformers.TFMistralForCausalLM ][ transformers.TFMistralForCausalLM","sections":[],"depth":2},{"title":"TFMistralForSequenceClassification","local":"transformers.TFMistralForSequenceClassification ][ transformers.TFMistralForSequenceClassification","sections":[],"depth":2}],"depth":1}';function Yr(v){return vr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ai extends wr{constructor(o){super(),$r(this,o,Yr,Ar,kr,{})}}export{ai as component};
