import{s as lh,o as dh,n as L}from"../chunks/scheduler.9bc65507.js";import{S as ch,i as mh,g as r,s as o,r as m,A as ph,h as a,f as s,c as n,j as y,u as p,x as l,k as M,y as t,a as b,v as h,d as f,t as u,w as g}from"../chunks/index.707bf1b6.js";import{T as bi}from"../chunks/Tip.c2ecdbf4.js";import{D as T}from"../chunks/Docstring.86474e80.js";import{C as B}from"../chunks/CodeBlock.54a9f38d.js";import{E as D}from"../chunks/ExampleCodeBlock.034f3a73.js";import{H as he,E as hh}from"../chunks/EditOnGithub.922df6ba.js";function fh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMiklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwbW9kZWwlMjB0byUyMHlvdXIlMjBuYW1lc3BhY2UlMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyLiUwQW1vZGVsLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjBtb2RlbCUyMHRvJTIwYW4lMjBvcmdhbml6YXRpb24lMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyLiUwQW1vZGVsLnB1c2hfdG9faHViKCUyMmh1Z2dpbmdmYWNlJTJGbXktZmluZXR1bmVkLWJlcnQlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the model to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the model to an organization with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function uh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMiklMEElMEFtb2RlbC5hZGRfbW9kZWxfdGFncyglNUIlMjJjdXN0b20lMjIlMkMlMjAlMjJjdXN0b20tYmVydCUyMiU1RCklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwbW9kZWwlMjB0byUyMHlvdXIlMjBuYW1lc3BhY2UlMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWN1c3RvbS1iZXJ0JTIyLiUwQW1vZGVsLnB1c2hfdG9faHViKCUyMm15LWN1c3RvbS1iZXJ0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

model = AutoModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

model.add_model_tags([<span class="hljs-string">&quot;custom&quot;</span>, <span class="hljs-string">&quot;custom-bert&quot;</span>])

