import{s as Xs,o as Ps,n as ys}from"../chunks/scheduler.b9285784.js";import{S as qs,i as Os,e as h,s as n,c as p,h as Ks,a as f,d as a,b as l,f as Vs,g as r,j as d,k as Rs,l as ea,m as t,n as c,t as m,o,p as u}from"../chunks/index.26bc89a1.js";import{T as bs}from"../chunks/Tip.e4eba3d6.js";import{C as sa,H as M,E as aa}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.f2e029e4.js";import{C as j}from"../chunks/CodeBlock.191169df.js";function ta(y){let i,$="Accelerate is not saving any of your credentials.";return{c(){i=h("p"),i.textContent=$},l(g){i=f(g,"P",{"data-svelte-h":!0}),d(i)!=="svelte-217aom"&&(i.textContent=$)},m(g,b){t(g,i,b)},p:ys,d(g){g&&a(i)}}}function na(y){let i,$=`SageMaker doesn’t support argparse actions. If you want to use, for example, boolean hyperparameters, you need to
specify type as bool in your script and provide an explicit True or False value for this hyperparameter. <a href="https://sagemaker.readthedocs.io/en/stable/frameworks/pytorch/using_pytorch.html#prepare-a-pytorch-training-script" rel="nofollow">[REF]</a>.`;return{c(){i=h("p"),i.innerHTML=$},l(g){i=f(g,"P",{"data-svelte-h":!0}),d(i)!=="svelte-15jtfr2"&&(i.innerHTML=$)},m(g,b){t(g,i,b)},p:ys,d(g){g&&a(i)}}}function la(y){let i,$="If you run one of the example scripts, don’t forget to add <code>accelerator.save(&#39;/opt/ml/model&#39;)</code> to it.";return{c(){i=h("p"),i.innerHTML=$},l(g){i=f(g,"P",{"data-svelte-h":!0}),d(i)!=="svelte-10ikrps"&&(i.innerHTML=$)},m(g,b){t(g,i,b)},p:ys,d(g){g&&a(i)}}}function ia(y){let i,$,g,b,J,ye,x,Te,v,Ts=`Hugging Face and Amazon introduced new <a href="https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-training-containers" rel="nofollow">Hugging Face Deep Learning Containers (DLCs)</a> to
make it easier than ever to train Hugging Face Transformer models in <a href="https://aws.amazon.com/sagemaker/" rel="nofollow">Amazon SageMaker</a>.`,we,C,Ue,L,Je,B,ws=`Before you can run your Accelerate scripts on Amazon SageMaker you need to sign up for an AWS account. If you do not
have an AWS account yet learn more <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/gs-set-up.html" rel="nofollow">here</a>.`,xe,k,Us="After you have your AWS Account you need to install the <code>sagemaker</code> sdk for Accelerate with:",ve,_,Ce,N,Js=`Accelerate currently uses the DLCs, with <code>transformers</code>, <code>datasets</code> and <code>tokenizers</code> pre-installed. Accelerate is not in the DLC yet (will soon be added!) so to use it within Amazon SageMaker you need to create a
<code>requirements.txt</code> in the same directory where your training script is located and add it as dependency:`,Le,W,Be,S,xs="You should also add any other dependencies you have to this <code>requirements.txt</code>.",ke,I,_e,A,vs=`You can configure the launch configuration for Amazon SageMaker the same as you do for non SageMaker training jobs with
the Accelerate CLI:`,Ne,Z,We,G,Cs="Accelerate will go through a questionnaire about your Amazon SageMaker setup and create a config file you can edit.",Se,T,Ie,E,Ae,z,Ls=`The training script is very similar to a training script you might run outside of SageMaker, but to save your model
after training you need to specify either <code>/opt/ml/model</code> or use <code>os.environ[&quot;SM_MODEL_DIR&quot;]</code> as your save
directory. After training, artifacts in this directory are uploaded to S3:`,Ze,D,Ge,w,Ee,Q,ze,Y,Bs="You can launch your training with Accelerate CLI with:",De,F,Qe,H,ks=`This will launch your training script using your configuration. The only thing you have to do is provide all the
arguments needed by your training script as named arguments.`,Ye,V,_s="<strong>Examples</strong>",Fe,U,He,R,Ve,X,Ns="Outputs:",Re,P,Xe,q,Pe,O,qe,K,Ws=`Set up the accelerate config by running <code>accelerate config</code> and answer the SageMaker questions and set it up.
To use SageMaker DDP, select it when asked
<code>What is the distributed mode? ([0] No distributed training, [1] data parallelism):</code>.
Example config below:`,Oe,ee,Ke,se,es,ae,Ss="<em>currently in development, will be supported soon.</em>",ss,te,as,ne,Is=`Accelerate currently uses the DLCs, with <code>transformers</code>, <code>datasets</code> and <code>tokenizers</code> pre-installed. If you
want to use different/other Python packages you can do this by adding them to the <code>requirements.txt</code>. These packages
will be installed before your training script is started.`,ts,le,ns,ie,As=`The local mode in the SageMaker SDK allows you to run your training script locally inside the HuggingFace DLC (Deep Learning container)
or using your custom container image. This is useful for debugging and testing your training script inside the final container environment.
Local mode uses Docker compose (<em>Note: Docker Compose V2 is not supported yet</em>). The SDK will handle the authentication against ECR
to pull the DLC to your local environment. You can emulate CPU (single and multi-instance) and GPU (single instance) SageMaker training jobs.`,ls,pe,Zs="To use local mode, you need to set your <code>ec2_instance_type</code> to <code>local</code>.",is,re,ps,ce,rs,me,Gs=`The configuration allows you to override parameters for the <a href="https://sagemaker.readthedocs.io/en/stable/api/training/estimators.html" rel="nofollow">Estimator</a>.
These settings have to be applied in the config file and are not part of <code>accelerate config</code>. You can control many additional aspects of the training job, e.g. use Spot instances, enable network isolation and many more.`,cs,oe,ms,ue,Es='You can find all available configuration <a href="https://sagemaker.readthedocs.io/en/stable/api/training/estimators.html" rel="nofollow">here</a>.',os,he,us,fe,zs='You can use Spot Instances e.g. using (see <a href="#advanced-configuration">Advanced configuration</a>):',hs,de,fs,ge,Ds="<em>Note: Spot Instances are subject to be terminated and training to be continued from a checkpoint. This is not handled in Accelerate out of the box. Contact us if you would like this feature.</em>",ds,Me,gs,$e,Qs="<em>undecided if feature is needed. Contact us if you would like this feature.</em>",Ms,je,$s,be,js;return J=new sa({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),x=new M({props:{title:"Amazon SageMaker",local:"amazon-sagemaker",headingTag:"h1"}}),C=new M({props:{title:"Getting Started",local:"getting-started",headingTag:"h2"}}),L=new M({props:{title:"Setup & Installation",local:"setup--installation",headingTag:"h3"}}),_=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMCUyMmFjY2VsZXJhdGUlNUJzYWdlbWFrZXIlNUQlMjIlMjAtLXVwZ3JhZGU=",highlighted:'pip install <span class="hljs-string">&quot;accelerate[sagemaker]&quot;</span> --upgrade',wrap:!1}}),W=new j({props:{code:"YWNjZWxlcmF0ZQ==",highlighted:'<span class="hljs-attribute">accelerate</span>',wrap:!1}}),I=new M({props:{title:"Configure Accelerate",local:"configure-accelerate",headingTag:"h3"}}),Z=new j({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUwQSUyMyUyMEluJTIwd2hpY2glMjBjb21wdXRlJTIwZW52aXJvbm1lbnQlMjBhcmUlMjB5b3UlMjBydW5uaW5nJTNGJTIwKCU1QjAlNUQlMjBUaGlzJTIwbWFjaGluZSUyQyUyMCU1QjElNUQlMjBBV1MlMjAoQW1hem9uJTIwU2FnZU1ha2VyKSklM0ElMjAx",highlighted:`accelerate config
<span class="hljs-comment"># In which compute environment are you running? ([0] This machine, [1] AWS (Amazon SageMaker)): 1</span>`,wrap:!1}}),T=new bs({props:{$$slots:{default:[ta]},$$scope:{ctx:y}}}),E=new M({props:{title:"Prepare a Accelerate fine-tuning script",local:"prepare-a-accelerate-fine-tuning-script",headingTag:"h3"}}),D=new j({props:{code:"LSUyMHRvcmNoLnNhdmUoJyUyRm9wdCUyRm1sJTJGbW9kZWwlNjApJTBBJTJCJTIwYWNjZWxlcmF0b3Iuc2F2ZSgnJTJGb3B0JTJGbWwlMkZtb2RlbCcp",highlighted:'<span class="hljs-deletion">- torch.save(&#x27;/opt/ml/model`)</span>\n<span class="hljs-addition">+ accelerator.save(&#x27;/opt/ml/model&#x27;)</span>',wrap:!1}}),w=new bs({props:{warning:!0,$$slots:{default:[na]},$$scope:{ctx:y}}}),Q=new M({props:{title:"Launch Training",local:"launch-training",headingTag:"h3"}}),F=new j({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHBhdGhfdG9fc2NyaXB0LnB5JTIwLS1hcmdzX3RvX3RoZV9zY3JpcHQ=",highlighted:'accelerate <span class="hljs-built_in">launch</span> path_to_script.py <span class="hljs-comment">--args_to_the_script</span>',wrap:!1}}),U=new bs({props:{$$slots:{default:[la]},$$scope:{ctx:y}}}),R=new j({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMC4lMkZleGFtcGxlcyUyRnNhZ2VtYWtlcl9leGFtcGxlLnB5",highlighted:"accelerate launch ./examples/sagemaker_example.py",wrap:!1}}),P=new j({props:{code:"Q29uZmlndXJpbmclMjBBbWF6b24lMjBTYWdlTWFrZXIlMjBlbnZpcm9ubWVudCUwQUNvbnZlcnRpbmclMjBBcmd1bWVudHMlMjB0byUyMEh5cGVycGFyYW1ldGVycyUwQUNyZWF0aW5nJTIwRXN0aW1hdG9yJTBBMjAyMS0wNC0wOCUyMDExJTNBNTYlM0E1MCUyMFN0YXJ0aW5nJTIwLSUyMFN0YXJ0aW5nJTIwdGhlJTIwdHJhaW5pbmclMjBqb2IuLi4lMEEyMDIxLTA0LTA4JTIwMTElM0E1NyUzQTEzJTIwU3RhcnRpbmclMjAtJTIwTGF1bmNoaW5nJTIwcmVxdWVzdGVkJTIwTUwlMjBpbnN0YW5jZXNQcm9maWxlclJlcG9ydC0xNjE3ODgzMDA4JTNBJTIwSW5Qcm9ncmVzcyUwQS4uLi4uLi4uLiUwQTIwMjEtMDQtMDglMjAxMSUzQTU4JTNBNTQlMjBTdGFydGluZyUyMC0lMjBQcmVwYXJpbmclMjB0aGUlMjBpbnN0YW5jZXMlMjBmb3IlMjB0cmFpbmluZy4uLi4uLi4uLiUwQTIwMjEtMDQtMDglMjAxMiUzQTAwJTNBMjQlMjBEb3dubG9hZGluZyUyMC0lMjBEb3dubG9hZGluZyUyMGlucHV0JTIwZGF0YSUwQTIwMjEtMDQtMDglMjAxMiUzQTAwJTNBMjQlMjBUcmFpbmluZyUyMC0lMjBEb3dubG9hZGluZyUyMHRoZSUyMHRyYWluaW5nJTIwaW1hZ2UuLi4uLi4uLi4uLi4uLi4uLi4lMEEyMDIxLTA0LTA4JTIwMTIlM0EwMyUzQTM5JTIwVHJhaW5pbmclMjAtJTIwVHJhaW5pbmclMjBpbWFnZSUyMGRvd25sb2FkJTIwY29tcGxldGVkLiUyMFRyYWluaW5nJTIwaW4lMjBwcm9ncmVzcy4uJTBBLi4uLi4uLi4lMEFlcG9jaCUyMDAlM0ElMjAlN0InYWNjdXJhY3knJTNBJTIwMC43NTk4MDM5MjE1Njg2Mjc0JTJDJTIwJ2YxJyUzQSUyMDAuODE3ODQzODY2MTcxMDAzNyU3RCUwQWVwb2NoJTIwMSUzQSUyMCU3QidhY2N1cmFjeSclM0ElMjAwLjgzNTc4NDMxMzcyNTQ5MDIlMkMlMjAnZjEnJTNBJTIwMC44ODIyNDk1NjA2MzI2ODklN0QlMEFlcG9jaCUyMDIlM0ElMjAlN0InYWNjdXJhY3knJTNBJTIwMC44NDA2ODYyNzQ1MDk4MDM5JTJDJTIwJ2YxJyUzQSUyMDAuODg2OTU2NTIxNzM5MTMwNCU3RCUwQS4uLi4uLi4uJTBBMjAyMS0wNC0wOCUyMDEyJTNBMDUlM0E0MCUyMFVwbG9hZGluZyUyMC0lMjBVcGxvYWRpbmclMjBnZW5lcmF0ZWQlMjB0cmFpbmluZyUyMG1vZGVsJTBBMjAyMS0wNC0wOCUyMDEyJTNBMDUlM0E0MCUyMENvbXBsZXRlZCUyMC0lMjBUcmFpbmluZyUyMGpvYiUyMGNvbXBsZXRlZCUwQVRyYWluaW5nJTIwc2Vjb25kcyUzQSUyMDMzMSUwQUJpbGxhYmxlJTIwc2Vjb25kcyUzQSUyMDMzMSUwQVlvdSUyMGNhbiUyMGZpbmQlMjB5b3VyJTIwbW9kZWwlMjBkYXRhJTIwYXQlM0ElMjBzMyUzQSUyRiUyRnlvdXItYnVja2V0JTJGYWNjZWxlcmF0ZS1zYWdlbWFrZXItMS0yMDIxLTA0LTA4LTExLTU2LTQ3LTEwOCUyRm91dHB1dCUyRm1vZGVsLnRhci5neg==",highlighted:`Configuring Amazon SageMaker environment
Converting Arguments <span class="hljs-keyword">to</span> Hyperparameters
Creating Estimator
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">11</span>:<span class="hljs-number">56</span>:<span class="hljs-number">50</span> Starting - Starting the training job<span class="hljs-params">...</span>
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">11</span>:<span class="hljs-number">57</span>:<span class="hljs-number">13</span> Starting - Launching requested ML instancesProfilerReport<span class="hljs-number">-1617883008</span>: InProgress
<span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span>
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">11</span>:<span class="hljs-number">58</span>:<span class="hljs-number">54</span> Starting - Preparing the instances for training<span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span>
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">12</span>:<span class="hljs-number">00</span>:<span class="hljs-number">24</span> Downloading - Downloading input <span class="hljs-built_in">data</span>
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">12</span>:<span class="hljs-number">00</span>:<span class="hljs-number">24</span> Training - Downloading the training image<span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span><span class="hljs-params">...</span>
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">12</span>:<span class="hljs-number">03</span>:<span class="hljs-number">39</span> Training - Training image download completed. Training <span class="hljs-keyword">in</span> progress..
<span class="hljs-params">...</span><span class="hljs-params">...</span>..
epoch <span class="hljs-number">0</span>: {<span class="hljs-string">&#x27;accuracy&#x27;</span>: <span class="hljs-number">0.7598039215686274</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">0.8178438661710037</span>}
epoch <span class="hljs-number">1</span>: {<span class="hljs-string">&#x27;accuracy&#x27;</span>: <span class="hljs-number">0.8357843137254902</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">0.882249560632689</span>}
epoch <span class="hljs-number">2</span>: {<span class="hljs-string">&#x27;accuracy&#x27;</span>: <span class="hljs-number">0.8406862745098039</span>, <span class="hljs-string">&#x27;f1&#x27;</span>: <span class="hljs-number">0.8869565217391304</span>}
<span class="hljs-params">...</span><span class="hljs-params">...</span>..
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">12</span>:<span class="hljs-number">05</span>:<span class="hljs-number">40</span> Uploading - Uploading generated training model
<span class="hljs-number">2021</span><span class="hljs-number">-04</span><span class="hljs-number">-08</span> <span class="hljs-number">12</span>:<span class="hljs-number">05</span>:<span class="hljs-number">40</span> Completed - Training job completed
Training seconds: <span class="hljs-number">331</span>
Billable seconds: <span class="hljs-number">331</span>
You can find your model <span class="hljs-built_in">data</span> at: s3:<span class="hljs-comment">//your-bucket/accelerate-sagemaker-1-2021-04-08-11-56-47-108/output/model.tar.gz</span>`,wrap:!1}}),q=new M({props:{title:"Advanced Features",local:"advanced-features",headingTag:"h2"}}),O=new M({props:{title:"Distributed Training: Data Parallelism",local:"distributed-training-data-parallelism",headingTag:"h3"}}),ee=new j({props:{code:"YmFzZV9qb2JfbmFtZSUzQSUyMGFjY2VsZXJhdGUtc2FnZW1ha2VyLTElMEFjb21wdXRlX2Vudmlyb25tZW50JTNBJTIwQU1BWk9OX1NBR0VNQUtFUiUwQWRpc3RyaWJ1dGVkX3R5cGUlM0ElMjBEQVRBX1BBUkFMTEVMJTBBZWMyX2luc3RhbmNlX3R5cGUlM0ElMjBtbC5wMy4xNnhsYXJnZSUwQWlhbV9yb2xlX25hbWUlM0ElMjB4eHh4eCUwQWltYWdlX3VyaSUzQSUyMG51bGwlMEFtaXhlZF9wcmVjaXNpb24lM0ElMjBmcDE2JTBBbnVtX21hY2hpbmVzJTNBJTIwMSUwQXByb2ZpbGUlM0ElMjB4eHh4eCUwQXB5X3ZlcnNpb24lM0ElMjBweTEwJTBBcHl0b3JjaF92ZXJzaW9uJTNBJTIwMi41LjAlMEFyZWdpb24lM0ElMjB1cy1lYXN0LTElMEF0cmFuc2Zvcm1lcnNfdmVyc2lvbiUzQSUyMDQuMTcuMCUwQXVzZV9jcHUlM0ElMjBmYWxzZQ==",highlighted:`<span class="hljs-attr">base_job_name:</span> <span class="hljs-string">accelerate-sagemaker-1</span>
<span class="hljs-attr">compute_environment:</span> <span class="hljs-string">AMAZON_SAGEMAKER</span>
<span class="hljs-attr">distributed_type:</span> <span class="hljs-string">DATA_PARALLEL</span>
<span class="hljs-attr">ec2_instance_type:</span> <span class="hljs-string">ml.p3.16xlarge</span>
<span class="hljs-attr">iam_role_name:</span> <span class="hljs-string">xxxxx</span>
<span class="hljs-attr">image_uri:</span> <span class="hljs-literal">null</span>
<span class="hljs-attr">mixed_precision:</span> <span class="hljs-string">fp16</span>
<span class="hljs-attr">num_machines:</span> <span class="hljs-number">1</span>
<span class="hljs-attr">profile:</span> <span class="hljs-string">xxxxx</span>
<span class="hljs-attr">py_version:</span> <span class="hljs-string">py10</span>
<span class="hljs-attr">pytorch_version:</span> <span class="hljs-number">2.5</span><span class="hljs-number">.0</span>
<span class="hljs-attr">region:</span> <span class="hljs-string">us-east-1</span>
<span class="hljs-attr">transformers_version:</span> <span class="hljs-number">4.17</span><span class="hljs-number">.0</span>
<span class="hljs-attr">use_cpu:</span> <span class="hljs-literal">false</span>`,wrap:!1}}),se=new M({props:{title:"Distributed Training: Model Parallelism",local:"distributed-training-model-parallelism",headingTag:"h3"}}),te=new M({props:{title:"Python packages and dependencies",local:"python-packages-and-dependencies",headingTag:"h3"}}),le=new M({props:{title:"Local Training: SageMaker Local mode",local:"local-training-sagemaker-local-mode",headingTag:"h3"}}),re=new j({props:{code:"ZWMyX2luc3RhbmNlX3R5cGUlM0ElMjBsb2NhbA==",highlighted:'<span class="hljs-attr">ec2_instance_type:</span> <span class="hljs-string">local</span>',wrap:!1}}),ce=new M({props:{title:"Advanced configuration",local:"advanced-configuration",headingTag:"h3"}}),oe=new j({props:{code:"YWRkaXRpb25hbF9hcmdzJTNBJTBBJTIwJTIwJTIzJTIwZW5hYmxlJTIwbmV0d29yayUyMGlzb2xhdGlvbiUyMHRvJTIwcmVzdHJpY3QlMjBpbnRlcm5ldCUyMGFjY2VzcyUyMGZvciUyMGNvbnRhaW5lcnMlMEElMjAlMjBlbmFibGVfbmV0d29ya19pc29sYXRpb24lM0ElMjBUcnVl",highlighted:`<span class="hljs-attr">additional_args:</span>
  <span class="hljs-comment"># enable network isolation to restrict internet access for containers</span>
  <span class="hljs-attr">enable_network_isolation:</span> <span class="hljs-literal">True</span>`,wrap:!1}}),he=new M({props:{title:"Use Spot Instances",local:"use-spot-instances",headingTag:"h3"}}),de=new j({props:{code:"YWRkaXRpb25hbF9hcmdzJTNBJTBBJTIwJTIwdXNlX3Nwb3RfaW5zdGFuY2VzJTNBJTIwVHJ1ZSUwQSUyMCUyMG1heF93YWl0JTNBJTIwODY0MDA=",highlighted:`<span class="hljs-attr">additional_args:</span>
  <span class="hljs-attr">use_spot_instances:</span> <span class="hljs-literal">True</span>
  <span class="hljs-attr">max_wait:</span> <span class="hljs-number">86400</span>`,wrap:!1}}),Me=new M({props:{title:"Remote scripts: Use scripts located on Github",local:"remote-scripts-use-scripts-located-on-github",headingTag:"h3"}}),je=new aa({props:{source:"https://github.com/huggingface/accelerate/blob/main/docs/source/usage_guides/sagemaker.md"}}),{c(){i=h("meta"),$=n(),g=h("p"),b=n(),p(J.$$.fragment),ye=n(),p(x.$$.fragment),Te=n(),v=h("p"),v.innerHTML=Ts,we=n(),p(C.$$.fragment),Ue=n(),p(L.$$.fragment),Je=n(),B=h("p"),B.innerHTML=ws,xe=n(),k=h("p"),k.innerHTML=Us,ve=n(),p(_.$$.fragment),Ce=n(),N=h("p"),N.innerHTML=Js,Le=n(),p(W.$$.fragment),Be=n(),S=h("p"),S.innerHTML=xs,ke=n(),p(I.$$.fragment),_e=n(),A=h("p"),A.textContent=vs,Ne=n(),p(Z.$$.fragment),We=n(),G=h("p"),G.textContent=Cs,Se=n(),p(T.$$.fragment),Ie=n(),p(E.$$.fragment),Ae=n(),z=h("p"),z.innerHTML=Ls,Ze=n(),p(D.$$.fragment),Ge=n(),p(w.$$.fragment),Ee=n(),p(Q.$$.fragment),ze=n(),Y=h("p"),Y.textContent=Bs,De=n(),p(F.$$.fragment),Qe=n(),H=h("p"),H.textContent=ks,Ye=n(),V=h("p"),V.innerHTML=_s,Fe=n(),p(U.$$.fragment),He=n(),p(R.$$.fragment),Ve=n(),X=h("p"),X.textContent=Ns,Re=n(),p(P.$$.fragment),Xe=n(),p(q.$$.fragment),Pe=n(),p(O.$$.fragment),qe=n(),K=h("p"),K.innerHTML=Ws,Oe=n(),p(ee.$$.fragment),Ke=n(),p(se.$$.fragment),es=n(),ae=h("p"),ae.innerHTML=Ss,ss=n(),p(te.$$.fragment),as=n(),ne=h("p"),ne.innerHTML=Is,ts=n(),p(le.$$.fragment),ns=n(),ie=h("p"),ie.innerHTML=As,ls=n(),pe=h("p"),pe.innerHTML=Zs,is=n(),p(re.$$.fragment),ps=n(),p(ce.$$.fragment),rs=n(),me=h("p"),me.innerHTML=Gs,cs=n(),p(oe.$$.fragment),ms=n(),ue=h("p"),ue.innerHTML=Es,os=n(),p(he.$$.fragment),us=n(),fe=h("p"),fe.innerHTML=zs,hs=n(),p(de.$$.fragment),fs=n(),ge=h("p"),ge.innerHTML=Ds,ds=n(),p(Me.$$.fragment),gs=n(),$e=h("p"),$e.innerHTML=Qs,Ms=n(),p(je.$$.fragment),$s=n(),be=h("p"),this.h()},l(e){const s=Ks("svelte-u9bgzb",document.head);i=f(s,"META",{name:!0,content:!0}),s.forEach(a),$=l(e),g=f(e,"P",{}),Vs(g).forEach(a),b=l(e),r(J.$$.fragment,e),ye=l(e),r(x.$$.fragment,e),Te=l(e),v=f(e,"P",{"data-svelte-h":!0}),d(v)!=="svelte-1s5lw9h"&&(v.innerHTML=Ts),we=l(e),r(C.$$.fragment,e),Ue=l(e),r(L.$$.fragment,e),Je=l(e),B=f(e,"P",{"data-svelte-h":!0}),d(B)!=="svelte-1kyqb4f"&&(B.innerHTML=ws),xe=l(e),k=f(e,"P",{"data-svelte-h":!0}),d(k)!=="svelte-1wmn1sf"&&(k.innerHTML=Us),ve=l(e),r(_.$$.fragment,e),Ce=l(e),N=f(e,"P",{"data-svelte-h":!0}),d(N)!=="svelte-15ra4c4"&&(N.innerHTML=Js),Le=l(e),r(W.$$.fragment,e),Be=l(e),S=f(e,"P",{"data-svelte-h":!0}),d(S)!=="svelte-1ovgi4"&&(S.innerHTML=xs),ke=l(e),r(I.$$.fragment,e),_e=l(e),A=f(e,"P",{"data-svelte-h":!0}),d(A)!=="svelte-1ju7w5p"&&(A.textContent=vs),Ne=l(e),r(Z.$$.fragment,e),We=l(e),G=f(e,"P",{"data-svelte-h":!0}),d(G)!=="svelte-lpgcs8"&&(G.textContent=Cs),Se=l(e),r(T.$$.fragment,e),Ie=l(e),r(E.$$.fragment,e),Ae=l(e),z=f(e,"P",{"data-svelte-h":!0}),d(z)!=="svelte-wyawfw"&&(z.innerHTML=Ls),Ze=l(e),r(D.$$.fragment,e),Ge=l(e),r(w.$$.fragment,e),Ee=l(e),r(Q.$$.fragment,e),ze=l(e),Y=f(e,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-3bqizu"&&(Y.textContent=Bs),De=l(e),r(F.$$.fragment,e),Qe=l(e),H=f(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1pbgrsi"&&(H.textContent=ks),Ye=l(e),V=f(e,"P",{"data-svelte-h":!0}),d(V)!=="svelte-1ihw35o"&&(V.innerHTML=_s),Fe=l(e),r(U.$$.fragment,e),He=l(e),r(R.$$.fragment,e),Ve=l(e),X=f(e,"P",{"data-svelte-h":!0}),d(X)!=="svelte-ljqq78"&&(X.textContent=Ns),Re=l(e),r(P.$$.fragment,e),Xe=l(e),r(q.$$.fragment,e),Pe=l(e),r(O.$$.fragment,e),qe=l(e),K=f(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-11fp4ms"&&(K.innerHTML=Ws),Oe=l(e),r(ee.$$.fragment,e),Ke=l(e),r(se.$$.fragment,e),es=l(e),ae=f(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-11hynvh"&&(ae.innerHTML=Ss),ss=l(e),r(te.$$.fragment,e),as=l(e),ne=f(e,"P",{"data-svelte-h":!0}),d(ne)!=="svelte-ilfccg"&&(ne.innerHTML=Is),ts=l(e),r(le.$$.fragment,e),ns=l(e),ie=f(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-e8k1kq"&&(ie.innerHTML=As),ls=l(e),pe=f(e,"P",{"data-svelte-h":!0}),d(pe)!=="svelte-katqto"&&(pe.innerHTML=Zs),is=l(e),r(re.$$.fragment,e),ps=l(e),r(ce.$$.fragment,e),rs=l(e),me=f(e,"P",{"data-svelte-h":!0}),d(me)!=="svelte-jqi71s"&&(me.innerHTML=Gs),cs=l(e),r(oe.$$.fragment,e),ms=l(e),ue=f(e,"P",{"data-svelte-h":!0}),d(ue)!=="svelte-134etkl"&&(ue.innerHTML=Es),os=l(e),r(he.$$.fragment,e),us=l(e),fe=f(e,"P",{"data-svelte-h":!0}),d(fe)!=="svelte-18qlfff"&&(fe.innerHTML=zs),hs=l(e),r(de.$$.fragment,e),fs=l(e),ge=f(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-1bv8zrn"&&(ge.innerHTML=Ds),ds=l(e),r(Me.$$.fragment,e),gs=l(e),$e=f(e,"P",{"data-svelte-h":!0}),d($e)!=="svelte-1quto80"&&($e.innerHTML=Qs),Ms=l(e),r(je.$$.fragment,e),$s=l(e),be=f(e,"P",{}),Vs(be).forEach(a),this.h()},h(){Rs(i,"name","hf:doc:metadata"),Rs(i,"content",pa)},m(e,s){ea(document.head,i),t(e,$,s),t(e,g,s),t(e,b,s),c(J,e,s),t(e,ye,s),c(x,e,s),t(e,Te,s),t(e,v,s),t(e,we,s),c(C,e,s),t(e,Ue,s),c(L,e,s),t(e,Je,s),t(e,B,s),t(e,xe,s),t(e,k,s),t(e,ve,s),c(_,e,s),t(e,Ce,s),t(e,N,s),t(e,Le,s),c(W,e,s),t(e,Be,s),t(e,S,s),t(e,ke,s),c(I,e,s),t(e,_e,s),t(e,A,s),t(e,Ne,s),c(Z,e,s),t(e,We,s),t(e,G,s),t(e,Se,s),c(T,e,s),t(e,Ie,s),c(E,e,s),t(e,Ae,s),t(e,z,s),t(e,Ze,s),c(D,e,s),t(e,Ge,s),c(w,e,s),t(e,Ee,s),c(Q,e,s),t(e,ze,s),t(e,Y,s),t(e,De,s),c(F,e,s),t(e,Qe,s),t(e,H,s),t(e,Ye,s),t(e,V,s),t(e,Fe,s),c(U,e,s),t(e,He,s),c(R,e,s),t(e,Ve,s),t(e,X,s),t(e,Re,s),c(P,e,s),t(e,Xe,s),c(q,e,s),t(e,Pe,s),c(O,e,s),t(e,qe,s),t(e,K,s),t(e,Oe,s),c(ee,e,s),t(e,Ke,s),c(se,e,s),t(e,es,s),t(e,ae,s),t(e,ss,s),c(te,e,s),t(e,as,s),t(e,ne,s),t(e,ts,s),c(le,e,s),t(e,ns,s),t(e,ie,s),t(e,ls,s),t(e,pe,s),t(e,is,s),c(re,e,s),t(e,ps,s),c(ce,e,s),t(e,rs,s),t(e,me,s),t(e,cs,s),c(oe,e,s),t(e,ms,s),t(e,ue,s),t(e,os,s),c(he,e,s),t(e,us,s),t(e,fe,s),t(e,hs,s),c(de,e,s),t(e,fs,s),t(e,ge,s),t(e,ds,s),c(Me,e,s),t(e,gs,s),t(e,$e,s),t(e,Ms,s),c(je,e,s),t(e,$s,s),t(e,be,s),js=!0},p(e,[s]){const Ys={};s&2&&(Ys.$$scope={dirty:s,ctx:e}),T.$set(Ys);const Fs={};s&2&&(Fs.$$scope={dirty:s,ctx:e}),w.$set(Fs);const Hs={};s&2&&(Hs.$$scope={dirty:s,ctx:e}),U.$set(Hs)},i(e){js||(m(J.$$.fragment,e),m(x.$$.fragment,e),m(C.$$.fragment,e),m(L.$$.fragment,e),m(_.$$.fragment,e),m(W.$$.fragment,e),m(I.$$.fragment,e),m(Z.$$.fragment,e),m(T.$$.fragment,e),m(E.$$.fragment,e),m(D.$$.fragment,e),m(w.$$.fragment,e),m(Q.$$.fragment,e),m(F.$$.fragment,e),m(U.$$.fragment,e),m(R.$$.fragment,e),m(P.$$.fragment,e),m(q.$$.fragment,e),m(O.$$.fragment,e),m(ee.$$.fragment,e),m(se.$$.fragment,e),m(te.$$.fragment,e),m(le.$$.fragment,e),m(re.$$.fragment,e),m(ce.$$.fragment,e),m(oe.$$.fragment,e),m(he.$$.fragment,e),m(de.$$.fragment,e),m(Me.$$.fragment,e),m(je.$$.fragment,e),js=!0)},o(e){o(J.$$.fragment,e),o(x.$$.fragment,e),o(C.$$.fragment,e),o(L.$$.fragment,e),o(_.$$.fragment,e),o(W.$$.fragment,e),o(I.$$.fragment,e),o(Z.$$.fragment,e),o(T.$$.fragment,e),o(E.$$.fragment,e),o(D.$$.fragment,e),o(w.$$.fragment,e),o(Q.$$.fragment,e),o(F.$$.fragment,e),o(U.$$.fragment,e),o(R.$$.fragment,e),o(P.$$.fragment,e),o(q.$$.fragment,e),o(O.$$.fragment,e),o(ee.$$.fragment,e),o(se.$$.fragment,e),o(te.$$.fragment,e),o(le.$$.fragment,e),o(re.$$.fragment,e),o(ce.$$.fragment,e),o(oe.$$.fragment,e),o(he.$$.fragment,e),o(de.$$.fragment,e),o(Me.$$.fragment,e),o(je.$$.fragment,e),js=!1},d(e){e&&(a($),a(g),a(b),a(ye),a(Te),a(v),a(we),a(Ue),a(Je),a(B),a(xe),a(k),a(ve),a(Ce),a(N),a(Le),a(Be),a(S),a(ke),a(_e),a(A),a(Ne),a(We),a(G),a(Se),a(Ie),a(Ae),a(z),a(Ze),a(Ge),a(Ee),a(ze),a(Y),a(De),a(Qe),a(H),a(Ye),a(V),a(Fe),a(He),a(Ve),a(X),a(Re),a(Xe),a(Pe),a(qe),a(K),a(Oe),a(Ke),a(es),a(ae),a(ss),a(as),a(ne),a(ts),a(ns),a(ie),a(ls),a(pe),a(is),a(ps),a(rs),a(me),a(cs),a(ms),a(ue),a(os),a(us),a(fe),a(hs),a(fs),a(ge),a(ds),a(gs),a($e),a(Ms),a($s),a(be)),a(i),u(J,e),u(x,e),u(C,e),u(L,e),u(_,e),u(W,e),u(I,e),u(Z,e),u(T,e),u(E,e),u(D,e),u(w,e),u(Q,e),u(F,e),u(U,e),u(R,e),u(P,e),u(q,e),u(O,e),u(ee,e),u(se,e),u(te,e),u(le,e),u(re,e),u(ce,e),u(oe,e),u(he,e),u(de,e),u(Me,e),u(je,e)}}}const pa='{"title":"Amazon SageMaker","local":"amazon-sagemaker","sections":[{"title":"Getting Started","local":"getting-started","sections":[{"title":"Setup & Installation","local":"setup--installation","sections":[],"depth":3},{"title":"Configure Accelerate","local":"configure-accelerate","sections":[],"depth":3},{"title":"Prepare a Accelerate fine-tuning script","local":"prepare-a-accelerate-fine-tuning-script","sections":[],"depth":3},{"title":"Launch Training","local":"launch-training","sections":[],"depth":3}],"depth":2},{"title":"Advanced Features","local":"advanced-features","sections":[{"title":"Distributed Training: Data Parallelism","local":"distributed-training-data-parallelism","sections":[],"depth":3},{"title":"Distributed Training: Model Parallelism","local":"distributed-training-model-parallelism","sections":[],"depth":3},{"title":"Python packages and dependencies","local":"python-packages-and-dependencies","sections":[],"depth":3},{"title":"Local Training: SageMaker Local mode","local":"local-training-sagemaker-local-mode","sections":[],"depth":3},{"title":"Advanced configuration","local":"advanced-configuration","sections":[],"depth":3},{"title":"Use Spot Instances","local":"use-spot-instances","sections":[],"depth":3},{"title":"Remote scripts: Use scripts located on Github","local":"remote-scripts-use-scripts-located-on-github","sections":[],"depth":3}],"depth":2}],"depth":1}';function ra(y){return Ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fa extends qs{constructor(i){super(),Os(this,i,ra,ia,Xs,{})}}export{fa as component};
