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 o,j as ot,u as g,x as T,k as rt,y as l,a as r,v as f,d as u,t as $,w}from"../chunks/index.4bca734e.js";import{T as xt}from"../chunks/Tip.b9ac1f03.js";import{D as vt}from"../chunks/Docstring.81ba5e3c.js";import{C as ie}from"../chunks/CodeBlock.fa01571c.js";import{E as oe}from"../chunks/ExampleCodeBlock.30e7542f.js";import{H as Y,E as re}from"../chunks/EditOnGithub.74ab2baa.js";function le(v){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){r(n,e,h)},p:ct,d(n){n&&a(e)}}}function ce(v){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){r(n,e,h)},p:ct,d(n){n&&a(e)}}}function de(v){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){r(n,e,h)},p:ct,d(n){n&&a(e)}}}function he(v){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=o(_),g(h.$$.fragment,_)},m(_,B){r(_,e,B),r(_,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(v){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){r(n,e,h)},p:ct,d(n){n&&a(e)}}}function _e(v){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,St=`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,qt="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,S,Pt='이것은 각 프레임워크별 헬퍼가 파생되는 기본 틀입니다. 실제로는 아직 지원되지 않는 프레임워크에 맞게 조정할 필요가 있는 경우가 아니면 이 틀을 직접 사용할 것으로 예상되지 않습니다. 그런 경우가 있다면, <code>huggingface_hub</code> 리포지토리에 <a href="https://github.com/huggingface/huggingface_hub/issues/new" rel="nofollow">새로운 이슈를 개설</a> 하여 알려주세요.',$t,J,q,Zt,et,Ft="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,P,Tt,x,F,Vt,at,Yt="Return unique identifier to a tensor storage.",Ht,nt,Qt=`Multiple different tensors can share the same underlying storage. 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.
In the case of meta tensors, we return None since we can’t tell if they share the same storage.`,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 vt({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/main/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 xt({props:{warning:!0,$$slots:{default:[le]},$$scope:{ctx:v}}}),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 vt({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/main/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 xt({props:{$$slots:{default:[ce]},$$scope:{ctx:v}}}),C=new xt({props:{warning:!0,$$slots:{default:[de]},$$scope:{ctx:v}}}),Z=new oe({props:{anchor:"huggingface_hub.split_torch_state_dict_into_shards.example",$$slots:{default:[he]},$$scope:{ctx:v}}}),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"}}),q=new vt({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 0x7f903cb5aef0>"},{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/main/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 xt({props:{warning:!0,$$slots:{default:[pe]},$$scope:{ctx:v}}}),X=new Y({props:{title:"도우미",local:"도우미",headingTag:"h2"}}),P=new Y({props:{title:"get_torch_storage_id",local:"huggingface_hub.get_torch_storage_id ][ huggingface_hub.get_torch_storage_id",headingTag:"h3"}}),F=new vt({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/main/src/huggingface_hub/serialization/_torch.py#L371"}}),N=new re({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=St,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=qt,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(),S=c("p"),S.innerHTML=Pt,$t=i(),J=c("div"),m(q.$$.fragment),Zt=i(),et=c("p"),et.textContent=Ft,Et=i(),st=c("p"),st.innerHTML=Nt,Rt=i(),m(E.$$.fragment),wt=i(),m(X.$$.fragment),bt=i(),m(P.$$.fragment),Tt=i(),x=c("div"),m(F.$$.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=o(t),n=d(t,"P",{}),ot(n).forEach(a),h=o(t),g(y.$$.fragment,t),_=o(t),B=d(t,"P",{"data-svelte-h":!0}),T(B)!=="svelte-1t3dxwg"&&(B.innerHTML=Wt),dt=o(t),g(R.$$.fragment,t),ht=o(t),V=d(t,"P",{"data-svelte-h":!0}),T(V)!=="svelte-144hjru"&&(V.innerHTML=Dt),pt=o(t),g(H.$$.fragment,t),_t=o(t),j=d(t,"DIV",{class:!0});var I=ot(j);g(L.$$.fragment,I),yt=o(I),Q=d(I,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-1q1pe7b"&&(Q.textContent=Ut),Bt=o(I),K=d(I,"P",{"data-svelte-h":!0}),T(K)!=="svelte-17rio2z"&&(K.innerHTML=St),It=o(I),g(A.$$.fragment,I),I.forEach(a),mt=o(t),g(W.$$.fragment,t),gt=o(t),b=d(t,"DIV",{class:!0});var M=ot(b);g(D.$$.fragment,M),Gt=o(M),O=d(M,"P",{"data-svelte-h":!0}),T(O)!=="svelte-1q1pe7b"&&(O.textContent=qt),zt=o(M),tt=d(M,"P",{"data-svelte-h":!0}),T(tt)!=="svelte-17rio2z"&&(tt.innerHTML=Xt),At=o(M),g(k.$$.fragment,M),kt=o(M),g(C.$$.fragment,M),Ct=o(M),g(Z.$$.fragment,M),M.forEach(a),ft=o(t),g(U.$$.fragment,t),ut=o(t),S=d(t,"P",{"data-svelte-h":!0}),T(S)!=="svelte-70bx2r"&&(S.innerHTML=Pt),$t=o(t),J=d(t,"DIV",{class:!0});var G=ot(J);g(q.$$.fragment,G),Zt=o(G),et=d(G,"P",{"data-svelte-h":!0}),T(et)!=="svelte-1q1pe7b"&&(et.textContent=Ft),Et=o(G),st=d(G,"P",{"data-svelte-h":!0}),T(st)!=="svelte-17rio2z"&&(st.innerHTML=Nt),Rt=o(G),g(E.$$.fragment,G),G.forEach(a),wt=o(t),g(X.$$.fragment,t),bt=o(t),g(P.$$.fragment,t),Tt=o(t),x=d(t,"DIV",{class:!0});var z=ot(x);g(F.$$.fragment,z),Vt=o(z),at=d(z,"P",{"data-svelte-h":!0}),T(at)!=="svelte-lfv2l4"&&(at.textContent=Yt),Ht=o(z),nt=d(z,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-1o86t9o"&&(nt.textContent=Qt),Lt=o(z),it=d(z,"P",{"data-svelte-h":!0}),T(it)!=="svelte-akggeo"&&(it.innerHTML=Kt),z.forEach(a),Mt=o(t),g(N.$$.fragment,t),jt=o(t),lt=d(t,"P",{}),ot(lt).forEach(a),this.h()},h(){rt(e,"name","hf:doc:metadata"),rt(e,"content",me),rt(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),rt(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),rt(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),rt(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(t,s){l(document.head,e),r(t,p,s),r(t,n,s),r(t,h,s),f(y,t,s),r(t,_,s),r(t,B,s),r(t,dt,s),f(R,t,s),r(t,ht,s),r(t,V,s),r(t,pt,s),f(H,t,s),r(t,_t,s),r(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),r(t,mt,s),f(W,t,s),r(t,gt,s),r(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),r(t,ft,s),f(U,t,s),r(t,ut,s),r(t,S,s),r(t,$t,s),r(t,J,s),f(q,J,null),l(J,Zt),l(J,et),l(J,Et),l(J,st),l(J,Rt),f(E,J,null),r(t,wt,s),f(X,t,s),r(t,bt,s),f(P,t,s),r(t,Tt,s),r(t,x,s),f(F,x,null),l(x,Vt),l(x,at),l(x,Ht),l(x,nt),l(x,Lt),l(x,it),r(t,Mt,s),f(N,t,s),r(t,jt,s),r(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(q.$$.fragment,t),u(E.$$.fragment,t),u(X.$$.fragment,t),u(P.$$.fragment,t),u(F.$$.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),$(q.$$.fragment,t),$(E.$$.fragment,t),$(X.$$.fragment,t),$(P.$$.fragment,t),$(F.$$.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(S),a($t),a(J),a(wt),a(bt),a(Tt),a(x),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(q),w(E),w(X,t),w(P,t),w(F),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(v){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};