<span class="hljs-comment"># Push the model to your namespace with the name &quot;my-custom-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;my-custom-bert&quot;</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function gh(P){let d,C=`Activate the special <a href="https://huggingface.co/transformers/installation.html#offline-mode" rel="nofollow">“offline-mode”</a> to
use this method in a firewalled environment.`;return{c(){d=r("p"),d.innerHTML=C},l(v){d=a(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-13hahdn"&&(d.innerHTML=C)},m(v,_){b(v,d,_)},p:L,d(v){v&&s(d)}}}function _h(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJlcnRDb25maWclMkMlMjBCZXJ0TW9kZWwlMEElMEElMjMlMjBEb3dubG9hZCUyMG1vZGVsJTIwYW5kJTIwY29uZmlndXJhdGlvbiUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQW1vZGVsJTIwJTNEJTIwQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQSUyMyUyME1vZGVsJTIwd2FzJTIwc2F2ZWQlMjB1c2luZyUyMCpzYXZlX3ByZXRyYWluZWQoJy4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYnKSolMjAoZm9yJTIwZXhhbXBsZSUyMHB1cnBvc2VzJTJDJTIwbm90JTIwcnVubmFibGUpLiUwQW1vZGVsJTIwJTNEJTIwQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjIuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJTIyKSUwQSUyMyUyMFVwZGF0ZSUyMGNvbmZpZ3VyYXRpb24lMjBkdXJpbmclMjBsb2FkaW5nLiUwQW1vZGVsJTIwJTNEJTIwQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS11bmNhc2VkJTIyJTJDJTIwb3V0cHV0X2F0dGVudGlvbnMlM0RUcnVlKSUwQWFzc2VydCUyMG1vZGVsLmNvbmZpZy5vdXRwdXRfYXR0ZW50aW9ucyUyMCUzRCUzRCUyMFRydWUlMEElMjMlMjBMb2FkaW5nJTIwZnJvbSUyMGElMjBURiUyMGNoZWNrcG9pbnQlMjBmaWxlJTIwaW5zdGVhZCUyMG9mJTIwYSUyMFB5VG9yY2glMjBtb2RlbCUyMChzbG93ZXIlMkMlMjBmb3IlMjBleGFtcGxlJTIwcHVycG9zZXMlMkMlMjBub3QlMjBydW5uYWJsZSkuJTBBY29uZmlnJTIwJTNEJTIwQmVydENvbmZpZy5mcm9tX2pzb25fZmlsZSglMjIuJTJGdGZfbW9kZWwlMkZteV90Zl9tb2RlbF9jb25maWcuanNvbiUyMiklMEFtb2RlbCUyMCUzRCUyMEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnRmX21vZGVsJTJGbXlfdGZfY2hlY2twb2ludC5ja3B0LmluZGV4JTIyJTJDJTIwZnJvbV90ZiUzRFRydWUlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTIzJTIwTG9hZGluZyUyMGZyb20lMjBhJTIwRmxheCUyMGNoZWNrcG9pbnQlMjBmaWxlJTIwaW5zdGVhZCUyMG9mJTIwYSUyMFB5VG9yY2glMjBtb2RlbCUyMChzbG93ZXIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBmcm9tX2ZsYXglM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertConfig, BertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Update configuration during loading.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>, output_attentions=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.output_attentions == <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Loading from a TF checkpoint file instead of a PyTorch model (slower, for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config = BertConfig.from_json_file(<span class="hljs-string">&quot;./tf_model/my_tf_model_config.json&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;./tf_model/my_tf_checkpoint.ckpt.index&quot;</span>, from_tf=<span class="hljs-literal">True</span>, config=config)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Loading from a Flax checkpoint file instead of a PyTorch model (slower)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>, from_flax=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function bh(P){let d,C="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){d=r("p"),d.textContent=C},l(v){d=a(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-15rpg4"&&(d.textContent=C)},m(v,_){b(v,d,_)},p:L,d(v){v&&s(d)}}}function vh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMG1vZGVsJTIwdG8lMjB5b3VyJTIwbmFtZXNwYWNlJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFtb2RlbC5wdXNoX3RvX2h1YiglMjJteS1maW5ldHVuZWQtYmVydCUyMiklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwbW9kZWwlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFtb2RlbC5wdXNoX3RvX2h1YiglMjJodWdnaW5nZmFjZSUyRm15LWZpbmV0dW5lZC1iZXJ0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

model = TFAutoModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the model to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the model to an organization with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function yh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJlcnRDb25maWclMkMlMjBURkJlcnRNb2RlbCUwQSUwQSUyMyUyMERvd25sb2FkJTIwbW9kZWwlMjBhbmQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTIwYW5kJTIwY2FjaGUuJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMjMlMjBNb2RlbCUyMHdhcyUyMHNhdmVkJTIwdXNpbmclMjAqc2F2ZV9wcmV0cmFpbmVkKCcuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJykqJTIwKGZvciUyMGV4YW1wbGUlMjBwdXJwb3NlcyUyQyUyMG5vdCUyMHJ1bm5hYmxlKS4lMEFtb2RlbCUyMCUzRCUyMFRGQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjIuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJTIyKSUwQSUyMyUyMFVwZGF0ZSUyMGNvbmZpZ3VyYXRpb24lMjBkdXJpbmclMjBsb2FkaW5nLiUwQW1vZGVsJTIwJTNEJTIwVEZCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUpJTBBYXNzZXJ0JTIwbW9kZWwuY29uZmlnLm91dHB1dF9hdHRlbnRpb25zJTIwJTNEJTNEJTIwVHJ1ZSUwQSUyMyUyMExvYWRpbmclMjBmcm9tJTIwYSUyMFB5dG9yY2glMjBtb2RlbCUyMGZpbGUlMjBpbnN0ZWFkJTIwb2YlMjBhJTIwVGVuc29yRmxvdyUyMGNoZWNrcG9pbnQlMjAoc2xvd2VyJTJDJTIwZm9yJTIwZXhhbXBsZSUyMHB1cnBvc2VzJTJDJTIwbm90JTIwcnVubmFibGUpLiUwQWNvbmZpZyUyMCUzRCUyMEJlcnRDb25maWcuZnJvbV9qc29uX2ZpbGUoJTIyLiUyRnB0X21vZGVsJTJGbXlfcHRfbW9kZWxfY29uZmlnLmpzb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnB0X21vZGVsJTJGbXlfcHl0b3JjaF9tb2RlbC5iaW4lMjIlMkMlMjBmcm9tX3B0JTNEVHJ1ZSUyQyUyMGNvbmZpZyUzRGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertConfig, TFBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Update configuration during loading.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>, output_attentions=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.output_attentions == <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Loading from a Pytorch model file instead of a TensorFlow checkpoint (slower, for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config = BertConfig.from_json_file(<span class="hljs-string">&quot;./pt_model/my_pt_model_config.json&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;./pt_model/my_pytorch_model.bin&quot;</span>, from_pt=<span class="hljs-literal">True</span>, config=config)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function Mh(P){let d,C="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){d=r("p"),d.textContent=C},l(v){d=a(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-15rpg4"&&(d.textContent=C)},m(v,_){b(v,d,_)},p:L,d(v){v&&s(d)}}}function Th(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZsYXhBdXRvTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEZsYXhBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLWNhc2VkJTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjBtb2RlbCUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBbW9kZWwucHVzaF90b19odWIoJTIybXktZmluZXR1bmVkLWJlcnQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMG1vZGVsJTIwdG8lMjBhbiUyMG9yZ2FuaXphdGlvbiUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBbW9kZWwucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FlaxAutoModel

model = FlaxAutoModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the model to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the model to an organization with the name &quot;my-finetuned-bert&quot;.</span>
model.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function xh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJlcnRDb25maWclMkMlMjBGbGF4QmVydE1vZGVsJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBtb2RlbCUyMGFuZCUyMGNvbmZpZ3VyYXRpb24lMjBmcm9tJTIwaHVnZ2luZ2ZhY2UuY28lMjBhbmQlMjBjYWNoZS4lMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLWNhc2VkJTIyKSUwQSUyMyUyME1vZGVsJTIwd2FzJTIwc2F2ZWQlMjB1c2luZyUyMCpzYXZlX3ByZXRyYWluZWQoJy4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYnKSolMjAoZm9yJTIwZXhhbXBsZSUyMHB1cnBvc2VzJTJDJTIwbm90JTIwcnVubmFibGUpLiUwQW1vZGVsJTIwJTNEJTIwRmxheEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRiUyMiklMEElMjMlMjBMb2FkaW5nJTIwZnJvbSUyMGElMjBQeVRvcmNoJTIwY2hlY2twb2ludCUyMGZpbGUlMjBpbnN0ZWFkJTIwb2YlMjBhJTIwUHlUb3JjaCUyMG1vZGVsJTIwKHNsb3dlciUyQyUyMGZvciUyMGV4YW1wbGUlMjBwdXJwb3NlcyUyQyUyMG5vdCUyMHJ1bm5hYmxlKS4lMEFjb25maWclMjAlM0QlMjBCZXJ0Q29uZmlnLmZyb21fanNvbl9maWxlKCUyMi4lMkZwdF9tb2RlbCUyRmNvbmZpZy5qc29uJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnB0X21vZGVsJTJGcHl0b3JjaF9tb2RlbC5iaW4lMjIlMkMlMjBmcm9tX3B0JTNEVHJ1ZSUyQyUyMGNvbmZpZyUzRGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertConfig, FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Loading from a PyTorch checkpoint file instead of a PyTorch model (slower, for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config = BertConfig.from_json_file(<span class="hljs-string">&quot;./pt_model/config.json&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;./pt_model/pytorch_model.bin&quot;</span>, from_pt=<span class="hljs-literal">True</span>, config=config)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function wh(P){let d,C="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){d=r("p"),d.textContent=C},l(v){d=a(v,"P",{"data-svelte-h":!0}),l(d)!=="svelte-15rpg4"&&(d.textContent=C)},m(v,_){b(v,d,_)},p:L,d(v){v&&s(d)}}}function $h(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZsYXhCZXJ0TW9kZWwlMEElMEElMjMlMjBsb2FkJTIwbW9kZWwlMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLWNhc2VkJTIyKSUwQSUyMyUyMEJ5JTIwZGVmYXVsdCUyQyUyMHRoZSUyMG1vZGVsJTIwcGFyYW1ldGVycyUyMHdpbGwlMjBiZSUyMGluJTIwZnAzMiUyMHByZWNpc2lvbiUyQyUyMHRvJTIwY2FzdCUyMHRoZXNlJTIwdG8lMjBiZmxvYXQxNiUyMHByZWNpc2lvbiUwQW1vZGVsLnBhcmFtcyUyMCUzRCUyMG1vZGVsLnRvX2JmMTYobW9kZWwucGFyYW1zKSUwQSUyMyUyMElmJTIweW91JTIwd2FudCUyMGRvbid0JTIwd2FudCUyMHRvJTIwY2FzdCUyMGNlcnRhaW4lMjBwYXJhbWV0ZXJzJTIwKGZvciUyMGV4YW1wbGUlMjBsYXllciUyMG5vcm0lMjBiaWFzJTIwYW5kJTIwc2NhbGUpJTBBJTIzJTIwdGhlbiUyMHBhc3MlMjB0aGUlMjBtYXNrJTIwYXMlMjBmb2xsb3dzJTBBZnJvbSUyMGZsYXglMjBpbXBvcnQlMjB0cmF2ZXJzZV91dGlsJTBBJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMiklMEFmbGF0X3BhcmFtcyUyMCUzRCUyMHRyYXZlcnNlX3V0aWwuZmxhdHRlbl9kaWN0KG1vZGVsLnBhcmFtcyklMEFtYXNrJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwcGF0aCUzQSUyMChwYXRoJTVCLTIlNUQlMjAhJTNEJTIwKCUyMkxheWVyTm9ybSUyMiUyQyUyMCUyMmJpYXMlMjIpJTIwYW5kJTIwcGF0aCU1Qi0yJTNBJTVEJTIwISUzRCUyMCglMjJMYXllck5vcm0lMjIlMkMlMjAlMjJzY2FsZSUyMikpJTBBJTIwJTIwJTIwJTIwZm9yJTIwcGF0aCUyMGluJTIwZmxhdF9wYXJhbXMlMEElN0QlMEFtYXNrJTIwJTNEJTIwdHJhdmVyc2VfdXRpbC51bmZsYXR0ZW5fZGljdChtYXNrKSUwQW1vZGVsLnBhcmFtcyUyMCUzRCUyMG1vZGVsLnRvX2JmMTYobW9kZWwucGFyYW1zJTJDJTIwbWFzayk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model parameters will be in fp32 precision, to cast these to bfloat16 precision</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_bf16(model.params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you want don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(model.params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_bf16(model.params, mask)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function kh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZsYXhCZXJ0TW9kZWwlMEElMEElMjMlMjBsb2FkJTIwbW9kZWwlMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZS1iZXJ0JTJGYmVydC1iYXNlLWNhc2VkJTIyKSUwQSUyMyUyMEJ5JTIwZGVmYXVsdCUyQyUyMHRoZSUyMG1vZGVsJTIwcGFyYW1zJTIwd2lsbCUyMGJlJTIwaW4lMjBmcDMyJTJDJTIwdG8lMjBjYXN0JTIwdGhlc2UlMjB0byUyMGZsb2F0MTYlMEFtb2RlbC5wYXJhbXMlMjAlM0QlMjBtb2RlbC50b19mcDE2KG1vZGVsLnBhcmFtcyklMEElMjMlMjBJZiUyMHlvdSUyMHdhbnQlMjBkb24ndCUyMHdhbnQlMjB0byUyMGNhc3QlMjBjZXJ0YWluJTIwcGFyYW1ldGVycyUyMChmb3IlMjBleGFtcGxlJTIwbGF5ZXIlMjBub3JtJTIwYmlhcyUyMGFuZCUyMHNjYWxlKSUwQSUyMyUyMHRoZW4lMjBwYXNzJTIwdGhlJTIwbWFzayUyMGFzJTIwZm9sbG93cyUwQWZyb20lMjBmbGF4JTIwaW1wb3J0JTIwdHJhdmVyc2VfdXRpbCUwQSUwQW1vZGVsJTIwJTNEJTIwRmxheEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBZmxhdF9wYXJhbXMlMjAlM0QlMjB0cmF2ZXJzZV91dGlsLmZsYXR0ZW5fZGljdChtb2RlbC5wYXJhbXMpJTBBbWFzayUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMHBhdGglM0ElMjAocGF0aCU1Qi0yJTVEJTIwISUzRCUyMCglMjJMYXllck5vcm0lMjIlMkMlMjAlMjJiaWFzJTIyKSUyMGFuZCUyMHBhdGglNUItMiUzQSU1RCUyMCElM0QlMjAoJTIyTGF5ZXJOb3JtJTIyJTJDJTIwJTIyc2NhbGUlMjIpKSUwQSUyMCUyMCUyMCUyMGZvciUyMHBhdGglMjBpbiUyMGZsYXRfcGFyYW1zJTBBJTdEJTBBbWFzayUyMCUzRCUyMHRyYXZlcnNlX3V0aWwudW5mbGF0dGVuX2RpY3QobWFzayklMEFtb2RlbC5wYXJhbXMlMjAlM0QlMjBtb2RlbC50b19mcDE2KG1vZGVsLnBhcmFtcyUyQyUyMG1hc2sp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to cast these to float16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_fp16(model.params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you want don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(model.params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_fp16(model.params, mask)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function jh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZsYXhCZXJ0TW9kZWwlMEElMEElMjMlMjBEb3dubG9hZCUyMG1vZGVsJTIwYW5kJTIwY29uZmlndXJhdGlvbiUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUwQW1vZGVsJTIwJTNEJTIwRmxheEJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTIzJTIwQnklMjBkZWZhdWx0JTJDJTIwdGhlJTIwbW9kZWwlMjBwYXJhbXMlMjB3aWxsJTIwYmUlMjBpbiUyMGZwMzIlMkMlMjB0byUyMGlsbHVzdHJhdGUlMjB0aGUlMjB1c2UlMjBvZiUyMHRoaXMlMjBtZXRob2QlMkMlMEElMjMlMjB3ZSdsbCUyMGZpcnN0JTIwY2FzdCUyMHRvJTIwZnAxNiUyMGFuZCUyMGJhY2slMjB0byUyMGZwMzIlMEFtb2RlbC5wYXJhbXMlMjAlM0QlMjBtb2RlbC50b19mMTYobW9kZWwucGFyYW1zKSUwQSUyMyUyMG5vdyUyMGNhc3QlMjBiYWNrJTIwdG8lMjBmcDMyJTBBbW9kZWwucGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fZnAzMihtb2RlbC5wYXJhbXMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to illustrate the use of this method,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># we&#x27;ll first cast to fp16 and back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_f16(model.params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now cast back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.params = model.to_fp32(model.params)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function Jh(P){let d,C="Examples:",v,_,$;return _=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMCU3Qm9iamVjdF9jbGFzcyU3RCUwQSUwQSU3Qm9iamVjdCU3RCUyMCUzRCUyMCU3Qm9iamVjdF9jbGFzcyU3RC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMCU3Qm9iamVjdCU3RCUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBJTdCb2JqZWN0JTdELnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjAlN0JvYmplY3QlN0QlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEElN0JvYmplY3QlN0QucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> {object_class}

{<span class="hljs-built_in">object</span>} = {object_class}.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the {object} to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
{<span class="hljs-built_in">object</span>}.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the {object} to an organization with the name &quot;my-finetuned-bert&quot;.</span>
{<span class="hljs-built_in">object</span>}.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`,wrap:!1}}),{c(){d=r("p"),d.textContent=C,v=o(),m(_.$$.fragment)},l(i){d=a(i,"P",{"data-svelte-h":!0}),l(d)!=="svelte-kvfsh7"&&(d.textContent=C),v=n(i),p(_.$$.fragment,i)},m(i,J){b(i,d,J),b(i,v,J),h(_,i,J),$=!0},p:L,i(i){$||(f(_.$$.fragment,i),$=!0)},o(i){u(_.$$.fragment,i),$=!1},d(i){i&&(s(d),s(v)),g(_,i)}}}function Ch(P){let d,C,v,_,$,i,J,Nc='ベースクラスである <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>、<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>、<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a> は、モデルの読み込みと保存に関する共通のメソッドを実装しており、これはローカルのファイルやディレクトリから、またはライブラリが提供する事前学習モデル構成（HuggingFaceのAWS S3リポジトリからダウンロード）からモデルを読み込むために使用できます。',Aa,xt,Yc='<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> と <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> は、次の共通のメソッドも実装しています：',Sa,wt,Dc="<li>語彙に新しいトークンが追加された場合に、入力トークン埋め込みのリサイズを行う</li> <li>モデルのアテンションヘッドを刈り込む</li>",Oa,$t,Qc='各モデルに共通するその他のメソッドは、<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.modeling_utils.ModuleUtilsMixin">ModuleUtilsMixin</a>（PyTorchモデル用）および<code>~modeling_tf_utils.TFModuleUtilsMixin</code>（TensorFlowモデル用）で定義されており、テキスト生成の場合、<a href="/docs/transformers/pr_30530/ja/main_classes/text_generation#transformers.GenerationMixin">GenerationMixin</a>（PyTorchモデル用）、<a href="/docs/transformers/pr_30530/ja/main_classes/text_generation#transformers.TFGenerationMixin">TFGenerationMixin</a>（TensorFlowモデル用）、および<a href="/docs/transformers/pr_30530/ja/main_classes/text_generation#transformers.FlaxGenerationMixin">FlaxGenerationMixin</a>（Flax/JAXモデル用）もあります。',Ka,kt,es,w,jt,vi,Pn,Ac="Base class for all models.",yi,Zn,Sc=`<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models as well as a few methods common to all models to:`,Mi,Fn,Oc="<li>resize the input embeddings,</li> <li>prune heads in the self-attention heads.</li>",Ti,In,Kc="Class attributes (overridden by derived classes):",xi,Wn,em=`<li><p><strong>config_class</strong> (<a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> to use as configuration class
for this model architecture.</p></li> <li><p><strong>load_tf_weights</strong> (<code>Callable</code>) — A python <em>method</em> for loading a TensorFlow checkpoint in a PyTorch model,
taking as arguments:</p> <ul><li><strong>model</strong> (<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>) — An instance of the model on which to load the TensorFlow checkpoint.</li> <li><strong>config</strong> (<code>PreTrainedConfig</code>) — An instance of the configuration associated to the model.</li> <li><strong>path</strong> (<code>str</code>) — A path to the TensorFlow checkpoint.</li></ul></li> <li><p><strong>base_model_prefix</strong> (<code>str</code>) — A string indicating the attribute associated to the base model in derived
classes of the same architecture adding modules on top of the base model.</p></li> <li><p><strong>is_parallelizable</strong> (<code>bool</code>) — A flag indicating whether this model supports model parallelization.</p></li> <li><p><strong>main_input_name</strong> (<code>str</code>) — The name of the principal input to the model (often <code>input_ids</code> for NLP
models, <code>pixel_values</code> for vision models and <code>input_values</code> for speech models).</p></li>`,wi,Q,Jt,$i,Gn,tm="Upload the model file to the 🤗 Model Hub.",ki,_e,ji,A,Ct,Ji,Bn,om=`Add custom tags into the model that gets pushed to the Hugging Face Hub. Will
not overwrite existing tags in the model.`,Ci,be,Ui,ve,Ut,Pi,Ln,nm="Returns whether this model can generate sequences with <code>.generate()</code>.",Zi,ye,Pt,Fi,zn,rm=`Potentially dequantize the model in case it has been quantized by a quantization method that support
dequantization.`,Ii,Me,Zt,Wi,Vn,am="Removes the <code>_require_grads_hook</code>.",Gi,Te,Ft,Bi,Hn,sm=`Enables the gradients for the input embeddings. This is useful for fine-tuning adapter weights while keeping
the model weights fixed.`,Li,Z,It,zi,qn,im="Instantiate a pretrained pytorch model from a pre-trained model configuration.",Vi,Xn,lm=`The model is set in evaluation mode by default using <code>model.eval()</code> (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with <code>model.train()</code>.`,Hi,Rn,dm=`The warning <em>Weights from XXX not initialized from pretrained model</em> means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`,qi,En,cm=`The warning <em>Weights from XXX not used in YYY</em> means that the layer XXX is not used by YYY, therefore those
weights are discarded.`,Xi,Nn,mm=`If model weights are the same precision as the base model (and is a supported model), weights will be lazily loaded
in using the <code>meta</code> device and brought into memory once an input is passed through that layer regardless of
<code>low_cpu_mem_usage</code>.`,Ri,xe,Ei,we,Ni,Yn,pm="<li><code>low_cpu_mem_usage</code> algorithm:</li>",Yi,Dn,hm="This is an experimental function that loads the model using ~1x model size CPU memory",Di,Qn,fm="Here is how it works:",Qi,An,um=`<li>save which state_dict keys we have</li> <li>drop state_dict before the model is created, since the latter takes 1x model size CPU memory</li> <li>after the model has been instantiated switch to the meta device all params/buffers that
are going to be replaced from the loaded state_dict</li> <li>load state_dict 2nd time</li> <li>replace the params/buffers from the state_dict</li>`,Ai,Sn,gm="Currently, it can’t handle deepspeed ZeRO stage 3 and ignores loading errors",Si,$e,Wt,Oi,On,_m="Returns the model’s input embeddings.",Ki,ke,Gt,el,Kn,bm=`Get the memory footprint of a model. This will return the memory footprint of the current model in bytes.
Useful to benchmark the memory footprint of the current model and design some tests. Solution inspired from the
PyTorch discussions: <a href="https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2" rel="nofollow">https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2</a>`,tl,je,Bt,ol,er,vm="Returns the model’s output embeddings.",nl,S,Lt,rl,tr,ym="Deactivates gradient checkpointing for the current model.",al,or,Mm=`Note that in other frameworks this feature can be referred to as “activation checkpointing” or “checkpoint
activations”.`,sl,H,zt,il,nr,Tm="Activates gradient checkpointing for the current model.",ll,rr,xm=`Note that in other frameworks this feature can be referred to as “activation checkpointing” or “checkpoint
activations”.`,dl,ar,wm=`We pass the <code>__call__</code> method of the modules instead of <code>forward</code> because <code>__call__</code> attaches all the hooks of
the module. <a href="https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690/2" rel="nofollow">https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690/2</a>`,cl,Je,Vt,ml,sr,$m=`If needed prunes and maybe initializes weights. If using a custom <code>PreTrainedModel</code>, you need to implement any
initialization logic in <code>_init_weights</code>.`,pl,Ce,Ht,hl,ir,km=`A method executed at the end of each Transformer model initialization, to execute code that needs the model’s
modules properly initialized (such as weight initialization).`,fl,Ue,qt,ul,lr,jm="Prunes heads of the base model.",gl,O,Xt,_l,dr,Jm=`Register this class with a given auto class. This should only be used for custom models as the ones in the
library are already mapped with an auto class.`,bl,Pe,vl,K,Rt,yl,cr,Cm="Resizes input token embeddings matrix of the model if <code>new_num_tokens != config.vocab_size</code>.",Ml,mr,Um="Takes care of tying weights embeddings afterwards if the model class has a <code>tie_weights()</code> method.",Tl,Ze,Et,xl,pr,Pm=`Reverts the transformation from <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.to_bettertransformer">to_bettertransformer()</a> so that the original modeling is
used, for example in order to save the model.`,wl,Fe,Nt,$l,hr,Zm=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> class method.`,kl,Ie,Yt,jl,fr,Fm="Set model’s input embeddings.",Jl,ee,Dt,Cl,ur,Im="Tie the weights between the input embeddings and the output embeddings.",Ul,gr,Wm=`If the <code>torchscript</code> flag is set in the configuration, can’t handle parameter sharing so we are cloning the
weights instead.`,Pl,te,Qt,Zl,_r,Gm=`Converts the model to use <a href="https://pytorch.org/docs/stable/generated/torch.nn.MultiheadAttention.html" rel="nofollow">PyTorch’s native attention
implementation</a>, integrated to
Transformers through <a href="https://huggingface.co/docs/optimum/bettertransformer/overview" rel="nofollow">Optimum library</a>. Only a
subset of all Transformers models are supported.`,Fl,br,Bm=`PyTorch’s attention fastpath allows to speed up inference through kernel fusions and the use of <a href="https://pytorch.org/docs/stable/nested.html" rel="nofollow">nested
tensors</a>. Detailed benchmarks can be found in <a href="https://medium.com/pytorch/bettertransformer-out-of-the-box-performance-for-huggingface-transformers-3fbe27d50ab2" rel="nofollow">this blog
post</a>.`,Il,We,At,Wl,vr,Lm="Shows a one-time warning if the input_ids appear to contain padding and no attention mask was given.",ts,yr,os,St,ns,Ot,zm='Transformers 4.20.0では、<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> メソッドが再設計され、<a href="https://huggingface.co/docs/accelerate/big_modeling" rel="nofollow">Accelerate</a> を使用して大規模モデルを扱うことが可能になりました。これには Accelerate &gt;= 0.9.0 と PyTorch &gt;= 1.9.0 が必要です。以前の方法でフルモデルを作成し、その後事前学習の重みを読み込む代わりに（これにはメモリ内のモデルサイズが2倍必要で、ランダムに初期化されたモデル用と重み用の2つが必要でした）、モデルを空の外殻として作成し、事前学習の重みが読み込まれるときにパラメーターを実体化するオプションが追加されました。',rs,Kt,Vm="このオプションは <code>low_cpu_mem_usage=True</code> で有効にできます。モデルはまず空の重みを持つメタデバイス上に作成され、その後状態辞書が内部に読み込まれます（シャードされたチェックポイントの場合、シャードごとに読み込まれます）。この方法で使用される最大RAMは、モデルの完全なサイズだけです。",as,eo,ss,to,Hm="さらに、モデルが完全にRAMに収まらない場合（現時点では推論のみ有効）、異なるデバイスにモデルを直接配置できます。<code>device_map=&quot;auto&quot;</code> を使用すると、Accelerateは各レイヤーをどのデバイスに配置するかを決定し、最速のデバイス（GPU）を最大限に活用し、残りの部分をCPU、あるいはGPU RAMが不足している場合はハードドライブにオフロードします。モデルが複数のデバイスに分割されていても、通常どおり実行されます。",is,oo,qm="<code>device_map</code> を渡す際、<code>low_cpu_mem_usage</code> は自動的に <code>True</code> に設定されるため、それを指定する必要はありません。",ls,no,ds,ro,Xm="モデルがデバイス間でどのように分割されたかは、その <code>hf_device_map</code> 属性を見ることで確認できます:",cs,ao,ms,so,ps,io,Rm="同じフォーマットに従って、独自のデバイスマップを作成することもできます（レイヤー名からデバイスへの辞書です）。モデルのすべてのパラメータを指定されたデバイスにマップする必要がありますが、1つのレイヤーが完全に同じデバイスにある場合、そのレイヤーのサブモジュールのすべてがどこに行くかの詳細を示す必要はありません。例えば、次のデバイスマップはT0ppに適しています（GPUメモリがある場合）:",hs,lo,fs,co,Em="モデルのメモリへの影響を最小限に抑えるもう 1 つの方法は、低精度の dtype (<code>torch.float16</code> など) でモデルをインスタンス化するか、以下で説明する直接量子化手法を使用することです。",us,mo,gs,po,Nm=`Pytorch では、モデルは通常 <code>torch.float32</code> 形式でインスタンス化されます。これは、しようとすると問題になる可能性があります
重みが fp16 にあるモデルをロードすると、2 倍のメモリが必要になるためです。この制限を克服するには、次のことができます。
<code>torch_dtype</code> 引数を使用して、目的の <code>dtype</code> を明示的に渡します。`,_s,ho,bs,fo,Ym=`または、モデルを常に最適なメモリ パターンでロードしたい場合は、特別な値 <code>&quot;auto&quot;</code> を使用できます。
そして、<code>dtype</code> はモデルの重みから自動的に導出されます。`,vs,uo,ys,go,Dm="スクラッチからインスタンス化されたモデルには、どの <code>dtype</code> を使用するかを指示することもできます。",Ms,_o,Ts,bo,Qm="Pytorch の設計により、この機能は浮動小数点 dtype でのみ使用できます。",xs,vo,ws,W,yo,Gl,Mr,Am="A few utilities for <code>torch.nn.Modules</code>, to be used as a mixin.",Bl,oe,Mo,Ll,Tr,Sm="Add a memory hook before and after each sub-module forward pass to record increase in memory consumption.",zl,xr,Om=`Increase in memory consumption is stored in a <code>mem_rss_diff</code> attribute for each module and can be reset to zero
with <code>model.reset_memory_hooks_state()</code>.`,Vl,Ge,To,Hl,wr,Km="Helper function to estimate the total number of tokens from the model inputs.",ql,Be,xo,Xl,$r,ep=`Get number of (optionally, non-embeddings) floating-point operations for the forward and backward passes of a
batch with this transformer model. Default approximation neglects the quadratic dependency on the number of
tokens (valid if <code>12 * d_model &lt;&lt; sequence_length</code>) as laid out in <a href="https://arxiv.org/pdf/2001.08361.pdf" rel="nofollow">this
paper</a> section 2.1. Should be overridden for transformers with parameter
re-use e.g. Albert or Universal Transformers, or if doing long-range modeling with very high sequence lengths.`,Rl,Le,wo,El,kr,tp="Makes broadcastable attention and causal masks so that future and masked tokens are ignored.",Nl,ze,$o,Yl,jr,op="Prepare the head mask if needed.",Dl,Ve,ko,Ql,Jr,np="Invert an attention mask (e.g., switches 0. and 1.).",Al,He,jo,Sl,Cr,rp="Get number of (optionally, trainable or non-embeddings) parameters in the module.",Ol,qe,Jo,Kl,Ur,ap='Reset the <code>mem_rss_diff</code> attribute of each module (see <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.modeling_utils.ModuleUtilsMixin.add_memory_hooks">add_memory_hooks()</a>).',$s,Co,ks,x,Uo,ed,Pr,sp="Base class for all TF models.",td,Zr,ip=`<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models as well as a few methods common to all models to:`,od,Fr,lp="<li>resize the input embeddings,</li> <li>prune heads in the self-attention heads.</li>",nd,Ir,dp="Class attributes (overridden by derived classes):",rd,Wr,cp=`<li><strong>config_class</strong> (<a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> to use as configuration class
for this model architecture.</li> <li><strong>base_model_prefix</strong> (<code>str</code>) — A string indicating the attribute associated to the base model in derived
classes of the same architecture adding modules on top of the base model.</li> <li><strong>main_input_name</strong> (<code>str</code>) — The name of the principal input to the model (often <code>input_ids</code> for NLP
models, <code>pixel_values</code> for vision models and <code>input_values</code> for speech models).</li>`,ad,ne,Po,sd,Gr,mp="Upload the model files to the 🤗 Model Hub while synchronizing a local clone of the repo in <code>repo_path_or_name</code>.",id,Xe,ld,Re,Zo,dd,Br,pp="Returns whether this model can generate sequences with <code>.generate()</code>.",cd,Ee,Fo,md,Lr,hp=`This is a thin wrapper that sets the model’s loss output head as the loss if the user does not specify a loss
function themselves.`,pd,Ne,Io,hd,zr,fp="Creates a draft of a model card using the information available to the <code>Trainer</code>.",fd,z,Wo,ud,Vr,up="Instantiate a pretrained TF 2.0 model from a pre-trained model configuration.",gd,Hr,gp=`The warning <em>Weights from XXX not initialized from pretrained model</em> means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`,_d,qr,_p=`The warning <em>Weights from XXX not used in YYY</em> means that the layer XXX is not used by YYY, therefore those
weights are discarded.`,bd,Ye,vd,De,Go,yd,Xr,bp="Dict of bias attached to an LM head. The key represents the name of the bias attribute.",Md,Qe,Bo,Td,Rr,vp="Prepare the head mask if needed.",xd,Ae,Lo,wd,Er,yp="Returns the model’s input embeddings layer.",$d,Se,zo,kd,Nr,Mp="The LM Head layer. This method must be overwritten by all the models that have a lm head.",jd,Oe,Vo,Jd,Yr,Tp="Returns the model’s output embeddings",Cd,Ke,Ho,Ud,Dr,xp=`Get the layer that handles a bias attribute in case the model has an LM head with weights tied to the
embeddings`,Pd,et,qo,Zd,Qr,wp="Get the concatenated _prefix name of the bias from the model name to the parent layer",Fd,tt,Xo,Id,Ar,$p=`Wraps a HuggingFace <code>Dataset</code> as a <code>tf.data.Dataset</code> with collation and batching. This method is
designed to create a “ready-to-use” dataset that can be passed directly to Keras methods like <code>fit()</code> without
further modification. The method will drop columns from the dataset if they don’t match input names for the
model. If you want to specify the column names to return rather than using the names that match this model, we
recommend using <code>Dataset.to_tf_dataset()</code> instead.`,Wd,ot,Ro,Gd,Sr,kp="Prunes heads of the base model.",Bd,re,Eo,Ld,Or,jp=`Register this class with a given auto class. This should only be used for custom models as the ones in the
library are already mapped with an auto class.`,zd,nt,Vd,ae,No,Hd,Kr,Jp="Resizes input token embeddings matrix of the model if <code>new_num_tokens != config.vocab_size</code>.",qd,ea,Cp="Takes care of tying weights embeddings afterwards if the model class has a <code>tie_weights()</code> method.",Xd,rt,Yo,Rd,ta,Up=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> class method.`,Ed,oa,Do,Nd,at,Qo,Yd,na,Pp="Prepare the output of the saved model. Can be overridden if specific serving modifications are required.",Dd,st,Ao,Qd,ra,Zp="Set all the bias in the LM head.",Ad,it,So,Sd,aa,Fp="Set model’s input embeddings",Od,lt,Oo,Kd,sa,Ip="Set model’s output embeddings",ec,dt,Ko,tc,ia,Wp=`A modification of Keras’s default <code>train_step</code> that correctly handles matching outputs to labels for our models
and supports directly training on the loss output head. In addition, it ensures input keys are copied to the
labels where appropriate. It will also copy label keys into the input dict when using the dummy loss, to ensure
that they are available to the model during the forward pass.`,oc,ct,en,nc,la,Gp=`A modification of Keras’s default <code>train_step</code> that correctly handles matching outputs to labels for our models
and supports directly training on the loss output head. In addition, it ensures input keys are copied to the
labels where appropriate. It will also copy label keys into the input dict when using the dummy loss, to ensure
that they are available to the model during the forward pass.`,js,tn,Js,R,on,rc,da,Bp="A few utilities for <code>keras.Model</code>, to be used as a mixin.",ac,mt,nn,sc,ca,Lp="Get the number of (optionally, trainable) parameters in the model.",Cs,rn,Us,U,an,ic,ma,zp="Base class for all models.",lc,pa,Vp=`<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a> takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`,dc,ha,Hp="Class attributes (overridden by derived classes):",cc,fa,qp=`<li><strong>config_class</strong> (<a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> to use as configuration class
for this model architecture.</li> <li><strong>base_model_prefix</strong> (<code>str</code>) — A string indicating the attribute associated to the base model in derived
classes of the same architecture adding modules on top of the base model.</li> <li><strong>main_input_name</strong> (<code>str</code>) — The name of the principal input to the model (often <code>input_ids</code> for NLP
models, <code>pixel_values</code> for vision models and <code>input_values</code> for speech models).</li>`,mc,se,sn,pc,ua,Xp="Upload the model checkpoint to the 🤗 Model Hub.",hc,pt,fc,ht,ln,uc,ga,Rp=`Returns whether this model can generate sequences with <code>.generate()</code>. Returns:
<code>bool</code>: Whether this model can generate sequences with <code>.generate()</code>.`,gc,V,dn,_c,_a,Ep="Instantiate a pretrained flax model from a pre-trained model configuration.",bc,ba,Np=`The warning <em>Weights from XXX not initialized from pretrained model</em> means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`,vc,va,Yp=`The warning <em>Weights from XXX not used in YYY</em> means that the layer XXX is not used by YYY, therefore those
weights are discarded.`,yc,ft,Mc,ie,cn,Tc,ya,Dp=`This is the same as <code>flax.serialization.from_bytes</code>
(https:lax.readthedocs.io/en/latest/_modules/flax/serialization.html#from_bytes) but for a sharded checkpoint.`,xc,Ma,Qp=`This load is performed efficiently: each checkpoint shard is loaded one by one in RAM and deleted after being
loaded in the model.`,wc,le,mn,$c,Ta,Ap=`Register this class with a given auto class. This should only be used for custom models as the ones in the
library are already mapped with an auto class.`,kc,ut,jc,gt,pn,Jc,xa,Sp=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<code>[from_pretrained()](/docs/transformers/pr_30530/ja/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained)</code> class method`,Cc,q,hn,Uc,wa,Op=`Cast the floating-point <code>params</code> to <code>jax.numpy.bfloat16</code>. This returns a new <code>params</code> tree and does not cast
the <code>params</code> in place.`,Pc,$a,Kp=`This method can be used on TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`,Zc,_t,Fc,X,fn,Ic,ka,eh=`Cast the floating-point <code>parmas</code> to <code>jax.numpy.float16</code>. This returns a new <code>params</code> tree and does not cast the
<code>params</code> in place.`,Wc,ja,th=`This method can be used on GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`,Gc,bt,Bc,de,un,Lc,Ja,oh=`Cast the floating-point <code>parmas</code> to <code>jax.numpy.float32</code>. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new <code>params</code> tree and does not cast the <code>params</code> in place.`,zc,vt,Ps,gn,Zs,E,_n,Vc,Ca,nh="A Mixin containing the functionality to push a model or tokenizer to the hub.",Hc,ce,bn,qc,Ua,rh="Upload the {object_files} to the 🤗 Model Hub.",Xc,yt,Fs,vn,Is,N,yn,Rc,Pa,ah=`This is the same as
<a href="https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=load_state_dict#torch.nn.Module.load_state_dict" rel="nofollow"><code>torch.nn.Module.load_state_dict</code></a>
but for a sharded checkpoint.`,Ec,Za,sh=`This load is performed efficiently: each checkpoint shard is loaded one by one in RAM and deleted after being
loaded in the model.`,Ws,Mn,Gs,Qa,Bs;return $=new he({props:{title:"Models",local:"models",headingTag:"h1"}}),kt=new he({props:{title:"PreTrainedModel",local:"transformers.PreTrainedModel",headingTag:"h2"}}),jt=new T({props:{name:"class transformers.PreTrainedModel",anchor:"transformers.PreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1269"}}),Jt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedModel.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional = None"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": str = None"},{name:"commit_description",val:": str = None"},{name:"tags",val:": Optional = None"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedModel.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your model to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PreTrainedModel.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.PreTrainedModel.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload model&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PreTrainedModel.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.PreTrainedModel.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.PreTrainedModel.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;5GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>). We default it to <code>&quot;5GB&quot;</code> so that users can easily load models on free-tier
Google Colab instances without any CPU OOM issues.`,name:"max_shard_size"},{anchor:"transformers.PreTrainedModel.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.PreTrainedModel.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"},{anchor:"transformers.PreTrainedModel.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"},{anchor:"transformers.PreTrainedModel.push_to_hub.commit_description",description:`<strong>commit_description</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The description of the commit that will be created`,name:"commit_description"},{anchor:"transformers.PreTrainedModel.push_to_hub.tags",description:`<strong>tags</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tags to push on the Hub.`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/utils/hub.py#L809"}}),_e=new D({props:{anchor:"transformers.PreTrainedModel.push_to_hub.example",$$slots:{default:[fh]},$$scope:{ctx:P}}}),Ct=new T({props:{name:"add_model_tags",anchor:"transformers.PreTrainedModel.add_model_tags",parameters:[{name:"tags",val:": Union"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.add_model_tags.tags",description:`<strong>tags</strong> (<code>Union[List[str], str]</code>) &#x2014;
The desired tags to inject in the model`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1399"}}),be=new D({props:{anchor:"transformers.PreTrainedModel.add_model_tags.example",$$slots:{default:[uh]},$$scope:{ctx:P}}}),Ut=new T({props:{name:"can_generate",anchor:"transformers.PreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1581",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Whether this model can generate sequences with <code>.generate()</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>bool</code></p>
`}}),Pt=new T({props:{name:"dequantize",anchor:"transformers.PreTrainedModel.dequantize",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1381"}}),Zt=new T({props:{name:"disable_input_require_grads",anchor:"transformers.PreTrainedModel.disable_input_require_grads",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1726"}}),Ft=new T({props:{name:"enable_input_require_grads",anchor:"transformers.PreTrainedModel.enable_input_require_grads",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1715"}}),It=new T({props:{name:"from_pretrained",anchor:"transformers.PreTrainedModel.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"*model_args",val:""},{name:"config",val:": Union = None"},{name:"cache_dir",val:": Union = None"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Union = None"},{name:"revision",val:": str = 'main'"},{name:"use_safetensors",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedModel.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.</li>
<li>A path to a <em>directory</em> containing model weights saved using
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.save_pretrained">save_pretrained()</a>, e.g., <code>./my_model_directory/</code>.</li>
<li>A path or url to a <em>tensorflow index checkpoint file</em> (e.g, <code>./tf_model/model.ckpt.index</code>). In
this case, <code>from_tf</code> should be set to <code>True</code> and a configuration object should be provided as
<code>config</code> argument. This loading path is slower than converting the TensorFlow checkpoint in a
PyTorch model using the provided conversion scripts and loading the PyTorch model afterwards.</li>
<li>A path or url to a model folder containing a <em>flax checkpoint file</em> in <em>.msgpack</em> format (e.g,
<code>./flax_model/</code> containing <code>flax_model.msgpack</code>). In this case, <code>from_flax</code> should be set to
<code>True</code>.</li>
<li><code>None</code> if you are both providing the configuration and state dictionary (resp. with keyword
arguments <code>config</code> and <code>state_dict</code>).</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.PreTrainedModel.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments will be passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"transformers.PreTrainedModel.from_pretrained.config",description:`<strong>config</strong> (<code>Union[PretrainedConfig, str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>an instance of a class derived from <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string or path valid as input to <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>.</li>
</ul>
<p>Configuration for the model to use instead of an automatically loaded configuration. Configuration can
be automatically loaded when:</p>
<ul>
<li>The model is a model provided by the library (loaded with the <em>model id</em> string of a pretrained
model).</li>
<li>The model was saved using <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.save_pretrained">save_pretrained()</a> and is reloaded by supplying the
save directory.</li>
<li>The model is loaded by supplying a local directory as <code>pretrained_model_name_or_path</code> and a
configuration JSON file named <em>config.json</em> is found in the directory.</li>
</ul>`,name:"config"},{anchor:"transformers.PreTrainedModel.from_pretrained.state_dict",description:`<strong>state_dict</strong> (<code>Dict[str, torch.Tensor]</code>, <em>optional</em>) &#x2014;
A state dictionary to use instead of a state dictionary loaded from saved weights file.</p>
<p>This option can be used if you want to create a model from a pretrained configuration but load your own
weights. In this case though, you should check if using <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> is not a simpler option.`,name:"state_dict"},{anchor:"transformers.PreTrainedModel.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.PreTrainedModel.from_pretrained.from_tf",description:`<strong>from_tf</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a TensorFlow checkpoint save file (see docstring of
<code>pretrained_model_name_or_path</code> argument).`,name:"from_tf"},{anchor:"transformers.PreTrainedModel.from_pretrained.from_flax",description:`<strong>from_flax</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a Flax checkpoint save file (see docstring of
<code>pretrained_model_name_or_path</code> argument).`,name:"from_flax"},{anchor:"transformers.PreTrainedModel.from_pretrained.ignore_mismatched_sizes",description:`<strong>ignore_mismatched_sizes</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to raise an error if some of the weights from the checkpoint do not have the same size
as the weights of the model (if for instance, you are instantiating a model with 10 labels from a
checkpoint with 3 labels).`,name:"ignore_mismatched_sizes"},{anchor:"transformers.PreTrainedModel.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.
resume_download &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"force_download"},{anchor:"transformers.PreTrainedModel.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"transformers.PreTrainedModel.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"transformers.PreTrainedModel.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"transformers.PreTrainedModel.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.PreTrainedModel.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>To test a pull request you made on the Hub, you can pass \`revision=&#x201C;refs/pr/<pr_number>&#x201C;.</pr_number></p>

					</div>`,name:"revision"},{anchor:"transformers.PreTrainedModel.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"},{anchor:"transformers.PreTrainedModel.from_pretrained._fast_init(bool,",description:`<strong>_fast_init(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to disable fast initialization.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>One should only disable <em>_fast_init</em> to ensure backwards compatibility with <code>transformers.__version__ &lt; 4.6.0</code> for seeded model initialization. This argument will be removed at the next major version. See
<a href="https://github.com/huggingface/transformers/pull/11471" rel="nofollow">pull request 11471</a> for more information.</p>

					</div>`,name:"_fast_init(bool,"},{anchor:"transformers.PreTrainedModel.from_pretrained.attn_implementation",description:`<strong>attn_implementation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The attention implementation to use in the model (if relevant). Can be any of <code>&quot;eager&quot;</code> (manual implementation of the attention), <code>&quot;sdpa&quot;</code> (using <a href="https://pytorch.org/docs/master/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow"><code>F.scaled_dot_product_attention</code></a>), or <code>&quot;flash_attention_2&quot;</code> (using <a href="https://github.com/Dao-AILab/flash-attention" rel="nofollow">Dao-AILab/flash-attention</a>). By default, if available, SDPA will be used for torch&gt;=2.1.1. The default is otherwise the manual <code>&quot;eager&quot;</code> implementation.`,name:"attn_implementation"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2870",parameterGroups:[{title:"Parameters for big model inference",parametersDescription:[{anchor:"transformers.PreTrainedModel.from_pretrained.low_cpu_mem_usage(bool,",description:`<strong>low_cpu_mem_usage(<code>bool</code>,</strong> <em>optional</em>) &#x2014;
Tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Generally should be combined with a <code>device_map</code> (such as <code>&quot;auto&quot;</code>) for best results.
This is an experimental feature and a subject to change at any moment.</p>

If the model weights are in the same precision as the model loaded in, \`low_cpu_mem_usage\` (without
\`device_map\`) is redundant and will not provide any benefit in regards to CPU memory usage. However,
this should still be enabled if you are passing in a \`device_map\`.`,name:"low_cpu_mem_usage(bool,"},{anchor:"transformers.PreTrainedModel.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model under a specific <code>dtype</code>. The different options
are:</p>
<ol>
<li>
<p><code>torch.float16</code> or <code>torch.bfloat16</code> or <code>torch.float</code>: load in a specified
<code>dtype</code>, ignoring the model&#x2019;s <code>config.torch_dtype</code> if one exists. If not specified</p>
<ul>
<li>the model will get loaded in <code>torch.float</code> (fp32).</li>
</ul>
</li>
<li>
<p><code>&quot;auto&quot;</code> - A <code>torch_dtype</code> entry in the <code>config.json</code> file of the model will be
attempted to be used. If this entry isn&#x2019;t found then next check the <code>dtype</code> of the first weight in
the checkpoint that&#x2019;s of a floating point type and use that as <code>dtype</code>. This will load the model
using the <code>dtype</code> it was saved in at the end of the training. It can&#x2019;t be used as an indicator of how
the model was trained. Since it could be trained in one of half precision dtypes, but saved in fp32.</p>
</li>
<li>
<p>A string that is a valid <code>torch.dtype</code>. E.g. &#x201C;float32&#x201D; loads the model in <code>torch.float32</code>, &#x201C;float16&#x201D; loads in <code>torch.float16</code> etc.</p>
</li>
</ol>
<tip>
<p>For some models the <code>dtype</code> they were trained in is unknown - you may try to check the model&#x2019;s paper or
reach out to the authors and ask them to add this information to the model&#x2019;s card and to insert the
<code>torch_dtype</code> entry in <code>config.json</code> on the hub.</p>
</tip>`,name:"torch_dtype"},{anchor:"transformers.PreTrainedModel.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code> or <code>int</code> or <code>torch.device</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be refined to each
parameter/buffer name, once a given module name is inside, every submodule of it will be sent to the
same device. If we only pass the device (<em>e.g.</em>, <code>&quot;cpu&quot;</code>, <code>&quot;cuda:1&quot;</code>, <code>&quot;mps&quot;</code>, or a GPU ordinal rank
like <code>1</code>) on which the model will be allocated, the device map will map the entire model to this
device. Passing <code>device_map = 0</code> means put the whole model on GPU 0.</p>
<p>To have Accelerate compute the most optimized <code>device_map</code> automatically, set <code>device_map=&quot;auto&quot;</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"transformers.PreTrainedModel.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier to maximum memory. Will default to the maximum memory available for each
GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"transformers.PreTrainedModel.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
If the <code>device_map</code> contains any value <code>&quot;disk&quot;</code>, the folder where we will offload weights.`,name:"offload_folder"},{anchor:"transformers.PreTrainedModel.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, will temporarily offload the CPU state dict to the hard drive to avoid getting out of CPU
RAM if the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to
<code>True</code> when there is some disk offload.`,name:"offload_state_dict"},{anchor:"transformers.PreTrainedModel.from_pretrained.offload_buffers",description:`<strong>offload_buffers</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to offload the buffers with the model parameters.`,name:"offload_buffers"},{anchor:"transformers.PreTrainedModel.from_pretrained.quantization_config",description:`<strong>quantization_config</strong> (<code>Union[QuantizationConfigMixin,Dict]</code>, <em>optional</em>) &#x2014;
A dictionary of configuration parameters or a QuantizationConfigMixin object for quantization (e.g
bitsandbytes, gptq). There may be other quantization-related kwargs, including <code>load_in_4bit</code> and
<code>load_in_8bit</code>, which are parsed by QuantizationConfigParser. Supported only for bitsandbytes
quantizations and not preferred. consider inserting all such arguments into quantization_config
instead.`,name:"quantization_config"},{anchor:"transformers.PreTrainedModel.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
specify the folder name here.`,name:"subfolder"},{anchor:"transformers.PreTrainedModel.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified load weights from <code>variant</code> filename, <em>e.g.</em> pytorch_model.<variant>.bin. <code>variant</code> is
ignored when using <code>from_tf</code> or <code>from_flax</code>.</variant>`,name:"variant"},{anchor:"transformers.PreTrainedModel.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether or not to use <code>safetensors</code> checkpoints. Defaults to <code>None</code>. If not specified and <code>safetensors</code>
is not installed, it will be set to <code>False</code>.`,name:"use_safetensors"},{anchor:"transformers.PreTrainedModel.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to update the configuration object (after it being loaded) and initiate the model (e.g.,
<code>output_attentions=True</code>). Behaves differently depending on whether a <code>config</code> is provided or
automatically loaded:</p>
<ul>
<li>If a configuration is provided with <code>config</code>, <code>**kwargs</code> will be directly passed to the
underlying model&#x2019;s <code>__init__</code> method (we assume all relevant updates to the configuration have
already been done)</li>
<li>If a configuration is not provided, <code>kwargs</code> will be first passed to the configuration class
initialization function (<a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>). Each key of <code>kwargs</code> that
corresponds to a configuration attribute will be used to override said attribute with the
supplied <code>kwargs</code> value. Remaining keys that do not correspond to any configuration attribute
will be passed to the underlying model&#x2019;s <code>__init__</code> function.</li>
</ul>`,name:"kwargs"}]}]}}),xe=new bi({props:{$$slots:{default:[gh]},$$scope:{ctx:P}}}),we=new D({props:{anchor:"transformers.PreTrainedModel.from_pretrained.example",$$slots:{default:[_h]},$$scope:{ctx:P}}}),Wt=new T({props:{name:"get_input_embeddings",anchor:"transformers.PreTrainedModel.get_input_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1732",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A torch module mapping vocabulary to hidden states.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>nn.Module</code></p>
`}}),Gt=new T({props:{name:"get_memory_footprint",anchor:"transformers.PreTrainedModel.get_memory_footprint",parameters:[{name:"return_buffers",val:" = True"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.get_memory_footprint.return_buffers",description:`<strong>return_buffers</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return the size of the buffer tensors in the computation of the memory footprint. Buffers
are tensors that do not require gradients and not registered as parameters. E.g. mean and std in batch
norm layers. Please see: <a href="https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2" rel="nofollow">https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2</a>`,name:"return_buffers"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2789"}}),Bt=new T({props:{name:"get_output_embeddings",anchor:"transformers.PreTrainedModel.get_output_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1758",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A torch module mapping hidden states to vocabulary.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>nn.Module</code></p>
`}}),Lt=new T({props:{name:"gradient_checkpointing_disable",anchor:"transformers.PreTrainedModel.gradient_checkpointing_disable",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2351"}}),zt=new T({props:{name:"gradient_checkpointing_enable",anchor:"transformers.PreTrainedModel.gradient_checkpointing_enable",parameters:[{name:"gradient_checkpointing_kwargs",val:" = None"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.gradient_checkpointing_enable.gradient_checkpointing_kwargs",description:`<strong>gradient_checkpointing_kwargs</strong> (dict, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <code>torch.utils.checkpoint.checkpoint</code> function.`,name:"gradient_checkpointing_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2287"}}),Vt=new T({props:{name:"init_weights",anchor:"transformers.PreTrainedModel.init_weights",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2253"}}),Ht=new T({props:{name:"post_init",anchor:"transformers.PreTrainedModel.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1373"}}),qt=new T({props:{name:"prune_heads",anchor:"transformers.PreTrainedModel.prune_heads",parameters:[{name:"heads_to_prune",val:": Dict"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.prune_heads.heads_to_prune",description:`<strong>heads_to_prune</strong> (<code>Dict[int, List[int]]</code>) &#x2014;
Dictionary with keys being selected layer indices (<code>int</code>) and associated values being the list of heads
to prune in said layer (list of <code>int</code>). For instance {1: [0, 2], 2: [2, 3]} will prune heads 0 and 2 on
layer 1 and heads 2 and 3 on layer 2.`,name:"heads_to_prune"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2270"}}),Xt=new T({props:{name:"register_for_auto_class",anchor:"transformers.PreTrainedModel.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'AutoModel'"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;AutoModel&quot;</code>) &#x2014;
The auto class to register this new model with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L4538"}}),Pe=new bi({props:{warning:!0,$$slots:{default:[bh]},$$scope:{ctx:P}}}),Rt=new T({props:{name:"resize_token_embeddings",anchor:"transformers.PreTrainedModel.resize_token_embeddings",parameters:[{name:"new_num_tokens",val:": Optional = None"},{name:"pad_to_multiple_of",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.resize_token_embeddings.new_num_tokens",description:`<strong>new_num_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The new number of tokens in the embedding matrix. Increasing the size will add newly initialized
vectors at the end. Reducing the size will remove vectors from the end. If not provided or <code>None</code>, just
returns a pointer to the input tokens <code>torch.nn.Embedding</code> module of the model without doing anything.`,name:"new_num_tokens"},{anchor:"transformers.PreTrainedModel.resize_token_embeddings.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the embedding matrix to a multiple of the provided value.If <code>new_num_tokens</code> is set to
<code>None</code> will just pad the embedding to a multiple of <code>pad_to_multiple_of</code>.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128. For more
details about this, or help on choosing the correct value for resizing, refer to this guide:
<a href="https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc" rel="nofollow">https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc</a>`,name:"pad_to_multiple_of"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1951",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Pointer to the input tokens Embeddings Module of the model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.nn.Embedding</code></p>
`}}),Et=new T({props:{name:"reverse_bettertransformer",anchor:"transformers.PreTrainedModel.reverse_bettertransformer",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L4592",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The model converted back to the original modeling.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel"
>PreTrainedModel</a></p>
`}}),Nt=new T({props:{name:"save_pretrained",anchor:"transformers.PreTrainedModel.save_pretrained",parameters:[{name:"save_directory",val:": Union"},{name:"is_main_process",val:": bool = True"},{name:"state_dict",val:": Optional = None"},{name:"save_function",val:": Callable = <function save at 0x7f3f131facb0>"},{name:"push_to_hub",val:": bool = False"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"save_peft_format",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedModel.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"transformers.PreTrainedModel.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful when in distributed training like
TPUs and need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on
the main process to avoid race conditions.`,name:"is_main_process"},{anchor:"transformers.PreTrainedModel.save_pretrained.state_dict",description:`<strong>state_dict</strong> (nested dictionary of <code>torch.Tensor</code>) &#x2014;
The state dictionary of the model to save. Will default to <code>self.state_dict()</code>, but can be used to only
save parts of the model or if special precautions need to be taken when recovering the state dictionary
of a model (like when using model parallelism).`,name:"state_dict"},{anchor:"transformers.PreTrainedModel.save_pretrained.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method.`,name:"save_function"},{anchor:"transformers.PreTrainedModel.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.PreTrainedModel.save_pretrained.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;5GB&quot;</code>) &#x2014;
The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size
lower than this size. If expressed as a string, needs to be digits followed by a unit (like <code>&quot;5MB&quot;</code>).
We default it to 5GB in order for models to be able to run easily on free-tier google colab instances
without CPU OOM issues.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>If a single weight of the model is bigger than <code>max_shard_size</code>, it will be in its own checkpoint shard
which will be bigger than <code>max_shard_size</code>.</p>

					</div>`,name:"max_shard_size"},{anchor:"transformers.PreTrainedModel.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way (that uses <code>pickle</code>).`,name:"safe_serialization"},{anchor:"transformers.PreTrainedModel.save_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format pytorch_model.<variant>.bin.</variant>`,name:"variant"},{anchor:"transformers.PreTrainedModel.save_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.PreTrainedModel.save_pretrained.save_peft_format",description:`<strong>save_peft_format</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
For backward compatibility with PEFT library, in case adapter weights are attached to the model, all
keys of the state dict of adapters needs to be pre-pended with <code>base_model.model</code>. Advanced users can
disable this behaviours by setting <code>save_peft_format</code> to <code>False</code>.`,name:"save_peft_format"},{anchor:"transformers.PreTrainedModel.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L2384"}}),Yt=new T({props:{name:"set_input_embeddings",anchor:"transformers.PreTrainedModel.set_input_embeddings",parameters:[{name:"value",val:": Module"}],parametersDescription:[{anchor:"transformers.PreTrainedModel.set_input_embeddings.value",description:"<strong>value</strong> (<code>nn.Module</code>) &#x2014; A module mapping vocabulary to hidden states.",name:"value"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1745"}}),Dt=new T({props:{name:"tie_weights",anchor:"transformers.PreTrainedModel.tie_weights",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1785"}}),Qt=new T({props:{name:"to_bettertransformer",anchor:"transformers.PreTrainedModel.to_bettertransformer",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L4564",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The model converted to BetterTransformer.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel"
>PreTrainedModel</a></p>
`}}),At=new T({props:{name:"warn_if_padding_and_no_attention_mask",anchor:"transformers.PreTrainedModel.warn_if_padding_and_no_attention_mask",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L4614"}}),St=new he({props:{title:"大規模モデルの読み込み",local:"大規模モデルの読み込み",headingTag:"h3"}}),eo=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUwQSUwQXQwcHAlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXEyU2VxTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZUMHBwJTIyJTJDJTIwbG93X2NwdV9tZW1fdXNhZ2UlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM

t0pp = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;bigscience/T0pp&quot;</span>, low_cpu_mem_usage=<span class="hljs-literal">True</span>)`,wrap:!1}}),no=new B({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUwQSUwQXQwcHAlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXEyU2VxTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZUMHBwJTIyJTJDJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM

t0pp = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;bigscience/T0pp&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)`,wrap:!1}}),ao=new B({props:{code:"dDBwcC5oZl9kZXZpY2VfbWFw",highlighted:"t0pp.hf_device_map",wrap:!1}}),so=new B({props:{code:"JTdCJ3NoYXJlZCclM0ElMjAwJTJDJTBBJTIwJ2RlY29kZXIuZW1iZWRfdG9rZW5zJyUzQSUyMDAlMkMlMEElMjAnZW5jb2RlciclM0ElMjAwJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMCclM0ElMjAwJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMSclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMiclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMyclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suNCclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suNSclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suNiclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suNyclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suOCclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suOSclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMTAnJTNBJTIwMSUyQyUwQSUyMCdkZWNvZGVyLmJsb2NrLjExJyUzQSUyMDElMkMlMEElMjAnZGVjb2Rlci5ibG9jay4xMiclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMTMnJTNBJTIwMSUyQyUwQSUyMCdkZWNvZGVyLmJsb2NrLjE0JyUzQSUyMDElMkMlMEElMjAnZGVjb2Rlci5ibG9jay4xNSclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMTYnJTNBJTIwMSUyQyUwQSUyMCdkZWNvZGVyLmJsb2NrLjE3JyUzQSUyMDElMkMlMEElMjAnZGVjb2Rlci5ibG9jay4xOCclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMTknJTNBJTIwMSUyQyUwQSUyMCdkZWNvZGVyLmJsb2NrLjIwJyUzQSUyMDElMkMlMEElMjAnZGVjb2Rlci5ibG9jay4yMSclM0ElMjAxJTJDJTBBJTIwJ2RlY29kZXIuYmxvY2suMjInJTNBJTIwJ2NwdSclMkMlMEElMjAnZGVjb2Rlci5ibG9jay4yMyclM0ElMjAnY3B1JyUyQyUwQSUyMCdkZWNvZGVyLmZpbmFsX2xheWVyX25vcm0nJTNBJTIwJ2NwdSclMkMlMEElMjAnZGVjb2Rlci5kcm9wb3V0JyUzQSUyMCdjcHUnJTJDJTBBJTIwJ2xtX2hlYWQnJTNBJTIwJ2NwdSclN0Q=",highlighted:`{<span class="hljs-string">&#x27;shared&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;decoder.embed_tokens&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;encoder&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;decoder.block.0&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;decoder.block.1&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.2&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.3&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.4&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.5&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.6&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.7&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.8&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.9&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.10&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.11&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.12&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.13&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.14&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.15&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.16&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.17&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.18&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.19&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.20&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.21&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;decoder.block.22&#x27;</span>: <span class="hljs-string">&#x27;cpu&#x27;</span>,
 <span class="hljs-string">&#x27;decoder.block.23&#x27;</span>: <span class="hljs-string">&#x27;cpu&#x27;</span>,
 <span class="hljs-string">&#x27;decoder.final_layer_norm&#x27;</span>: <span class="hljs-string">&#x27;cpu&#x27;</span>,
 <span class="hljs-string">&#x27;decoder.dropout&#x27;</span>: <span class="hljs-string">&#x27;cpu&#x27;</span>,
 <span class="hljs-string">&#x27;lm_head&#x27;</span>: <span class="hljs-string">&#x27;cpu&#x27;</span>}`,wrap:!1}}),lo=new B({props:{code:"ZGV2aWNlX21hcCUyMCUzRCUyMCU3QiUyMnNoYXJlZCUyMiUzQSUyMDAlMkMlMjAlMjJlbmNvZGVyJTIyJTNBJTIwMCUyQyUyMCUyMmRlY29kZXIlMjIlM0ElMjAxJTJDJTIwJTIybG1faGVhZCUyMiUzQSUyMDElN0Q=",highlighted:'device_map = {<span class="hljs-string">&quot;shared&quot;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&quot;encoder&quot;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&quot;decoder&quot;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&quot;lm_head&quot;</span>: <span class="hljs-number">1</span>}',wrap:!1}}),mo=new he({props:{title:"Model Instantiation dtype",local:"model-instantiation-dtype",headingTag:"h3"}}),ho=new B({props:{code:"bW9kZWwlMjAlM0QlMjBUNUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydDUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYp",highlighted:'model = T5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;t5&quot;</span>, torch_dtype=torch.float16)',wrap:!1}}),uo=new B({props:{code:"bW9kZWwlMjAlM0QlMjBUNUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydDUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRCUyMmF1dG8lMjIp",highlighted:'model = T5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;t5&quot;</span>, torch_dtype=<span class="hljs-string">&quot;auto&quot;</span>)',wrap:!1}}),_o=new B({props:{code:"Y29uZmlnJTIwJTNEJTIwVDVDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMnQ1JTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fY29uZmlnKGNvbmZpZyk=",highlighted:`config = T5Config.from_pretrained(<span class="hljs-string">&quot;t5&quot;</span>)
model = AutoModel.from_config(config)`,wrap:!1}}),vo=new he({props:{title:"ModuleUtilsMixin",local:"transformers.modeling_utils.ModuleUtilsMixin",headingTag:"h2"}}),yo=new T({props:{name:"class transformers.modeling_utils.ModuleUtilsMixin",anchor:"transformers.modeling_utils.ModuleUtilsMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L958"}}),Mo=new T({props:{name:"add_memory_hooks",anchor:"transformers.modeling_utils.ModuleUtilsMixin.add_memory_hooks",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L989"}}),To=new T({props:{name:"estimate_tokens",anchor:"transformers.modeling_utils.ModuleUtilsMixin.estimate_tokens",parameters:[{name:"input_dict",val:": Dict"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.estimate_tokens.inputs",description:"<strong>inputs</strong> (<code>dict</code>) &#x2014; The model inputs.",name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1221",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The total number of tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),xo=new T({props:{name:"floating_point_ops",anchor:"transformers.modeling_utils.ModuleUtilsMixin.floating_point_ops",parameters:[{name:"input_dict",val:": Dict"},{name:"exclude_embeddings",val:": bool = True"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.floating_point_ops.batch_size",description:`<strong>batch_size</strong> (<code>int</code>) &#x2014;
The batch size for the forward pass.`,name:"batch_size"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.floating_point_ops.sequence_length",description:`<strong>sequence_length</strong> (<code>int</code>) &#x2014;
The number of tokens in each line of the batch.`,name:"sequence_length"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.floating_point_ops.exclude_embeddings",description:`<strong>exclude_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to count embedding and softmax operations.`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1242",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The number of floating-point operations.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),wo=new T({props:{name:"get_extended_attention_mask",anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_extended_attention_mask",parameters:[{name:"attention_mask",val:": Tensor"},{name:"input_shape",val:": Tuple"},{name:"device",val:": device = None"},{name:"dtype",val:": torch.float32 = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_extended_attention_mask.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code>) &#x2014;
Mask with ones indicating tokens to attend to, zeros for tokens to ignore.`,name:"attention_mask"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_extended_attention_mask.input_shape",description:`<strong>input_shape</strong> (<code>Tuple[int]</code>) &#x2014;
The shape of the input to the model.`,name:"input_shape"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1077",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code> The extended attention mask, with a the same dtype as <code>attention_mask.dtype</code>.</p>
`}}),$o=new T({props:{name:"get_head_mask",anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_head_mask",parameters:[{name:"head_mask",val:": Optional"},{name:"num_hidden_layers",val:": int"},{name:"is_attention_chunked",val:": bool = False"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_head_mask.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> with shape <code>[num_heads]</code> or <code>[num_hidden_layers x num_heads]</code>, <em>optional</em>) &#x2014;
The mask indicating if we should keep the heads or not (1.0 for keep, 0.0 for discard).`,name:"head_mask"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_head_mask.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>) &#x2014;
The number of hidden layers in the model.`,name:"num_hidden_layers"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_head_mask.is_attention_chunked",description:`<strong>is_attention_chunked</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the attentions scores are computed by chunks or not.`,name:"is_attention_chunked"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1129",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code> with shape <code>[num_hidden_layers x batch x num_heads x seq_length x seq_length]</code> or list with
<code>[None]</code> for each layer.</p>
`}}),ko=new T({props:{name:"invert_attention_mask",anchor:"transformers.modeling_utils.ModuleUtilsMixin.invert_attention_mask",parameters:[{name:"encoder_attention_mask",val:": Tensor"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.invert_attention_mask.encoder_attention_mask",description:"<strong>encoder_attention_mask</strong> (<code>torch.Tensor</code>) &#x2014; An attention mask.",name:"encoder_attention_mask"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1025",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The inverted attention mask.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),jo=new T({props:{name:"num_parameters",anchor:"transformers.modeling_utils.ModuleUtilsMixin.num_parameters",parameters:[{name:"only_trainable",val:": bool = False"},{name:"exclude_embeddings",val:": bool = False"}],parametersDescription:[{anchor:"transformers.modeling_utils.ModuleUtilsMixin.num_parameters.only_trainable",description:`<strong>only_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of trainable parameters`,name:"only_trainable"},{anchor:"transformers.modeling_utils.ModuleUtilsMixin.num_parameters.exclude_embeddings",description:`<strong>exclude_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of non-embeddings parameters`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1167",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The number of parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),Jo=new T({props:{name:"reset_memory_hooks_state",anchor:"transformers.modeling_utils.ModuleUtilsMixin.reset_memory_hooks_state",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L1001"}}),Co=new he({props:{title:"TFPreTrainedModel",local:"transformers.TFPreTrainedModel",headingTag:"h2"}}),Uo=new T({props:{name:"class transformers.TFPreTrainedModel",anchor:"transformers.TFPreTrainedModel",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1129"}}),Po=new T({props:{name:"push_to_hub",anchor:"transformers.TFPreTrainedModel.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional[bool] = None"},{name:"commit_message",val:": Optional[str] = None"},{name:"private",val:": Optional[bool] = None"},{name:"max_shard_size",val:": Optional[Union[int, str]] = '10GB'"},{name:"token",val:": Optional[Union[bool, str]] = None"},{name:"use_auth_token",val:": Optional[Union[bool, str]] = None"},{name:"create_pr",val:": bool = False"},{name:"**base_model_card_args",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your model to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload model&quot;</code>.`,name:"commit_message"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"transformers.TFPreTrainedModel.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L3137"}}),Xe=new D({props:{anchor:"transformers.TFPreTrainedModel.push_to_hub.example",$$slots:{default:[vh]},$$scope:{ctx:P}}}),Zo=new T({props:{name:"can_generate",anchor:"transformers.TFPreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1385",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Whether this model can generate sequences with <code>.generate()</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>bool</code></p>
`}}),Fo=new T({props:{name:"compile",anchor:"transformers.TFPreTrainedModel.compile",parameters:[{name:"optimizer",val:" = 'rmsprop'"},{name:"loss",val:" = 'auto_with_warning'"},{name:"metrics",val:" = None"},{name:"loss_weights",val:" = None"},{name:"weighted_metrics",val:" = None"},{name:"run_eagerly",val:" = None"},{name:"steps_per_execution",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1531"}}),Io=new T({props:{name:"create_model_card",anchor:"transformers.TFPreTrainedModel.create_model_card",parameters:[{name:"output_dir",val:""},{name:"model_name",val:": str"},{name:"language",val:": Optional[str] = None"},{name:"license",val:": Optional[str] = None"},{name:"tags",val:": Optional[str] = None"},{name:"finetuned_from",val:": Optional[str] = None"},{name:"tasks",val:": Optional[str] = None"},{name:"dataset_tags",val:": Optional[Union[str, List[str]]] = None"},{name:"dataset",val:": Optional[Union[str, List[str]]] = None"},{name:"dataset_args",val:": Optional[Union[str, List[str]]] = None"}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.create_model_card.output_dir",description:`<strong>output_dir</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The folder in which to create the model card.`,name:"output_dir"},{anchor:"transformers.TFPreTrainedModel.create_model_card.model_name",description:`<strong>model_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the model.`,name:"model_name"},{anchor:"transformers.TFPreTrainedModel.create_model_card.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the model (if applicable)`,name:"language"},{anchor:"transformers.TFPreTrainedModel.create_model_card.license",description:`<strong>license</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The license of the model. Will default to the license of the pretrained model used, if the original
model given to the <code>Trainer</code> comes from a repo on the Hub.`,name:"license"},{anchor:"transformers.TFPreTrainedModel.create_model_card.tags",description:`<strong>tags</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Some tags to be included in the metadata of the model card.`,name:"tags"},{anchor:"transformers.TFPreTrainedModel.create_model_card.finetuned_from",description:`<strong>finetuned_from</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the model used to fine-tune this one (if applicable). Will default to the name of the repo
of the original model given to the <code>Trainer</code> (if it comes from the Hub).`,name:"finetuned_from"},{anchor:"transformers.TFPreTrainedModel.create_model_card.tasks",description:`<strong>tasks</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several task identifiers, to be included in the metadata of the model card.`,name:"tasks"},{anchor:"transformers.TFPreTrainedModel.create_model_card.dataset_tags",description:`<strong>dataset_tags</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset tags, to be included in the metadata of the model card.`,name:"dataset_tags"},{anchor:"transformers.TFPreTrainedModel.create_model_card.dataset",description:`<strong>dataset</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset identifiers, to be included in the metadata of the model card.`,name:"dataset"},{anchor:"transformers.TFPreTrainedModel.create_model_card.dataset_args",description:`<strong>dataset_args</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
One or several dataset arguments, to be included in the metadata of the model card.`,name:"dataset_args"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1826"}}),Wo=new T({props:{name:"from_pretrained",anchor:"transformers.TFPreTrainedModel.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Optional[Union[str, os.PathLike]]"},{name:"*model_args",val:""},{name:"config",val:": Optional[Union[PretrainedConfig, str, os.PathLike]] = None"},{name:"cache_dir",val:": Optional[Union[str, os.PathLike]] = None"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Optional[Union[str, bool]] = None"},{name:"revision",val:": str = 'main'"},{name:"use_safetensors",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.</li>
<li>A path to a <em>directory</em> containing model weights saved using
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel.save_pretrained">save_pretrained()</a>, e.g., <code>./my_model_directory/</code>.</li>
<li>A path or url to a <em>PyTorch state_dict save file</em> (e.g, <code>./pt_model/pytorch_model.bin</code>). In this
case, <code>from_pt</code> should be set to <code>True</code> and a configuration object should be provided as <code>config</code>
argument. This loading path is slower than converting the PyTorch model in a TensorFlow model
using the provided conversion scripts and loading the TensorFlow model afterwards.</li>
<li><code>None</code> if you are both providing the configuration and state dictionary (resp. with keyword
arguments <code>config</code> and <code>state_dict</code>).</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments will be passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.config",description:`<strong>config</strong> (<code>Union[PretrainedConfig, str]</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>an instance of a class derived from <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string valid as input to <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>.</li>
</ul>
<p>Configuration for the model to use instead of an automatically loaded configuration. Configuration can
be automatically loaded when:</p>
<ul>
<li>The model is a model provided by the library (loaded with the <em>model id</em> string of a pretrained
model).</li>
<li>The model was saved using <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.TFPreTrainedModel.save_pretrained">save_pretrained()</a> and is reloaded by supplying the
save directory.</li>
<li>The model is loaded by supplying a local directory as <code>pretrained_model_name_or_path</code> and a
configuration JSON file named <em>config.json</em> is found in the directory.</li>
</ul>`,name:"config"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.from_pt",description:`<strong>from_pt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a PyTorch state_dict save file (see docstring of
<code>pretrained_model_name_or_path</code> argument).`,name:"from_pt"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.ignore_mismatched_sizes",description:`<strong>ignore_mismatched_sizes</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to raise an error if some of the weights from the checkpoint do not have the same size
as the weights of the model (if for instance, you are instantiating a model with 10 labels from a
checkpoint with 3 labels).`,name:"ignore_mismatched_sizes"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.
resume_download &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.
proxies &#x2014;
(<code>Dict[str, str], </code>optional<code>): A dictionary of proxy servers to use by protocol or endpoint, e.g., </code>{&#x2018;http&#x2019;: &#x2018;foo.bar:3128&#x2019;, &#x2018;http://hostname&#x2019;: &#x2018;foo.bar:4012&#x2019;}<code>. The proxies are used on each request. output_loading_info(</code>bool<code>, *optional*, defaults to </code>False\`): Whether ot not to also return a
dictionary containing missing keys, unexpected keys and error messages.`,name:"force_download"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (e.g., not try downloading the model).`,name:"local_files_only(bool,"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L2541"}}),Ye=new D({props:{anchor:"transformers.TFPreTrainedModel.from_pretrained.example",$$slots:{default:[yh]},$$scope:{ctx:P}}}),Go=new T({props:{name:"get_bias",anchor:"transformers.TFPreTrainedModel.get_bias",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1966",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The weights representing the bias, None if not an LM model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tf.Variable</code></p>
`}}),Bo=new T({props:{name:"get_head_mask",anchor:"transformers.TFPreTrainedModel.get_head_mask",parameters:[{name:"head_mask",val:": tf.Tensor | None"},{name:"num_hidden_layers",val:": int"}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.get_head_mask.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> with shape <code>[num_heads]</code> or <code>[num_hidden_layers x num_heads]</code>, <em>optional</em>) &#x2014;
The mask indicating if we should keep the heads or not (1.0 for keep, 0.0 for discard).`,name:"head_mask"},{anchor:"transformers.TFPreTrainedModel.get_head_mask.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>) &#x2014;
The number of hidden layers in the model.`,name:"num_hidden_layers"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1269",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tf.Tensor</code> with shape <code>[num_hidden_layers x batch x num_heads x seq_length x seq_length]</code> or list with
<code>[None]</code> for each layer.</p>
`}}),Lo=new T({props:{name:"get_input_embeddings",anchor:"transformers.TFPreTrainedModel.get_input_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1399",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The embeddings layer mapping vocabulary to hidden states.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tf.Variable</code></p>
`}}),zo=new T({props:{name:"get_lm_head",anchor:"transformers.TFPreTrainedModel.get_lm_head",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1999",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The LM head layer if the model has one, None if not.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>keras.layers.Layer</code></p>
`}}),Vo=new T({props:{name:"get_output_embeddings",anchor:"transformers.TFPreTrainedModel.get_output_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1906",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The new weights mapping vocabulary to hidden states.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tf.Variable</code></p>
`}}),Ho=new T({props:{name:"get_output_layer_with_bias",anchor:"transformers.TFPreTrainedModel.get_output_layer_with_bias",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1943",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The layer that handles the bias, None if not an LM model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>keras.layers.Layer</code></p>
`}}),qo=new T({props:{name:"get_prefix_bias_name",anchor:"transformers.TFPreTrainedModel.get_prefix_bias_name",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1956",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The _prefix name of the bias.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),Xo=new T({props:{name:"prepare_tf_dataset",anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset",parameters:[{name:"dataset",val:": 'datasets.Dataset'"},{name:"batch_size",val:": int = 8"},{name:"shuffle",val:": bool = True"},{name:"tokenizer",val:": Optional['PreTrainedTokenizerBase'] = None"},{name:"collate_fn",val:": Optional[Callable] = None"},{name:"collate_fn_args",val:": Optional[Dict[str, Any]] = None"},{name:"drop_remainder",val:": Optional[bool] = None"},{name:"prefetch",val:": bool = True"}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.dataset",description:`<strong>dataset</strong> (<code>Any</code>) &#x2014;
A [~<code>datasets.Dataset</code>] to be wrapped as a <code>tf.data.Dataset</code>.`,name:"dataset"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, defaults to 8) &#x2014;
The size of batches to return.`,name:"batch_size"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.shuffle",description:`<strong>shuffle</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to return samples from the dataset in random order. Usually <code>True</code> for training datasets and
<code>False</code> for validation/test datasets.`,name:"shuffle"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_30530/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase">PreTrainedTokenizerBase</a>, <em>optional</em>) &#x2014;
A <code>PreTrainedTokenizer</code> that will be used to pad samples to create batches. Has no effect if a specific
<code>collate_fn</code> is passed instead.`,name:"tokenizer"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.collate_fn",description:`<strong>collate_fn</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that collates samples from the dataset into a single batch. Defaults to
<code>DefaultDataCollator</code> if no <code>tokenizer</code> is supplied or <code>DataCollatorWithPadding</code> if a <code>tokenizer</code> is
passed.`,name:"collate_fn"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.collate_fn_args",description:`<strong>collate_fn_args</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
A dict of arguments to pass to the <code>collate_fn</code> alongside the list of samples.`,name:"collate_fn_args"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.drop_remainder",description:`<strong>drop_remainder</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to drop the final batch, if the batch_size does not evenly divide the dataset length. Defaults
to the same setting as <code>shuffle</code>.`,name:"drop_remainder"},{anchor:"transformers.TFPreTrainedModel.prepare_tf_dataset.prefetch",description:`<strong>prefetch</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to add prefetching to the end of the <code>tf.data</code> pipeline. This is almost always beneficial for
performance, but can be disabled in edge cases.`,name:"prefetch"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1426",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>tf.data.Dataset</code> which is ready to pass to the Keras API.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dataset</code></p>
`}}),Ro=new T({props:{name:"prune_heads",anchor:"transformers.TFPreTrainedModel.prune_heads",parameters:[{name:"heads_to_prune",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.prune_heads.heads_to_prune",description:`<strong>heads_to_prune</strong> (<code>Dict[int, List[int]]</code>) &#x2014;
Dictionary with keys being selected layer indices (<code>int</code>) and associated values being the list of heads
to prune in said layer (list of <code>int</code>). For instance {1: [0, 2], 2: [2, 3]} will prune heads 0 and 2 on
layer 1 and heads 2 and 3 on layer 2.`,name:"heads_to_prune"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L2346"}}),Eo=new T({props:{name:"register_for_auto_class",anchor:"transformers.TFPreTrainedModel.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'TFAutoModel'"}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;TFAutoModel&quot;</code>) &#x2014;
The auto class to register this new model with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L3246"}}),nt=new bi({props:{warning:!0,$$slots:{default:[Mh]},$$scope:{ctx:P}}}),No=new T({props:{name:"resize_token_embeddings",anchor:"transformers.TFPreTrainedModel.resize_token_embeddings",parameters:[{name:"new_num_tokens",val:": Optional[int] = None"}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.resize_token_embeddings.new_num_tokens",description:`<strong>new_num_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of new tokens in the embedding matrix. Increasing the size will add newly initialized
vectors at the end. Reducing the size will remove vectors from the end. If not provided or <code>None</code>, just
returns a pointer to the input tokens without doing anything.`,name:"new_num_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L2008",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Pointer to the input tokens of the model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tf.Variable</code> or <code>keras.layers.Embedding</code></p>
`}}),Yo=new T({props:{name:"save_pretrained",anchor:"transformers.TFPreTrainedModel.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"saved_model",val:" = False"},{name:"version",val:" = 1"},{name:"push_to_hub",val:" = False"},{name:"signatures",val:" = None"},{name:"max_shard_size",val:": Union[int, str] = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"token",val:": Optional[Union[str, bool]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.saved_model",description:`<strong>saved_model</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If the model has to be saved in saved model format as well or not.`,name:"saved_model"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.version",description:`<strong>version</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The version of the saved model. A saved model needs to be versioned in order to be properly loaded by
TensorFlow Serving as detailed in the official documentation
<a href="https://www.tensorflow.org/tfx/serving/serving_basic" rel="nofollow">https://www.tensorflow.org/tfx/serving/serving_basic</a>`,name:"version"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.signatures",description:`<strong>signatures</strong> (<code>dict</code> or <code>tf.function</code>, <em>optional</em>) &#x2014;
Model&#x2019;s signature used for serving. This will be passed to the <code>signatures</code> argument of model.save().`,name:"signatures"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size
lower than this size. If expressed as a string, needs to be digits followed by a unit (like <code>&quot;5MB&quot;</code>).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>If a single weight of the model is bigger than <code>max_shard_size</code>, it will be in its own checkpoint shard
which will be bigger than <code>max_shard_size</code>.</p>

					</div>`,name:"max_shard_size"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional TensorFlow way (that uses <code>h5</code>).`,name:"safe_serialization"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.TFPreTrainedModel.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L2358"}}),Do=new T({props:{name:"serving",anchor:"transformers.TFPreTrainedModel.serving",parameters:[{name:"inputs",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.serving.Method",description:"<strong>Method</strong> used for serving the model. Does not have a specific signature, but will be specialized as concrete &#x2014;",name:"Method"},{anchor:"transformers.TFPreTrainedModel.serving.functions",description:`<strong>functions</strong> when saving with <code>save_pretrained</code>. &#x2014;
inputs (<code>Dict[str, tf.Tensor]</code>):
The input of the saved model as a dictionary of tensors.`,name:"functions"}]}}),Qo=new T({props:{name:"serving_output",anchor:"transformers.TFPreTrainedModel.serving_output",parameters:[{name:"output",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1361"}}),Ao=new T({props:{name:"set_bias",anchor:"transformers.TFPreTrainedModel.set_bias",parameters:[{name:"value",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.set_bias.value",description:`<strong>value</strong> (<code>Dict[tf.Variable]</code>) &#x2014;
All the new bias attached to an LM head.`,name:"value"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1983"}}),So=new T({props:{name:"set_input_embeddings",anchor:"transformers.TFPreTrainedModel.set_input_embeddings",parameters:[{name:"value",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.set_input_embeddings.value",description:`<strong>value</strong> (<code>tf.Variable</code>) &#x2014;
The new weights mapping hidden states to vocabulary.`,name:"value"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1886"}}),Oo=new T({props:{name:"set_output_embeddings",anchor:"transformers.TFPreTrainedModel.set_output_embeddings",parameters:[{name:"value",val:""}],parametersDescription:[{anchor:"transformers.TFPreTrainedModel.set_output_embeddings.value",description:`<strong>value</strong> (<code>tf.Variable</code>) &#x2014;
The new weights mapping hidden states to vocabulary.`,name:"value"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1926"}}),Ko=new T({props:{name:"test_step",anchor:"transformers.TFPreTrainedModel.test_step",parameters:[{name:"data",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1722"}}),en=new T({props:{name:"train_step",anchor:"transformers.TFPreTrainedModel.train_step",parameters:[{name:"data",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L1614"}}),tn=new he({props:{title:"TFModelUtilsMixin",local:"transformers.modeling_tf_utils.TFModelUtilsMixin",headingTag:"h2"}}),on=new T({props:{name:"class transformers.modeling_tf_utils.TFModelUtilsMixin",anchor:"transformers.modeling_tf_utils.TFModelUtilsMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L126"}}),nn=new T({props:{name:"num_parameters",anchor:"transformers.modeling_tf_utils.TFModelUtilsMixin.num_parameters",parameters:[{name:"only_trainable",val:": bool = False"}],parametersDescription:[{anchor:"transformers.modeling_tf_utils.TFModelUtilsMixin.num_parameters.only_trainable",description:`<strong>only_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of trainable parameters`,name:"only_trainable"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_tf_utils.py#L131",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The number of parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),rn=new he({props:{title:"FlaxPreTrainedModel",local:"transformers.FlaxPreTrainedModel",headingTag:"h2"}}),an=new T({props:{name:"class transformers.FlaxPreTrainedModel",anchor:"transformers.FlaxPreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"module",val:": Module"},{name:"input_shape",val:": Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L167"}}),sn=new T({props:{name:"push_to_hub",anchor:"transformers.FlaxPreTrainedModel.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional = None"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": str = None"},{name:"commit_description",val:": str = None"},{name:"tags",val:": Optional = None"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your model to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload model&quot;</code>.`,name:"commit_message"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;5GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>). We default it to <code>&quot;5GB&quot;</code> so that users can easily load models on free-tier
Google Colab instances without any CPU OOM issues.`,name:"max_shard_size"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.commit_description",description:`<strong>commit_description</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The description of the commit that will be created`,name:"commit_description"},{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.tags",description:`<strong>tags</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tags to push on the Hub.`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/utils/hub.py#L809"}}),pt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.example",$$slots:{default:[Th]},$$scope:{ctx:P}}}),ln=new T({props:{name:"can_generate",anchor:"transformers.FlaxPreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L506"}}),dn=new T({props:{name:"from_pretrained",anchor:"transformers.FlaxPreTrainedModel.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"*model_args",val:""},{name:"config",val:": Union = None"},{name:"cache_dir",val:": Union = None"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Union = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.</li>
<li>A path to a <em>directory</em> containing model weights saved using
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.FlaxPreTrainedModel.save_pretrained">save_pretrained()</a>, e.g., <code>./my_model_directory/</code>.</li>
<li>A path or url to a <em>pt index checkpoint file</em> (e.g, <code>./tf_model/model.ckpt.index</code>). In this case,
<code>from_pt</code> should be set to <code>True</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.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> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</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/ja/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments will be passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.config",description:`<strong>config</strong> (<code>Union[PretrainedConfig, str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>an instance of a class derived from <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string or path valid as input to <a href="/docs/transformers/pr_30530/ja/main_classes/configuration#transformers.PretrainedConfig.from_pretrained">from_pretrained()</a>.</li>
</ul>
<p>Configuration for the model to use instead of an automatically loaded configuration. Configuration can
be automatically loaded when:</p>
<ul>
<li>The model is a model provided by the library (loaded with the <em>model id</em> string of a pretrained
model).</li>
<li>The model was saved using <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.PreTrainedModel.save_pretrained">save_pretrained()</a> and is reloaded by supplying the
save directory.</li>
<li>The model is loaded by supplying a local directory as <code>pretrained_model_name_or_path</code> and a
configuration JSON file named <em>config.json</em> is found in the directory.</li>
</ul>`,name:"config"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.from_pt",description:`<strong>from_pt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a PyTorch checkpoint save file (see docstring of
<code>pretrained_model_name_or_path</code> argument).`,name:"from_pt"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.ignore_mismatched_sizes",description:`<strong>ignore_mismatched_sizes</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to raise an error if some of the weights from the checkpoint do not have the same size
as the weights of the model (if for instance, you are instantiating a model with 10 labels from a
checkpoint with 3 labels).`,name:"ignore_mismatched_sizes"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.
resume_download &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"force_download"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L518"}}),ft=new D({props:{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.example",$$slots:{default:[xh]},$$scope:{ctx:P}}}),cn=new T({props:{name:"load_flax_sharded_weights",anchor:"transformers.FlaxPreTrainedModel.load_flax_sharded_weights",parameters:[{name:"shard_files",val:""}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.load_flax_sharded_weights.shard_files",description:`<strong>shard_files</strong> (<code>List[str]</code> &#x2014;
The list of shard files to load.`,name:"shard_files"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L459",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A nested dictionary of the model parameters, in the expected format for flax models : <code>&#123;'model': &#123;'params': &#123;'...'&#125;&#125;&#125;</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict</code></p>
`}}),mn=new T({props:{name:"register_for_auto_class",anchor:"transformers.FlaxPreTrainedModel.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'FlaxAutoModel'"}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;FlaxAutoModel&quot;</code>) &#x2014;
The auto class to register this new model with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L1227"}}),ut=new bi({props:{warning:!0,$$slots:{default:[wh]},$$scope:{ctx:P}}}),pn=new T({props:{name:"save_pretrained",anchor:"transformers.FlaxPreTrainedModel.save_pretrained",parameters:[{name:"save_directory",val:": Union"},{name:"params",val:" = None"},{name:"push_to_hub",val:" = False"},{name:"max_shard_size",val:" = '10GB'"},{name:"token",val:": Union = None"},{name:"safe_serialization",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size
lower than this size. If expressed as a string, needs to be digits followed by a unit (like <code>&quot;5MB&quot;</code>).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>If a single weight of the model is bigger than <code>max_shard_size</code>, it will be in its own checkpoint shard
which will be bigger than <code>max_shard_size</code>.</p>

					</div>`,name:"max_shard_size"},{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_30530/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"},{anchor:"transformers.FlaxPreTrainedModel.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or through msgpack.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L1089"}}),hn=new T({props:{name:"to_bf16",anchor:"transformers.FlaxPreTrainedModel.to_bf16",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.to_bf16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"transformers.FlaxPreTrainedModel.to_bf16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L329"}}),_t=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_bf16.example",$$slots:{default:[$h]},$$scope:{ctx:P}}}),fn=new T({props:{name:"to_fp16",anchor:"transformers.FlaxPreTrainedModel.to_fp16",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.to_fp16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"transformers.FlaxPreTrainedModel.to_fp16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip`,name:"mask"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L395"}}),bt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_fp16.example",$$slots:{default:[kh]},$$scope:{ctx:P}}}),un=new T({props:{name:"to_fp32",anchor:"transformers.FlaxPreTrainedModel.to_fp32",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"transformers.FlaxPreTrainedModel.to_fp32.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"transformers.FlaxPreTrainedModel.to_fp32.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip`,name:"mask"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_flax_utils.py#L368"}}),vt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_fp32.example",$$slots:{default:[jh]},$$scope:{ctx:P}}}),gn=new he({props:{title:"Pushing to the Hub",local:"transformers.utils.PushToHubMixin",headingTag:"h2"}}),_n=new T({props:{name:"class transformers.utils.PushToHubMixin",anchor:"transformers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/utils/hub.py#L693"}}),bn=new T({props:{name:"push_to_hub",anchor:"transformers.utils.PushToHubMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional = None"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": str = None"},{name:"commit_description",val:": str = None"},{name:"tags",val:": Optional = None"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.utils.PushToHubMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your {object} to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload {object}&quot;</code>.`,name:"commit_message"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;5GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>). We default it to <code>&quot;5GB&quot;</code> so that users can easily load models on free-tier
Google Colab instances without any CPU OOM issues.`,name:"max_shard_size"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.commit_description",description:`<strong>commit_description</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The description of the commit that will be created`,name:"commit_description"},{anchor:"transformers.utils.PushToHubMixin.push_to_hub.tags",description:`<strong>tags</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tags to push on the Hub.`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/utils/hub.py#L809"}}),yt=new D({props:{anchor:"transformers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[Jh]},$$scope:{ctx:P}}}),vn=new he({props:{title:"Sharded checkpoints",local:"transformers.modeling_utils.load_sharded_checkpoint",headingTag:"h2"}}),yn=new T({props:{name:"transformers.modeling_utils.load_sharded_checkpoint",anchor:"transformers.modeling_utils.load_sharded_checkpoint",parameters:[{name:"model",val:""},{name:"folder",val:""},{name:"strict",val:" = True"},{name:"prefer_safe",val:" = True"}],parametersDescription:[{anchor:"transformers.modeling_utils.load_sharded_checkpoint.model",description:"<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014; The model in which to load the checkpoint.",name:"model"},{anchor:"transformers.modeling_utils.load_sharded_checkpoint.folder",description:"<strong>folder</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014; A path to a folder containing the sharded checkpoint.",name:"folder"},{anchor:"transformers.modeling_utils.load_sharded_checkpoint.strict",description:"<strong>strict</strong> (<code>bool</code>, *optional<code>, defaults to </code>True`) &#x2014;\nWhether to strictly enforce that the keys in the model state dict match the keys in the sharded checkpoint.",name:"strict"},{anchor:"transformers.modeling_utils.load_sharded_checkpoint.prefer_safe",description:`<strong>prefer_safe</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If both safetensors and PyTorch save files are present in checkpoint and <code>prefer_safe</code> is True, the
safetensors files will be loaded. Otherwise, PyTorch files are always loaded when possible.`,name:"prefer_safe"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/modeling_utils.py#L458",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A named tuple with <code>missing_keys</code> and <code>unexpected_keys</code> fields</p>
<ul>
<li><code>missing_keys</code> is a list of str containing the missing keys</li>
<li><code>unexpected_keys</code> is a list of str containing the unexpected keys</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>NamedTuple</code></p>
`}}),Mn=new hh({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/main_classes/model.md"}}),{c(){d=r("meta"),C=o(),v=r("p"),_=o(),m($.$$.fragment),i=o(),J=r("p"),J.innerHTML=Nc,Aa=o(),xt=r("p"),xt.innerHTML=Yc,Sa=o(),wt=r("ul"),wt.innerHTML=Dc,Oa=o(),$t=r("p"),$t.innerHTML=Qc,Ka=o(),m(kt.$$.fragment),es=o(),w=r("div"),m(jt.$$.fragment),vi=o(),Pn=r("p"),Pn.textContent=Ac,yi=o(),Zn=r("p"),Zn.innerHTML=Sc,Mi=o(),Fn=r("ul"),Fn.innerHTML=Oc,Ti=o(),In=r("p"),In.textContent=Kc,xi=o(),Wn=r("ul"),Wn.innerHTML=em,wi=o(),Q=r("div"),m(Jt.$$.fragment),$i=o(),Gn=r("p"),Gn.textContent=tm,ki=o(),m(_e.$$.fragment),ji=o(),A=r("div"),m(Ct.$$.fragment),Ji=o(),Bn=r("p"),Bn.textContent=om,Ci=o(),m(be.$$.fragment),Ui=o(),ve=r("div"),m(Ut.$$.fragment),Pi=o(),Ln=r("p"),Ln.innerHTML=nm,Zi=o(),ye=r("div"),m(Pt.$$.fragment),Fi=o(),zn=r("p"),zn.textContent=rm,Ii=o(),Me=r("div"),m(Zt.$$.fragment),Wi=o(),Vn=r("p"),Vn.innerHTML=am,Gi=o(),Te=r("div"),m(Ft.$$.fragment),Bi=o(),Hn=r("p"),Hn.textContent=sm,Li=o(),Z=r("div"),m(It.$$.fragment),zi=o(),qn=r("p"),qn.textContent=im,Vi=o(),Xn=r("p"),Xn.innerHTML=lm,Hi=o(),Rn=r("p"),Rn.innerHTML=dm,qi=o(),En=r("p"),En.innerHTML=cm,Xi=o(),Nn=r("p"),Nn.innerHTML=mm,Ri=o(),m(xe.$$.fragment),Ei=o(),m(we.$$.fragment),Ni=o(),Yn=r("ul"),Yn.innerHTML=pm,Yi=o(),Dn=r("p"),Dn.textContent=hm,Di=o(),Qn=r("p"),Qn.textContent=fm,Qi=o(),An=r("ol"),An.innerHTML=um,Ai=o(),Sn=r("p"),Sn.textContent=gm,Si=o(),$e=r("div"),m(Wt.$$.fragment),Oi=o(),On=r("p"),On.textContent=_m,Ki=o(),ke=r("div"),m(Gt.$$.fragment),el=o(),Kn=r("p"),Kn.innerHTML=bm,tl=o(),je=r("div"),m(Bt.$$.fragment),ol=o(),er=r("p"),er.textContent=vm,nl=o(),S=r("div"),m(Lt.$$.fragment),rl=o(),tr=r("p"),tr.textContent=ym,al=o(),or=r("p"),or.textContent=Mm,sl=o(),H=r("div"),m(zt.$$.fragment),il=o(),nr=r("p"),nr.textContent=Tm,ll=o(),rr=r("p"),rr.textContent=xm,dl=o(),ar=r("p"),ar.innerHTML=wm,cl=o(),Je=r("div"),m(Vt.$$.fragment),ml=o(),sr=r("p"),sr.innerHTML=$m,pl=o(),Ce=r("div"),m(Ht.$$.fragment),hl=o(),ir=r("p"),ir.textContent=km,fl=o(),Ue=r("div"),m(qt.$$.fragment),ul=o(),lr=r("p"),lr.textContent=jm,gl=o(),O=r("div"),m(Xt.$$.fragment),_l=o(),dr=r("p"),dr.textContent=Jm,bl=o(),m(Pe.$$.fragment),vl=o(),K=r("div"),m(Rt.$$.fragment),yl=o(),cr=r("p"),cr.innerHTML=Cm,Ml=o(),mr=r("p"),mr.innerHTML=Um,Tl=o(),Ze=r("div"),m(Et.$$.fragment),xl=o(),pr=r("p"),pr.innerHTML=Pm,wl=o(),Fe=r("div"),m(Nt.$$.fragment),$l=o(),hr=r("p"),hr.innerHTML=Zm,kl=o(),Ie=r("div"),m(Yt.$$.fragment),jl=o(),fr=r("p"),fr.textContent=Fm,Jl=o(),ee=r("div"),m(Dt.$$.fragment),Cl=o(),ur=r("p"),ur.textContent=Im,Ul=o(),gr=r("p"),gr.innerHTML=Wm,Pl=o(),te=r("div"),m(Qt.$$.fragment),Zl=o(),_r=r("p"),_r.innerHTML=Gm,Fl=o(),br=r("p"),br.innerHTML=Bm,Il=o(),We=r("div"),m(At.$$.fragment),Wl=o(),vr=r("p"),vr.textContent=Lm,ts=o(),yr=r("a"),os=o(),m(St.$$.fragment),ns=o(),Ot=r("p"),Ot.innerHTML=zm,rs=o(),Kt=r("p"),Kt.innerHTML=Vm,as=o(),m(eo.$$.fragment),ss=o(),to=r("p"),to.innerHTML=Hm,is=o(),oo=r("p"),oo.innerHTML=qm,ls=o(),m(no.$$.fragment),ds=o(),ro=r("p"),ro.innerHTML=Xm,cs=o(),m(ao.$$.fragment),ms=o(),m(so.$$.fragment),ps=o(),io=r("p"),io.textContent=Rm,hs=o(),m(lo.$$.fragment),fs=o(),co=r("p"),co.innerHTML=Em,us=o(),m(mo.$$.fragment),gs=o(),po=r("p"),po.innerHTML=Nm,_s=o(),m(ho.$$.fragment),bs=o(),fo=r("p"),fo.innerHTML=Ym,vs=o(),m(uo.$$.fragment),ys=o(),go=r("p"),go.innerHTML=Dm,Ms=o(),m(_o.$$.fragment),Ts=o(),bo=r("p"),bo.textContent=Qm,xs=o(),m(vo.$$.fragment),ws=o(),W=r("div"),m(yo.$$.fragment),Gl=o(),Mr=r("p"),Mr.innerHTML=Am,Bl=o(),oe=r("div"),m(Mo.$$.fragment),Ll=o(),Tr=r("p"),Tr.textContent=Sm,zl=o(),xr=r("p"),xr.innerHTML=Om,Vl=o(),Ge=r("div"),m(To.$$.fragment),Hl=o(),wr=r("p"),wr.textContent=Km,ql=o(),Be=r("div"),m(xo.$$.fragment),Xl=o(),$r=r("p"),$r.innerHTML=ep,Rl=o(),Le=r("div"),m(wo.$$.fragment),El=o(),kr=r("p"),kr.textContent=tp,Nl=o(),ze=r("div"),m($o.$$.fragment),Yl=o(),jr=r("p"),jr.textContent=op,Dl=o(),Ve=r("div"),m(ko.$$.fragment),Ql=o(),Jr=r("p"),Jr.textContent=np,Al=o(),He=r("div"),m(jo.$$.fragment),Sl=o(),Cr=r("p"),Cr.textContent=rp,Ol=o(),qe=r("div"),m(Jo.$$.fragment),Kl=o(),Ur=r("p"),Ur.innerHTML=ap,$s=o(),m(Co.$$.fragment),ks=o(),x=r("div"),m(Uo.$$.fragment),ed=o(),Pr=r("p"),Pr.textContent=sp,td=o(),Zr=r("p"),Zr.innerHTML=ip,od=o(),Fr=r("ul"),Fr.innerHTML=lp,nd=o(),Ir=r("p"),Ir.textContent=dp,rd=o(),Wr=r("ul"),Wr.innerHTML=cp,ad=o(),ne=r("div"),m(Po.$$.fragment),sd=o(),Gr=r("p"),Gr.innerHTML=mp,id=o(),m(Xe.$$.fragment),ld=o(),Re=r("div"),m(Zo.$$.fragment),dd=o(),Br=r("p"),Br.innerHTML=pp,cd=o(),Ee=r("div"),m(Fo.$$.fragment),md=o(),Lr=r("p"),Lr.textContent=hp,pd=o(),Ne=r("div"),m(Io.$$.fragment),hd=o(),zr=r("p"),zr.innerHTML=fp,fd=o(),z=r("div"),m(Wo.$$.fragment),ud=o(),Vr=r("p"),Vr.textContent=up,gd=o(),Hr=r("p"),Hr.innerHTML=gp,_d=o(),qr=r("p"),qr.innerHTML=_p,bd=o(),m(Ye.$$.fragment),vd=o(),De=r("div"),m(Go.$$.fragment),yd=o(),Xr=r("p"),Xr.textContent=bp,Md=o(),Qe=r("div"),m(Bo.$$.fragment),Td=o(),Rr=r("p"),Rr.textContent=vp,xd=o(),Ae=r("div"),m(Lo.$$.fragment),wd=o(),Er=r("p"),Er.textContent=yp,$d=o(),Se=r("div"),m(zo.$$.fragment),kd=o(),Nr=r("p"),Nr.textContent=Mp,jd=o(),Oe=r("div"),m(Vo.$$.fragment),Jd=o(),Yr=r("p"),Yr.textContent=Tp,Cd=o(),Ke=r("div"),m(Ho.$$.fragment),Ud=o(),Dr=r("p"),Dr.textContent=xp,Pd=o(),et=r("div"),m(qo.$$.fragment),Zd=o(),Qr=r("p"),Qr.textContent=wp,Fd=o(),tt=r("div"),m(Xo.$$.fragment),Id=o(),Ar=r("p"),Ar.innerHTML=$p,Wd=o(),ot=r("div"),m(Ro.$$.fragment),Gd=o(),Sr=r("p"),Sr.textContent=kp,Bd=o(),re=r("div"),m(Eo.$$.fragment),Ld=o(),Or=r("p"),Or.textContent=jp,zd=o(),m(nt.$$.fragment),Vd=o(),ae=r("div"),m(No.$$.fragment),Hd=o(),Kr=r("p"),Kr.innerHTML=Jp,qd=o(),ea=r("p"),ea.innerHTML=Cp,Xd=o(),rt=r("div"),m(Yo.$$.fragment),Rd=o(),ta=r("p"),ta.innerHTML=Up,Ed=o(),oa=r("div"),m(Do.$$.fragment),Nd=o(),at=r("div"),m(Qo.$$.fragment),Yd=o(),na=r("p"),na.textContent=Pp,Dd=o(),st=r("div"),m(Ao.$$.fragment),Qd=o(),ra=r("p"),ra.textContent=Zp,Ad=o(),it=r("div"),m(So.$$.fragment),Sd=o(),aa=r("p"),aa.textContent=Fp,Od=o(),lt=r("div"),m(Oo.$$.fragment),Kd=o(),sa=r("p"),sa.textContent=Ip,ec=o(),dt=r("div"),m(Ko.$$.fragment),tc=o(),ia=r("p"),ia.innerHTML=Wp,oc=o(),ct=r("div"),m(en.$$.fragment),nc=o(),la=r("p"),la.innerHTML=Gp,js=o(),m(tn.$$.fragment),Js=o(),R=r("div"),m(on.$$.fragment),rc=o(),da=r("p"),da.innerHTML=Bp,ac=o(),mt=r("div"),m(nn.$$.fragment),sc=o(),ca=r("p"),ca.textContent=Lp,Cs=o(),m(rn.$$.fragment),Us=o(),U=r("div"),m(an.$$.fragment),ic=o(),ma=r("p"),ma.textContent=zp,lc=o(),pa=r("p"),pa.innerHTML=Vp,dc=o(),ha=r("p"),ha.textContent=Hp,cc=o(),fa=r("ul"),fa.innerHTML=qp,mc=o(),se=r("div"),m(sn.$$.fragment),pc=o(),ua=r("p"),ua.textContent=Xp,hc=o(),m(pt.$$.fragment),fc=o(),ht=r("div"),m(ln.$$.fragment),uc=o(),ga=r("p"),ga.innerHTML=Rp,gc=o(),V=r("div"),m(dn.$$.fragment),_c=o(),_a=r("p"),_a.textContent=Ep,bc=o(),ba=r("p"),ba.innerHTML=Np,vc=o(),va=r("p"),va.innerHTML=Yp,yc=o(),m(ft.$$.fragment),Mc=o(),ie=r("div"),m(cn.$$.fragment),Tc=o(),ya=r("p"),ya.innerHTML=Dp,xc=o(),Ma=r("p"),Ma.textContent=Qp,wc=o(),le=r("div"),m(mn.$$.fragment),$c=o(),Ta=r("p"),Ta.textContent=Ap,kc=o(),m(ut.$$.fragment),jc=o(),gt=r("div"),m(pn.$$.fragment),Jc=o(),xa=r("p"),xa.innerHTML=Sp,Cc=o(),q=r("div"),m(hn.$$.fragment),Uc=o(),wa=r("p"),wa.innerHTML=Op,Pc=o(),$a=r("p"),$a.textContent=Kp,Zc=o(),m(_t.$$.fragment),Fc=o(),X=r("div"),m(fn.$$.fragment),Ic=o(),ka=r("p"),ka.innerHTML=eh,Wc=o(),ja=r("p"),ja.textContent=th,Gc=o(),m(bt.$$.fragment),Bc=o(),de=r("div"),m(un.$$.fragment),Lc=o(),Ja=r("p"),Ja.innerHTML=oh,zc=o(),m(vt.$$.fragment),Ps=o(),m(gn.$$.fragment),Zs=o(),E=r("div"),m(_n.$$.fragment),Vc=o(),Ca=r("p"),Ca.textContent=nh,Hc=o(),ce=r("div"),m(bn.$$.fragment),qc=o(),Ua=r("p"),Ua.textContent=rh,Xc=o(),m(yt.$$.fragment),Fs=o(),m(vn.$$.fragment),Is=o(),N=r("div"),m(yn.$$.fragment),Rc=o(),Pa=r("p"),Pa.innerHTML=ah,Ec=o(),Za=r("p"),Za.textContent=sh,Ws=o(),m(Mn.$$.fragment),Gs=o(),Qa=r("p"),this.h()},l(e){const c=ph("svelte-u9bgzb",document.head);d=a(c,"META",{name:!0,content:!0}),c.forEach(s),C=n(e),v=a(e,"P",{}),y(v).forEach(s),_=n(e),p($.$$.fragment,e),i=n(e),J=a(e,"P",{"data-svelte-h":!0}),l(J)!=="svelte-13g43dn"&&(J.innerHTML=Nc),Aa=n(e),xt=a(e,"P",{"data-svelte-h":!0}),l(xt)!=="svelte-1s1rezm"&&(xt.innerHTML=Yc),Sa=n(e),wt=a(e,"UL",{"data-svelte-h":!0}),l(wt)!=="svelte-ovrku8"&&(wt.innerHTML=Dc),Oa=n(e),$t=a(e,"P",{"data-svelte-h":!0}),l($t)!=="svelte-3y0u2d"&&($t.innerHTML=Qc),Ka=n(e),p(kt.$$.fragment,e),es=n(e),w=a(e,"DIV",{class:!0});var k=y(w);p(jt.$$.fragment,k),vi=n(k),Pn=a(k,"P",{"data-svelte-h":!0}),l(Pn)!=="svelte-12nk4t7"&&(Pn.textContent=Ac),yi=n(k),Zn=a(k,"P",{"data-svelte-h":!0}),l(Zn)!=="svelte-7cf3fl"&&(Zn.innerHTML=Sc),Mi=n(k),Fn=a(k,"UL",{"data-svelte-h":!0}),l(Fn)!=="svelte-6o6r8w"&&(Fn.innerHTML=Oc),Ti=n(k),In=a(k,"P",{"data-svelte-h":!0}),l(In)!=="svelte-1qxxkvo"&&(In.textContent=Kc),xi=n(k),Wn=a(k,"UL",{"data-svelte-h":!0}),l(Wn)!=="svelte-kuvaex"&&(Wn.innerHTML=em),wi=n(k),Q=a(k,"DIV",{class:!0});var fe=y(Q);p(Jt.$$.fragment,fe),$i=n(fe),Gn=a(fe,"P",{"data-svelte-h":!0}),l(Gn)!=="svelte-1j9019y"&&(Gn.textContent=tm),ki=n(fe),p(_e.$$.fragment,fe),fe.forEach(s),ji=n(k),A=a(k,"DIV",{class:!0});var ue=y(A);p(Ct.$$.fragment,ue),Ji=n(ue),Bn=a(ue,"P",{"data-svelte-h":!0}),l(Bn)!=="svelte-1mcxpi"&&(Bn.textContent=om),Ci=n(ue),p(be.$$.fragment,ue),ue.forEach(s),Ui=n(k),ve=a(k,"DIV",{class:!0});var Tn=y(ve);p(Ut.$$.fragment,Tn),Pi=n(Tn),Ln=a(Tn,"P",{"data-svelte-h":!0}),l(Ln)!=="svelte-1r2xt0l"&&(Ln.innerHTML=nm),Tn.forEach(s),Zi=n(k),ye=a(k,"DIV",{class:!0});var xn=y(ye);p(Pt.$$.fragment,xn),Fi=n(xn),zn=a(xn,"P",{"data-svelte-h":!0}),l(zn)!=="svelte-on69a4"&&(zn.textContent=rm),xn.forEach(s),Ii=n(k),Me=a(k,"DIV",{class:!0});var wn=y(Me);p(Zt.$$.fragment,wn),Wi=n(wn),Vn=a(wn,"P",{"data-svelte-h":!0}),l(Vn)!=="svelte-1arq2q9"&&(Vn.innerHTML=am),wn.forEach(s),Gi=n(k),Te=a(k,"DIV",{class:!0});var $n=y(Te);p(Ft.$$.fragment,$n),Bi=n($n),Hn=a($n,"P",{"data-svelte-h":!0}),l(Hn)!=="svelte-gf3f10"&&(Hn.textContent=sm),$n.forEach(s),Li=n(k),Z=a(k,"DIV",{class:!0});var F=y(Z);p(It.$$.fragment,F),zi=n(F),qn=a(F,"P",{"data-svelte-h":!0}),l(qn)!=="svelte-1m220hc"&&(qn.textContent=im),Vi=n(F),Xn=a(F,"P",{"data-svelte-h":!0}),l(Xn)!=="svelte-1vvzid2"&&(Xn.innerHTML=lm),Hi=n(F),Rn=a(F,"P",{"data-svelte-h":!0}),l(Rn)!=="svelte-floidm"&&(Rn.innerHTML=dm),qi=n(F),En=a(F,"P",{"data-svelte-h":!0}),l(En)!=="svelte-5vnnmn"&&(En.innerHTML=cm),Xi=n(F),Nn=a(F,"P",{"data-svelte-h":!0}),l(Nn)!=="svelte-1f411sa"&&(Nn.innerHTML=mm),Ri=n(F),p(xe.$$.fragment,F),Ei=n(F),p(we.$$.fragment,F),Ni=n(F),Yn=a(F,"UL",{"data-svelte-h":!0}),l(Yn)!=="svelte-14hq6us"&&(Yn.innerHTML=pm),Yi=n(F),Dn=a(F,"P",{"data-svelte-h":!0}),l(Dn)!=="svelte-1ndujqx"&&(Dn.textContent=hm),Di=n(F),Qn=a(F,"P",{"data-svelte-h":!0}),l(Qn)!=="svelte-h5finb"&&(Qn.textContent=fm),Qi=n(F),An=a(F,"OL",{"data-svelte-h":!0}),l(An)!=="svelte-17iv4ty"&&(An.innerHTML=um),Ai=n(F),Sn=a(F,"P",{"data-svelte-h":!0}),l(Sn)!=="svelte-1kh2krb"&&(Sn.textContent=gm),F.forEach(s),Si=n(k),$e=a(k,"DIV",{class:!0});var kn=y($e);p(Wt.$$.fragment,kn),Oi=n(kn),On=a(kn,"P",{"data-svelte-h":!0}),l(On)!=="svelte-1oe3d1l"&&(On.textContent=_m),kn.forEach(s),Ki=n(k),ke=a(k,"DIV",{class:!0});var jn=y(ke);p(Gt.$$.fragment,jn),el=n(jn),Kn=a(jn,"P",{"data-svelte-h":!0}),l(Kn)!=="svelte-1o6lvix"&&(Kn.innerHTML=bm),jn.forEach(s),tl=n(k),je=a(k,"DIV",{class:!0});var Jn=y(je);p(Bt.$$.fragment,Jn),ol=n(Jn),er=a(Jn,"P",{"data-svelte-h":!0}),l(er)!=="svelte-1en7lnm"&&(er.textContent=vm),Jn.forEach(s),nl=n(k),S=a(k,"DIV",{class:!0});var ge=y(S);p(Lt.$$.fragment,ge),rl=n(ge),tr=a(ge,"P",{"data-svelte-h":!0}),l(tr)!=="svelte-x1yzxn"&&(tr.textContent=ym),al=n(ge),or=a(ge,"P",{"data-svelte-h":!0}),l(or)!=="svelte-1c0vp3s"&&(or.textContent=Mm),ge.forEach(s),sl=n(k),H=a(k,"DIV",{class:!0});var Y=y(H);p(zt.$$.fragment,Y),il=n(Y),nr=a(Y,"P",{"data-svelte-h":!0}),l(nr)!=="svelte-vu1mp6"&&(nr.textContent=Tm),ll=n(Y),rr=a(Y,"P",{"data-svelte-h":!0}),l(rr)!=="svelte-1c0vp3s"&&(rr.textContent=xm),dl=n(Y),ar=a(Y,"P",{"data-svelte-h":!0}),l(ar)!=="svelte-1entg0x"&&(ar.innerHTML=wm),Y.forEach(s),cl=n(k),Je=a(k,"DIV",{class:!0});var Cn=y(Je);p(Vt.$$.fragment,Cn),ml=n(Cn),sr=a(Cn,"P",{"data-svelte-h":!0}),l(sr)!=="svelte-1gceydr"&&(sr.innerHTML=$m),Cn.forEach(s),pl=n(k),Ce=a(k,"DIV",{class:!0});var Un=y(Ce);p(Ht.$$.fragment,Un),hl=n(Un),ir=a(Un,"P",{"data-svelte-h":!0}),l(ir)!=="svelte-kxy0hj"&&(ir.textContent=km),Un.forEach(s),fl=n(k),Ue=a(k,"DIV",{class:!0});var Ls=y(Ue);p(qt.$$.fragment,Ls),ul=n(Ls),lr=a(Ls,"P",{"data-svelte-h":!0}),l(lr)!=="svelte-qvrpxu"&&(lr.textContent=jm),Ls.forEach(s),gl=n(k),O=a(k,"DIV",{class:!0});var Fa=y(O);p(Xt.$$.fragment,Fa),_l=n(Fa),dr=a(Fa,"P",{"data-svelte-h":!0}),l(dr)!=="svelte-1ie4sav"&&(dr.textContent=Jm),bl=n(Fa),p(Pe.$$.fragment,Fa),Fa.forEach(s),vl=n(k),K=a(k,"DIV",{class:!0});var Ia=y(K);p(Rt.$$.fragment,Ia),yl=n(Ia),cr=a(Ia,"P",{"data-svelte-h":!0}),l(cr)!=="svelte-sgsur1"&&(cr.innerHTML=Cm),Ml=n(Ia),mr=a(Ia,"P",{"data-svelte-h":!0}),l(mr)!=="svelte-1t4xas4"&&(mr.innerHTML=Um),Ia.forEach(s),Tl=n(k),Ze=a(k,"DIV",{class:!0});var zs=y(Ze);p(Et.$$.fragment,zs),xl=n(zs),pr=a(zs,"P",{"data-svelte-h":!0}),l(pr)!=="svelte-wbiq17"&&(pr.innerHTML=Pm),zs.forEach(s),wl=n(k),Fe=a(k,"DIV",{class:!0});var Vs=y(Fe);p(Nt.$$.fragment,Vs),$l=n(Vs),hr=a(Vs,"P",{"data-svelte-h":!0}),l(hr)!=="svelte-l7c94w"&&(hr.innerHTML=Zm),Vs.forEach(s),kl=n(k),Ie=a(k,"DIV",{class:!0});var Hs=y(Ie);p(Yt.$$.fragment,Hs),jl=n(Hs),fr=a(Hs,"P",{"data-svelte-h":!0}),l(fr)!=="svelte-107jmv5"&&(fr.textContent=Fm),Hs.forEach(s),Jl=n(k),ee=a(k,"DIV",{class:!0});var Wa=y(ee);p(Dt.$$.fragment,Wa),Cl=n(Wa),ur=a(Wa,"P",{"data-svelte-h":!0}),l(ur)!=="svelte-5nt4be"&&(ur.textContent=Im),Ul=n(Wa),gr=a(Wa,"P",{"data-svelte-h":!0}),l(gr)!=="svelte-1ti0hxu"&&(gr.innerHTML=Wm),Wa.forEach(s),Pl=n(k),te=a(k,"DIV",{class:!0});var Ga=y(te);p(Qt.$$.fragment,Ga),Zl=n(Ga),_r=a(Ga,"P",{"data-svelte-h":!0}),l(_r)!=="svelte-1sq1344"&&(_r.innerHTML=Gm),Fl=n(Ga),br=a(Ga,"P",{"data-svelte-h":!0}),l(br)!=="svelte-1p16ejc"&&(br.innerHTML=Bm),Ga.forEach(s),Il=n(k),We=a(k,"DIV",{class:!0});var qs=y(We);p(At.$$.fragment,qs),Wl=n(qs),vr=a(qs,"P",{"data-svelte-h":!0}),l(vr)!=="svelte-nkp8sx"&&(vr.textContent=Lm),qs.forEach(s),k.forEach(s),ts=n(e),yr=a(e,"A",{id:!0}),y(yr).forEach(s),os=n(e),p(St.$$.fragment,e),ns=n(e),Ot=a(e,"P",{"data-svelte-h":!0}),l(Ot)!=="svelte-1vph4yl"&&(Ot.innerHTML=zm),rs=n(e),Kt=a(e,"P",{"data-svelte-h":!0}),l(Kt)!=="svelte-k82ih6"&&(Kt.innerHTML=Vm),as=n(e),p(eo.$$.fragment,e),ss=n(e),to=a(e,"P",{"data-svelte-h":!0}),l(to)!=="svelte-bbuvro"&&(to.innerHTML=Hm),is=n(e),oo=a(e,"P",{"data-svelte-h":!0}),l(oo)!=="svelte-a0sf5y"&&(oo.innerHTML=qm),ls=n(e),p(no.$$.fragment,e),ds=n(e),ro=a(e,"P",{"data-svelte-h":!0}),l(ro)!=="svelte-hi8e88"&&(ro.innerHTML=Xm),cs=n(e),p(ao.$$.fragment,e),ms=n(e),p(so.$$.fragment,e),ps=n(e),io=a(e,"P",{"data-svelte-h":!0}),l(io)!=="svelte-bffpgr"&&(io.textContent=Rm),hs=n(e),p(lo.$$.fragment,e),fs=n(e),co=a(e,"P",{"data-svelte-h":!0}),l(co)!=="svelte-xofgy7"&&(co.innerHTML=Em),us=n(e),p(mo.$$.fragment,e),gs=n(e),po=a(e,"P",{"data-svelte-h":!0}),l(po)!=="svelte-1g6edtz"&&(po.innerHTML=Nm),_s=n(e),p(ho.$$.fragment,e),bs=n(e),fo=a(e,"P",{"data-svelte-h":!0}),l(fo)!=="svelte-d3uh15"&&(fo.innerHTML=Ym),vs=n(e),p(uo.$$.fragment,e),ys=n(e),go=a(e,"P",{"data-svelte-h":!0}),l(go)!=="svelte-1fk7l2i"&&(go.innerHTML=Dm),Ms=n(e),p(_o.$$.fragment,e),Ts=n(e),bo=a(e,"P",{"data-svelte-h":!0}),l(bo)!=="svelte-11n10jn"&&(bo.textContent=Qm),xs=n(e),p(vo.$$.fragment,e),ws=n(e),W=a(e,"DIV",{class:!0});var G=y(W);p(yo.$$.fragment,G),Gl=n(G),Mr=a(G,"P",{"data-svelte-h":!0}),l(Mr)!=="svelte-9daxpl"&&(Mr.innerHTML=Am),Bl=n(G),oe=a(G,"DIV",{class:!0});var Ba=y(oe);p(Mo.$$.fragment,Ba),Ll=n(Ba),Tr=a(Ba,"P",{"data-svelte-h":!0}),l(Tr)!=="svelte-bszdl"&&(Tr.textContent=Sm),zl=n(Ba),xr=a(Ba,"P",{"data-svelte-h":!0}),l(xr)!=="svelte-1yhz50g"&&(xr.innerHTML=Om),Ba.forEach(s),Vl=n(G),Ge=a(G,"DIV",{class:!0});var Xs=y(Ge);p(To.$$.fragment,Xs),Hl=n(Xs),wr=a(Xs,"P",{"data-svelte-h":!0}),l(wr)!=="svelte-1vzpsnb"&&(wr.textContent=Km),Xs.forEach(s),ql=n(G),Be=a(G,"DIV",{class:!0});var Rs=y(Be);p(xo.$$.fragment,Rs),Xl=n(Rs),$r=a(Rs,"P",{"data-svelte-h":!0}),l($r)!=="svelte-1quexap"&&($r.innerHTML=ep),Rs.forEach(s),Rl=n(G),Le=a(G,"DIV",{class:!0});var Es=y(Le);p(wo.$$.fragment,Es),El=n(Es),kr=a(Es,"P",{"data-svelte-h":!0}),l(kr)!=="svelte-qy1xxb"&&(kr.textContent=tp),Es.forEach(s),Nl=n(G),ze=a(G,"DIV",{class:!0});var Ns=y(ze);p($o.$$.fragment,Ns),Yl=n(Ns),jr=a(Ns,"P",{"data-svelte-h":!0}),l(jr)!=="svelte-1y1rtu0"&&(jr.textContent=op),Ns.forEach(s),Dl=n(G),Ve=a(G,"DIV",{class:!0});var Ys=y(Ve);p(ko.$$.fragment,Ys),Ql=n(Ys),Jr=a(Ys,"P",{"data-svelte-h":!0}),l(Jr)!=="svelte-1tbhnug"&&(Jr.textContent=np),Ys.forEach(s),Al=n(G),He=a(G,"DIV",{class:!0});var Ds=y(He);p(jo.$$.fragment,Ds),Sl=n(Ds),Cr=a(Ds,"P",{"data-svelte-h":!0}),l(Cr)!=="svelte-vktrn"&&(Cr.textContent=rp),Ds.forEach(s),Ol=n(G),qe=a(G,"DIV",{class:!0});var Qs=y(qe);p(Jo.$$.fragment,Qs),Kl=n(Qs),Ur=a(Qs,"P",{"data-svelte-h":!0}),l(Ur)!=="svelte-1nzhwfo"&&(Ur.innerHTML=ap),Qs.forEach(s),G.forEach(s),$s=n(e),p(Co.$$.fragment,e),ks=n(e),x=a(e,"DIV",{class:!0});var j=y(x);p(Uo.$$.fragment,j),ed=n(j),Pr=a(j,"P",{"data-svelte-h":!0}),l(Pr)!=="svelte-ho56tp"&&(Pr.textContent=sp),td=n(j),Zr=a(j,"P",{"data-svelte-h":!0}),l(Zr)!=="svelte-1ib9pqx"&&(Zr.innerHTML=ip),od=n(j),Fr=a(j,"UL",{"data-svelte-h":!0}),l(Fr)!=="svelte-6o6r8w"&&(Fr.innerHTML=lp),nd=n(j),Ir=a(j,"P",{"data-svelte-h":!0}),l(Ir)!=="svelte-1qxxkvo"&&(Ir.textContent=dp),rd=n(j),Wr=a(j,"UL",{"data-svelte-h":!0}),l(Wr)!=="svelte-1s0ywz5"&&(Wr.innerHTML=cp),ad=n(j),ne=a(j,"DIV",{class:!0});var La=y(ne);p(Po.$$.fragment,La),sd=n(La),Gr=a(La,"P",{"data-svelte-h":!0}),l(Gr)!=="svelte-8nftbo"&&(Gr.innerHTML=mp),id=n(La),p(Xe.$$.fragment,La),La.forEach(s),ld=n(j),Re=a(j,"DIV",{class:!0});var As=y(Re);p(Zo.$$.fragment,As),dd=n(As),Br=a(As,"P",{"data-svelte-h":!0}),l(Br)!=="svelte-1r2xt0l"&&(Br.innerHTML=pp),As.forEach(s),cd=n(j),Ee=a(j,"DIV",{class:!0});var Ss=y(Ee);p(Fo.$$.fragment,Ss),md=n(Ss),Lr=a(Ss,"P",{"data-svelte-h":!0}),l(Lr)!=="svelte-wsnq9n"&&(Lr.textContent=hp),Ss.forEach(s),pd=n(j),Ne=a(j,"DIV",{class:!0});var Os=y(Ne);p(Io.$$.fragment,Os),hd=n(Os),zr=a(Os,"P",{"data-svelte-h":!0}),l(zr)!=="svelte-1mh859w"&&(zr.innerHTML=fp),Os.forEach(s),fd=n(j),z=a(j,"DIV",{class:!0});var me=y(z);p(Wo.$$.fragment,me),ud=n(me),Vr=a(me,"P",{"data-svelte-h":!0}),l(Vr)!=="svelte-vc5x03"&&(Vr.textContent=up),gd=n(me),Hr=a(me,"P",{"data-svelte-h":!0}),l(Hr)!=="svelte-floidm"&&(Hr.innerHTML=gp),_d=n(me),qr=a(me,"P",{"data-svelte-h":!0}),l(qr)!=="svelte-5vnnmn"&&(qr.innerHTML=_p),bd=n(me),p(Ye.$$.fragment,me),me.forEach(s),vd=n(j),De=a(j,"DIV",{class:!0});var Ks=y(De);p(Go.$$.fragment,Ks),yd=n(Ks),Xr=a(Ks,"P",{"data-svelte-h":!0}),l(Xr)!=="svelte-ja4l5b"&&(Xr.textContent=bp),Ks.forEach(s),Md=n(j),Qe=a(j,"DIV",{class:!0});var ei=y(Qe);p(Bo.$$.fragment,ei),Td=n(ei),Rr=a(ei,"P",{"data-svelte-h":!0}),l(Rr)!=="svelte-1y1rtu0"&&(Rr.textContent=vp),ei.forEach(s),xd=n(j),Ae=a(j,"DIV",{class:!0});var ti=y(Ae);p(Lo.$$.fragment,ti),wd=n(ti),Er=a(ti,"P",{"data-svelte-h":!0}),l(Er)!=="svelte-1g2truu"&&(Er.textContent=yp),ti.forEach(s),$d=n(j),Se=a(j,"DIV",{class:!0});var oi=y(Se);p(zo.$$.fragment,oi),kd=n(oi),Nr=a(oi,"P",{"data-svelte-h":!0}),l(Nr)!=="svelte-1hvwe3j"&&(Nr.textContent=Mp),oi.forEach(s),jd=n(j),Oe=a(j,"DIV",{class:!0});var ni=y(Oe);p(Vo.$$.fragment,ni),Jd=n(ni),Yr=a(ni,"P",{"data-svelte-h":!0}),l(Yr)!=="svelte-1mu3td8"&&(Yr.textContent=Tp),ni.forEach(s),Cd=n(j),Ke=a(j,"DIV",{class:!0});var ri=y(Ke);p(Ho.$$.fragment,ri),Ud=n(ri),Dr=a(ri,"P",{"data-svelte-h":!0}),l(Dr)!=="svelte-ib1802"&&(Dr.textContent=xp),ri.forEach(s),Pd=n(j),et=a(j,"DIV",{class:!0});var ai=y(et);p(qo.$$.fragment,ai),Zd=n(ai),Qr=a(ai,"P",{"data-svelte-h":!0}),l(Qr)!=="svelte-1vipzyv"&&(Qr.textContent=wp),ai.forEach(s),Fd=n(j),tt=a(j,"DIV",{class:!0});var si=y(tt);p(Xo.$$.fragment,si),Id=n(si),Ar=a(si,"P",{"data-svelte-h":!0}),l(Ar)!=="svelte-q8rs5u"&&(Ar.innerHTML=$p),si.forEach(s),Wd=n(j),ot=a(j,"DIV",{class:!0});var ii=y(ot);p(Ro.$$.fragment,ii),Gd=n(ii),Sr=a(ii,"P",{"data-svelte-h":!0}),l(Sr)!=="svelte-qvrpxu"&&(Sr.textContent=kp),ii.forEach(s),Bd=n(j),re=a(j,"DIV",{class:!0});var za=y(re);p(Eo.$$.fragment,za),Ld=n(za),Or=a(za,"P",{"data-svelte-h":!0}),l(Or)!=="svelte-1ie4sav"&&(Or.textContent=jp),zd=n(za),p(nt.$$.fragment,za),za.forEach(s),Vd=n(j),ae=a(j,"DIV",{class:!0});var Va=y(ae);p(No.$$.fragment,Va),Hd=n(Va),Kr=a(Va,"P",{"data-svelte-h":!0}),l(Kr)!=="svelte-sgsur1"&&(Kr.innerHTML=Jp),qd=n(Va),ea=a(Va,"P",{"data-svelte-h":!0}),l(ea)!=="svelte-1t4xas4"&&(ea.innerHTML=Cp),Va.forEach(s),Xd=n(j),rt=a(j,"DIV",{class:!0});var li=y(rt);p(Yo.$$.fragment,li),Rd=n(li),ta=a(li,"P",{"data-svelte-h":!0}),l(ta)!=="svelte-ub11wm"&&(ta.innerHTML=Up),li.forEach(s),Ed=n(j),oa=a(j,"DIV",{class:!0});var ih=y(oa);p(Do.$$.fragment,ih),ih.forEach(s),Nd=n(j),at=a(j,"DIV",{class:!0});var di=y(at);p(Qo.$$.fragment,di),Yd=n(di),na=a(di,"P",{"data-svelte-h":!0}),l(na)!=="svelte-4zpnur"&&(na.textContent=Pp),di.forEach(s),Dd=n(j),st=a(j,"DIV",{class:!0});var ci=y(st);p(Ao.$$.fragment,ci),Qd=n(ci),ra=a(ci,"P",{"data-svelte-h":!0}),l(ra)!=="svelte-cmhrcy"&&(ra.textContent=Zp),ci.forEach(s),Ad=n(j),it=a(j,"DIV",{class:!0});var mi=y(it);p(So.$$.fragment,mi),Sd=n(mi),aa=a(mi,"P",{"data-svelte-h":!0}),l(aa)!=="svelte-1ouwbwr"&&(aa.textContent=Fp),mi.forEach(s),Od=n(j),lt=a(j,"DIV",{class:!0});var pi=y(lt);p(Oo.$$.fragment,pi),Kd=n(pi),sa=a(pi,"P",{"data-svelte-h":!0}),l(sa)!=="svelte-x8fgs0"&&(sa.textContent=Ip),pi.forEach(s),ec=n(j),dt=a(j,"DIV",{class:!0});var hi=y(dt);p(Ko.$$.fragment,hi),tc=n(hi),ia=a(hi,"P",{"data-svelte-h":!0}),l(ia)!=="svelte-oo8tit"&&(ia.innerHTML=Wp),hi.forEach(s),oc=n(j),ct=a(j,"DIV",{class:!0});var fi=y(ct);p(en.$$.fragment,fi),nc=n(fi),la=a(fi,"P",{"data-svelte-h":!0}),l(la)!=="svelte-oo8tit"&&(la.innerHTML=Gp),fi.forEach(s),j.forEach(s),js=n(e),p(tn.$$.fragment,e),Js=n(e),R=a(e,"DIV",{class:!0});var Ha=y(R);p(on.$$.fragment,Ha),rc=n(Ha),da=a(Ha,"P",{"data-svelte-h":!0}),l(da)!=="svelte-1dqi2f3"&&(da.innerHTML=Bp),ac=n(Ha),mt=a(Ha,"DIV",{class:!0});var ui=y(mt);p(nn.$$.fragment,ui),sc=n(ui),ca=a(ui,"P",{"data-svelte-h":!0}),l(ca)!=="svelte-im20fs"&&(ca.textContent=Lp),ui.forEach(s),Ha.forEach(s),Cs=n(e),p(rn.$$.fragment,e),Us=n(e),U=a(e,"DIV",{class:!0});var I=y(U);p(an.$$.fragment,I),ic=n(I),ma=a(I,"P",{"data-svelte-h":!0}),l(ma)!=="svelte-12nk4t7"&&(ma.textContent=zp),lc=n(I),pa=a(I,"P",{"data-svelte-h":!0}),l(pa)!=="svelte-j2cd18"&&(pa.innerHTML=Vp),dc=n(I),ha=a(I,"P",{"data-svelte-h":!0}),l(ha)!=="svelte-1qxxkvo"&&(ha.textContent=Hp),cc=n(I),fa=a(I,"UL",{"data-svelte-h":!0}),l(fa)!=="svelte-1s0ywz5"&&(fa.innerHTML=qp),mc=n(I),se=a(I,"DIV",{class:!0});var qa=y(se);p(sn.$$.fragment,qa),pc=n(qa),ua=a(qa,"P",{"data-svelte-h":!0}),l(ua)!=="svelte-a8hf5e"&&(ua.textContent=Xp),hc=n(qa),p(pt.$$.fragment,qa),qa.forEach(s),fc=n(I),ht=a(I,"DIV",{class:!0});var gi=y(ht);p(ln.$$.fragment,gi),uc=n(gi),ga=a(gi,"P",{"data-svelte-h":!0}),l(ga)!=="svelte-12hq10t"&&(ga.innerHTML=Rp),gi.forEach(s),gc=n(I),V=a(I,"DIV",{class:!0});var pe=y(V);p(dn.$$.fragment,pe),_c=n(pe),_a=a(pe,"P",{"data-svelte-h":!0}),l(_a)!=="svelte-1oaqdrm"&&(_a.textContent=Ep),bc=n(pe),ba=a(pe,"P",{"data-svelte-h":!0}),l(ba)!=="svelte-floidm"&&(ba.innerHTML=Np),vc=n(pe),va=a(pe,"P",{"data-svelte-h":!0}),l(va)!=="svelte-5vnnmn"&&(va.innerHTML=Yp),yc=n(pe),p(ft.$$.fragment,pe),pe.forEach(s),Mc=n(I),ie=a(I,"DIV",{class:!0});var Xa=y(ie);p(cn.$$.fragment,Xa),Tc=n(Xa),ya=a(Xa,"P",{"data-svelte-h":!0}),l(ya)!=="svelte-plzzd0"&&(ya.innerHTML=Dp),xc=n(Xa),Ma=a(Xa,"P",{"data-svelte-h":!0}),l(Ma)!=="svelte-bzl1lx"&&(Ma.textContent=Qp),Xa.forEach(s),wc=n(I),le=a(I,"DIV",{class:!0});var Ra=y(le);p(mn.$$.fragment,Ra),$c=n(Ra),Ta=a(Ra,"P",{"data-svelte-h":!0}),l(Ta)!=="svelte-1ie4sav"&&(Ta.textContent=Ap),kc=n(Ra),p(ut.$$.fragment,Ra),Ra.forEach(s),jc=n(I),gt=a(I,"DIV",{class:!0});var _i=y(gt);p(pn.$$.fragment,_i),Jc=n(_i),xa=a(_i,"P",{"data-svelte-h":!0}),l(xa)!=="svelte-k338yk"&&(xa.innerHTML=Sp),_i.forEach(s),Cc=n(I),q=a(I,"DIV",{class:!0});var Mt=y(q);p(hn.$$.fragment,Mt),Uc=n(Mt),wa=a(Mt,"P",{"data-svelte-h":!0}),l(wa)!=="svelte-16uni9u"&&(wa.innerHTML=Op),Pc=n(Mt),$a=a(Mt,"P",{"data-svelte-h":!0}),l($a)!=="svelte-qh3hgx"&&($a.textContent=Kp),Zc=n(Mt),p(_t.$$.fragment,Mt),Mt.forEach(s),Fc=n(I),X=a(I,"DIV",{class:!0});var Tt=y(X);p(fn.$$.fragment,Tt),Ic=n(Tt),ka=a(Tt,"P",{"data-svelte-h":!0}),l(ka)!=="svelte-uock64"&&(ka.innerHTML=eh),Wc=n(Tt),ja=a(Tt,"P",{"data-svelte-h":!0}),l(ja)!=="svelte-1rko7go"&&(ja.textContent=th),Gc=n(Tt),p(bt.$$.fragment,Tt),Tt.forEach(s),Bc=n(I),de=a(I,"DIV",{class:!0});var Ea=y(de);p(un.$$.fragment,Ea),Lc=n(Ea),Ja=a(Ea,"P",{"data-svelte-h":!0}),l(Ja)!=="svelte-1jvan3s"&&(Ja.innerHTML=oh),zc=n(Ea),p(vt.$$.fragment,Ea),Ea.forEach(s),I.forEach(s),Ps=n(e),p(gn.$$.fragment,e),Zs=n(e),E=a(e,"DIV",{class:!0});var Na=y(E);p(_n.$$.fragment,Na),Vc=n(Na),Ca=a(Na,"P",{"data-svelte-h":!0}),l(Ca)!=="svelte-s2i98"&&(Ca.textContent=nh),Hc=n(Na),ce=a(Na,"DIV",{class:!0});var Ya=y(ce);p(bn.$$.fragment,Ya),qc=n(Ya),Ua=a(Ya,"P",{"data-svelte-h":!0}),l(Ua)!=="svelte-am4l6x"&&(Ua.textContent=rh),Xc=n(Ya),p(yt.$$.fragment,Ya),Ya.forEach(s),Na.forEach(s),Fs=n(e),p(vn.$$.fragment,e),Is=n(e),N=a(e,"DIV",{class:!0});var Da=y(N);p(yn.$$.fragment,Da),Rc=n(Da),Pa=a(Da,"P",{"data-svelte-h":!0}),l(Pa)!=="svelte-16tfby7"&&(Pa.innerHTML=ah),Ec=n(Da),Za=a(Da,"P",{"data-svelte-h":!0}),l(Za)!=="svelte-bzl1lx"&&(Za.textContent=sh),Da.forEach(s),Ws=n(e),p(Mn.$$.fragment,e),Gs=n(e),Qa=a(e,"P",{}),y(Qa).forEach(s),this.h()},h(){M(d,"name","hf:doc:metadata"),M(d,"content",Uh),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(yr,"id","from_pretrained-torch-dtype"),M(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"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,c){t(document.head,d),b(e,C,c),b(e,v,c),b(e,_,c),h($,e,c),b(e,i,c),b(e,J,c),b(e,Aa,c),b(e,xt,c),b(e,Sa,c),b(e,wt,c),b(e,Oa,c),b(e,$t,c),b(e,Ka,c),h(kt,e,c),b(e,es,c),b(e,w,c),h(jt,w,null),t(w,vi),t(w,Pn),t(w,yi),t(w,Zn),t(w,Mi),t(w,Fn),t(w,Ti),t(w,In),t(w,xi),t(w,Wn),t(w,wi),t(w,Q),h(Jt,Q,null),t(Q,$i),t(Q,Gn),t(Q,ki),h(_e,Q,null),t(w,ji),t(w,A),h(Ct,A,null),t(A,Ji),t(A,Bn),t(A,Ci),h(be,A,null),t(w,Ui),t(w,ve),h(Ut,ve,null),t(ve,Pi),t(ve,Ln),t(w,Zi),t(w,ye),h(Pt,ye,null),t(ye,Fi),t(ye,zn),t(w,Ii),t(w,Me),h(Zt,Me,null),t(Me,Wi),t(Me,Vn),t(w,Gi),t(w,Te),h(Ft,Te,null),t(Te,Bi),t(Te,Hn),t(w,Li),t(w,Z),h(It,Z,null),t(Z,zi),t(Z,qn),t(Z,Vi),t(Z,Xn),t(Z,Hi),t(Z,Rn),t(Z,qi),t(Z,En),t(Z,Xi),t(Z,Nn),t(Z,Ri),h(xe,Z,null),t(Z,Ei),h(we,Z,null),t(Z,Ni),t(Z,Yn),t(Z,Yi),t(Z,Dn),t(Z,Di),t(Z,Qn),t(Z,Qi),t(Z,An),t(Z,Ai),t(Z,Sn),t(w,Si),t(w,$e),h(Wt,$e,null),t($e,Oi),t($e,On),t(w,Ki),t(w,ke),h(Gt,ke,null),t(ke,el),t(ke,Kn),t(w,tl),t(w,je),h(Bt,je,null),t(je,ol),t(je,er),t(w,nl),t(w,S),h(Lt,S,null),t(S,rl),t(S,tr),t(S,al),t(S,or),t(w,sl),t(w,H),h(zt,H,null),t(H,il),t(H,nr),t(H,ll),t(H,rr),t(H,dl),t(H,ar),t(w,cl),t(w,Je),h(Vt,Je,null),t(Je,ml),t(Je,sr),t(w,pl),t(w,Ce),h(Ht,Ce,null),t(Ce,hl),t(Ce,ir),t(w,fl),t(w,Ue),h(qt,Ue,null),t(Ue,ul),t(Ue,lr),t(w,gl),t(w,O),h(Xt,O,null),t(O,_l),t(O,dr),t(O,bl),h(Pe,O,null),t(w,vl),t(w,K),h(Rt,K,null),t(K,yl),t(K,cr),t(K,Ml),t(K,mr),t(w,Tl),t(w,Ze),h(Et,Ze,null),t(Ze,xl),t(Ze,pr),t(w,wl),t(w,Fe),h(Nt,Fe,null),t(Fe,$l),t(Fe,hr),t(w,kl),t(w,Ie),h(Yt,Ie,null),t(Ie,jl),t(Ie,fr),t(w,Jl),t(w,ee),h(Dt,ee,null),t(ee,Cl),t(ee,ur),t(ee,Ul),t(ee,gr),t(w,Pl),t(w,te),h(Qt,te,null),t(te,Zl),t(te,_r),t(te,Fl),t(te,br),t(w,Il),t(w,We),h(At,We,null),t(We,Wl),t(We,vr),b(e,ts,c),b(e,yr,c),b(e,os,c),h(St,e,c),b(e,ns,c),b(e,Ot,c),b(e,rs,c),b(e,Kt,c),b(e,as,c),h(eo,e,c),b(e,ss,c),b(e,to,c),b(e,is,c),b(e,oo,c),b(e,ls,c),h(no,e,c),b(e,ds,c),b(e,ro,c),b(e,cs,c),h(ao,e,c),b(e,ms,c),h(so,e,c),b(e,ps,c),b(e,io,c),b(e,hs,c),h(lo,e,c),b(e,fs,c),b(e,co,c),b(e,us,c),h(mo,e,c),b(e,gs,c),b(e,po,c),b(e,_s,c),h(ho,e,c),b(e,bs,c),b(e,fo,c),b(e,vs,c),h(uo,e,c),b(e,ys,c),b(e,go,c),b(e,Ms,c),h(_o,e,c),b(e,Ts,c),b(e,bo,c),b(e,xs,c),h(vo,e,c),b(e,ws,c),b(e,W,c),h(yo,W,null),t(W,Gl),t(W,Mr),t(W,Bl),t(W,oe),h(Mo,oe,null),t(oe,Ll),t(oe,Tr),t(oe,zl),t(oe,xr),t(W,Vl),t(W,Ge),h(To,Ge,null),t(Ge,Hl),t(Ge,wr),t(W,ql),t(W,Be),h(xo,Be,null),t(Be,Xl),t(Be,$r),t(W,Rl),t(W,Le),h(wo,Le,null),t(Le,El),t(Le,kr),t(W,Nl),t(W,ze),h($o,ze,null),t(ze,Yl),t(ze,jr),t(W,Dl),t(W,Ve),h(ko,Ve,null),t(Ve,Ql),t(Ve,Jr),t(W,Al),t(W,He),h(jo,He,null),t(He,Sl),t(He,Cr),t(W,Ol),t(W,qe),h(Jo,qe,null),t(qe,Kl),t(qe,Ur),b(e,$s,c),h(Co,e,c),b(e,ks,c),b(e,x,c),h(Uo,x,null),t(x,ed),t(x,Pr),t(x,td),t(x,Zr),t(x,od),t(x,Fr),t(x,nd),t(x,Ir),t(x,rd),t(x,Wr),t(x,ad),t(x,ne),h(Po,ne,null),t(ne,sd),t(ne,Gr),t(ne,id),h(Xe,ne,null),t(x,ld),t(x,Re),h(Zo,Re,null),t(Re,dd),t(Re,Br),t(x,cd),t(x,Ee),h(Fo,Ee,null),t(Ee,md),t(Ee,Lr),t(x,pd),t(x,Ne),h(Io,Ne,null),t(Ne,hd),t(Ne,zr),t(x,fd),t(x,z),h(Wo,z,null),t(z,ud),t(z,Vr),t(z,gd),t(z,Hr),t(z,_d),t(z,qr),t(z,bd),h(Ye,z,null),t(x,vd),t(x,De),h(Go,De,null),t(De,yd),t(De,Xr),t(x,Md),t(x,Qe),h(Bo,Qe,null),t(Qe,Td),t(Qe,Rr),t(x,xd),t(x,Ae),h(Lo,Ae,null),t(Ae,wd),t(Ae,Er),t(x,$d),t(x,Se),h(zo,Se,null),t(Se,kd),t(Se,Nr),t(x,jd),t(x,Oe),h(Vo,Oe,null),t(Oe,Jd),t(Oe,Yr),t(x,Cd),t(x,Ke),h(Ho,Ke,null),t(Ke,Ud),t(Ke,Dr),t(x,Pd),t(x,et),h(qo,et,null),t(et,Zd),t(et,Qr),t(x,Fd),t(x,tt),h(Xo,tt,null),t(tt,Id),t(tt,Ar),t(x,Wd),t(x,ot),h(Ro,ot,null),t(ot,Gd),t(ot,Sr),t(x,Bd),t(x,re),h(Eo,re,null),t(re,Ld),t(re,Or),t(re,zd),h(nt,re,null),t(x,Vd),t(x,ae),h(No,ae,null),t(ae,Hd),t(ae,Kr),t(ae,qd),t(ae,ea),t(x,Xd),t(x,rt),h(Yo,rt,null),t(rt,Rd),t(rt,ta),t(x,Ed),t(x,oa),h(Do,oa,null),t(x,Nd),t(x,at),h(Qo,at,null),t(at,Yd),t(at,na),t(x,Dd),t(x,st),h(Ao,st,null),t(st,Qd),t(st,ra),t(x,Ad),t(x,it),h(So,it,null),t(it,Sd),t(it,aa),t(x,Od),t(x,lt),h(Oo,lt,null),t(lt,Kd),t(lt,sa),t(x,ec),t(x,dt),h(Ko,dt,null),t(dt,tc),t(dt,ia),t(x,oc),t(x,ct),h(en,ct,null),t(ct,nc),t(ct,la),b(e,js,c),h(tn,e,c),b(e,Js,c),b(e,R,c),h(on,R,null),t(R,rc),t(R,da),t(R,ac),t(R,mt),h(nn,mt,null),t(mt,sc),t(mt,ca),b(e,Cs,c),h(rn,e,c),b(e,Us,c),b(e,U,c),h(an,U,null),t(U,ic),t(U,ma),t(U,lc),t(U,pa),t(U,dc),t(U,ha),t(U,cc),t(U,fa),t(U,mc),t(U,se),h(sn,se,null),t(se,pc),t(se,ua),t(se,hc),h(pt,se,null),t(U,fc),t(U,ht),h(ln,ht,null),t(ht,uc),t(ht,ga),t(U,gc),t(U,V),h(dn,V,null),t(V,_c),t(V,_a),t(V,bc),t(V,ba),t(V,vc),t(V,va),t(V,yc),h(ft,V,null),t(U,Mc),t(U,ie),h(cn,ie,null),t(ie,Tc),t(ie,ya),t(ie,xc),t(ie,Ma),t(U,wc),t(U,le),h(mn,le,null),t(le,$c),t(le,Ta),t(le,kc),h(ut,le,null),t(U,jc),t(U,gt),h(pn,gt,null),t(gt,Jc),t(gt,xa),t(U,Cc),t(U,q),h(hn,q,null),t(q,Uc),t(q,wa),t(q,Pc),t(q,$a),t(q,Zc),h(_t,q,null),t(U,Fc),t(U,X),h(fn,X,null),t(X,Ic),t(X,ka),t(X,Wc),t(X,ja),t(X,Gc),h(bt,X,null),t(U,Bc),t(U,de),h(un,de,null),t(de,Lc),t(de,Ja),t(de,zc),h(vt,de,null),b(e,Ps,c),h(gn,e,c),b(e,Zs,c),b(e,E,c),h(_n,E,null),t(E,Vc),t(E,Ca),t(E,Hc),t(E,ce),h(bn,ce,null),t(ce,qc),t(ce,Ua),t(ce,Xc),h(yt,ce,null),b(e,Fs,c),h(vn,e,c),b(e,Is,c),b(e,N,c),h(yn,N,null),t(N,Rc),t(N,Pa),t(N,Ec),t(N,Za),b(e,Ws,c),h(Mn,e,c),b(e,Gs,c),b(e,Qa,c),Bs=!0},p(e,[c]){const k={};c&2&&(k.$$scope={dirty:c,ctx:e}),_e.$set(k);const fe={};c&2&&(fe.$$scope={dirty:c,ctx:e}),be.$set(fe);const ue={};c&2&&(ue.$$scope={dirty:c,ctx:e}),xe.$set(ue);const Tn={};c&2&&(Tn.$$scope={dirty:c,ctx:e}),we.$set(Tn);const xn={};c&2&&(xn.$$scope={dirty:c,ctx:e}),Pe.$set(xn);const wn={};c&2&&(wn.$$scope={dirty:c,ctx:e}),Xe.$set(wn);const $n={};c&2&&($n.$$scope={dirty:c,ctx:e}),Ye.$set($n);const F={};c&2&&(F.$$scope={dirty:c,ctx:e}),nt.$set(F);const kn={};c&2&&(kn.$$scope={dirty:c,ctx:e}),pt.$set(kn);const jn={};c&2&&(jn.$$scope={dirty:c,ctx:e}),ft.$set(jn);const Jn={};c&2&&(Jn.$$scope={dirty:c,ctx:e}),ut.$set(Jn);const ge={};c&2&&(ge.$$scope={dirty:c,ctx:e}),_t.$set(ge);const Y={};c&2&&(Y.$$scope={dirty:c,ctx:e}),bt.$set(Y);const Cn={};c&2&&(Cn.$$scope={dirty:c,ctx:e}),vt.$set(Cn);const Un={};c&2&&(Un.$$scope={dirty:c,ctx:e}),yt.$set(Un)},i(e){Bs||(f($.$$.fragment,e),f(kt.$$.fragment,e),f(jt.$$.fragment,e),f(Jt.$$.fragment,e),f(_e.$$.fragment,e),f(Ct.$$.fragment,e),f(be.$$.fragment,e),f(Ut.$$.fragment,e),f(Pt.$$.fragment,e),f(Zt.$$.fragment,e),f(Ft.$$.fragment,e),f(It.$$.fragment,e),f(xe.$$.fragment,e),f(we.$$.fragment,e),f(Wt.$$.fragment,e),f(Gt.$$.fragment,e),f(Bt.$$.fragment,e),f(Lt.$$.fragment,e),f(zt.$$.fragment,e),f(Vt.$$.fragment,e),f(Ht.$$.fragment,e),f(qt.$$.fragment,e),f(Xt.$$.fragment,e),f(Pe.$$.fragment,e),f(Rt.$$.fragment,e),f(Et.$$.fragment,e),f(Nt.$$.fragment,e),f(Yt.$$.fragment,e),f(Dt.$$.fragment,e),f(Qt.$$.fragment,e),f(At.$$.fragment,e),f(St.$$.fragment,e),f(eo.$$.fragment,e),f(no.$$.fragment,e),f(ao.$$.fragment,e),f(so.$$.fragment,e),f(lo.$$.fragment,e),f(mo.$$.fragment,e),f(ho.$$.fragment,e),f(uo.$$.fragment,e),f(_o.$$.fragment,e),f(vo.$$.fragment,e),f(yo.$$.fragment,e),f(Mo.$$.fragment,e),f(To.$$.fragment,e),f(xo.$$.fragment,e),f(wo.$$.fragment,e),f($o.$$.fragment,e),f(ko.$$.fragment,e),f(jo.$$.fragment,e),f(Jo.$$.fragment,e),f(Co.$$.fragment,e),f(Uo.$$.fragment,e),f(Po.$$.fragment,e),f(Xe.$$.fragment,e),f(Zo.$$.fragment,e),f(Fo.$$.fragment,e),f(Io.$$.fragment,e),f(Wo.$$.fragment,e),f(Ye.$$.fragment,e),f(Go.$$.fragment,e),f(Bo.$$.fragment,e),f(Lo.$$.fragment,e),f(zo.$$.fragment,e),f(Vo.$$.fragment,e),f(Ho.$$.fragment,e),f(qo.$$.fragment,e),f(Xo.$$.fragment,e),f(Ro.$$.fragment,e),f(Eo.$$.fragment,e),f(nt.$$.fragment,e),f(No.$$.fragment,e),f(Yo.$$.fragment,e),f(Do.$$.fragment,e),f(Qo.$$.fragment,e),f(Ao.$$.fragment,e),f(So.$$.fragment,e),f(Oo.$$.fragment,e),f(Ko.$$.fragment,e),f(en.$$.fragment,e),f(tn.$$.fragment,e),f(on.$$.fragment,e),f(nn.$$.fragment,e),f(rn.$$.fragment,e),f(an.$$.fragment,e),f(sn.$$.fragment,e),f(pt.$$.fragment,e),f(ln.$$.fragment,e),f(dn.$$.fragment,e),f(ft.$$.fragment,e),f(cn.$$.fragment,e),f(mn.$$.fragment,e),f(ut.$$.fragment,e),f(pn.$$.fragment,e),f(hn.$$.fragment,e),f(_t.$$.fragment,e),f(fn.$$.fragment,e),f(bt.$$.fragment,e),f(un.$$.fragment,e),f(vt.$$.fragment,e),f(gn.$$.fragment,e),f(_n.$$.fragment,e),f(bn.$$.fragment,e),f(yt.$$.fragment,e),f(vn.$$.fragment,e),f(yn.$$.fragment,e),f(Mn.$$.fragment,e),Bs=!0)},o(e){u($.$$.fragment,e),u(kt.$$.fragment,e),u(jt.$$.fragment,e),u(Jt.$$.fragment,e),u(_e.$$.fragment,e),u(Ct.$$.fragment,e),u(be.$$.fragment,e),u(Ut.$$.fragment,e),u(Pt.$$.fragment,e),u(Zt.$$.fragment,e),u(Ft.$$.fragment,e),u(It.$$.fragment,e),u(xe.$$.fragment,e),u(we.$$.fragment,e),u(Wt.$$.fragment,e),u(Gt.$$.fragment,e),u(Bt.$$.fragment,e),u(Lt.$$.fragment,e),u(zt.$$.fragment,e),u(Vt.$$.fragment,e),u(Ht.$$.fragment,e),u(qt.$$.fragment,e),u(Xt.$$.fragment,e),u(Pe.$$.fragment,e),u(Rt.$$.fragment,e),u(Et.$$.fragment,e),u(Nt.$$.fragment,e),u(Yt.$$.fragment,e),u(Dt.$$.fragment,e),u(Qt.$$.fragment,e),u(At.$$.fragment,e),u(St.$$.fragment,e),u(eo.$$.fragment,e),u(no.$$.fragment,e),u(ao.$$.fragment,e),u(so.$$.fragment,e),u(lo.$$.fragment,e),u(mo.$$.fragment,e),u(ho.$$.fragment,e),u(uo.$$.fragment,e),u(_o.$$.fragment,e),u(vo.$$.fragment,e),u(yo.$$.fragment,e),u(Mo.$$.fragment,e),u(To.$$.fragment,e),u(xo.$$.fragment,e),u(wo.$$.fragment,e),u($o.$$.fragment,e),u(ko.$$.fragment,e),u(jo.$$.fragment,e),u(Jo.$$.fragment,e),u(Co.$$.fragment,e),u(Uo.$$.fragment,e),u(Po.$$.fragment,e),u(Xe.$$.fragment,e),u(Zo.$$.fragment,e),u(Fo.$$.fragment,e),u(Io.$$.fragment,e),u(Wo.$$.fragment,e),u(Ye.$$.fragment,e),u(Go.$$.fragment,e),u(Bo.$$.fragment,e),u(Lo.$$.fragment,e),u(zo.$$.fragment,e),u(Vo.$$.fragment,e),u(Ho.$$.fragment,e),u(qo.$$.fragment,e),u(Xo.$$.fragment,e),u(Ro.$$.fragment,e),u(Eo.$$.fragment,e),u(nt.$$.fragment,e),u(No.$$.fragment,e),u(Yo.$$.fragment,e),u(Do.$$.fragment,e),u(Qo.$$.fragment,e),u(Ao.$$.fragment,e),u(So.$$.fragment,e),u(Oo.$$.fragment,e),u(Ko.$$.fragment,e),u(en.$$.fragment,e),u(tn.$$.fragment,e),u(on.$$.fragment,e),u(nn.$$.fragment,e),u(rn.$$.fragment,e),u(an.$$.fragment,e),u(sn.$$.fragment,e),u(pt.$$.fragment,e),u(ln.$$.fragment,e),u(dn.$$.fragment,e),u(ft.$$.fragment,e),u(cn.$$.fragment,e),u(mn.$$.fragment,e),u(ut.$$.fragment,e),u(pn.$$.fragment,e),u(hn.$$.fragment,e),u(_t.$$.fragment,e),u(fn.$$.fragment,e),u(bt.$$.fragment,e),u(un.$$.fragment,e),u(vt.$$.fragment,e),u(gn.$$.fragment,e),u(_n.$$.fragment,e),u(bn.$$.fragment,e),u(yt.$$.fragment,e),u(vn.$$.fragment,e),u(yn.$$.fragment,e),u(Mn.$$.fragment,e),Bs=!1},d(e){e&&(s(C),s(v),s(_),s(i),s(J),s(Aa),s(xt),s(Sa),s(wt),s(Oa),s($t),s(Ka),s(es),s(w),s(ts),s(yr),s(os),s(ns),s(Ot),s(rs),s(Kt),s(as),s(ss),s(to),s(is),s(oo),s(ls),s(ds),s(ro),s(cs),s(ms),s(ps),s(io),s(hs),s(fs),s(co),s(us),s(gs),s(po),s(_s),s(bs),s(fo),s(vs),s(ys),s(go),s(Ms),s(Ts),s(bo),s(xs),s(ws),s(W),s($s),s(ks),s(x),s(js),s(Js),s(R),s(Cs),s(Us),s(U),s(Ps),s(Zs),s(E),s(Fs),s(Is),s(N),s(Ws),s(Gs),s(Qa)),s(d),g($,e),g(kt,e),g(jt),g(Jt),g(_e),g(Ct),g(be),g(Ut),g(Pt),g(Zt),g(Ft),g(It),g(xe),g(we),g(Wt),g(Gt),g(Bt),g(Lt),g(zt),g(Vt),g(Ht),g(qt),g(Xt),g(Pe),g(Rt),g(Et),g(Nt),g(Yt),g(Dt),g(Qt),g(At),g(St,e),g(eo,e),g(no,e),g(ao,e),g(so,e),g(lo,e),g(mo,e),g(ho,e),g(uo,e),g(_o,e),g(vo,e),g(yo),g(Mo),g(To),g(xo),g(wo),g($o),g(ko),g(jo),g(Jo),g(Co,e),g(Uo),g(Po),g(Xe),g(Zo),g(Fo),g(Io),g(Wo),g(Ye),g(Go),g(Bo),g(Lo),g(zo),g(Vo),g(Ho),g(qo),g(Xo),g(Ro),g(Eo),g(nt),g(No),g(Yo),g(Do),g(Qo),g(Ao),g(So),g(Oo),g(Ko),g(en),g(tn,e),g(on),g(nn),g(rn,e),g(an),g(sn),g(pt),g(ln),g(dn),g(ft),g(cn),g(mn),g(ut),g(pn),g(hn),g(_t),g(fn),g(bt),g(un),g(vt),g(gn,e),g(_n),g(bn),g(yt),g(vn,e),g(yn),g(Mn,e)}}}const Uh='{"title":"Models","local":"models","sections":[{"title":"PreTrainedModel","local":"transformers.PreTrainedModel","sections":[{"title":"大規模モデルの読み込み","local":"大規模モデルの読み込み","sections":[],"depth":3},{"title":"Model Instantiation dtype","local":"model-instantiation-dtype","sections":[],"depth":3}],"depth":2},{"title":"ModuleUtilsMixin","local":"transformers.modeling_utils.ModuleUtilsMixin","sections":[],"depth":2},{"title":"TFPreTrainedModel","local":"transformers.TFPreTrainedModel","sections":[],"depth":2},{"title":"TFModelUtilsMixin","local":"transformers.modeling_tf_utils.TFModelUtilsMixin","sections":[],"depth":2},{"title":"FlaxPreTrainedModel","local":"transformers.FlaxPreTrainedModel","sections":[],"depth":2},{"title":"Pushing to the Hub","local":"transformers.utils.PushToHubMixin","sections":[],"depth":2},{"title":"Sharded checkpoints","local":"transformers.modeling_utils.load_sharded_checkpoint","sections":[],"depth":2}],"depth":1}';function Ph(P){return dh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zh extends ch{constructor(d){super(),mh(this,d,Ph,Ch,lh,{})}}export{zh as component};
