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 g,A as ne,h as d,f as a,c as r,j as rt,u as m,x as b,k as ot,y as l,a as o,v as f,d as u,t as $,w as T}from"../chunks/index.4bca734e.js";import{T as Jt}from"../chunks/Tip.b9ac1f03.js";import{D as xt}from"../chunks/Docstring.81ba5e3c.js";import{C as ie}from"../chunks/CodeBlock.fa01571c.js";import{E as re}from"../chunks/ExampleCodeBlock.30e7542f.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}),b(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}),b(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}),b(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,v;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(),g(h.$$.fragment)},l(_){e=d(_,"P",{"data-svelte-h":!0}),b(e)!=="svelte-11lpom8"&&(e.textContent=p),n=r(_),m(h.$$.fragment,_)},m(_,B){o(_,e,B),o(_,n,B),f(h,_,B),v=!0},p:ct,i(_){v||(u(h.$$.fragment,_),v=!0)},o(_){$(h.$$.fragment,_),v=!1},d(_){_&&(a(e),a(n)),T(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}),b(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,v,_,B,Wt="<code>huggingface_hub</code>에는 ML 라이브러리가 모델 가중치를 표준화된 방식으로 직렬화 할 수 있도록 돕는 헬퍼를 포함하고 있습니다. 라이브러리의 이 부분은 아직 개발 중이며 향후 버전에서 개선될 예정입니다. 개선 목표는 Hub에서 가중치의 직렬화 방식을 통일하고, 라이브러리 간 코드 중복을 줄이며, Hub에서의 규약을 촉진하는 것입니다.",dt,E,ht,V,Dt="현재 이 모듈은 상태 딕셔너리(예: 레이어 이름과 관련 텐서 간의 매핑)를 받아 여러 샤드로 나누고, 이 과정에서 적절한 인덱스를 생성하는 단일 헬퍼를 포함하고 있습니다. 이 헬퍼는 <code>torch</code>, <code>tensorflow</code>, <code>numpy</code> 텐서에 사용 가능하며, 다른 ML 프레임워크로 쉽게 확장될 수 있도록 설계되었습니다.",pt,H,_t,j,L,vt,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,gt,W,mt,w,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,Ft='이것은 각 프레임워크별 헬퍼가 파생되는 기본 틀입니다. 실제로는 아직 지원되지 않는 프레임워크에 맞게 조정할 필요가 있는 경우가 아니면 이 틀을 직접 사용할 것으로 예상되지 않습니다. 그런 경우가 있다면, <code>huggingface_hub</code> 리포지토리에 <a href="https://github.com/huggingface/huggingface_hub/issues/new" rel="nofollow">새로운 이슈를 개설</a> 하여 알려주세요.',$t,y,q,Zt,et,Pt="Split a model state dictionary in shards so that each shard is smaller than a given size.",Rt,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].`,Et,R,Tt,X,wt,F,bt,J,P,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,yt;return v=new Y({props:{title:"직렬화",local:"serialization",headingTag:"h1"}}),E=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:": typing.Dict[str, ForwardRef('tf.Tensor')]"},{name:"filename_pattern",val:": str = 'tf_model{suffix}.h5'"},{name:"max_shard_size",val:": typing.Union[int, str] = '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 Jt({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:": typing.Dict[str, ForwardRef('torch.Tensor')]"},{name:"filename_pattern",val:": str = 'model{suffix}.safetensors'"},{name:"max_shard_size",val:": typing.Union[int, str] = '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#L302",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 Jt({props:{$$slots:{default:[ce]},$$scope:{ctx:x}}}),C=new Jt({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"}}),q=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:": typing.Dict[str, ~TensorT]"},{name:"get_storage_size",val:": typing.Callable[[~TensorT], int]"},{name:"filename_pattern",val:": str"},{name:"get_storage_id",val:": typing.Callable[[~TensorT], typing.Optional[typing.Any]] = <function <lambda> at 0x7f35e2d992d0>"},{name:"max_shard_size",val:": typing.Union[int, str] = '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>
`}}),R=new Jt({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/main/src/huggingface_hub/serialization/_torch.py#L735"}}),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(),g(v.$$.fragment),_=i(),B=c("p"),B.innerHTML=Wt,dt=i(),g(E.$$.fragment),ht=i(),V=c("p"),V.innerHTML=Dt,pt=i(),g(H.$$.fragment),_t=i(),j=c("div"),g(L.$$.fragment),vt=i(),Q=c("p"),Q.textContent=Ut,Bt=i(),K=c("p"),K.innerHTML=St,It=i(),g(A.$$.fragment),gt=i(),g(W.$$.fragment),mt=i(),w=c("div"),g(D.$$.fragment),Gt=i(),O=c("p"),O.textContent=qt,zt=i(),tt=c("p"),tt.innerHTML=Xt,At=i(),g(k.$$.fragment),kt=i(),g(C.$$.fragment),Ct=i(),g(Z.$$.fragment),ft=i(),g(U.$$.fragment),ut=i(),S=c("p"),S.innerHTML=Ft,$t=i(),y=c("div"),g(q.$$.fragment),Zt=i(),et=c("p"),et.textContent=Pt,Rt=i(),st=c("p"),st.innerHTML=Nt,Et=i(),g(R.$$.fragment),Tt=i(),g(X.$$.fragment),wt=i(),g(F.$$.fragment),bt=i(),J=c("div"),g(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(),g(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),m(v.$$.fragment,t),_=r(t),B=d(t,"P",{"data-svelte-h":!0}),b(B)!=="svelte-1t3dxwg"&&(B.innerHTML=Wt),dt=r(t),m(E.$$.fragment,t),ht=r(t),V=d(t,"P",{"data-svelte-h":!0}),b(V)!=="svelte-144hjru"&&(V.innerHTML=Dt),pt=r(t),m(H.$$.fragment,t),_t=r(t),j=d(t,"DIV",{class:!0});var I=rt(j);m(L.$$.fragment,I),vt=r(I),Q=d(I,"P",{"data-svelte-h":!0}),b(Q)!=="svelte-1q1pe7b"&&(Q.textContent=Ut),Bt=r(I),K=d(I,"P",{"data-svelte-h":!0}),b(K)!=="svelte-17rio2z"&&(K.innerHTML=St),It=r(I),m(A.$$.fragment,I),I.forEach(a),gt=r(t),m(W.$$.fragment,t),mt=r(t),w=d(t,"DIV",{class:!0});var M=rt(w);m(D.$$.fragment,M),Gt=r(M),O=d(M,"P",{"data-svelte-h":!0}),b(O)!=="svelte-1q1pe7b"&&(O.textContent=qt),zt=r(M),tt=d(M,"P",{"data-svelte-h":!0}),b(tt)!=="svelte-17rio2z"&&(tt.innerHTML=Xt),At=r(M),m(k.$$.fragment,M),kt=r(M),m(C.$$.fragment,M),Ct=r(M),m(Z.$$.fragment,M),M.forEach(a),ft=r(t),m(U.$$.fragment,t),ut=r(t),S=d(t,"P",{"data-svelte-h":!0}),b(S)!=="svelte-70bx2r"&&(S.innerHTML=Ft),$t=r(t),y=d(t,"DIV",{class:!0});var G=rt(y);m(q.$$.fragment,G),Zt=r(G),et=d(G,"P",{"data-svelte-h":!0}),b(et)!=="svelte-1q1pe7b"&&(et.textContent=Pt),Rt=r(G),st=d(G,"P",{"data-svelte-h":!0}),b(st)!=="svelte-17rio2z"&&(st.innerHTML=Nt),Et=r(G),m(R.$$.fragment,G),G.forEach(a),Tt=r(t),m(X.$$.fragment,t),wt=r(t),m(F.$$.fragment,t),bt=r(t),J=d(t,"DIV",{class:!0});var z=rt(J);m(P.$$.fragment,z),Vt=r(z),at=d(z,"P",{"data-svelte-h":!0}),b(at)!=="svelte-lfv2l4"&&(at.textContent=Yt),Ht=r(z),nt=d(z,"P",{"data-svelte-h":!0}),b(nt)!=="svelte-1o86t9o"&&(nt.textContent=Qt),Lt=r(z),it=d(z,"P",{"data-svelte-h":!0}),b(it)!=="svelte-akggeo"&&(it.innerHTML=Kt),z.forEach(a),Mt=r(t),m(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",ge),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(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ot(y,"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")},m(t,s){l(document.head,e),o(t,p,s),o(t,n,s),o(t,h,s),f(v,t,s),o(t,_,s),o(t,B,s),o(t,dt,s),f(E,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,vt),l(j,Q),l(j,Bt),l(j,K),l(j,It),f(A,j,null),o(t,gt,s),f(W,t,s),o(t,mt,s),o(t,w,s),f(D,w,null),l(w,Gt),l(w,O),l(w,zt),l(w,tt),l(w,At),f(k,w,null),l(w,kt),f(C,w,null),l(w,Ct),f(Z,w,null),o(t,ft,s),f(U,t,s),o(t,ut,s),o(t,S,s),o(t,$t,s),o(t,y,s),f(q,y,null),l(y,Zt),l(y,et),l(y,Rt),l(y,st),l(y,Et),f(R,y,null),o(t,Tt,s),f(X,t,s),o(t,wt,s),f(F,t,s),o(t,bt,s),o(t,J,s),f(P,J,null),l(J,Vt),l(J,at),l(J,Ht),l(J,nt),l(J,Lt),l(J,it),o(t,Mt,s),f(N,t,s),o(t,jt,s),o(t,lt,s),yt=!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}),R.$set(Ot)},i(t){yt||(u(v.$$.fragment,t),u(E.$$.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(R.$$.fragment,t),u(X.$$.fragment,t),u(F.$$.fragment,t),u(P.$$.fragment,t),u(N.$$.fragment,t),yt=!0)},o(t){$(v.$$.fragment,t),$(E.$$.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),$(R.$$.fragment,t),$(X.$$.fragment,t),$(F.$$.fragment,t),$(P.$$.fragment,t),$(N.$$.fragment,t),yt=!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(gt),a(mt),a(w),a(ft),a(ut),a(S),a($t),a(y),a(Tt),a(wt),a(bt),a(J),a(Mt),a(jt),a(lt)),a(e),T(v,t),T(E,t),T(H,t),T(L),T(A),T(W,t),T(D),T(k),T(C),T(Z),T(U,t),T(q),T(R),T(X,t),T(F,t),T(P),T(N,t)}}}const ge='{"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 me(x){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class je extends se{constructor(e){super(),ae(this,e,me,_e,te,{})}}export{je as component};
