import{s as te,o as ee,n as ct}from"../chunks/scheduler.6062bdaf.js";import{S as se,i as ae,g as c,s as i,r as m,A as ne,h as d,f as a,c as r,j as rt,u as g,x as T,k as ot,y as l,a as o,v as f,d as u,t as $,w}from"../chunks/index.4bca734e.js";import{T as vt}from"../chunks/Tip.b9ac1f03.js";import{D as xt}from"../chunks/Docstring.d7918b6d.js";import{C as ie}from"../chunks/CodeBlock.fa01571c.js";import{E as re}from"../chunks/ExampleCodeBlock.d27cbfa4.js";import{H as Y,E as oe}from"../chunks/EditOnGithub.74ab2baa.js";function le(x){let e,p=`If one of the model’s tensor is bigger than <code>max_shard_size</code>, it will end up in its own shard which will have a
size greater than <code>max_shard_size</code>.`;return{c(){e=c("p"),e.innerHTML=p},l(n){e=d(n,"P",{"data-svelte-h":!0}),T(e)!=="svelte-16sq104"&&(e.innerHTML=p)},m(n,h){o(n,e,h)},p:ct,d(n){n&&a(e)}}}function ce(x){let e,p=`To save a model state dictionary to the disk, see <code>save_torch_state_dict()</code>. This helper uses
<code>split_torch_state_dict_into_shards</code> under the hood.`;return{c(){e=c("p"),e.innerHTML=p},l(n){e=d(n,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1pf3f5v"&&(e.innerHTML=p)},m(n,h){o(n,e,h)},p:ct,d(n){n&&a(e)}}}function de(x){let e,p=`If one of the model’s tensor is bigger than <code>max_shard_size</code>, it will end up in its own shard which will have a
size greater than <code>max_shard_size</code>.`;return{c(){e=c("p"),e.innerHTML=p},l(n){e=d(n,"P",{"data-svelte-h":!0}),T(e)!=="svelte-16sq104"&&(e.innerHTML=p)},m(n,h){o(n,e,h)},p:ct,d(n){n&&a(e)}}}function he(x){let e,p="Example:",n,h,y;return h=new ie({props:{code:"aW1wb3J0JTIwanNvbiUwQWltcG9ydCUyMG9zJTBBZnJvbSUyMHNhZmV0ZW5zb3JzLnRvcmNoJTIwaW1wb3J0JTIwc2F2ZV9maWxlJTIwYXMlMjBzYWZlX3NhdmVfZmlsZSUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBzcGxpdF90b3JjaF9zdGF0ZV9kaWN0X2ludG9fc2hhcmRzJTBBJTBBZGVmJTIwc2F2ZV9zdGF0ZV9kaWN0KHN0YXRlX2RpY3QlM0ElMjBEaWN0JTVCc3RyJTJDJTIwdG9yY2guVGVuc29yJTVEJTJDJTIwc2F2ZV9kaXJlY3RvcnklM0ElMjBzdHIpJTNBJTBBJTIwJTIwJTIwJTIwc3RhdGVfZGljdF9zcGxpdCUyMCUzRCUyMHNwbGl0X3RvcmNoX3N0YXRlX2RpY3RfaW50b19zaGFyZHMoc3RhdGVfZGljdCklMEElMjAlMjAlMjAlMjBmb3IlMjBmaWxlbmFtZSUyQyUyMHRlbnNvcnMlMjBpbiUyMHN0YXRlX2RpY3Rfc3BsaXQuZmlsZW5hbWVfdG9fdGVuc29ycy5pdGVtcygpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2hhcmQlMjAlM0QlMjAlN0J0ZW5zb3IlM0ElMjBzdGF0ZV9kaWN0JTVCdGVuc29yJTVEJTIwZm9yJTIwdGVuc29yJTIwaW4lMjB0ZW5zb3JzJTdEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2FmZV9zYXZlX2ZpbGUoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2hhcmQlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBvcy5wYXRoLmpvaW4oc2F2ZV9kaXJlY3RvcnklMkMlMjBmaWxlbmFtZSklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRhZGF0YSUzRCU3QiUyMmZvcm1hdCUyMiUzQSUyMCUyMnB0JTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCUyMCUyMGlmJTIwc3RhdGVfZGljdF9zcGxpdC5pc19zaGFyZGVkJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaW5kZXglMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJtZXRhZGF0YSUyMiUzQSUyMHN0YXRlX2RpY3Rfc3BsaXQubWV0YWRhdGElMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ3ZWlnaHRfbWFwJTIyJTNBJTIwc3RhdGVfZGljdF9zcGxpdC50ZW5zb3JfdG9fZmlsZW5hbWUlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB3aXRoJTIwb3Blbihvcy5wYXRoLmpvaW4oc2F2ZV9kaXJlY3RvcnklMkMlMjAlMjJtb2RlbC5zYWZldGVuc29ycy5pbmRleC5qc29uJTIyKSUyQyUyMCUyMnclMjIpJTIwYXMlMjBmJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZi53cml0ZShqc29uLmR1bXBzKGluZGV4JTJDJTIwaW5kZW50JTNEMikp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> json
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> safetensors.torch <span class="hljs-keyword">import</span> save_file <span class="hljs-keyword">as</span> safe_save_file
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> split_torch_state_dict_into_shards

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">save_state_dict</span>(<span class="hljs-params">state_dict: <span class="hljs-type">Dict</span>[<span class="hljs-built_in">str</span>, torch.Tensor], save_directory: <span class="hljs-built_in">str</span></span>):
<span class="hljs-meta">... </span>    state_dict_split = split_torch_state_dict_into_shards(state_dict)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> filename, tensors <span class="hljs-keyword">in</span> state_dict_split.filename_to_tensors.items():
<span class="hljs-meta">... </span>        shard = {tensor: state_dict[tensor] <span class="hljs-keyword">for</span> tensor <span class="hljs-keyword">in</span> tensors}
<span class="hljs-meta">... </span>        safe_save_file(
<span class="hljs-meta">... </span>            shard,
<span class="hljs-meta">... </span>            os.path.join(save_directory, filename),
<span class="hljs-meta">... </span>            metadata={<span class="hljs-string">&quot;format&quot;</span>: <span class="hljs-string">&quot;pt&quot;</span>},
<span class="hljs-meta">... </span>        )
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> state_dict_split.is_sharded:
<span class="hljs-meta">... </span>        index = {
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;metadata&quot;</span>: state_dict_split.metadata,
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;weight_map&quot;</span>: state_dict_split.tensor_to_filename,
<span class="hljs-meta">... </span>        }
<span class="hljs-meta">... </span>        <span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(os.path.join(save_directory, <span class="hljs-string">&quot;model.safetensors.index.json&quot;</span>), <span class="hljs-string">&quot;w&quot;</span>) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>            f.write(json.dumps(index, indent=<span class="hljs-number">2</span>))`,wrap:!1}}),{c(){e=c("p"),e.textContent=p,n=i(),m(h.$$.fragment)},l(_){e=d(_,"P",{"data-svelte-h":!0}),T(e)!=="svelte-11lpom8"&&(e.textContent=p),n=r(_),g(h.$$.fragment,_)},m(_,B){o(_,e,B),o(_,n,B),f(h,_,B),y=!0},p:ct,i(_){y||(u(h.$$.fragment,_),y=!0)},o(_){$(h.$$.fragment,_),y=!1},d(_){_&&(a(e),a(n)),w(h,_)}}}function pe(x){let e,p=`If one of the model’s tensor is bigger than <code>max_shard_size</code>, it will end up in its own shard which will have a
size greater than <code>max_shard_size</code>.`;return{c(){e=c("p"),e.innerHTML=p},l(n){e=d(n,"P",{"data-svelte-h":!0}),T(e)!=="svelte-16sq104"&&(e.innerHTML=p)},m(n,h){o(n,e,h)},p:ct,d(n){n&&a(e)}}}function _e(x){let e,p,n,h,y,_,B,Wt="<code>huggingface_hub</code>에는 ML 라이브러리가 모델 가중치를 표준화된 방식으로 직렬화 할 수 있도록 돕는 헬퍼를 포함하고 있습니다. 라이브러리의 이 부분은 아직 개발 중이며 향후 버전에서 개선될 예정입니다. 개선 목표는 Hub에서 가중치의 직렬화 방식을 통일하고, 라이브러리 간 코드 중복을 줄이며, Hub에서의 규약을 촉진하는 것입니다.",dt,R,ht,V,Dt="현재 이 모듈은 상태 딕셔너리(예: 레이어 이름과 관련 텐서 간의 매핑)를 받아 여러 샤드로 나누고, 이 과정에서 적절한 인덱스를 생성하는 단일 헬퍼를 포함하고 있습니다. 이 헬퍼는 <code>torch</code>, <code>tensorflow</code>, <code>numpy</code> 텐서에 사용 가능하며, 다른 ML 프레임워크로 쉽게 확장될 수 있도록 설계되었습니다.",pt,H,_t,j,L,yt,Q,Ut="Split a model state dictionary in shards so that each shard is smaller than a given size.",Bt,K,qt=`The shards are determined by iterating through the <code>state_dict</code> in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].`,It,A,mt,W,gt,b,D,Gt,O,St="Split a model state dictionary in shards so that each shard is smaller than a given size.",zt,tt,Xt=`The shards are determined by iterating through the <code>state_dict</code> in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].`,At,k,kt,C,Ct,Z,ft,U,ut,q,Ft='이것은 각 프레임워크별 헬퍼가 파생되는 기본 틀입니다. 실제로는 아직 지원되지 않는 프레임워크에 맞게 조정할 필요가 있는 경우가 아니면 이 틀을 직접 사용할 것으로 예상되지 않습니다. 그런 경우가 있다면, <code>huggingface_hub</code> 리포지토리에 <a href="https://github.com/huggingface/huggingface_hub/issues/new" rel="nofollow">새로운 이슈를 개설</a> 하여 알려주세요.',$t,J,S,Zt,et,Pt="Split a model state dictionary in shards so that each shard is smaller than a given size.",Et,st,Nt=`The shards are determined by iterating through the <code>state_dict</code> in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].`,Rt,E,wt,X,bt,F,Tt,v,P,Vt,at,Yt="Return unique identifier to a tensor storage.",Ht,nt,Qt=`Multiple different tensors can share the same underlying storage. For
example, “meta” tensors all share the same storage, and thus their identifier will all be equal. This identifier is
guaranteed to be unique and constant for this tensor’s storage during its lifetime. Two tensor storages with
non-overlapping lifetimes may have the same id.`,Lt,it,Kt='Taken from <a href="https://github.com/huggingface/transformers/blob/1ecf5f7c982d761b4daaa96719d162c324187c64/src/transformers/pytorch_utils.py#L278" rel="nofollow">https://github.com/huggingface/transformers/blob/1ecf5f7c982d761b4daaa96719d162c324187c64/src/transformers/pytorch_utils.py#L278</a>.',Mt,N,jt,lt,Jt;return y=new Y({props:{title:"직렬화",local:"serialization",headingTag:"h1"}}),R=new Y({props:{title:"상태 사전을 샤드로 나누기",local:"split-state-dict-into-shards",headingTag:"h2"}}),H=new Y({props:{title:"split_tf_state_dict_into_shards",local:"huggingface_hub.split_tf_state_dict_into_shards ][ huggingface_hub.split_tf_state_dict_into_shards",headingTag:"h3"}}),L=new xt({props:{name:"huggingface_hub.split_tf_state_dict_into_shards",anchor:"huggingface_hub.split_tf_state_dict_into_shards",parameters:[{name:"state_dict",val:": Dict"},{name:"filename_pattern",val:": str = 'tf_model{suffix}.h5'"},{name:"max_shard_size",val:": Union = '5GB'"}],parametersDescription:[{anchor:"huggingface_hub.split_tf_state_dict_into_shards.state_dict",description:`<strong>state_dict</strong> (<code>Dict[str, Tensor]</code>) &#x2014;
The state dictionary to save.`,name:"state_dict"},{anchor:"huggingface_hub.split_tf_state_dict_into_shards.filename_pattern",description:`<strong>filename_pattern</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The pattern to generate the files names in which the model will be saved. Pattern must be a string that
can be formatted with <code>filename_pattern.format(suffix=...)</code> and must contain the keyword <code>suffix</code>
Defaults to <code>&quot;tf_model{suffix}.h5&quot;</code>.`,name:"filename_pattern"},{anchor:"huggingface_hub.split_tf_state_dict_into_shards.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>) &#x2014;
The maximum size of each shard, in bytes. Defaults to 5GB.`,name:"max_shard_size"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2404/src/huggingface_hub/serialization/_tensorflow.py#L28",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>StateDictSplit</code> object containing the shards and the index to retrieve them.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>StateDictSplit</code></p>
`}}),A=new vt({props:{warning:!0,$$slots:{default:[le]},$$scope:{ctx:x}}}),W=new Y({props:{title:"split_torch_state_dict_into_shards",local:"huggingface_hub.split_torch_state_dict_into_shards ][ huggingface_hub.split_torch_state_dict_into_shards",headingTag:"h3"}}),D=new xt({props:{name:"huggingface_hub.split_torch_state_dict_into_shards",anchor:"huggingface_hub.split_torch_state_dict_into_shards",parameters:[{name:"state_dict",val:": Dict"},{name:"filename_pattern",val:": str = 'model{suffix}.safetensors'"},{name:"max_shard_size",val:": Union = '5GB'"}],parametersDescription:[{anchor:"huggingface_hub.split_torch_state_dict_into_shards.state_dict",description:`<strong>state_dict</strong> (<code>Dict[str, torch.Tensor]</code>) &#x2014;
The state dictionary to save.`,name:"state_dict"},{anchor:"huggingface_hub.split_torch_state_dict_into_shards.filename_pattern",description:`<strong>filename_pattern</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The pattern to generate the files names in which the model will be saved. Pattern must be a string that
can be formatted with <code>filename_pattern.format(suffix=...)</code> and must contain the keyword <code>suffix</code>
Defaults to <code>&quot;model{suffix}.safetensors&quot;</code>.`,name:"filename_pattern"},{anchor:"huggingface_hub.split_torch_state_dict_into_shards.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>) &#x2014;
The maximum size of each shard, in bytes. Defaults to 5GB.`,name:"max_shard_size"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2404/src/huggingface_hub/serialization/_torch.py#L263",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>StateDictSplit</code> object containing the shards and the index to retrieve them.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>StateDictSplit</code></p>
`}}),k=new vt({props:{$$slots:{default:[ce]},$$scope:{ctx:x}}}),C=new vt({props:{warning:!0,$$slots:{default:[de]},$$scope:{ctx:x}}}),Z=new re({props:{anchor:"huggingface_hub.split_torch_state_dict_into_shards.example",$$slots:{default:[he]},$$scope:{ctx:x}}}),U=new Y({props:{title:"split_state_dict_into_shards_factory",local:"huggingface_hub.split_state_dict_into_shards_factory ][ huggingface_hub.split_state_dict_into_shards_factory",headingTag:"h3"}}),S=new xt({props:{name:"huggingface_hub.split_state_dict_into_shards_factory",anchor:"huggingface_hub.split_state_dict_into_shards_factory",parameters:[{name:"state_dict",val:": Dict"},{name:"get_storage_size",val:": Callable"},{name:"filename_pattern",val:": str"},{name:"get_storage_id",val:": Callable = <function <lambda> at 0x7f54711ca710>"},{name:"max_shard_size",val:": Union = '5GB'"}],parametersDescription:[{anchor:"huggingface_hub.split_state_dict_into_shards_factory.state_dict",description:`<strong>state_dict</strong> (<code>Dict[str, Tensor]</code>) &#x2014;
The state dictionary to save.`,name:"state_dict"},{anchor:"huggingface_hub.split_state_dict_into_shards_factory.get_storage_size",description:`<strong>get_storage_size</strong> (<code>Callable[[Tensor], int]</code>) &#x2014;
A function that returns the size of a tensor when saved on disk in bytes.`,name:"get_storage_size"},{anchor:"huggingface_hub.split_state_dict_into_shards_factory.get_storage_id",description:`<strong>get_storage_id</strong> (<code>Callable[[Tensor], Optional[Any]]</code>, <em>optional</em>) &#x2014;
A function that returns a unique identifier to a tensor storage. Multiple different tensors can share the
same underlying storage. This identifier is guaranteed to be unique and constant for this tensor&#x2019;s storage
during its lifetime. Two tensor storages with non-overlapping lifetimes may have the same id.`,name:"get_storage_id"},{anchor:"huggingface_hub.split_state_dict_into_shards_factory.filename_pattern",description:`<strong>filename_pattern</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The pattern to generate the files names in which the model will be saved. Pattern must be a string that
can be formatted with <code>filename_pattern.format(suffix=...)</code> and must contain the keyword <code>suffix</code>`,name:"filename_pattern"},{anchor:"huggingface_hub.split_state_dict_into_shards_factory.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>) &#x2014;
The maximum size of each shard, in bytes. Defaults to 5GB.`,name:"max_shard_size"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2404/src/huggingface_hub/serialization/_base.py#L49",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>StateDictSplit</code> object containing the shards and the index to retrieve them.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>StateDictSplit</code></p>
`}}),E=new vt({props:{warning:!0,$$slots:{default:[pe]},$$scope:{ctx:x}}}),X=new Y({props:{title:"도우미",local:"도우미",headingTag:"h2"}}),F=new Y({props:{title:"get_torch_storage_id",local:"huggingface_hub.get_torch_storage_id ][ huggingface_hub.get_torch_storage_id",headingTag:"h3"}}),P=new xt({props:{name:"huggingface_hub.get_torch_storage_id",anchor:"huggingface_hub.get_torch_storage_id",parameters:[{name:"tensor",val:": torch.Tensor"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2404/src/huggingface_hub/serialization/_torch.py#L339"}}),N=new oe({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/ko/package_reference/serialization.md"}}),{c(){e=c("meta"),p=i(),n=c("p"),h=i(),m(y.$$.fragment),_=i(),B=c("p"),B.innerHTML=Wt,dt=i(),m(R.$$.fragment),ht=i(),V=c("p"),V.innerHTML=Dt,pt=i(),m(H.$$.fragment),_t=i(),j=c("div"),m(L.$$.fragment),yt=i(),Q=c("p"),Q.textContent=Ut,Bt=i(),K=c("p"),K.innerHTML=qt,It=i(),m(A.$$.fragment),mt=i(),m(W.$$.fragment),gt=i(),b=c("div"),m(D.$$.fragment),Gt=i(),O=c("p"),O.textContent=St,zt=i(),tt=c("p"),tt.innerHTML=Xt,At=i(),m(k.$$.fragment),kt=i(),m(C.$$.fragment),Ct=i(),m(Z.$$.fragment),ft=i(),m(U.$$.fragment),ut=i(),q=c("p"),q.innerHTML=Ft,$t=i(),J=c("div"),m(S.$$.fragment),Zt=i(),et=c("p"),et.textContent=Pt,Et=i(),st=c("p"),st.innerHTML=Nt,Rt=i(),m(E.$$.fragment),wt=i(),m(X.$$.fragment),bt=i(),m(F.$$.fragment),Tt=i(),v=c("div"),m(P.$$.fragment),Vt=i(),at=c("p"),at.textContent=Yt,Ht=i(),nt=c("p"),nt.textContent=Qt,Lt=i(),it=c("p"),it.innerHTML=Kt,Mt=i(),m(N.$$.fragment),jt=i(),lt=c("p"),this.h()},l(t){const s=ne("svelte-u9bgzb",document.head);e=d(s,"META",{name:!0,content:!0}),s.forEach(a),p=r(t),n=d(t,"P",{}),rt(n).forEach(a),h=r(t),g(y.$$.fragment,t),_=r(t),B=d(t,"P",{"data-svelte-h":!0}),T(B)!=="svelte-1t3dxwg"&&(B.innerHTML=Wt),dt=r(t),g(R.$$.fragment,t),ht=r(t),V=d(t,"P",{"data-svelte-h":!0}),T(V)!=="svelte-144hjru"&&(V.innerHTML=Dt),pt=r(t),g(H.$$.fragment,t),_t=r(t),j=d(t,"DIV",{class:!0});var I=rt(j);g(L.$$.fragment,I),yt=r(I),Q=d(I,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-1q1pe7b"&&(Q.textContent=Ut),Bt=r(I),K=d(I,"P",{"data-svelte-h":!0}),T(K)!=="svelte-17rio2z"&&(K.innerHTML=qt),It=r(I),g(A.$$.fragment,I),I.forEach(a),mt=r(t),g(W.$$.fragment,t),gt=r(t),b=d(t,"DIV",{class:!0});var M=rt(b);g(D.$$.fragment,M),Gt=r(M),O=d(M,"P",{"data-svelte-h":!0}),T(O)!=="svelte-1q1pe7b"&&(O.textContent=St),zt=r(M),tt=d(M,"P",{"data-svelte-h":!0}),T(tt)!=="svelte-17rio2z"&&(tt.innerHTML=Xt),At=r(M),g(k.$$.fragment,M),kt=r(M),g(C.$$.fragment,M),Ct=r(M),g(Z.$$.fragment,M),M.forEach(a),ft=r(t),g(U.$$.fragment,t),ut=r(t),q=d(t,"P",{"data-svelte-h":!0}),T(q)!=="svelte-70bx2r"&&(q.innerHTML=Ft),$t=r(t),J=d(t,"DIV",{class:!0});var G=rt(J);g(S.$$.fragment,G),Zt=r(G),et=d(G,"P",{"data-svelte-h":!0}),T(et)!=="svelte-1q1pe7b"&&(et.textContent=Pt),Et=r(G),st=d(G,"P",{"data-svelte-h":!0}),T(st)!=="svelte-17rio2z"&&(st.innerHTML=Nt),Rt=r(G),g(E.$$.fragment,G),G.forEach(a),wt=r(t),g(X.$$.fragment,t),bt=r(t),g(F.$$.fragment,t),Tt=r(t),v=d(t,"DIV",{class:!0});var z=rt(v);g(P.$$.fragment,z),Vt=r(z),at=d(z,"P",{"data-svelte-h":!0}),T(at)!=="svelte-lfv2l4"&&(at.textContent=Yt),Ht=r(z),nt=d(z,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-4klsmr"&&(nt.textContent=Qt),Lt=r(z),it=d(z,"P",{"data-svelte-h":!0}),T(it)!=="svelte-akggeo"&&(it.innerHTML=Kt),z.forEach(a),Mt=r(t),g(N.$$.fragment,t),jt=r(t),lt=d(t,"P",{}),rt(lt).forEach(a),this.h()},h(){ot(e,"name","hf:doc:metadata"),ot(e,"content",me),ot(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ot(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ot(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ot(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(t,s){l(document.head,e),o(t,p,s),o(t,n,s),o(t,h,s),f(y,t,s),o(t,_,s),o(t,B,s),o(t,dt,s),f(R,t,s),o(t,ht,s),o(t,V,s),o(t,pt,s),f(H,t,s),o(t,_t,s),o(t,j,s),f(L,j,null),l(j,yt),l(j,Q),l(j,Bt),l(j,K),l(j,It),f(A,j,null),o(t,mt,s),f(W,t,s),o(t,gt,s),o(t,b,s),f(D,b,null),l(b,Gt),l(b,O),l(b,zt),l(b,tt),l(b,At),f(k,b,null),l(b,kt),f(C,b,null),l(b,Ct),f(Z,b,null),o(t,ft,s),f(U,t,s),o(t,ut,s),o(t,q,s),o(t,$t,s),o(t,J,s),f(S,J,null),l(J,Zt),l(J,et),l(J,Et),l(J,st),l(J,Rt),f(E,J,null),o(t,wt,s),f(X,t,s),o(t,bt,s),f(F,t,s),o(t,Tt,s),o(t,v,s),f(P,v,null),l(v,Vt),l(v,at),l(v,Ht),l(v,nt),l(v,Lt),l(v,it),o(t,Mt,s),f(N,t,s),o(t,jt,s),o(t,lt,s),Jt=!0},p(t,[s]){const I={};s&2&&(I.$$scope={dirty:s,ctx:t}),A.$set(I);const M={};s&2&&(M.$$scope={dirty:s,ctx:t}),k.$set(M);const G={};s&2&&(G.$$scope={dirty:s,ctx:t}),C.$set(G);const z={};s&2&&(z.$$scope={dirty:s,ctx:t}),Z.$set(z);const Ot={};s&2&&(Ot.$$scope={dirty:s,ctx:t}),E.$set(Ot)},i(t){Jt||(u(y.$$.fragment,t),u(R.$$.fragment,t),u(H.$$.fragment,t),u(L.$$.fragment,t),u(A.$$.fragment,t),u(W.$$.fragment,t),u(D.$$.fragment,t),u(k.$$.fragment,t),u(C.$$.fragment,t),u(Z.$$.fragment,t),u(U.$$.fragment,t),u(S.$$.fragment,t),u(E.$$.fragment,t),u(X.$$.fragment,t),u(F.$$.fragment,t),u(P.$$.fragment,t),u(N.$$.fragment,t),Jt=!0)},o(t){$(y.$$.fragment,t),$(R.$$.fragment,t),$(H.$$.fragment,t),$(L.$$.fragment,t),$(A.$$.fragment,t),$(W.$$.fragment,t),$(D.$$.fragment,t),$(k.$$.fragment,t),$(C.$$.fragment,t),$(Z.$$.fragment,t),$(U.$$.fragment,t),$(S.$$.fragment,t),$(E.$$.fragment,t),$(X.$$.fragment,t),$(F.$$.fragment,t),$(P.$$.fragment,t),$(N.$$.fragment,t),Jt=!1},d(t){t&&(a(p),a(n),a(h),a(_),a(B),a(dt),a(ht),a(V),a(pt),a(_t),a(j),a(mt),a(gt),a(b),a(ft),a(ut),a(q),a($t),a(J),a(wt),a(bt),a(Tt),a(v),a(Mt),a(jt),a(lt)),a(e),w(y,t),w(R,t),w(H,t),w(L),w(A),w(W,t),w(D),w(k),w(C),w(Z),w(U,t),w(S),w(E),w(X,t),w(F,t),w(P),w(N,t)}}}const me='{"title":"직렬화","local":"serialization","sections":[{"title":"상태 사전을 샤드로 나누기","local":"split-state-dict-into-shards","sections":[{"title":"split_tf_state_dict_into_shards","local":"huggingface_hub.split_tf_state_dict_into_shards ][ huggingface_hub.split_tf_state_dict_into_shards","sections":[],"depth":3},{"title":"split_torch_state_dict_into_shards","local":"huggingface_hub.split_torch_state_dict_into_shards ][ huggingface_hub.split_torch_state_dict_into_shards","sections":[],"depth":3},{"title":"split_state_dict_into_shards_factory","local":"huggingface_hub.split_state_dict_into_shards_factory ][ huggingface_hub.split_state_dict_into_shards_factory","sections":[],"depth":3}],"depth":2},{"title":"도우미","local":"도우미","sections":[{"title":"get_torch_storage_id","local":"huggingface_hub.get_torch_storage_id ][ huggingface_hub.get_torch_storage_id","sections":[],"depth":3}],"depth":2}],"depth":1}';function ge(x){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class je extends se{constructor(e){super(),ae(this,e,ge,_e,te,{})}}export{je as component};
