import{s as ih,o as dh,n as B}from"../chunks/scheduler.bdbef820.js";import{S as lh,i as mh,g as r,s as o,r as c,A as ch,h as a,f as s,c as n,j as v,u as p,x as d,k as M,y as t,a as b,v as h,d as f,t as u,w as g}from"../chunks/index.33f81d56.js";import{T as Mi}from"../chunks/Tip.34194030.js";import{D as T}from"../chunks/Docstring.b3df4217.js";import{C as W}from"../chunks/CodeBlock.3bad7fc9.js";import{E as D}from"../chunks/ExampleCodeBlock.d705c5b9.js";import{H as fe,E as ph}from"../chunks/index.474b463a.js";function hh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function fh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function uh(P){let l,U=`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(){l=r("p"),l.innerHTML=U},l(y){l=a(y,"P",{"data-svelte-h":!0}),d(l)!=="svelte-13hahdn"&&(l.innerHTML=U)},m(y,_){b(y,l,_)},p:B,d(y){y&&s(l)}}}function gh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function _h(P){let l,U="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){l=r("p"),l.textContent=U},l(y){l=a(y,"P",{"data-svelte-h":!0}),d(l)!=="svelte-15rpg4"&&(l.textContent=U)},m(y,_){b(y,l,_)},p:B,d(y){y&&s(l)}}}function bh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function yh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function vh(P){let l,U="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){l=r("p"),l.textContent=U},l(y){l=a(y,"P",{"data-svelte-h":!0}),d(l)!=="svelte-15rpg4"&&(l.textContent=U)},m(y,_){b(y,l,_)},p:B,d(y){y&&s(l)}}}function Mh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function Th(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function xh(P){let l,U="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){l=r("p"),l.textContent=U},l(y){l=a(y,"P",{"data-svelte-h":!0}),d(l)!=="svelte-15rpg4"&&(l.textContent=U)},m(y,_){b(y,l,_)},p:B,d(y){y&&s(l)}}}function wh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function $h(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function kh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function jh(P){let l,U="Examples:",y,_,k;return _=new W({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(){l=r("p"),l.textContent=U,y=o(),c(_.$$.fragment)},l(i){l=a(i,"P",{"data-svelte-h":!0}),d(l)!=="svelte-kvfsh7"&&(l.textContent=U),y=n(i),p(_.$$.fragment,i)},m(i,J){b(i,l,J),b(i,y,J),h(_,i,J),k=!0},p:B,i(i){k||(f(_.$$.fragment,i),k=!0)},o(i){u(_.$$.fragment,i),k=!1},d(i){i&&(s(l),s(y)),g(_,i)}}}function Jh(P){let l,U,y,_,k,i,J,Dm='ベースクラスである <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>、<a href="/docs/transformers/main/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>、<a href="/docs/transformers/main/ja/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a> は、モデルの読み込みと保存に関する共通のメソッドを実装しており、これはローカルのファイルやディレクトリから、またはライブラリが提供する事前学習モデル構成（HuggingFaceのAWS S3リポジトリからダウンロード）からモデルを読み込むために使用できます。',Sa,kt,Qm='<a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> と <a href="/docs/transformers/main/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> は、次の共通のメソッドも実装しています：',Oa,jt,Am="<li>語彙に新しいトークンが追加された場合に、入力トークン埋め込みのリサイズを行う</li> <li>モデルのアテンションヘッドを刈り込む</li>",Ka,Jt,Sm='各モデルに共通するその他のメソッドは、<a href="/docs/transformers/main/ja/main_classes/model#transformers.modeling_utils.ModuleUtilsMixin">ModuleUtilsMixin</a>（PyTorchモデル用）および<code>~modeling_tf_utils.TFModuleUtilsMixin</code>（TensorFlowモデル用）で定義されており、テキスト生成の場合、<a href="/docs/transformers/main/ja/main_classes/text_generation#transformers.GenerationMixin">GenerationMixin</a>（PyTorchモデル用）、<a href="/docs/transformers/main/ja/main_classes/text_generation#transformers.TFGenerationMixin">TFGenerationMixin</a>（TensorFlowモデル用）、および<a href="/docs/transformers/main/ja/main_classes/text_generation#transformers.FlaxGenerationMixin">FlaxGenerationMixin</a>（Flax/JAXモデル用）もあります。',es,Ut,ts,x,Ct,Ti,Wn,Om="Base class for all models.",xi,Gn,Km=`<a href="/docs/transformers/main/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:`,wi,zn,ec="<li>resize the input embeddings,</li> <li>prune heads in the self-attention heads.</li>",$i,Bn,tc="Class attributes (overridden by derived classes):",ki,Ln,oc=`<li><p><strong>config_class</strong> (<a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/main/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/main/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>`,ji,Q,Pt,Ji,Vn,nc="Upload the model file to the 🤗 Model Hub.",Ui,ye,Ci,A,Zt,Pi,Hn,rc=`Add custom tags into the model that gets pushed to the Hugging Face Hub. Will
not overwrite existing tags in the model.`,Zi,ve,Fi,S,Ft,Ii,Nn,ac="Returns whether this model can generate sequences with <code>.generate()</code> from the <code>GenerationMixin</code>.",Wi,qn,sc=`Under the hood, on classes where this function returns True, some generation-specific changes are triggered:
for instance, the model instance will have a populated <code>generation_config</code> attribute.`,Gi,Me,It,zi,Xn,ic=`Potentially dequantize the model in case it has been quantized by a quantization method that support
dequantization.`,Bi,Te,Wt,Li,Rn,dc="Removes the <code>_require_grads_hook</code>.",Vi,xe,Gt,Hi,En,lc=`Enables the gradients for the input embeddings. This is useful for fine-tuning adapter weights while keeping
the model weights fixed.`,Ni,G,zt,qi,Yn,mc="Instantiate a pretrained pytorch model from a pre-trained model configuration.",Xi,Dn,cc=`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>.`,Ri,Qn,pc=`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.`,Ei,An,hc=`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.`,Yi,we,Di,$e,Qi,ke,Bt,Ai,Sn,fc=`Return a <code>torch.compile</code>‘d version of <code>self.__call__</code>. This is useful to dynamically choose between
non-compiled/compiled <code>forward</code> during inference, especially to switch between prefill (where we don’t
want to use compiled version to avoid recomputing the graph with new shapes) and iterative decoding
(where we want the speed-ups of compiled version with static shapes).`,Si,je,Lt,Oi,On,uc="Returns the model’s input embeddings.",Ki,Je,Vt,ed,Kn,gc=`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>`,td,Ue,Ht,od,er,_c="Returns the model’s output embeddings.",nd,Ce,Nt,rd,tr,bc=`Return the parameter or buffer given by <code>target</code> if it exists, otherwise throw an error. This combines
<code>get_parameter()</code> and <code>get_buffer()</code> in a single handy function. Note that it only work if <code>target</code> is a
leaf of the model.`,ad,O,qt,sd,or,yc="Deactivates gradient checkpointing for the current model.",id,nr,vc=`Note that in other frameworks this feature can be referred to as “activation checkpointing” or “checkpoint
activations”.`,dd,H,Xt,ld,rr,Mc="Activates gradient checkpointing for the current model.",md,ar,Tc=`Note that in other frameworks this feature can be referred to as “activation checkpointing” or “checkpoint
activations”.`,cd,sr,xc=`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>`,pd,Pe,Rt,hd,ir,wc=`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>.`,fd,Ze,Et,ud,dr,$c=`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).`,gd,Fe,Yt,_d,lr,kc="Prunes heads of the base model.",bd,K,Dt,yd,mr,jc=`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.`,vd,Ie,Md,ee,Qt,Td,cr,Jc="Resizes input token embeddings matrix of the model if <code>new_num_tokens != config.vocab_size</code>.",xd,pr,Uc="Takes care of tying weights embeddings afterwards if the model class has a <code>tie_weights()</code> method.",wd,We,At,$d,hr,Cc=`Reverts the transformation from <a href="/docs/transformers/main/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.`,kd,Ge,St,jd,fr,Pc=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> class method.`,Jd,ze,Ot,Ud,ur,Zc="Set model’s input embeddings.",Cd,te,Kt,Pd,gr,Fc="Tie the weights between the input embeddings and the output embeddings.",Zd,_r,Ic=`If the <code>torchscript</code> flag is set in the configuration, can’t handle parameter sharing so we are cloning the
weights instead.`,Fd,oe,eo,Id,br,Wc=`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.`,Wd,yr,Gc=`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>.`,Gd,Be,to,zd,vr,zc="Shows a one-time warning if the input_ids appear to contain padding and no attention mask was given.",os,Mr,ns,oo,rs,no,Bc='Transformers 4.20.0では、<a href="/docs/transformers/main/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つが必要でした）、モデルを空の外殻として作成し、事前学習の重みが読み込まれるときにパラメーターを実体化するオプションが追加されました。',as,ro,Lc="このオプションは <code>low_cpu_mem_usage=True</code> で有効にできます。モデルはまず空の重みを持つメタデバイス上に作成され、その後状態辞書が内部に読み込まれます（シャードされたチェックポイントの場合、シャードごとに読み込まれます）。この方法で使用される最大RAMは、モデルの完全なサイズだけです。",ss,ao,is,so,Vc="さらに、モデルが完全にRAMに収まらない場合（現時点では推論のみ有効）、異なるデバイスにモデルを直接配置できます。<code>device_map=&quot;auto&quot;</code> を使用すると、Accelerateは各レイヤーをどのデバイスに配置するかを決定し、最速のデバイス（GPU）を最大限に活用し、残りの部分をCPU、あるいはGPU RAMが不足している場合はハードドライブにオフロードします。モデルが複数のデバイスに分割されていても、通常どおり実行されます。",ds,io,Hc="<code>device_map</code> を渡す際、<code>low_cpu_mem_usage</code> は自動的に <code>True</code> に設定されるため、それを指定する必要はありません。",ls,lo,ms,mo,Nc="モデルがデバイス間でどのように分割されたかは、その <code>hf_device_map</code> 属性を見ることで確認できます:",cs,co,ps,po,hs,ho,qc="同じフォーマットに従って、独自のデバイスマップを作成することもできます（レイヤー名からデバイスへの辞書です）。モデルのすべてのパラメータを指定されたデバイスにマップする必要がありますが、1つのレイヤーが完全に同じデバイスにある場合、そのレイヤーのサブモジュールのすべてがどこに行くかの詳細を示す必要はありません。例えば、次のデバイスマップはT0ppに適しています（GPUメモリがある場合）:",fs,fo,us,uo,Xc="モデルのメモリへの影響を最小限に抑えるもう 1 つの方法は、低精度の dtype (<code>torch.float16</code> など) でモデルをインスタンス化するか、以下で説明する直接量子化手法を使用することです。",gs,go,_s,_o,Rc=`Pytorch では、モデルは通常 <code>torch.float32</code> 形式でインスタンス化されます。これは、しようとすると問題になる可能性があります
重みが fp16 にあるモデルをロードすると、2 倍のメモリが必要になるためです。この制限を克服するには、次のことができます。
<code>torch_dtype</code> 引数を使用して、目的の <code>dtype</code> を明示的に渡します。`,bs,bo,ys,yo,Ec=`または、モデルを常に最適なメモリ パターンでロードしたい場合は、特別な値 <code>&quot;auto&quot;</code> を使用できます。
そして、<code>dtype</code> はモデルの重みから自動的に導出されます。`,vs,vo,Ms,Mo,Yc="スクラッチからインスタンス化されたモデルには、どの <code>dtype</code> を使用するかを指示することもできます。",Ts,To,xs,xo,Dc="Pytorch の設計により、この機能は浮動小数点 dtype でのみ使用できます。",ws,wo,$s,F,$o,Bd,Tr,Qc="A few utilities for <code>torch.nn.Modules</code>, to be used as a mixin.",Ld,ne,ko,Vd,xr,Ac="Add a memory hook before and after each sub-module forward pass to record increase in memory consumption.",Hd,wr,Sc=`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>.`,Nd,Le,jo,qd,$r,Oc="Helper function to estimate the total number of tokens from the model inputs.",Xd,Ve,Jo,Rd,kr,Kc=`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.`,Ed,He,Uo,Yd,jr,ep="Makes broadcastable attention and causal masks so that future and masked tokens are ignored.",Dd,Ne,Co,Qd,Jr,tp="Prepare the head mask if needed.",Ad,qe,Po,Sd,Ur,op="Invert an attention mask (e.g., switches 0. and 1.).",Od,Xe,Zo,Kd,Cr,np="Get number of (optionally, trainable or non-embeddings) parameters in the module.",el,Re,Fo,tl,Pr,rp='Reset the <code>mem_rss_diff</code> attribute of each module (see <a href="/docs/transformers/main/ja/main_classes/model#transformers.modeling_utils.ModuleUtilsMixin.add_memory_hooks">add_memory_hooks()</a>).',ks,Io,js,w,Wo,ol,Zr,ap="Base class for all TF models.",nl,Fr,sp=`<a href="/docs/transformers/main/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:`,rl,Ir,ip="<li>resize the input embeddings,</li> <li>prune heads in the self-attention heads.</li>",al,Wr,dp="Class attributes (overridden by derived classes):",sl,Gr,lp=`<li><strong>config_class</strong> (<a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/main/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>`,il,re,Go,dl,zr,mp="Upload the model files to the 🤗 Model Hub while synchronizing a local clone of the repo in <code>repo_path_or_name</code>.",ll,Ee,ml,Ye,zo,cl,Br,cp="Returns whether this model can generate sequences with <code>.generate()</code>.",pl,De,Bo,hl,Lr,pp=`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.`,fl,Qe,Lo,ul,Vr,hp="Creates a draft of a model card using the information available to the <code>Trainer</code>.",gl,L,Vo,_l,Hr,fp="Instantiate a pretrained TF 2.0 model from a pre-trained model configuration.",bl,Nr,up=`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.`,yl,qr,gp=`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.`,vl,Ae,Ml,Se,Ho,Tl,Xr,_p="Dict of bias attached to an LM head. The key represents the name of the bias attribute.",xl,Oe,No,wl,Rr,bp="Prepare the head mask if needed.",$l,Ke,qo,kl,Er,yp="Returns the model’s input embeddings layer.",jl,et,Xo,Jl,Yr,vp="The LM Head layer. This method must be overwritten by all the models that have a lm head.",Ul,tt,Ro,Cl,Dr,Mp="Returns the model’s output embeddings",Pl,ot,Eo,Zl,Qr,Tp=`Get the layer that handles a bias attribute in case the model has an LM head with weights tied to the
embeddings`,Fl,nt,Yo,Il,Ar,xp="Get the concatenated _prefix name of the bias from the model name to the parent layer",Wl,rt,Do,Gl,Sr,wp=`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.`,zl,at,Qo,Bl,Or,$p="Prunes heads of the base model.",Ll,ae,Ao,Vl,Kr,kp=`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.`,Hl,st,Nl,se,So,ql,ea,jp="Resizes input token embeddings matrix of the model if <code>new_num_tokens != config.vocab_size</code>.",Xl,ta,Jp="Takes care of tying weights embeddings afterwards if the model class has a <code>tie_weights()</code> method.",Rl,it,Oo,El,oa,Up=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<a href="/docs/transformers/main/ja/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> class method.`,Yl,na,Ko,Dl,dt,en,Ql,ra,Cp="Prepare the output of the saved model. Can be overridden if specific serving modifications are required.",Al,lt,tn,Sl,aa,Pp="Set all the bias in the LM head.",Ol,mt,on,Kl,sa,Zp="Set model’s input embeddings",em,ct,nn,tm,ia,Fp="Set model’s output embeddings",om,pt,rn,nm,da,Ip=`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.`,rm,ht,an,am,la,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.`,Js,sn,Us,X,dn,sm,ma,Gp="A few utilities for <code>keras.Model</code>, to be used as a mixin.",im,ft,ln,dm,ca,zp="Get the number of (optionally, trainable) parameters in the model.",Cs,mn,Ps,C,cn,lm,pa,Bp="Base class for all models.",mm,ha,Lp=`<a href="/docs/transformers/main/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.`,cm,fa,Vp="Class attributes (overridden by derived classes):",pm,ua,Hp=`<li><strong>config_class</strong> (<a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) — A subclass of <a href="/docs/transformers/main/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>`,hm,ie,pn,fm,ga,Np="Upload the model checkpoint to the 🤗 Model Hub.",um,ut,gm,gt,hn,_m,_a,qp=`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>.`,bm,V,fn,ym,ba,Xp="Instantiate a pretrained flax model from a pre-trained model configuration.",vm,ya,Rp=`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.`,Mm,va,Ep=`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.`,Tm,_t,xm,de,un,wm,Ma,Yp=`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.`,$m,Ta,Dp=`This load is performed efficiently: each checkpoint shard is loaded one by one in RAM and deleted after being
loaded in the model.`,km,le,gn,jm,xa,Qp=`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.`,Jm,bt,Um,yt,_n,Cm,wa,Ap=`Save a model and its configuration file to a directory, so that it can be re-loaded using the
<code>[from_pretrained()](/docs/transformers/main/ja/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained)</code> class method`,Pm,N,bn,Zm,$a,Sp=`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.`,Fm,ka,Op=`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.`,Im,vt,Wm,q,yn,Gm,ja,Kp=`Cast the floating-point <code>params</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.`,zm,Ja,eh=`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.`,Bm,Mt,Lm,me,vn,Vm,Ua,th=`Cast the floating-point <code>params</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.`,Hm,Tt,Zs,Mn,Fs,R,Tn,Nm,Ca,oh="A Mixin containing the functionality to push a model or tokenizer to the hub.",qm,ce,xn,Xm,Pa,nh="Upload the {object_files} to the 🤗 Model Hub.",Rm,xt,Is,wn,Ws,E,$n,Em,Za,rh=`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.`,Ym,Fa,ah=`This load is performed efficiently: each checkpoint shard is loaded one by one in RAM and deleted after being
loaded in the model.`,Gs,kn,zs,Aa,Bs;return k=new fe({props:{title:"Models",local:"models",headingTag:"h1"}}),Ut=new fe({props:{title:"PreTrainedModel",local:"transformers.PreTrainedModel",headingTag:"h2"}}),Ct=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/main/src/transformers/modeling_utils.py#L1737"}}),Pt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedModel.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": typing.Optional[str] = None"},{name:"commit_description",val:": typing.Optional[str] = None"},{name:"tags",val:": typing.Optional[list[str]] = 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 to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,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/main/src/transformers/utils/hub.py#L854"}}),ye=new D({props:{anchor:"transformers.PreTrainedModel.push_to_hub.example",$$slots:{default:[hh]},$$scope:{ctx:P}}}),Zt=new T({props:{name:"add_model_tags",anchor:"transformers.PreTrainedModel.add_model_tags",parameters:[{name:"tags",val:": typing.Union[typing.List[str], str]"}],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/main/src/transformers/modeling_utils.py#L1939"}}),ve=new D({props:{anchor:"transformers.PreTrainedModel.add_model_tags.example",$$slots:{default:[fh]},$$scope:{ctx:P}}}),Ft=new T({props:{name:"can_generate",anchor:"transformers.PreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2169",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>
`}}),It=new T({props:{name:"dequantize",anchor:"transformers.PreTrainedModel.dequantize",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L1921"}}),Wt=new T({props:{name:"disable_input_require_grads",anchor:"transformers.PreTrainedModel.disable_input_require_grads",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2385"}}),Gt=new T({props:{name:"enable_input_require_grads",anchor:"transformers.PreTrainedModel.enable_input_require_grads",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2374"}}),zt=new T({props:{name:"from_pretrained",anchor:"transformers.PreTrainedModel.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"*model_args",val:""},{name:"config",val:": typing.Union[transformers.configuration_utils.PretrainedConfig, str, os.PathLike, NoneType] = None"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[str, bool, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"use_safetensors",val:": typing.Optional[bool] = None"},{name:"weights_only",val:": bool = True"},{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/main/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/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string or path valid as input to <a href="/docs/transformers/main/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/main/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/main/ja/main_classes/model#transformers.PreTrainedModel.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/main/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.`,name:"force_download"},{anchor:"transformers.PreTrainedModel.from_pretrained.resume_download",description:`<strong>resume_download</strong> &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"resume_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 <code>revision=&quot;refs/pr/&lt;pr_number&gt;&quot;</code>.</p>

					</div>`,name:"revision"},{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/main/src/transformers/modeling_utils.py#L3725",parameterGroups:[{title:"Parameters for big model inference",parametersDescription:[{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 if using <code>device_map</code>. 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.tp_plan",description:`<strong>tp_plan</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A torch tensor parallel plan, see <a href="https://pytorch.org/tutorials/intermediate/TP_tutorial.html" rel="nofollow">here</a>. Currently, it only accepts
<code>tp_plan=&quot;auto&quot;</code> to use predefined plan based on the model. Note that if you use it, you should launch your script accordingly with
<code>torchrun [args] script.py</code>. This will be much faster than using a <code>device_map</code>, but has limitations.`,name:"tp_plan"},{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.weights_only",description:`<strong>weights_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Indicates whether unpickler should be restricted to loading only tensors, primitive types,
dictionaries and any types added via torch.serialization.add_safe_globals().
When set to False, we can load wrapper tensor subclass weights.`,name:"weights_only"},{anchor:"transformers.PreTrainedModel.from_pretrained.key_mapping",description:`<strong>key_mapping</strong> (\`Dict[str, str], <em>optional</em>) &#x2014;
A potential mapping of the weight names if using a model on the Hub which is compatible to a Transformers
architecture, but was not converted accordingly.`,name:"key_mapping"},{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/main/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"}]}]}}),we=new Mi({props:{$$slots:{default:[uh]},$$scope:{ctx:P}}}),$e=new D({props:{anchor:"transformers.PreTrainedModel.from_pretrained.example",$$slots:{default:[gh]},$$scope:{ctx:P}}}),Bt=new T({props:{name:"get_compiled_call",anchor:"transformers.PreTrainedModel.get_compiled_call",parameters:[{name:"compile_config",val:": CompileConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5162"}}),Lt=new T({props:{name:"get_input_embeddings",anchor:"transformers.PreTrainedModel.get_input_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2391",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>
`}}),Vt=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/main/src/transformers/modeling_utils.py#L3609"}}),Ht=new T({props:{name:"get_output_embeddings",anchor:"transformers.PreTrainedModel.get_output_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2417",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>
`}}),Nt=new T({props:{name:"get_parameter_or_buffer",anchor:"transformers.PreTrainedModel.get_parameter_or_buffer",parameters:[{name:"target",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5257"}}),qt=new T({props:{name:"gradient_checkpointing_disable",anchor:"transformers.PreTrainedModel.gradient_checkpointing_disable",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L3156"}}),Xt=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/main/src/transformers/modeling_utils.py#L3092"}}),Rt=new T({props:{name:"init_weights",anchor:"transformers.PreTrainedModel.init_weights",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L3058"}}),Et=new T({props:{name:"post_init",anchor:"transformers.PreTrainedModel.post_init",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L1882"}}),Yt=new T({props:{name:"prune_heads",anchor:"transformers.PreTrainedModel.prune_heads",parameters:[{name:"heads_to_prune",val:": typing.Dict[int, typing.List[int]]"}],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/main/src/transformers/modeling_utils.py#L3075"}}),Dt=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/main/src/transformers/modeling_utils.py#L5011"}}),Ie=new Mi({props:{warning:!0,$$slots:{default:[_h]},$$scope:{ctx:P}}}),Qt=new T({props:{name:"resize_token_embeddings",anchor:"transformers.PreTrainedModel.resize_token_embeddings",parameters:[{name:"new_num_tokens",val:": typing.Optional[int] = None"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"mean_resizing",val:": bool = True"}],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"},{anchor:"transformers.PreTrainedModel.resize_token_embeddings.mean_resizing",description:`<strong>mean_resizing</strong> (<code>bool</code>) &#x2014;
Whether to initialize the added embeddings from a multivariate normal distribution that has old embeddings&#x2019; mean and
covariance or to initialize them with a normal distribution that has a mean of zero and std equals <code>config.initializer_range</code>.</p>
<p>Setting <code>mean_resizing</code> to <code>True</code> is useful when increasing the size of the embeddings of causal language models,
where the generated tokens&#x2019; probabilities won&#x2019;t be affected by the added embeddings because initializing the new embeddings with the
old embeddings&#x2019; mean will reduce the kl-divergence between the next token probability before and after adding the new embeddings.
Refer to this article for more information: <a href="https://nlp.stanford.edu/~johnhew/vocab-expansion.html" rel="nofollow">https://nlp.stanford.edu/~johnhew/vocab-expansion.html</a>`,name:"mean_resizing"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2610",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>
`}}),At=new T({props:{name:"reverse_bettertransformer",anchor:"transformers.PreTrainedModel.reverse_bettertransformer",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5065",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/main/ja/main_classes/model#transformers.PreTrainedModel"
>PreTrainedModel</a></p>
`}}),St=new T({props:{name:"save_pretrained",anchor:"transformers.PreTrainedModel.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"state_dict",val:": typing.Optional[dict] = None"},{name:"save_function",val:": typing.Callable = <function save at 0x7f0f0cdaab00>"},{name:"push_to_hub",val:": bool = False"},{name:"max_shard_size",val:": typing.Union[int, str] = '5GB'"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": typing.Optional[str] = None"},{name:"token",val:": typing.Union[str, bool, NoneType] = 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/main/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L3189"}}),Ot=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/main/src/transformers/modeling_utils.py#L2404"}}),Kt=new T({props:{name:"tie_weights",anchor:"transformers.PreTrainedModel.tie_weights",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2444"}}),eo=new T({props:{name:"to_bettertransformer",anchor:"transformers.PreTrainedModel.to_bettertransformer",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5037",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/main/ja/main_classes/model#transformers.PreTrainedModel"
>PreTrainedModel</a></p>
`}}),to=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/main/src/transformers/modeling_utils.py#L5087"}}),oo=new fe({props:{title:"大規模モデルの読み込み",local:"大規模モデルの読み込み",headingTag:"h3"}}),ao=new W({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}}),lo=new W({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}}),co=new W({props:{code:"dDBwcC5oZl9kZXZpY2VfbWFw",highlighted:"t0pp.hf_device_map",wrap:!1}}),po=new W({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}}),fo=new W({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}}),go=new fe({props:{title:"Model Instantiation dtype",local:"model-instantiation-dtype",headingTag:"h3"}}),bo=new W({props:{code:"bW9kZWwlMjAlM0QlMjBUNUZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydDUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYp",highlighted:'model = T5ForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;t5&quot;</span>, torch_dtype=torch.float16)',wrap:!1}}),vo=new W({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}}),To=new W({props:{code:"Y29uZmlnJTIwJTNEJTIwVDVDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMnQ1JTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fY29uZmlnKGNvbmZpZyk=",highlighted:`config = T5Config.from_pretrained(<span class="hljs-string">&quot;t5&quot;</span>)
model = AutoModel.from_config(config)`,wrap:!1}}),wo=new fe({props:{title:"ModuleUtilsMixin",local:"transformers.modeling_utils.ModuleUtilsMixin",headingTag:"h2"}}),$o=new T({props:{name:"class transformers.modeling_utils.ModuleUtilsMixin",anchor:"transformers.modeling_utils.ModuleUtilsMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L1425"}}),ko=new T({props:{name:"add_memory_hooks",anchor:"transformers.modeling_utils.ModuleUtilsMixin.add_memory_hooks",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L1456"}}),jo=new T({props:{name:"estimate_tokens",anchor:"transformers.modeling_utils.ModuleUtilsMixin.estimate_tokens",parameters:[{name:"input_dict",val:": typing.Dict[str, typing.Union[torch.Tensor, typing.Any]]"}],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/main/src/transformers/modeling_utils.py#L1688",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>
`}}),Jo=new T({props:{name:"floating_point_ops",anchor:"transformers.modeling_utils.ModuleUtilsMixin.floating_point_ops",parameters:[{name:"input_dict",val:": typing.Dict[str, typing.Union[torch.Tensor, typing.Any]]"},{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/main/src/transformers/modeling_utils.py#L1709",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>
`}}),Uo=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:": typing.Tuple[int]"},{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/main/src/transformers/modeling_utils.py#L1544",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>
`}}),Co=new T({props:{name:"get_head_mask",anchor:"transformers.modeling_utils.ModuleUtilsMixin.get_head_mask",parameters:[{name:"head_mask",val:": typing.Optional[torch.Tensor]"},{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/main/src/transformers/modeling_utils.py#L1596",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>
`}}),Po=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/main/src/transformers/modeling_utils.py#L1492",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>
`}}),Zo=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/main/src/transformers/modeling_utils.py#L1634",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>
`}}),Fo=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/main/src/transformers/modeling_utils.py#L1468"}}),Io=new fe({props:{title:"TFPreTrainedModel",local:"transformers.TFPreTrainedModel",headingTag:"h2"}}),Wo=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/main/src/transformers/modeling_tf_utils.py#L1109"}}),Go=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 to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,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/main/src/transformers/modeling_tf_utils.py#L3117"}}),Ee=new D({props:{anchor:"transformers.TFPreTrainedModel.push_to_hub.example",$$slots:{default:[bh]},$$scope:{ctx:P}}}),zo=new T({props:{name:"can_generate",anchor:"transformers.TFPreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1365",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>
`}}),Bo=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/main/src/transformers/modeling_tf_utils.py#L1511"}}),Lo=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/main/src/transformers/modeling_tf_utils.py#L1806"}}),Vo=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:": Optional[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/main/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/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string valid as input to <a href="/docs/transformers/main/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/main/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.`,name:"force_download"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.resume_download",description:`<strong>resume_download</strong> &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"resume_download"},{anchor:"transformers.TFPreTrainedModel.from_pretrained.proxies",description:`<strong>proxies</strong> &#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:"proxies"},{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/main/src/transformers/modeling_tf_utils.py#L2521"}}),Ae=new D({props:{anchor:"transformers.TFPreTrainedModel.from_pretrained.example",$$slots:{default:[yh]},$$scope:{ctx:P}}}),Ho=new T({props:{name:"get_bias",anchor:"transformers.TFPreTrainedModel.get_bias",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1946",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>
`}}),No=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/main/src/transformers/modeling_tf_utils.py#L1249",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>
`}}),qo=new T({props:{name:"get_input_embeddings",anchor:"transformers.TFPreTrainedModel.get_input_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1379",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>
`}}),Xo=new T({props:{name:"get_lm_head",anchor:"transformers.TFPreTrainedModel.get_lm_head",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1979",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>
`}}),Ro=new T({props:{name:"get_output_embeddings",anchor:"transformers.TFPreTrainedModel.get_output_embeddings",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1886",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>
`}}),Eo=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/main/src/transformers/modeling_tf_utils.py#L1923",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>
`}}),Yo=new T({props:{name:"get_prefix_bias_name",anchor:"transformers.TFPreTrainedModel.get_prefix_bias_name",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1936",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>
`}}),Do=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>, <em>optional</em>, 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/main/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/main/src/transformers/modeling_tf_utils.py#L1406",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>
`}}),Qo=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/main/src/transformers/modeling_tf_utils.py#L2326"}}),Ao=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/main/src/transformers/modeling_tf_utils.py#L3226"}}),st=new Mi({props:{warning:!0,$$slots:{default:[vh]},$$scope:{ctx:P}}}),So=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/main/src/transformers/modeling_tf_utils.py#L1988",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>
`}}),Oo=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/main/ja/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L2338"}}),Ko=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"}]}}),en=new T({props:{name:"serving_output",anchor:"transformers.TFPreTrainedModel.serving_output",parameters:[{name:"output",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1341"}}),tn=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/main/src/transformers/modeling_tf_utils.py#L1963"}}),on=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/main/src/transformers/modeling_tf_utils.py#L1866"}}),nn=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/main/src/transformers/modeling_tf_utils.py#L1906"}}),rn=new T({props:{name:"test_step",anchor:"transformers.TFPreTrainedModel.test_step",parameters:[{name:"data",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1702"}}),an=new T({props:{name:"train_step",anchor:"transformers.TFPreTrainedModel.train_step",parameters:[{name:"data",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L1594"}}),sn=new fe({props:{title:"TFModelUtilsMixin",local:"transformers.modeling_tf_utils.TFModelUtilsMixin",headingTag:"h2"}}),dn=new T({props:{name:"class transformers.modeling_tf_utils.TFModelUtilsMixin",anchor:"transformers.modeling_tf_utils.TFModelUtilsMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L126"}}),ln=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/main/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>
`}}),mn=new fe({props:{title:"FlaxPreTrainedModel",local:"transformers.FlaxPreTrainedModel",headingTag:"h2"}}),cn=new T({props:{name:"class transformers.FlaxPreTrainedModel",anchor:"transformers.FlaxPreTrainedModel",parameters:[{name:"config",val:": PretrainedConfig"},{name:"module",val:": Module"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_flax_utils.py#L150"}}),pn=new T({props:{name:"push_to_hub",anchor:"transformers.FlaxPreTrainedModel.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": typing.Optional[str] = None"},{name:"commit_description",val:": typing.Optional[str] = None"},{name:"tags",val:": typing.Optional[list[str]] = 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 to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,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/main/src/transformers/utils/hub.py#L854"}}),ut=new D({props:{anchor:"transformers.FlaxPreTrainedModel.push_to_hub.example",$$slots:{default:[Mh]},$$scope:{ctx:P}}}),hn=new T({props:{name:"can_generate",anchor:"transformers.FlaxPreTrainedModel.can_generate",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_flax_utils.py#L489"}}),fn=new T({props:{name:"from_pretrained",anchor:"transformers.FlaxPreTrainedModel.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"*model_args",val:""},{name:"config",val:": typing.Union[transformers.configuration_utils.PretrainedConfig, str, os.PathLike, NoneType] = None"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[str, bool, NoneType] = 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/main/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/main/ja/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/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/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>,</li>
<li>a string or path valid as input to <a href="/docs/transformers/main/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/main/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.`,name:"force_download"},{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.resume_download",description:`<strong>resume_download</strong> &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible.
Will be removed in v5 of Transformers.`,name:"resume_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/main/src/transformers/modeling_flax_utils.py#L501"}}),_t=new D({props:{anchor:"transformers.FlaxPreTrainedModel.from_pretrained.example",$$slots:{default:[Th]},$$scope:{ctx:P}}}),un=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/main/src/transformers/modeling_flax_utils.py#L442",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>
`}}),gn=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/main/src/transformers/modeling_flax_utils.py#L1210"}}),bt=new Mi({props:{warning:!0,$$slots:{default:[xh]},$$scope:{ctx:P}}}),_n=new T({props:{name:"save_pretrained",anchor:"transformers.FlaxPreTrainedModel.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"params",val:" = None"},{name:"push_to_hub",val:" = False"},{name:"max_shard_size",val:" = '10GB'"},{name:"token",val:": typing.Union[str, bool, NoneType] = 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/main/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/main/src/transformers/modeling_flax_utils.py#L1072"}}),bn=new T({props:{name:"to_bf16",anchor:"transformers.FlaxPreTrainedModel.to_bf16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.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/main/src/transformers/modeling_flax_utils.py#L312"}}),vt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_bf16.example",$$slots:{default:[wh]},$$scope:{ctx:P}}}),yn=new T({props:{name:"to_fp16",anchor:"transformers.FlaxPreTrainedModel.to_fp16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.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/main/src/transformers/modeling_flax_utils.py#L378"}}),Mt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_fp16.example",$$slots:{default:[$h]},$$scope:{ctx:P}}}),vn=new T({props:{name:"to_fp32",anchor:"transformers.FlaxPreTrainedModel.to_fp32",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.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/main/src/transformers/modeling_flax_utils.py#L351"}}),Tt=new D({props:{anchor:"transformers.FlaxPreTrainedModel.to_fp32.example",$$slots:{default:[kh]},$$scope:{ctx:P}}}),Mn=new fe({props:{title:"Pushing to the Hub",local:"transformers.utils.PushToHubMixin",headingTag:"h2"}}),Tn=new T({props:{name:"class transformers.utils.PushToHubMixin",anchor:"transformers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L729"}}),xn=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:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": typing.Optional[str] = None"},{name:"commit_description",val:": typing.Optional[str] = None"},{name:"tags",val:": typing.Optional[list[str]] = 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 to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,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/main/src/transformers/utils/hub.py#L854"}}),xt=new D({props:{anchor:"transformers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[jh]},$$scope:{ctx:P}}}),wn=new fe({props:{title:"Sharded checkpoints",local:"transformers.modeling_utils.load_sharded_checkpoint",headingTag:"h2"}}),$n=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>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether 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/main/src/transformers/modeling_utils.py#L392",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>
`}}),kn=new ph({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/main_classes/model.md"}}),{c(){l=r("meta"),U=o(),y=r("p"),_=o(),c(k.$$.fragment),i=o(),J=r("p"),J.innerHTML=Dm,Sa=o(),kt=r("p"),kt.innerHTML=Qm,Oa=o(),jt=r("ul"),jt.innerHTML=Am,Ka=o(),Jt=r("p"),Jt.innerHTML=Sm,es=o(),c(Ut.$$.fragment),ts=o(),x=r("div"),c(Ct.$$.fragment),Ti=o(),Wn=r("p"),Wn.textContent=Om,xi=o(),Gn=r("p"),Gn.innerHTML=Km,wi=o(),zn=r("ul"),zn.innerHTML=ec,$i=o(),Bn=r("p"),Bn.textContent=tc,ki=o(),Ln=r("ul"),Ln.innerHTML=oc,ji=o(),Q=r("div"),c(Pt.$$.fragment),Ji=o(),Vn=r("p"),Vn.textContent=nc,Ui=o(),c(ye.$$.fragment),Ci=o(),A=r("div"),c(Zt.$$.fragment),Pi=o(),Hn=r("p"),Hn.textContent=rc,Zi=o(),c(ve.$$.fragment),Fi=o(),S=r("div"),c(Ft.$$.fragment),Ii=o(),Nn=r("p"),Nn.innerHTML=ac,Wi=o(),qn=r("p"),qn.innerHTML=sc,Gi=o(),Me=r("div"),c(It.$$.fragment),zi=o(),Xn=r("p"),Xn.textContent=ic,Bi=o(),Te=r("div"),c(Wt.$$.fragment),Li=o(),Rn=r("p"),Rn.innerHTML=dc,Vi=o(),xe=r("div"),c(Gt.$$.fragment),Hi=o(),En=r("p"),En.textContent=lc,Ni=o(),G=r("div"),c(zt.$$.fragment),qi=o(),Yn=r("p"),Yn.textContent=mc,Xi=o(),Dn=r("p"),Dn.innerHTML=cc,Ri=o(),Qn=r("p"),Qn.innerHTML=pc,Ei=o(),An=r("p"),An.innerHTML=hc,Yi=o(),c(we.$$.fragment),Di=o(),c($e.$$.fragment),Qi=o(),ke=r("div"),c(Bt.$$.fragment),Ai=o(),Sn=r("p"),Sn.innerHTML=fc,Si=o(),je=r("div"),c(Lt.$$.fragment),Oi=o(),On=r("p"),On.textContent=uc,Ki=o(),Je=r("div"),c(Vt.$$.fragment),ed=o(),Kn=r("p"),Kn.innerHTML=gc,td=o(),Ue=r("div"),c(Ht.$$.fragment),od=o(),er=r("p"),er.textContent=_c,nd=o(),Ce=r("div"),c(Nt.$$.fragment),rd=o(),tr=r("p"),tr.innerHTML=bc,ad=o(),O=r("div"),c(qt.$$.fragment),sd=o(),or=r("p"),or.textContent=yc,id=o(),nr=r("p"),nr.textContent=vc,dd=o(),H=r("div"),c(Xt.$$.fragment),ld=o(),rr=r("p"),rr.textContent=Mc,md=o(),ar=r("p"),ar.textContent=Tc,cd=o(),sr=r("p"),sr.innerHTML=xc,pd=o(),Pe=r("div"),c(Rt.$$.fragment),hd=o(),ir=r("p"),ir.innerHTML=wc,fd=o(),Ze=r("div"),c(Et.$$.fragment),ud=o(),dr=r("p"),dr.textContent=$c,gd=o(),Fe=r("div"),c(Yt.$$.fragment),_d=o(),lr=r("p"),lr.textContent=kc,bd=o(),K=r("div"),c(Dt.$$.fragment),yd=o(),mr=r("p"),mr.textContent=jc,vd=o(),c(Ie.$$.fragment),Md=o(),ee=r("div"),c(Qt.$$.fragment),Td=o(),cr=r("p"),cr.innerHTML=Jc,xd=o(),pr=r("p"),pr.innerHTML=Uc,wd=o(),We=r("div"),c(At.$$.fragment),$d=o(),hr=r("p"),hr.innerHTML=Cc,kd=o(),Ge=r("div"),c(St.$$.fragment),jd=o(),fr=r("p"),fr.innerHTML=Pc,Jd=o(),ze=r("div"),c(Ot.$$.fragment),Ud=o(),ur=r("p"),ur.textContent=Zc,Cd=o(),te=r("div"),c(Kt.$$.fragment),Pd=o(),gr=r("p"),gr.textContent=Fc,Zd=o(),_r=r("p"),_r.innerHTML=Ic,Fd=o(),oe=r("div"),c(eo.$$.fragment),Id=o(),br=r("p"),br.innerHTML=Wc,Wd=o(),yr=r("p"),yr.innerHTML=Gc,Gd=o(),Be=r("div"),c(to.$$.fragment),zd=o(),vr=r("p"),vr.textContent=zc,os=o(),Mr=r("a"),ns=o(),c(oo.$$.fragment),rs=o(),no=r("p"),no.innerHTML=Bc,as=o(),ro=r("p"),ro.innerHTML=Lc,ss=o(),c(ao.$$.fragment),is=o(),so=r("p"),so.innerHTML=Vc,ds=o(),io=r("p"),io.innerHTML=Hc,ls=o(),c(lo.$$.fragment),ms=o(),mo=r("p"),mo.innerHTML=Nc,cs=o(),c(co.$$.fragment),ps=o(),c(po.$$.fragment),hs=o(),ho=r("p"),ho.textContent=qc,fs=o(),c(fo.$$.fragment),us=o(),uo=r("p"),uo.innerHTML=Xc,gs=o(),c(go.$$.fragment),_s=o(),_o=r("p"),_o.innerHTML=Rc,bs=o(),c(bo.$$.fragment),ys=o(),yo=r("p"),yo.innerHTML=Ec,vs=o(),c(vo.$$.fragment),Ms=o(),Mo=r("p"),Mo.innerHTML=Yc,Ts=o(),c(To.$$.fragment),xs=o(),xo=r("p"),xo.textContent=Dc,ws=o(),c(wo.$$.fragment),$s=o(),F=r("div"),c($o.$$.fragment),Bd=o(),Tr=r("p"),Tr.innerHTML=Qc,Ld=o(),ne=r("div"),c(ko.$$.fragment),Vd=o(),xr=r("p"),xr.textContent=Ac,Hd=o(),wr=r("p"),wr.innerHTML=Sc,Nd=o(),Le=r("div"),c(jo.$$.fragment),qd=o(),$r=r("p"),$r.textContent=Oc,Xd=o(),Ve=r("div"),c(Jo.$$.fragment),Rd=o(),kr=r("p"),kr.innerHTML=Kc,Ed=o(),He=r("div"),c(Uo.$$.fragment),Yd=o(),jr=r("p"),jr.textContent=ep,Dd=o(),Ne=r("div"),c(Co.$$.fragment),Qd=o(),Jr=r("p"),Jr.textContent=tp,Ad=o(),qe=r("div"),c(Po.$$.fragment),Sd=o(),Ur=r("p"),Ur.textContent=op,Od=o(),Xe=r("div"),c(Zo.$$.fragment),Kd=o(),Cr=r("p"),Cr.textContent=np,el=o(),Re=r("div"),c(Fo.$$.fragment),tl=o(),Pr=r("p"),Pr.innerHTML=rp,ks=o(),c(Io.$$.fragment),js=o(),w=r("div"),c(Wo.$$.fragment),ol=o(),Zr=r("p"),Zr.textContent=ap,nl=o(),Fr=r("p"),Fr.innerHTML=sp,rl=o(),Ir=r("ul"),Ir.innerHTML=ip,al=o(),Wr=r("p"),Wr.textContent=dp,sl=o(),Gr=r("ul"),Gr.innerHTML=lp,il=o(),re=r("div"),c(Go.$$.fragment),dl=o(),zr=r("p"),zr.innerHTML=mp,ll=o(),c(Ee.$$.fragment),ml=o(),Ye=r("div"),c(zo.$$.fragment),cl=o(),Br=r("p"),Br.innerHTML=cp,pl=o(),De=r("div"),c(Bo.$$.fragment),hl=o(),Lr=r("p"),Lr.textContent=pp,fl=o(),Qe=r("div"),c(Lo.$$.fragment),ul=o(),Vr=r("p"),Vr.innerHTML=hp,gl=o(),L=r("div"),c(Vo.$$.fragment),_l=o(),Hr=r("p"),Hr.textContent=fp,bl=o(),Nr=r("p"),Nr.innerHTML=up,yl=o(),qr=r("p"),qr.innerHTML=gp,vl=o(),c(Ae.$$.fragment),Ml=o(),Se=r("div"),c(Ho.$$.fragment),Tl=o(),Xr=r("p"),Xr.textContent=_p,xl=o(),Oe=r("div"),c(No.$$.fragment),wl=o(),Rr=r("p"),Rr.textContent=bp,$l=o(),Ke=r("div"),c(qo.$$.fragment),kl=o(),Er=r("p"),Er.textContent=yp,jl=o(),et=r("div"),c(Xo.$$.fragment),Jl=o(),Yr=r("p"),Yr.textContent=vp,Ul=o(),tt=r("div"),c(Ro.$$.fragment),Cl=o(),Dr=r("p"),Dr.textContent=Mp,Pl=o(),ot=r("div"),c(Eo.$$.fragment),Zl=o(),Qr=r("p"),Qr.textContent=Tp,Fl=o(),nt=r("div"),c(Yo.$$.fragment),Il=o(),Ar=r("p"),Ar.textContent=xp,Wl=o(),rt=r("div"),c(Do.$$.fragment),Gl=o(),Sr=r("p"),Sr.innerHTML=wp,zl=o(),at=r("div"),c(Qo.$$.fragment),Bl=o(),Or=r("p"),Or.textContent=$p,Ll=o(),ae=r("div"),c(Ao.$$.fragment),Vl=o(),Kr=r("p"),Kr.textContent=kp,Hl=o(),c(st.$$.fragment),Nl=o(),se=r("div"),c(So.$$.fragment),ql=o(),ea=r("p"),ea.innerHTML=jp,Xl=o(),ta=r("p"),ta.innerHTML=Jp,Rl=o(),it=r("div"),c(Oo.$$.fragment),El=o(),oa=r("p"),oa.innerHTML=Up,Yl=o(),na=r("div"),c(Ko.$$.fragment),Dl=o(),dt=r("div"),c(en.$$.fragment),Ql=o(),ra=r("p"),ra.textContent=Cp,Al=o(),lt=r("div"),c(tn.$$.fragment),Sl=o(),aa=r("p"),aa.textContent=Pp,Ol=o(),mt=r("div"),c(on.$$.fragment),Kl=o(),sa=r("p"),sa.textContent=Zp,em=o(),ct=r("div"),c(nn.$$.fragment),tm=o(),ia=r("p"),ia.textContent=Fp,om=o(),pt=r("div"),c(rn.$$.fragment),nm=o(),da=r("p"),da.innerHTML=Ip,rm=o(),ht=r("div"),c(an.$$.fragment),am=o(),la=r("p"),la.innerHTML=Wp,Js=o(),c(sn.$$.fragment),Us=o(),X=r("div"),c(dn.$$.fragment),sm=o(),ma=r("p"),ma.innerHTML=Gp,im=o(),ft=r("div"),c(ln.$$.fragment),dm=o(),ca=r("p"),ca.textContent=zp,Cs=o(),c(mn.$$.fragment),Ps=o(),C=r("div"),c(cn.$$.fragment),lm=o(),pa=r("p"),pa.textContent=Bp,mm=o(),ha=r("p"),ha.innerHTML=Lp,cm=o(),fa=r("p"),fa.textContent=Vp,pm=o(),ua=r("ul"),ua.innerHTML=Hp,hm=o(),ie=r("div"),c(pn.$$.fragment),fm=o(),ga=r("p"),ga.textContent=Np,um=o(),c(ut.$$.fragment),gm=o(),gt=r("div"),c(hn.$$.fragment),_m=o(),_a=r("p"),_a.innerHTML=qp,bm=o(),V=r("div"),c(fn.$$.fragment),ym=o(),ba=r("p"),ba.textContent=Xp,vm=o(),ya=r("p"),ya.innerHTML=Rp,Mm=o(),va=r("p"),va.innerHTML=Ep,Tm=o(),c(_t.$$.fragment),xm=o(),de=r("div"),c(un.$$.fragment),wm=o(),Ma=r("p"),Ma.innerHTML=Yp,$m=o(),Ta=r("p"),Ta.textContent=Dp,km=o(),le=r("div"),c(gn.$$.fragment),jm=o(),xa=r("p"),xa.textContent=Qp,Jm=o(),c(bt.$$.fragment),Um=o(),yt=r("div"),c(_n.$$.fragment),Cm=o(),wa=r("p"),wa.innerHTML=Ap,Pm=o(),N=r("div"),c(bn.$$.fragment),Zm=o(),$a=r("p"),$a.innerHTML=Sp,Fm=o(),ka=r("p"),ka.textContent=Op,Im=o(),c(vt.$$.fragment),Wm=o(),q=r("div"),c(yn.$$.fragment),Gm=o(),ja=r("p"),ja.innerHTML=Kp,zm=o(),Ja=r("p"),Ja.textContent=eh,Bm=o(),c(Mt.$$.fragment),Lm=o(),me=r("div"),c(vn.$$.fragment),Vm=o(),Ua=r("p"),Ua.innerHTML=th,Hm=o(),c(Tt.$$.fragment),Zs=o(),c(Mn.$$.fragment),Fs=o(),R=r("div"),c(Tn.$$.fragment),Nm=o(),Ca=r("p"),Ca.textContent=oh,qm=o(),ce=r("div"),c(xn.$$.fragment),Xm=o(),Pa=r("p"),Pa.textContent=nh,Rm=o(),c(xt.$$.fragment),Is=o(),c(wn.$$.fragment),Ws=o(),E=r("div"),c($n.$$.fragment),Em=o(),Za=r("p"),Za.innerHTML=rh,Ym=o(),Fa=r("p"),Fa.textContent=ah,Gs=o(),c(kn.$$.fragment),zs=o(),Aa=r("p"),this.h()},l(e){const m=ch("svelte-u9bgzb",document.head);l=a(m,"META",{name:!0,content:!0}),m.forEach(s),U=n(e),y=a(e,"P",{}),v(y).forEach(s),_=n(e),p(k.$$.fragment,e),i=n(e),J=a(e,"P",{"data-svelte-h":!0}),d(J)!=="svelte-ztd3eo"&&(J.innerHTML=Dm),Sa=n(e),kt=a(e,"P",{"data-svelte-h":!0}),d(kt)!=="svelte-5ajiku"&&(kt.innerHTML=Qm),Oa=n(e),jt=a(e,"UL",{"data-svelte-h":!0}),d(jt)!=="svelte-ovrku8"&&(jt.innerHTML=Am),Ka=n(e),Jt=a(e,"P",{"data-svelte-h":!0}),d(Jt)!=="svelte-1pczj4x"&&(Jt.innerHTML=Sm),es=n(e),p(Ut.$$.fragment,e),ts=n(e),x=a(e,"DIV",{class:!0});var $=v(x);p(Ct.$$.fragment,$),Ti=n($),Wn=a($,"P",{"data-svelte-h":!0}),d(Wn)!=="svelte-12nk4t7"&&(Wn.textContent=Om),xi=n($),Gn=a($,"P",{"data-svelte-h":!0}),d(Gn)!=="svelte-1qd90z2"&&(Gn.innerHTML=Km),wi=n($),zn=a($,"UL",{"data-svelte-h":!0}),d(zn)!=="svelte-6o6r8w"&&(zn.innerHTML=ec),$i=n($),Bn=a($,"P",{"data-svelte-h":!0}),d(Bn)!=="svelte-1qxxkvo"&&(Bn.textContent=tc),ki=n($),Ln=a($,"UL",{"data-svelte-h":!0}),d(Ln)!=="svelte-1xgvwmi"&&(Ln.innerHTML=oc),ji=n($),Q=a($,"DIV",{class:!0});var ue=v(Q);p(Pt.$$.fragment,ue),Ji=n(ue),Vn=a(ue,"P",{"data-svelte-h":!0}),d(Vn)!=="svelte-1j9019y"&&(Vn.textContent=nc),Ui=n(ue),p(ye.$$.fragment,ue),ue.forEach(s),Ci=n($),A=a($,"DIV",{class:!0});var ge=v(A);p(Zt.$$.fragment,ge),Pi=n(ge),Hn=a(ge,"P",{"data-svelte-h":!0}),d(Hn)!=="svelte-1mcxpi"&&(Hn.textContent=rc),Zi=n(ge),p(ve.$$.fragment,ge),ge.forEach(s),Fi=n($),S=a($,"DIV",{class:!0});var _e=v(S);p(Ft.$$.fragment,_e),Ii=n(_e),Nn=a(_e,"P",{"data-svelte-h":!0}),d(Nn)!=="svelte-5kr66y"&&(Nn.innerHTML=ac),Wi=n(_e),qn=a(_e,"P",{"data-svelte-h":!0}),d(qn)!=="svelte-1pm07fd"&&(qn.innerHTML=sc),_e.forEach(s),Gi=n($),Me=a($,"DIV",{class:!0});var jn=v(Me);p(It.$$.fragment,jn),zi=n(jn),Xn=a(jn,"P",{"data-svelte-h":!0}),d(Xn)!=="svelte-on69a4"&&(Xn.textContent=ic),jn.forEach(s),Bi=n($),Te=a($,"DIV",{class:!0});var Jn=v(Te);p(Wt.$$.fragment,Jn),Li=n(Jn),Rn=a(Jn,"P",{"data-svelte-h":!0}),d(Rn)!=="svelte-1arq2q9"&&(Rn.innerHTML=dc),Jn.forEach(s),Vi=n($),xe=a($,"DIV",{class:!0});var Un=v(xe);p(Gt.$$.fragment,Un),Hi=n(Un),En=a(Un,"P",{"data-svelte-h":!0}),d(En)!=="svelte-gf3f10"&&(En.textContent=lc),Un.forEach(s),Ni=n($),G=a($,"DIV",{class:!0});var z=v(G);p(zt.$$.fragment,z),qi=n(z),Yn=a(z,"P",{"data-svelte-h":!0}),d(Yn)!=="svelte-1m220hc"&&(Yn.textContent=mc),Xi=n(z),Dn=a(z,"P",{"data-svelte-h":!0}),d(Dn)!=="svelte-1vvzid2"&&(Dn.innerHTML=cc),Ri=n(z),Qn=a(z,"P",{"data-svelte-h":!0}),d(Qn)!=="svelte-floidm"&&(Qn.innerHTML=pc),Ei=n(z),An=a(z,"P",{"data-svelte-h":!0}),d(An)!=="svelte-5vnnmn"&&(An.innerHTML=hc),Yi=n(z),p(we.$$.fragment,z),Di=n(z),p($e.$$.fragment,z),z.forEach(s),Qi=n($),ke=a($,"DIV",{class:!0});var Cn=v(ke);p(Bt.$$.fragment,Cn),Ai=n(Cn),Sn=a(Cn,"P",{"data-svelte-h":!0}),d(Sn)!=="svelte-1jqter6"&&(Sn.innerHTML=fc),Cn.forEach(s),Si=n($),je=a($,"DIV",{class:!0});var Pn=v(je);p(Lt.$$.fragment,Pn),Oi=n(Pn),On=a(Pn,"P",{"data-svelte-h":!0}),d(On)!=="svelte-1oe3d1l"&&(On.textContent=uc),Pn.forEach(s),Ki=n($),Je=a($,"DIV",{class:!0});var Zn=v(Je);p(Vt.$$.fragment,Zn),ed=n(Zn),Kn=a(Zn,"P",{"data-svelte-h":!0}),d(Kn)!=="svelte-1o6lvix"&&(Kn.innerHTML=gc),Zn.forEach(s),td=n($),Ue=a($,"DIV",{class:!0});var Fn=v(Ue);p(Ht.$$.fragment,Fn),od=n(Fn),er=a(Fn,"P",{"data-svelte-h":!0}),d(er)!=="svelte-1en7lnm"&&(er.textContent=_c),Fn.forEach(s),nd=n($),Ce=a($,"DIV",{class:!0});var In=v(Ce);p(Nt.$$.fragment,In),rd=n(In),tr=a(In,"P",{"data-svelte-h":!0}),d(tr)!=="svelte-9ljyb8"&&(tr.innerHTML=bc),In.forEach(s),ad=n($),O=a($,"DIV",{class:!0});var be=v(O);p(qt.$$.fragment,be),sd=n(be),or=a(be,"P",{"data-svelte-h":!0}),d(or)!=="svelte-x1yzxn"&&(or.textContent=yc),id=n(be),nr=a(be,"P",{"data-svelte-h":!0}),d(nr)!=="svelte-1c0vp3s"&&(nr.textContent=vc),be.forEach(s),dd=n($),H=a($,"DIV",{class:!0});var Y=v(H);p(Xt.$$.fragment,Y),ld=n(Y),rr=a(Y,"P",{"data-svelte-h":!0}),d(rr)!=="svelte-vu1mp6"&&(rr.textContent=Mc),md=n(Y),ar=a(Y,"P",{"data-svelte-h":!0}),d(ar)!=="svelte-1c0vp3s"&&(ar.textContent=Tc),cd=n(Y),sr=a(Y,"P",{"data-svelte-h":!0}),d(sr)!=="svelte-1entg0x"&&(sr.innerHTML=xc),Y.forEach(s),pd=n($),Pe=a($,"DIV",{class:!0});var Ls=v(Pe);p(Rt.$$.fragment,Ls),hd=n(Ls),ir=a(Ls,"P",{"data-svelte-h":!0}),d(ir)!=="svelte-1gceydr"&&(ir.innerHTML=wc),Ls.forEach(s),fd=n($),Ze=a($,"DIV",{class:!0});var Vs=v(Ze);p(Et.$$.fragment,Vs),ud=n(Vs),dr=a(Vs,"P",{"data-svelte-h":!0}),d(dr)!=="svelte-kxy0hj"&&(dr.textContent=$c),Vs.forEach(s),gd=n($),Fe=a($,"DIV",{class:!0});var Hs=v(Fe);p(Yt.$$.fragment,Hs),_d=n(Hs),lr=a(Hs,"P",{"data-svelte-h":!0}),d(lr)!=="svelte-qvrpxu"&&(lr.textContent=kc),Hs.forEach(s),bd=n($),K=a($,"DIV",{class:!0});var Ia=v(K);p(Dt.$$.fragment,Ia),yd=n(Ia),mr=a(Ia,"P",{"data-svelte-h":!0}),d(mr)!=="svelte-1ie4sav"&&(mr.textContent=jc),vd=n(Ia),p(Ie.$$.fragment,Ia),Ia.forEach(s),Md=n($),ee=a($,"DIV",{class:!0});var Wa=v(ee);p(Qt.$$.fragment,Wa),Td=n(Wa),cr=a(Wa,"P",{"data-svelte-h":!0}),d(cr)!=="svelte-sgsur1"&&(cr.innerHTML=Jc),xd=n(Wa),pr=a(Wa,"P",{"data-svelte-h":!0}),d(pr)!=="svelte-1t4xas4"&&(pr.innerHTML=Uc),Wa.forEach(s),wd=n($),We=a($,"DIV",{class:!0});var Ns=v(We);p(At.$$.fragment,Ns),$d=n(Ns),hr=a(Ns,"P",{"data-svelte-h":!0}),d(hr)!=="svelte-t1afrg"&&(hr.innerHTML=Cc),Ns.forEach(s),kd=n($),Ge=a($,"DIV",{class:!0});var qs=v(Ge);p(St.$$.fragment,qs),jd=n(qs),fr=a(qs,"P",{"data-svelte-h":!0}),d(fr)!=="svelte-1karewn"&&(fr.innerHTML=Pc),qs.forEach(s),Jd=n($),ze=a($,"DIV",{class:!0});var Xs=v(ze);p(Ot.$$.fragment,Xs),Ud=n(Xs),ur=a(Xs,"P",{"data-svelte-h":!0}),d(ur)!=="svelte-107jmv5"&&(ur.textContent=Zc),Xs.forEach(s),Cd=n($),te=a($,"DIV",{class:!0});var Ga=v(te);p(Kt.$$.fragment,Ga),Pd=n(Ga),gr=a(Ga,"P",{"data-svelte-h":!0}),d(gr)!=="svelte-5nt4be"&&(gr.textContent=Fc),Zd=n(Ga),_r=a(Ga,"P",{"data-svelte-h":!0}),d(_r)!=="svelte-1ti0hxu"&&(_r.innerHTML=Ic),Ga.forEach(s),Fd=n($),oe=a($,"DIV",{class:!0});var za=v(oe);p(eo.$$.fragment,za),Id=n(za),br=a(za,"P",{"data-svelte-h":!0}),d(br)!=="svelte-1sq1344"&&(br.innerHTML=Wc),Wd=n(za),yr=a(za,"P",{"data-svelte-h":!0}),d(yr)!=="svelte-1p16ejc"&&(yr.innerHTML=Gc),za.forEach(s),Gd=n($),Be=a($,"DIV",{class:!0});var Rs=v(Be);p(to.$$.fragment,Rs),zd=n(Rs),vr=a(Rs,"P",{"data-svelte-h":!0}),d(vr)!=="svelte-nkp8sx"&&(vr.textContent=zc),Rs.forEach(s),$.forEach(s),os=n(e),Mr=a(e,"A",{id:!0}),v(Mr).forEach(s),ns=n(e),p(oo.$$.fragment,e),rs=n(e),no=a(e,"P",{"data-svelte-h":!0}),d(no)!=="svelte-yjbrr2"&&(no.innerHTML=Bc),as=n(e),ro=a(e,"P",{"data-svelte-h":!0}),d(ro)!=="svelte-k82ih6"&&(ro.innerHTML=Lc),ss=n(e),p(ao.$$.fragment,e),is=n(e),so=a(e,"P",{"data-svelte-h":!0}),d(so)!=="svelte-bbuvro"&&(so.innerHTML=Vc),ds=n(e),io=a(e,"P",{"data-svelte-h":!0}),d(io)!=="svelte-a0sf5y"&&(io.innerHTML=Hc),ls=n(e),p(lo.$$.fragment,e),ms=n(e),mo=a(e,"P",{"data-svelte-h":!0}),d(mo)!=="svelte-hi8e88"&&(mo.innerHTML=Nc),cs=n(e),p(co.$$.fragment,e),ps=n(e),p(po.$$.fragment,e),hs=n(e),ho=a(e,"P",{"data-svelte-h":!0}),d(ho)!=="svelte-bffpgr"&&(ho.textContent=qc),fs=n(e),p(fo.$$.fragment,e),us=n(e),uo=a(e,"P",{"data-svelte-h":!0}),d(uo)!=="svelte-xofgy7"&&(uo.innerHTML=Xc),gs=n(e),p(go.$$.fragment,e),_s=n(e),_o=a(e,"P",{"data-svelte-h":!0}),d(_o)!=="svelte-1g6edtz"&&(_o.innerHTML=Rc),bs=n(e),p(bo.$$.fragment,e),ys=n(e),yo=a(e,"P",{"data-svelte-h":!0}),d(yo)!=="svelte-d3uh15"&&(yo.innerHTML=Ec),vs=n(e),p(vo.$$.fragment,e),Ms=n(e),Mo=a(e,"P",{"data-svelte-h":!0}),d(Mo)!=="svelte-1fk7l2i"&&(Mo.innerHTML=Yc),Ts=n(e),p(To.$$.fragment,e),xs=n(e),xo=a(e,"P",{"data-svelte-h":!0}),d(xo)!=="svelte-11n10jn"&&(xo.textContent=Dc),ws=n(e),p(wo.$$.fragment,e),$s=n(e),F=a(e,"DIV",{class:!0});var I=v(F);p($o.$$.fragment,I),Bd=n(I),Tr=a(I,"P",{"data-svelte-h":!0}),d(Tr)!=="svelte-9daxpl"&&(Tr.innerHTML=Qc),Ld=n(I),ne=a(I,"DIV",{class:!0});var Ba=v(ne);p(ko.$$.fragment,Ba),Vd=n(Ba),xr=a(Ba,"P",{"data-svelte-h":!0}),d(xr)!=="svelte-bszdl"&&(xr.textContent=Ac),Hd=n(Ba),wr=a(Ba,"P",{"data-svelte-h":!0}),d(wr)!=="svelte-1yhz50g"&&(wr.innerHTML=Sc),Ba.forEach(s),Nd=n(I),Le=a(I,"DIV",{class:!0});var Es=v(Le);p(jo.$$.fragment,Es),qd=n(Es),$r=a(Es,"P",{"data-svelte-h":!0}),d($r)!=="svelte-1vzpsnb"&&($r.textContent=Oc),Es.forEach(s),Xd=n(I),Ve=a(I,"DIV",{class:!0});var Ys=v(Ve);p(Jo.$$.fragment,Ys),Rd=n(Ys),kr=a(Ys,"P",{"data-svelte-h":!0}),d(kr)!=="svelte-1quexap"&&(kr.innerHTML=Kc),Ys.forEach(s),Ed=n(I),He=a(I,"DIV",{class:!0});var Ds=v(He);p(Uo.$$.fragment,Ds),Yd=n(Ds),jr=a(Ds,"P",{"data-svelte-h":!0}),d(jr)!=="svelte-qy1xxb"&&(jr.textContent=ep),Ds.forEach(s),Dd=n(I),Ne=a(I,"DIV",{class:!0});var Qs=v(Ne);p(Co.$$.fragment,Qs),Qd=n(Qs),Jr=a(Qs,"P",{"data-svelte-h":!0}),d(Jr)!=="svelte-1y1rtu0"&&(Jr.textContent=tp),Qs.forEach(s),Ad=n(I),qe=a(I,"DIV",{class:!0});var As=v(qe);p(Po.$$.fragment,As),Sd=n(As),Ur=a(As,"P",{"data-svelte-h":!0}),d(Ur)!=="svelte-1tbhnug"&&(Ur.textContent=op),As.forEach(s),Od=n(I),Xe=a(I,"DIV",{class:!0});var Ss=v(Xe);p(Zo.$$.fragment,Ss),Kd=n(Ss),Cr=a(Ss,"P",{"data-svelte-h":!0}),d(Cr)!=="svelte-vktrn"&&(Cr.textContent=np),Ss.forEach(s),el=n(I),Re=a(I,"DIV",{class:!0});var Os=v(Re);p(Fo.$$.fragment,Os),tl=n(Os),Pr=a(Os,"P",{"data-svelte-h":!0}),d(Pr)!=="svelte-1vzjjgb"&&(Pr.innerHTML=rp),Os.forEach(s),I.forEach(s),ks=n(e),p(Io.$$.fragment,e),js=n(e),w=a(e,"DIV",{class:!0});var j=v(w);p(Wo.$$.fragment,j),ol=n(j),Zr=a(j,"P",{"data-svelte-h":!0}),d(Zr)!=="svelte-ho56tp"&&(Zr.textContent=ap),nl=n(j),Fr=a(j,"P",{"data-svelte-h":!0}),d(Fr)!=="svelte-co6gzq"&&(Fr.innerHTML=sp),rl=n(j),Ir=a(j,"UL",{"data-svelte-h":!0}),d(Ir)!=="svelte-6o6r8w"&&(Ir.innerHTML=ip),al=n(j),Wr=a(j,"P",{"data-svelte-h":!0}),d(Wr)!=="svelte-1qxxkvo"&&(Wr.textContent=dp),sl=n(j),Gr=a(j,"UL",{"data-svelte-h":!0}),d(Gr)!=="svelte-1empms3"&&(Gr.innerHTML=lp),il=n(j),re=a(j,"DIV",{class:!0});var La=v(re);p(Go.$$.fragment,La),dl=n(La),zr=a(La,"P",{"data-svelte-h":!0}),d(zr)!=="svelte-8nftbo"&&(zr.innerHTML=mp),ll=n(La),p(Ee.$$.fragment,La),La.forEach(s),ml=n(j),Ye=a(j,"DIV",{class:!0});var Ks=v(Ye);p(zo.$$.fragment,Ks),cl=n(Ks),Br=a(Ks,"P",{"data-svelte-h":!0}),d(Br)!=="svelte-1r2xt0l"&&(Br.innerHTML=cp),Ks.forEach(s),pl=n(j),De=a(j,"DIV",{class:!0});var ei=v(De);p(Bo.$$.fragment,ei),hl=n(ei),Lr=a(ei,"P",{"data-svelte-h":!0}),d(Lr)!=="svelte-wsnq9n"&&(Lr.textContent=pp),ei.forEach(s),fl=n(j),Qe=a(j,"DIV",{class:!0});var ti=v(Qe);p(Lo.$$.fragment,ti),ul=n(ti),Vr=a(ti,"P",{"data-svelte-h":!0}),d(Vr)!=="svelte-1mh859w"&&(Vr.innerHTML=hp),ti.forEach(s),gl=n(j),L=a(j,"DIV",{class:!0});var pe=v(L);p(Vo.$$.fragment,pe),_l=n(pe),Hr=a(pe,"P",{"data-svelte-h":!0}),d(Hr)!=="svelte-vc5x03"&&(Hr.textContent=fp),bl=n(pe),Nr=a(pe,"P",{"data-svelte-h":!0}),d(Nr)!=="svelte-floidm"&&(Nr.innerHTML=up),yl=n(pe),qr=a(pe,"P",{"data-svelte-h":!0}),d(qr)!=="svelte-5vnnmn"&&(qr.innerHTML=gp),vl=n(pe),p(Ae.$$.fragment,pe),pe.forEach(s),Ml=n(j),Se=a(j,"DIV",{class:!0});var oi=v(Se);p(Ho.$$.fragment,oi),Tl=n(oi),Xr=a(oi,"P",{"data-svelte-h":!0}),d(Xr)!=="svelte-ja4l5b"&&(Xr.textContent=_p),oi.forEach(s),xl=n(j),Oe=a(j,"DIV",{class:!0});var ni=v(Oe);p(No.$$.fragment,ni),wl=n(ni),Rr=a(ni,"P",{"data-svelte-h":!0}),d(Rr)!=="svelte-1y1rtu0"&&(Rr.textContent=bp),ni.forEach(s),$l=n(j),Ke=a(j,"DIV",{class:!0});var ri=v(Ke);p(qo.$$.fragment,ri),kl=n(ri),Er=a(ri,"P",{"data-svelte-h":!0}),d(Er)!=="svelte-1g2truu"&&(Er.textContent=yp),ri.forEach(s),jl=n(j),et=a(j,"DIV",{class:!0});var ai=v(et);p(Xo.$$.fragment,ai),Jl=n(ai),Yr=a(ai,"P",{"data-svelte-h":!0}),d(Yr)!=="svelte-1hvwe3j"&&(Yr.textContent=vp),ai.forEach(s),Ul=n(j),tt=a(j,"DIV",{class:!0});var si=v(tt);p(Ro.$$.fragment,si),Cl=n(si),Dr=a(si,"P",{"data-svelte-h":!0}),d(Dr)!=="svelte-1mu3td8"&&(Dr.textContent=Mp),si.forEach(s),Pl=n(j),ot=a(j,"DIV",{class:!0});var ii=v(ot);p(Eo.$$.fragment,ii),Zl=n(ii),Qr=a(ii,"P",{"data-svelte-h":!0}),d(Qr)!=="svelte-ib1802"&&(Qr.textContent=Tp),ii.forEach(s),Fl=n(j),nt=a(j,"DIV",{class:!0});var di=v(nt);p(Yo.$$.fragment,di),Il=n(di),Ar=a(di,"P",{"data-svelte-h":!0}),d(Ar)!=="svelte-1vipzyv"&&(Ar.textContent=xp),di.forEach(s),Wl=n(j),rt=a(j,"DIV",{class:!0});var li=v(rt);p(Do.$$.fragment,li),Gl=n(li),Sr=a(li,"P",{"data-svelte-h":!0}),d(Sr)!=="svelte-q8rs5u"&&(Sr.innerHTML=wp),li.forEach(s),zl=n(j),at=a(j,"DIV",{class:!0});var mi=v(at);p(Qo.$$.fragment,mi),Bl=n(mi),Or=a(mi,"P",{"data-svelte-h":!0}),d(Or)!=="svelte-qvrpxu"&&(Or.textContent=$p),mi.forEach(s),Ll=n(j),ae=a(j,"DIV",{class:!0});var Va=v(ae);p(Ao.$$.fragment,Va),Vl=n(Va),Kr=a(Va,"P",{"data-svelte-h":!0}),d(Kr)!=="svelte-1ie4sav"&&(Kr.textContent=kp),Hl=n(Va),p(st.$$.fragment,Va),Va.forEach(s),Nl=n(j),se=a(j,"DIV",{class:!0});var Ha=v(se);p(So.$$.fragment,Ha),ql=n(Ha),ea=a(Ha,"P",{"data-svelte-h":!0}),d(ea)!=="svelte-sgsur1"&&(ea.innerHTML=jp),Xl=n(Ha),ta=a(Ha,"P",{"data-svelte-h":!0}),d(ta)!=="svelte-1t4xas4"&&(ta.innerHTML=Jp),Ha.forEach(s),Rl=n(j),it=a(j,"DIV",{class:!0});var ci=v(it);p(Oo.$$.fragment,ci),El=n(ci),oa=a(ci,"P",{"data-svelte-h":!0}),d(oa)!=="svelte-1wafce1"&&(oa.innerHTML=Up),ci.forEach(s),Yl=n(j),na=a(j,"DIV",{class:!0});var sh=v(na);p(Ko.$$.fragment,sh),sh.forEach(s),Dl=n(j),dt=a(j,"DIV",{class:!0});var pi=v(dt);p(en.$$.fragment,pi),Ql=n(pi),ra=a(pi,"P",{"data-svelte-h":!0}),d(ra)!=="svelte-4zpnur"&&(ra.textContent=Cp),pi.forEach(s),Al=n(j),lt=a(j,"DIV",{class:!0});var hi=v(lt);p(tn.$$.fragment,hi),Sl=n(hi),aa=a(hi,"P",{"data-svelte-h":!0}),d(aa)!=="svelte-cmhrcy"&&(aa.textContent=Pp),hi.forEach(s),Ol=n(j),mt=a(j,"DIV",{class:!0});var fi=v(mt);p(on.$$.fragment,fi),Kl=n(fi),sa=a(fi,"P",{"data-svelte-h":!0}),d(sa)!=="svelte-1ouwbwr"&&(sa.textContent=Zp),fi.forEach(s),em=n(j),ct=a(j,"DIV",{class:!0});var ui=v(ct);p(nn.$$.fragment,ui),tm=n(ui),ia=a(ui,"P",{"data-svelte-h":!0}),d(ia)!=="svelte-x8fgs0"&&(ia.textContent=Fp),ui.forEach(s),om=n(j),pt=a(j,"DIV",{class:!0});var gi=v(pt);p(rn.$$.fragment,gi),nm=n(gi),da=a(gi,"P",{"data-svelte-h":!0}),d(da)!=="svelte-oo8tit"&&(da.innerHTML=Ip),gi.forEach(s),rm=n(j),ht=a(j,"DIV",{class:!0});var _i=v(ht);p(an.$$.fragment,_i),am=n(_i),la=a(_i,"P",{"data-svelte-h":!0}),d(la)!=="svelte-oo8tit"&&(la.innerHTML=Wp),_i.forEach(s),j.forEach(s),Js=n(e),p(sn.$$.fragment,e),Us=n(e),X=a(e,"DIV",{class:!0});var Na=v(X);p(dn.$$.fragment,Na),sm=n(Na),ma=a(Na,"P",{"data-svelte-h":!0}),d(ma)!=="svelte-1dqi2f3"&&(ma.innerHTML=Gp),im=n(Na),ft=a(Na,"DIV",{class:!0});var bi=v(ft);p(ln.$$.fragment,bi),dm=n(bi),ca=a(bi,"P",{"data-svelte-h":!0}),d(ca)!=="svelte-im20fs"&&(ca.textContent=zp),bi.forEach(s),Na.forEach(s),Cs=n(e),p(mn.$$.fragment,e),Ps=n(e),C=a(e,"DIV",{class:!0});var Z=v(C);p(cn.$$.fragment,Z),lm=n(Z),pa=a(Z,"P",{"data-svelte-h":!0}),d(pa)!=="svelte-12nk4t7"&&(pa.textContent=Bp),mm=n(Z),ha=a(Z,"P",{"data-svelte-h":!0}),d(ha)!=="svelte-m0edpf"&&(ha.innerHTML=Lp),cm=n(Z),fa=a(Z,"P",{"data-svelte-h":!0}),d(fa)!=="svelte-1qxxkvo"&&(fa.textContent=Vp),pm=n(Z),ua=a(Z,"UL",{"data-svelte-h":!0}),d(ua)!=="svelte-1empms3"&&(ua.innerHTML=Hp),hm=n(Z),ie=a(Z,"DIV",{class:!0});var qa=v(ie);p(pn.$$.fragment,qa),fm=n(qa),ga=a(qa,"P",{"data-svelte-h":!0}),d(ga)!=="svelte-a8hf5e"&&(ga.textContent=Np),um=n(qa),p(ut.$$.fragment,qa),qa.forEach(s),gm=n(Z),gt=a(Z,"DIV",{class:!0});var yi=v(gt);p(hn.$$.fragment,yi),_m=n(yi),_a=a(yi,"P",{"data-svelte-h":!0}),d(_a)!=="svelte-12hq10t"&&(_a.innerHTML=qp),yi.forEach(s),bm=n(Z),V=a(Z,"DIV",{class:!0});var he=v(V);p(fn.$$.fragment,he),ym=n(he),ba=a(he,"P",{"data-svelte-h":!0}),d(ba)!=="svelte-1oaqdrm"&&(ba.textContent=Xp),vm=n(he),ya=a(he,"P",{"data-svelte-h":!0}),d(ya)!=="svelte-floidm"&&(ya.innerHTML=Rp),Mm=n(he),va=a(he,"P",{"data-svelte-h":!0}),d(va)!=="svelte-5vnnmn"&&(va.innerHTML=Ep),Tm=n(he),p(_t.$$.fragment,he),he.forEach(s),xm=n(Z),de=a(Z,"DIV",{class:!0});var Xa=v(de);p(un.$$.fragment,Xa),wm=n(Xa),Ma=a(Xa,"P",{"data-svelte-h":!0}),d(Ma)!=="svelte-plzzd0"&&(Ma.innerHTML=Yp),$m=n(Xa),Ta=a(Xa,"P",{"data-svelte-h":!0}),d(Ta)!=="svelte-bzl1lx"&&(Ta.textContent=Dp),Xa.forEach(s),km=n(Z),le=a(Z,"DIV",{class:!0});var Ra=v(le);p(gn.$$.fragment,Ra),jm=n(Ra),xa=a(Ra,"P",{"data-svelte-h":!0}),d(xa)!=="svelte-1ie4sav"&&(xa.textContent=Qp),Jm=n(Ra),p(bt.$$.fragment,Ra),Ra.forEach(s),Um=n(Z),yt=a(Z,"DIV",{class:!0});var vi=v(yt);p(_n.$$.fragment,vi),Cm=n(vi),wa=a(vi,"P",{"data-svelte-h":!0}),d(wa)!=="svelte-pbwnir"&&(wa.innerHTML=Ap),vi.forEach(s),Pm=n(Z),N=a(Z,"DIV",{class:!0});var wt=v(N);p(bn.$$.fragment,wt),Zm=n(wt),$a=a(wt,"P",{"data-svelte-h":!0}),d($a)!=="svelte-16uni9u"&&($a.innerHTML=Sp),Fm=n(wt),ka=a(wt,"P",{"data-svelte-h":!0}),d(ka)!=="svelte-qh3hgx"&&(ka.textContent=Op),Im=n(wt),p(vt.$$.fragment,wt),wt.forEach(s),Wm=n(Z),q=a(Z,"DIV",{class:!0});var $t=v(q);p(yn.$$.fragment,$t),Gm=n($t),ja=a($t,"P",{"data-svelte-h":!0}),d(ja)!=="svelte-ifz6ak"&&(ja.innerHTML=Kp),zm=n($t),Ja=a($t,"P",{"data-svelte-h":!0}),d(Ja)!=="svelte-1rko7go"&&(Ja.textContent=eh),Bm=n($t),p(Mt.$$.fragment,$t),$t.forEach(s),Lm=n(Z),me=a(Z,"DIV",{class:!0});var Ea=v(me);p(vn.$$.fragment,Ea),Vm=n(Ea),Ua=a(Ea,"P",{"data-svelte-h":!0}),d(Ua)!=="svelte-j66hh4"&&(Ua.innerHTML=th),Hm=n(Ea),p(Tt.$$.fragment,Ea),Ea.forEach(s),Z.forEach(s),Zs=n(e),p(Mn.$$.fragment,e),Fs=n(e),R=a(e,"DIV",{class:!0});var Ya=v(R);p(Tn.$$.fragment,Ya),Nm=n(Ya),Ca=a(Ya,"P",{"data-svelte-h":!0}),d(Ca)!=="svelte-s2i98"&&(Ca.textContent=oh),qm=n(Ya),ce=a(Ya,"DIV",{class:!0});var Da=v(ce);p(xn.$$.fragment,Da),Xm=n(Da),Pa=a(Da,"P",{"data-svelte-h":!0}),d(Pa)!=="svelte-am4l6x"&&(Pa.textContent=nh),Rm=n(Da),p(xt.$$.fragment,Da),Da.forEach(s),Ya.forEach(s),Is=n(e),p(wn.$$.fragment,e),Ws=n(e),E=a(e,"DIV",{class:!0});var Qa=v(E);p($n.$$.fragment,Qa),Em=n(Qa),Za=a(Qa,"P",{"data-svelte-h":!0}),d(Za)!=="svelte-16tfby7"&&(Za.innerHTML=rh),Ym=n(Qa),Fa=a(Qa,"P",{"data-svelte-h":!0}),d(Fa)!=="svelte-bzl1lx"&&(Fa.textContent=ah),Qa.forEach(s),Gs=n(e),p(kn.$$.fragment,e),zs=n(e),Aa=a(e,"P",{}),v(Aa).forEach(s),this.h()},h(){M(l,"name","hf:doc:metadata"),M(l,"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(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(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(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"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(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(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(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(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(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(Pe,"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(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(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(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(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(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(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(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(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(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(Mr,"id","from_pretrained-torch-dtype"),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(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(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(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(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(Xe,"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(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(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(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(L,"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(nt,"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(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(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(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(na,"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(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(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(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(pt,"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(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(ft,"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(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(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(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(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(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(yt,"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(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(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(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(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(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(e,m){t(document.head,l),b(e,U,m),b(e,y,m),b(e,_,m),h(k,e,m),b(e,i,m),b(e,J,m),b(e,Sa,m),b(e,kt,m),b(e,Oa,m),b(e,jt,m),b(e,Ka,m),b(e,Jt,m),b(e,es,m),h(Ut,e,m),b(e,ts,m),b(e,x,m),h(Ct,x,null),t(x,Ti),t(x,Wn),t(x,xi),t(x,Gn),t(x,wi),t(x,zn),t(x,$i),t(x,Bn),t(x,ki),t(x,Ln),t(x,ji),t(x,Q),h(Pt,Q,null),t(Q,Ji),t(Q,Vn),t(Q,Ui),h(ye,Q,null),t(x,Ci),t(x,A),h(Zt,A,null),t(A,Pi),t(A,Hn),t(A,Zi),h(ve,A,null),t(x,Fi),t(x,S),h(Ft,S,null),t(S,Ii),t(S,Nn),t(S,Wi),t(S,qn),t(x,Gi),t(x,Me),h(It,Me,null),t(Me,zi),t(Me,Xn),t(x,Bi),t(x,Te),h(Wt,Te,null),t(Te,Li),t(Te,Rn),t(x,Vi),t(x,xe),h(Gt,xe,null),t(xe,Hi),t(xe,En),t(x,Ni),t(x,G),h(zt,G,null),t(G,qi),t(G,Yn),t(G,Xi),t(G,Dn),t(G,Ri),t(G,Qn),t(G,Ei),t(G,An),t(G,Yi),h(we,G,null),t(G,Di),h($e,G,null),t(x,Qi),t(x,ke),h(Bt,ke,null),t(ke,Ai),t(ke,Sn),t(x,Si),t(x,je),h(Lt,je,null),t(je,Oi),t(je,On),t(x,Ki),t(x,Je),h(Vt,Je,null),t(Je,ed),t(Je,Kn),t(x,td),t(x,Ue),h(Ht,Ue,null),t(Ue,od),t(Ue,er),t(x,nd),t(x,Ce),h(Nt,Ce,null),t(Ce,rd),t(Ce,tr),t(x,ad),t(x,O),h(qt,O,null),t(O,sd),t(O,or),t(O,id),t(O,nr),t(x,dd),t(x,H),h(Xt,H,null),t(H,ld),t(H,rr),t(H,md),t(H,ar),t(H,cd),t(H,sr),t(x,pd),t(x,Pe),h(Rt,Pe,null),t(Pe,hd),t(Pe,ir),t(x,fd),t(x,Ze),h(Et,Ze,null),t(Ze,ud),t(Ze,dr),t(x,gd),t(x,Fe),h(Yt,Fe,null),t(Fe,_d),t(Fe,lr),t(x,bd),t(x,K),h(Dt,K,null),t(K,yd),t(K,mr),t(K,vd),h(Ie,K,null),t(x,Md),t(x,ee),h(Qt,ee,null),t(ee,Td),t(ee,cr),t(ee,xd),t(ee,pr),t(x,wd),t(x,We),h(At,We,null),t(We,$d),t(We,hr),t(x,kd),t(x,Ge),h(St,Ge,null),t(Ge,jd),t(Ge,fr),t(x,Jd),t(x,ze),h(Ot,ze,null),t(ze,Ud),t(ze,ur),t(x,Cd),t(x,te),h(Kt,te,null),t(te,Pd),t(te,gr),t(te,Zd),t(te,_r),t(x,Fd),t(x,oe),h(eo,oe,null),t(oe,Id),t(oe,br),t(oe,Wd),t(oe,yr),t(x,Gd),t(x,Be),h(to,Be,null),t(Be,zd),t(Be,vr),b(e,os,m),b(e,Mr,m),b(e,ns,m),h(oo,e,m),b(e,rs,m),b(e,no,m),b(e,as,m),b(e,ro,m),b(e,ss,m),h(ao,e,m),b(e,is,m),b(e,so,m),b(e,ds,m),b(e,io,m),b(e,ls,m),h(lo,e,m),b(e,ms,m),b(e,mo,m),b(e,cs,m),h(co,e,m),b(e,ps,m),h(po,e,m),b(e,hs,m),b(e,ho,m),b(e,fs,m),h(fo,e,m),b(e,us,m),b(e,uo,m),b(e,gs,m),h(go,e,m),b(e,_s,m),b(e,_o,m),b(e,bs,m),h(bo,e,m),b(e,ys,m),b(e,yo,m),b(e,vs,m),h(vo,e,m),b(e,Ms,m),b(e,Mo,m),b(e,Ts,m),h(To,e,m),b(e,xs,m),b(e,xo,m),b(e,ws,m),h(wo,e,m),b(e,$s,m),b(e,F,m),h($o,F,null),t(F,Bd),t(F,Tr),t(F,Ld),t(F,ne),h(ko,ne,null),t(ne,Vd),t(ne,xr),t(ne,Hd),t(ne,wr),t(F,Nd),t(F,Le),h(jo,Le,null),t(Le,qd),t(Le,$r),t(F,Xd),t(F,Ve),h(Jo,Ve,null),t(Ve,Rd),t(Ve,kr),t(F,Ed),t(F,He),h(Uo,He,null),t(He,Yd),t(He,jr),t(F,Dd),t(F,Ne),h(Co,Ne,null),t(Ne,Qd),t(Ne,Jr),t(F,Ad),t(F,qe),h(Po,qe,null),t(qe,Sd),t(qe,Ur),t(F,Od),t(F,Xe),h(Zo,Xe,null),t(Xe,Kd),t(Xe,Cr),t(F,el),t(F,Re),h(Fo,Re,null),t(Re,tl),t(Re,Pr),b(e,ks,m),h(Io,e,m),b(e,js,m),b(e,w,m),h(Wo,w,null),t(w,ol),t(w,Zr),t(w,nl),t(w,Fr),t(w,rl),t(w,Ir),t(w,al),t(w,Wr),t(w,sl),t(w,Gr),t(w,il),t(w,re),h(Go,re,null),t(re,dl),t(re,zr),t(re,ll),h(Ee,re,null),t(w,ml),t(w,Ye),h(zo,Ye,null),t(Ye,cl),t(Ye,Br),t(w,pl),t(w,De),h(Bo,De,null),t(De,hl),t(De,Lr),t(w,fl),t(w,Qe),h(Lo,Qe,null),t(Qe,ul),t(Qe,Vr),t(w,gl),t(w,L),h(Vo,L,null),t(L,_l),t(L,Hr),t(L,bl),t(L,Nr),t(L,yl),t(L,qr),t(L,vl),h(Ae,L,null),t(w,Ml),t(w,Se),h(Ho,Se,null),t(Se,Tl),t(Se,Xr),t(w,xl),t(w,Oe),h(No,Oe,null),t(Oe,wl),t(Oe,Rr),t(w,$l),t(w,Ke),h(qo,Ke,null),t(Ke,kl),t(Ke,Er),t(w,jl),t(w,et),h(Xo,et,null),t(et,Jl),t(et,Yr),t(w,Ul),t(w,tt),h(Ro,tt,null),t(tt,Cl),t(tt,Dr),t(w,Pl),t(w,ot),h(Eo,ot,null),t(ot,Zl),t(ot,Qr),t(w,Fl),t(w,nt),h(Yo,nt,null),t(nt,Il),t(nt,Ar),t(w,Wl),t(w,rt),h(Do,rt,null),t(rt,Gl),t(rt,Sr),t(w,zl),t(w,at),h(Qo,at,null),t(at,Bl),t(at,Or),t(w,Ll),t(w,ae),h(Ao,ae,null),t(ae,Vl),t(ae,Kr),t(ae,Hl),h(st,ae,null),t(w,Nl),t(w,se),h(So,se,null),t(se,ql),t(se,ea),t(se,Xl),t(se,ta),t(w,Rl),t(w,it),h(Oo,it,null),t(it,El),t(it,oa),t(w,Yl),t(w,na),h(Ko,na,null),t(w,Dl),t(w,dt),h(en,dt,null),t(dt,Ql),t(dt,ra),t(w,Al),t(w,lt),h(tn,lt,null),t(lt,Sl),t(lt,aa),t(w,Ol),t(w,mt),h(on,mt,null),t(mt,Kl),t(mt,sa),t(w,em),t(w,ct),h(nn,ct,null),t(ct,tm),t(ct,ia),t(w,om),t(w,pt),h(rn,pt,null),t(pt,nm),t(pt,da),t(w,rm),t(w,ht),h(an,ht,null),t(ht,am),t(ht,la),b(e,Js,m),h(sn,e,m),b(e,Us,m),b(e,X,m),h(dn,X,null),t(X,sm),t(X,ma),t(X,im),t(X,ft),h(ln,ft,null),t(ft,dm),t(ft,ca),b(e,Cs,m),h(mn,e,m),b(e,Ps,m),b(e,C,m),h(cn,C,null),t(C,lm),t(C,pa),t(C,mm),t(C,ha),t(C,cm),t(C,fa),t(C,pm),t(C,ua),t(C,hm),t(C,ie),h(pn,ie,null),t(ie,fm),t(ie,ga),t(ie,um),h(ut,ie,null),t(C,gm),t(C,gt),h(hn,gt,null),t(gt,_m),t(gt,_a),t(C,bm),t(C,V),h(fn,V,null),t(V,ym),t(V,ba),t(V,vm),t(V,ya),t(V,Mm),t(V,va),t(V,Tm),h(_t,V,null),t(C,xm),t(C,de),h(un,de,null),t(de,wm),t(de,Ma),t(de,$m),t(de,Ta),t(C,km),t(C,le),h(gn,le,null),t(le,jm),t(le,xa),t(le,Jm),h(bt,le,null),t(C,Um),t(C,yt),h(_n,yt,null),t(yt,Cm),t(yt,wa),t(C,Pm),t(C,N),h(bn,N,null),t(N,Zm),t(N,$a),t(N,Fm),t(N,ka),t(N,Im),h(vt,N,null),t(C,Wm),t(C,q),h(yn,q,null),t(q,Gm),t(q,ja),t(q,zm),t(q,Ja),t(q,Bm),h(Mt,q,null),t(C,Lm),t(C,me),h(vn,me,null),t(me,Vm),t(me,Ua),t(me,Hm),h(Tt,me,null),b(e,Zs,m),h(Mn,e,m),b(e,Fs,m),b(e,R,m),h(Tn,R,null),t(R,Nm),t(R,Ca),t(R,qm),t(R,ce),h(xn,ce,null),t(ce,Xm),t(ce,Pa),t(ce,Rm),h(xt,ce,null),b(e,Is,m),h(wn,e,m),b(e,Ws,m),b(e,E,m),h($n,E,null),t(E,Em),t(E,Za),t(E,Ym),t(E,Fa),b(e,Gs,m),h(kn,e,m),b(e,zs,m),b(e,Aa,m),Bs=!0},p(e,[m]){const $={};m&2&&($.$$scope={dirty:m,ctx:e}),ye.$set($);const ue={};m&2&&(ue.$$scope={dirty:m,ctx:e}),ve.$set(ue);const ge={};m&2&&(ge.$$scope={dirty:m,ctx:e}),we.$set(ge);const _e={};m&2&&(_e.$$scope={dirty:m,ctx:e}),$e.$set(_e);const jn={};m&2&&(jn.$$scope={dirty:m,ctx:e}),Ie.$set(jn);const Jn={};m&2&&(Jn.$$scope={dirty:m,ctx:e}),Ee.$set(Jn);const Un={};m&2&&(Un.$$scope={dirty:m,ctx:e}),Ae.$set(Un);const z={};m&2&&(z.$$scope={dirty:m,ctx:e}),st.$set(z);const Cn={};m&2&&(Cn.$$scope={dirty:m,ctx:e}),ut.$set(Cn);const Pn={};m&2&&(Pn.$$scope={dirty:m,ctx:e}),_t.$set(Pn);const Zn={};m&2&&(Zn.$$scope={dirty:m,ctx:e}),bt.$set(Zn);const Fn={};m&2&&(Fn.$$scope={dirty:m,ctx:e}),vt.$set(Fn);const In={};m&2&&(In.$$scope={dirty:m,ctx:e}),Mt.$set(In);const be={};m&2&&(be.$$scope={dirty:m,ctx:e}),Tt.$set(be);const Y={};m&2&&(Y.$$scope={dirty:m,ctx:e}),xt.$set(Y)},i(e){Bs||(f(k.$$.fragment,e),f(Ut.$$.fragment,e),f(Ct.$$.fragment,e),f(Pt.$$.fragment,e),f(ye.$$.fragment,e),f(Zt.$$.fragment,e),f(ve.$$.fragment,e),f(Ft.$$.fragment,e),f(It.$$.fragment,e),f(Wt.$$.fragment,e),f(Gt.$$.fragment,e),f(zt.$$.fragment,e),f(we.$$.fragment,e),f($e.$$.fragment,e),f(Bt.$$.fragment,e),f(Lt.$$.fragment,e),f(Vt.$$.fragment,e),f(Ht.$$.fragment,e),f(Nt.$$.fragment,e),f(qt.$$.fragment,e),f(Xt.$$.fragment,e),f(Rt.$$.fragment,e),f(Et.$$.fragment,e),f(Yt.$$.fragment,e),f(Dt.$$.fragment,e),f(Ie.$$.fragment,e),f(Qt.$$.fragment,e),f(At.$$.fragment,e),f(St.$$.fragment,e),f(Ot.$$.fragment,e),f(Kt.$$.fragment,e),f(eo.$$.fragment,e),f(to.$$.fragment,e),f(oo.$$.fragment,e),f(ao.$$.fragment,e),f(lo.$$.fragment,e),f(co.$$.fragment,e),f(po.$$.fragment,e),f(fo.$$.fragment,e),f(go.$$.fragment,e),f(bo.$$.fragment,e),f(vo.$$.fragment,e),f(To.$$.fragment,e),f(wo.$$.fragment,e),f($o.$$.fragment,e),f(ko.$$.fragment,e),f(jo.$$.fragment,e),f(Jo.$$.fragment,e),f(Uo.$$.fragment,e),f(Co.$$.fragment,e),f(Po.$$.fragment,e),f(Zo.$$.fragment,e),f(Fo.$$.fragment,e),f(Io.$$.fragment,e),f(Wo.$$.fragment,e),f(Go.$$.fragment,e),f(Ee.$$.fragment,e),f(zo.$$.fragment,e),f(Bo.$$.fragment,e),f(Lo.$$.fragment,e),f(Vo.$$.fragment,e),f(Ae.$$.fragment,e),f(Ho.$$.fragment,e),f(No.$$.fragment,e),f(qo.$$.fragment,e),f(Xo.$$.fragment,e),f(Ro.$$.fragment,e),f(Eo.$$.fragment,e),f(Yo.$$.fragment,e),f(Do.$$.fragment,e),f(Qo.$$.fragment,e),f(Ao.$$.fragment,e),f(st.$$.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(dn.$$.fragment,e),f(ln.$$.fragment,e),f(mn.$$.fragment,e),f(cn.$$.fragment,e),f(pn.$$.fragment,e),f(ut.$$.fragment,e),f(hn.$$.fragment,e),f(fn.$$.fragment,e),f(_t.$$.fragment,e),f(un.$$.fragment,e),f(gn.$$.fragment,e),f(bt.$$.fragment,e),f(_n.$$.fragment,e),f(bn.$$.fragment,e),f(vt.$$.fragment,e),f(yn.$$.fragment,e),f(Mt.$$.fragment,e),f(vn.$$.fragment,e),f(Tt.$$.fragment,e),f(Mn.$$.fragment,e),f(Tn.$$.fragment,e),f(xn.$$.fragment,e),f(xt.$$.fragment,e),f(wn.$$.fragment,e),f($n.$$.fragment,e),f(kn.$$.fragment,e),Bs=!0)},o(e){u(k.$$.fragment,e),u(Ut.$$.fragment,e),u(Ct.$$.fragment,e),u(Pt.$$.fragment,e),u(ye.$$.fragment,e),u(Zt.$$.fragment,e),u(ve.$$.fragment,e),u(Ft.$$.fragment,e),u(It.$$.fragment,e),u(Wt.$$.fragment,e),u(Gt.$$.fragment,e),u(zt.$$.fragment,e),u(we.$$.fragment,e),u($e.$$.fragment,e),u(Bt.$$.fragment,e),u(Lt.$$.fragment,e),u(Vt.$$.fragment,e),u(Ht.$$.fragment,e),u(Nt.$$.fragment,e),u(qt.$$.fragment,e),u(Xt.$$.fragment,e),u(Rt.$$.fragment,e),u(Et.$$.fragment,e),u(Yt.$$.fragment,e),u(Dt.$$.fragment,e),u(Ie.$$.fragment,e),u(Qt.$$.fragment,e),u(At.$$.fragment,e),u(St.$$.fragment,e),u(Ot.$$.fragment,e),u(Kt.$$.fragment,e),u(eo.$$.fragment,e),u(to.$$.fragment,e),u(oo.$$.fragment,e),u(ao.$$.fragment,e),u(lo.$$.fragment,e),u(co.$$.fragment,e),u(po.$$.fragment,e),u(fo.$$.fragment,e),u(go.$$.fragment,e),u(bo.$$.fragment,e),u(vo.$$.fragment,e),u(To.$$.fragment,e),u(wo.$$.fragment,e),u($o.$$.fragment,e),u(ko.$$.fragment,e),u(jo.$$.fragment,e),u(Jo.$$.fragment,e),u(Uo.$$.fragment,e),u(Co.$$.fragment,e),u(Po.$$.fragment,e),u(Zo.$$.fragment,e),u(Fo.$$.fragment,e),u(Io.$$.fragment,e),u(Wo.$$.fragment,e),u(Go.$$.fragment,e),u(Ee.$$.fragment,e),u(zo.$$.fragment,e),u(Bo.$$.fragment,e),u(Lo.$$.fragment,e),u(Vo.$$.fragment,e),u(Ae.$$.fragment,e),u(Ho.$$.fragment,e),u(No.$$.fragment,e),u(qo.$$.fragment,e),u(Xo.$$.fragment,e),u(Ro.$$.fragment,e),u(Eo.$$.fragment,e),u(Yo.$$.fragment,e),u(Do.$$.fragment,e),u(Qo.$$.fragment,e),u(Ao.$$.fragment,e),u(st.$$.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(dn.$$.fragment,e),u(ln.$$.fragment,e),u(mn.$$.fragment,e),u(cn.$$.fragment,e),u(pn.$$.fragment,e),u(ut.$$.fragment,e),u(hn.$$.fragment,e),u(fn.$$.fragment,e),u(_t.$$.fragment,e),u(un.$$.fragment,e),u(gn.$$.fragment,e),u(bt.$$.fragment,e),u(_n.$$.fragment,e),u(bn.$$.fragment,e),u(vt.$$.fragment,e),u(yn.$$.fragment,e),u(Mt.$$.fragment,e),u(vn.$$.fragment,e),u(Tt.$$.fragment,e),u(Mn.$$.fragment,e),u(Tn.$$.fragment,e),u(xn.$$.fragment,e),u(xt.$$.fragment,e),u(wn.$$.fragment,e),u($n.$$.fragment,e),u(kn.$$.fragment,e),Bs=!1},d(e){e&&(s(U),s(y),s(_),s(i),s(J),s(Sa),s(kt),s(Oa),s(jt),s(Ka),s(Jt),s(es),s(ts),s(x),s(os),s(Mr),s(ns),s(rs),s(no),s(as),s(ro),s(ss),s(is),s(so),s(ds),s(io),s(ls),s(ms),s(mo),s(cs),s(ps),s(hs),s(ho),s(fs),s(us),s(uo),s(gs),s(_s),s(_o),s(bs),s(ys),s(yo),s(vs),s(Ms),s(Mo),s(Ts),s(xs),s(xo),s(ws),s($s),s(F),s(ks),s(js),s(w),s(Js),s(Us),s(X),s(Cs),s(Ps),s(C),s(Zs),s(Fs),s(R),s(Is),s(Ws),s(E),s(Gs),s(zs),s(Aa)),s(l),g(k,e),g(Ut,e),g(Ct),g(Pt),g(ye),g(Zt),g(ve),g(Ft),g(It),g(Wt),g(Gt),g(zt),g(we),g($e),g(Bt),g(Lt),g(Vt),g(Ht),g(Nt),g(qt),g(Xt),g(Rt),g(Et),g(Yt),g(Dt),g(Ie),g(Qt),g(At),g(St),g(Ot),g(Kt),g(eo),g(to),g(oo,e),g(ao,e),g(lo,e),g(co,e),g(po,e),g(fo,e),g(go,e),g(bo,e),g(vo,e),g(To,e),g(wo,e),g($o),g(ko),g(jo),g(Jo),g(Uo),g(Co),g(Po),g(Zo),g(Fo),g(Io,e),g(Wo),g(Go),g(Ee),g(zo),g(Bo),g(Lo),g(Vo),g(Ae),g(Ho),g(No),g(qo),g(Xo),g(Ro),g(Eo),g(Yo),g(Do),g(Qo),g(Ao),g(st),g(So),g(Oo),g(Ko),g(en),g(tn),g(on),g(nn),g(rn),g(an),g(sn,e),g(dn),g(ln),g(mn,e),g(cn),g(pn),g(ut),g(hn),g(fn),g(_t),g(un),g(gn),g(bt),g(_n),g(bn),g(vt),g(yn),g(Mt),g(vn),g(Tt),g(Mn,e),g(Tn),g(xn),g(xt),g(wn,e),g($n),g(kn,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 Ch(P){return dh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bh extends lh{constructor(l){super(),mh(this,l,Ch,Jh,ih,{})}}export{Bh as component};
