import{s as Vs,o as Rs,n as js}from"../chunks/scheduler.defa9a21.js";import{S as Xs,i as Ps,g as h,s as n,r as p,A as qs,h as f,f as a,c as l,j as Fs,u as r,x as d,k as Hs,y as Os,a as t,v as c,d as m,t as o,w as u}from"../chunks/index.fe795e71.js";import{T as $s}from"../chunks/Tip.179eb360.js";import{C as j}from"../chunks/CodeBlock.204b6c34.js";import{H as M,E as Ks}from"../chunks/getInferenceSnippets.2234a8dd.js";function ea(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:js,d(g){g&&a(i)}}}function sa(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:js,d(g){g&&a(i)}}}function aa(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:js,d(g){g&&a(i)}}}function ta(y){let i,$,g,b,J,be,v,bs=`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>.`,ye,x,Te,C,we,L,ys=`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>.`,Ue,B,Ts="After you have your AWS Account you need to install the <code>sagemaker</code> sdk for Accelerate with:",Je,k,ve,_,ws=`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:`,xe,N,Ce,W,Us="You should also add any other dependencies you have to this <code>requirements.txt</code>.",Le,S,Be,I,Js=`You can configure the launch configuration for Amazon SageMaker the same as you do for non SageMaker training jobs with
the Accelerate CLI:`,ke,A,_e,Z,vs="Accelerate will go through a questionnaire about your Amazon SageMaker setup and create a config file you can edit.",Ne,T,We,G,Se,E,xs=`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:`,Ie,D,Ae,w,Ze,z,Ge,Q,Cs="You can launch your training with Accelerate CLI with:",Ee,Y,De,F,Ls=`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.`,ze,H,Bs="<strong>Examples</strong>",Qe,U,Ye,V,Fe,R,ks="Outputs:",He,X,Ve,P,Re,q,Xe,O,_s=`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:`,Pe,K,qe,ee,Oe,se,Ns="<em>currently in development, will be supported soon.</em>",Ke,ae,es,te,Ws=`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.`,ss,ne,as,le,Ss=`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.`,ts,ie,Is="To use local mode, you need to set your <code>ec2_instance_type</code> to <code>local</code>.",ns,pe,ls,re,is,ce,As=`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.`,ps,me,rs,oe,Zs='You can find all available configuration <a href="https://sagemaker.readthedocs.io/en/stable/api/training/estimators.html" rel="nofollow">here</a>.',cs,ue,ms,he,Gs='You can use Spot Instances e.g. using (see <a href="#advanced-configuration">Advanced configuration</a>):',os,fe,us,de,Es="<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>",hs,ge,fs,Me,Ds="<em>undecided if feature is needed. Contact us if you would like this feature.</em>",ds,$e,gs,je,Ms;return J=new M({props:{title:"Amazon SageMaker",local:"amazon-sagemaker",headingTag:"h1"}}),x=new M({props:{title:"Getting Started",local:"getting-started",headingTag:"h2"}}),C=new M({props:{title:"Setup & Installation",local:"setup--installation",headingTag:"h3"}}),k=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMCUyMmFjY2VsZXJhdGUlNUJzYWdlbWFrZXIlNUQlMjIlMjAtLXVwZ3JhZGU=",highlighted:'pip install <span class="hljs-string">&quot;accelerate[sagemaker]&quot;</span> --upgrade',wrap:!1}}),N=new j({props:{code:"YWNjZWxlcmF0ZQ==",highlighted:'<span class="hljs-attribute">accelerate</span>',wrap:!1}}),S=new M({props:{title:"Configure Accelerate",local:"configure-accelerate",headingTag:"h3"}}),A=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 $s({props:{$$slots:{default:[ea]},$$scope:{ctx:y}}}),G=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 $s({props:{warning:!0,$$slots:{default:[sa]},$$scope:{ctx:y}}}),z=new M({props:{title:"Launch Training",local:"launch-training",headingTag:"h3"}}),Y=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 $s({props:{$$slots:{default:[aa]},$$scope:{ctx:y}}}),V=new j({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMC4lMkZleGFtcGxlcyUyRnNhZ2VtYWtlcl9leGFtcGxlLnB5",highlighted:"accelerate launch ./examples/sagemaker_example.py",wrap:!1}}),X=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}}),P=new M({props:{title:"Advanced Features",local:"advanced-features",headingTag:"h2"}}),q=new M({props:{title:"Distributed Training: Data Parallelism",local:"distributed-training-data-parallelism",headingTag:"h3"}}),K=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}}),ee=new M({props:{title:"Distributed Training: Model Parallelism",local:"distributed-training-model-parallelism",headingTag:"h3"}}),ae=new M({props:{title:"Python packages and dependencies",local:"python-packages-and-dependencies",headingTag:"h3"}}),ne=new M({props:{title:"Local Training: SageMaker Local mode",local:"local-training-sagemaker-local-mode",headingTag:"h3"}}),pe=new j({props:{code:"ZWMyX2luc3RhbmNlX3R5cGUlM0ElMjBsb2NhbA==",highlighted:'<span class="hljs-attr">ec2_instance_type:</span> <span class="hljs-string">local</span>',wrap:!1}}),re=new M({props:{title:"Advanced configuration",local:"advanced-configuration",headingTag:"h3"}}),me=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}}),ue=new M({props:{title:"Use Spot Instances",local:"use-spot-instances",headingTag:"h3"}}),fe=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}}),ge=new M({props:{title:"Remote scripts: Use scripts located on Github",local:"remote-scripts-use-scripts-located-on-github",headingTag:"h3"}}),$e=new Ks({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),be=n(),v=h("p"),v.innerHTML=bs,ye=n(),p(x.$$.fragment),Te=n(),p(C.$$.fragment),we=n(),L=h("p"),L.innerHTML=ys,Ue=n(),B=h("p"),B.innerHTML=Ts,Je=n(),p(k.$$.fragment),ve=n(),_=h("p"),_.innerHTML=ws,xe=n(),p(N.$$.fragment),Ce=n(),W=h("p"),W.innerHTML=Us,Le=n(),p(S.$$.fragment),Be=n(),I=h("p"),I.textContent=Js,ke=n(),p(A.$$.fragment),_e=n(),Z=h("p"),Z.textContent=vs,Ne=n(),p(T.$$.fragment),We=n(),p(G.$$.fragment),Se=n(),E=h("p"),E.innerHTML=xs,Ie=n(),p(D.$$.fragment),Ae=n(),p(w.$$.fragment),Ze=n(),p(z.$$.fragment),Ge=n(),Q=h("p"),Q.textContent=Cs,Ee=n(),p(Y.$$.fragment),De=n(),F=h("p"),F.textContent=Ls,ze=n(),H=h("p"),H.innerHTML=Bs,Qe=n(),p(U.$$.fragment),Ye=n(),p(V.$$.fragment),Fe=n(),R=h("p"),R.textContent=ks,He=n(),p(X.$$.fragment),Ve=n(),p(P.$$.fragment),Re=n(),p(q.$$.fragment),Xe=n(),O=h("p"),O.innerHTML=_s,Pe=n(),p(K.$$.fragment),qe=n(),p(ee.$$.fragment),Oe=n(),se=h("p"),se.innerHTML=Ns,Ke=n(),p(ae.$$.fragment),es=n(),te=h("p"),te.innerHTML=Ws,ss=n(),p(ne.$$.fragment),as=n(),le=h("p"),le.innerHTML=Ss,ts=n(),ie=h("p"),ie.innerHTML=Is,ns=n(),p(pe.$$.fragment),ls=n(),p(re.$$.fragment),is=n(),ce=h("p"),ce.innerHTML=As,ps=n(),p(me.$$.fragment),rs=n(),oe=h("p"),oe.innerHTML=Zs,cs=n(),p(ue.$$.fragment),ms=n(),he=h("p"),he.innerHTML=Gs,os=n(),p(fe.$$.fragment),us=n(),de=h("p"),de.innerHTML=Es,hs=n(),p(ge.$$.fragment),fs=n(),Me=h("p"),Me.innerHTML=Ds,ds=n(),p($e.$$.fragment),gs=n(),je=h("p"),this.h()},l(e){const s=qs("svelte-u9bgzb",document.head);i=f(s,"META",{name:!0,content:!0}),s.forEach(a),$=l(e),g=f(e,"P",{}),Fs(g).forEach(a),b=l(e),r(J.$$.fragment,e),be=l(e),v=f(e,"P",{"data-svelte-h":!0}),d(v)!=="svelte-1s5lw9h"&&(v.innerHTML=bs),ye=l(e),r(x.$$.fragment,e),Te=l(e),r(C.$$.fragment,e),we=l(e),L=f(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-1kyqb4f"&&(L.innerHTML=ys),Ue=l(e),B=f(e,"P",{"data-svelte-h":!0}),d(B)!=="svelte-1wmn1sf"&&(B.innerHTML=Ts),Je=l(e),r(k.$$.fragment,e),ve=l(e),_=f(e,"P",{"data-svelte-h":!0}),d(_)!=="svelte-15ra4c4"&&(_.innerHTML=ws),xe=l(e),r(N.$$.fragment,e),Ce=l(e),W=f(e,"P",{"data-svelte-h":!0}),d(W)!=="svelte-1ovgi4"&&(W.innerHTML=Us),Le=l(e),r(S.$$.fragment,e),Be=l(e),I=f(e,"P",{"data-svelte-h":!0}),d(I)!=="svelte-1ju7w5p"&&(I.textContent=Js),ke=l(e),r(A.$$.fragment,e),_e=l(e),Z=f(e,"P",{"data-svelte-h":!0}),d(Z)!=="svelte-lpgcs8"&&(Z.textContent=vs),Ne=l(e),r(T.$$.fragment,e),We=l(e),r(G.$$.fragment,e),Se=l(e),E=f(e,"P",{"data-svelte-h":!0}),d(E)!=="svelte-wyawfw"&&(E.innerHTML=xs),Ie=l(e),r(D.$$.fragment,e),Ae=l(e),r(w.$$.fragment,e),Ze=l(e),r(z.$$.fragment,e),Ge=l(e),Q=f(e,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-3bqizu"&&(Q.textContent=Cs),Ee=l(e),r(Y.$$.fragment,e),De=l(e),F=f(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-1pbgrsi"&&(F.textContent=Ls),ze=l(e),H=f(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1ihw35o"&&(H.innerHTML=Bs),Qe=l(e),r(U.$$.fragment,e),Ye=l(e),r(V.$$.fragment,e),Fe=l(e),R=f(e,"P",{"data-svelte-h":!0}),d(R)!=="svelte-ljqq78"&&(R.textContent=ks),He=l(e),r(X.$$.fragment,e),Ve=l(e),r(P.$$.fragment,e),Re=l(e),r(q.$$.fragment,e),Xe=l(e),O=f(e,"P",{"data-svelte-h":!0}),d(O)!=="svelte-11fp4ms"&&(O.innerHTML=_s),Pe=l(e),r(K.$$.fragment,e),qe=l(e),r(ee.$$.fragment,e),Oe=l(e),se=f(e,"P",{"data-svelte-h":!0}),d(se)!=="svelte-11hynvh"&&(se.innerHTML=Ns),Ke=l(e),r(ae.$$.fragment,e),es=l(e),te=f(e,"P",{"data-svelte-h":!0}),d(te)!=="svelte-ilfccg"&&(te.innerHTML=Ws),ss=l(e),r(ne.$$.fragment,e),as=l(e),le=f(e,"P",{"data-svelte-h":!0}),d(le)!=="svelte-e8k1kq"&&(le.innerHTML=Ss),ts=l(e),ie=f(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-katqto"&&(ie.innerHTML=Is),ns=l(e),r(pe.$$.fragment,e),ls=l(e),r(re.$$.fragment,e),is=l(e),ce=f(e,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-jqi71s"&&(ce.innerHTML=As),ps=l(e),r(me.$$.fragment,e),rs=l(e),oe=f(e,"P",{"data-svelte-h":!0}),d(oe)!=="svelte-134etkl"&&(oe.innerHTML=Zs),cs=l(e),r(ue.$$.fragment,e),ms=l(e),he=f(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-18qlfff"&&(he.innerHTML=Gs),os=l(e),r(fe.$$.fragment,e),us=l(e),de=f(e,"P",{"data-svelte-h":!0}),d(de)!=="svelte-1bv8zrn"&&(de.innerHTML=Es),hs=l(e),r(ge.$$.fragment,e),fs=l(e),Me=f(e,"P",{"data-svelte-h":!0}),d(Me)!=="svelte-1quto80"&&(Me.innerHTML=Ds),ds=l(e),r($e.$$.fragment,e),gs=l(e),je=f(e,"P",{}),Fs(je).forEach(a),this.h()},h(){Hs(i,"name","hf:doc:metadata"),Hs(i,"content",na)},m(e,s){Os(document.head,i),t(e,$,s),t(e,g,s),t(e,b,s),c(J,e,s),t(e,be,s),t(e,v,s),t(e,ye,s),c(x,e,s),t(e,Te,s),c(C,e,s),t(e,we,s),t(e,L,s),t(e,Ue,s),t(e,B,s),t(e,Je,s),c(k,e,s),t(e,ve,s),t(e,_,s),t(e,xe,s),c(N,e,s),t(e,Ce,s),t(e,W,s),t(e,Le,s),c(S,e,s),t(e,Be,s),t(e,I,s),t(e,ke,s),c(A,e,s),t(e,_e,s),t(e,Z,s),t(e,Ne,s),c(T,e,s),t(e,We,s),c(G,e,s),t(e,Se,s),t(e,E,s),t(e,Ie,s),c(D,e,s),t(e,Ae,s),c(w,e,s),t(e,Ze,s),c(z,e,s),t(e,Ge,s),t(e,Q,s),t(e,Ee,s),c(Y,e,s),t(e,De,s),t(e,F,s),t(e,ze,s),t(e,H,s),t(e,Qe,s),c(U,e,s),t(e,Ye,s),c(V,e,s),t(e,Fe,s),t(e,R,s),t(e,He,s),c(X,e,s),t(e,Ve,s),c(P,e,s),t(e,Re,s),c(q,e,s),t(e,Xe,s),t(e,O,s),t(e,Pe,s),c(K,e,s),t(e,qe,s),c(ee,e,s),t(e,Oe,s),t(e,se,s),t(e,Ke,s),c(ae,e,s),t(e,es,s),t(e,te,s),t(e,ss,s),c(ne,e,s),t(e,as,s),t(e,le,s),t(e,ts,s),t(e,ie,s),t(e,ns,s),c(pe,e,s),t(e,ls,s),c(re,e,s),t(e,is,s),t(e,ce,s),t(e,ps,s),c(me,e,s),t(e,rs,s),t(e,oe,s),t(e,cs,s),c(ue,e,s),t(e,ms,s),t(e,he,s),t(e,os,s),c(fe,e,s),t(e,us,s),t(e,de,s),t(e,hs,s),c(ge,e,s),t(e,fs,s),t(e,Me,s),t(e,ds,s),c($e,e,s),t(e,gs,s),t(e,je,s),Ms=!0},p(e,[s]){const zs={};s&2&&(zs.$$scope={dirty:s,ctx:e}),T.$set(zs);const Qs={};s&2&&(Qs.$$scope={dirty:s,ctx:e}),w.$set(Qs);const Ys={};s&2&&(Ys.$$scope={dirty:s,ctx:e}),U.$set(Ys)},i(e){Ms||(m(J.$$.fragment,e),m(x.$$.fragment,e),m(C.$$.fragment,e),m(k.$$.fragment,e),m(N.$$.fragment,e),m(S.$$.fragment,e),m(A.$$.fragment,e),m(T.$$.fragment,e),m(G.$$.fragment,e),m(D.$$.fragment,e),m(w.$$.fragment,e),m(z.$$.fragment,e),m(Y.$$.fragment,e),m(U.$$.fragment,e),m(V.$$.fragment,e),m(X.$$.fragment,e),m(P.$$.fragment,e),m(q.$$.fragment,e),m(K.$$.fragment,e),m(ee.$$.fragment,e),m(ae.$$.fragment,e),m(ne.$$.fragment,e),m(pe.$$.fragment,e),m(re.$$.fragment,e),m(me.$$.fragment,e),m(ue.$$.fragment,e),m(fe.$$.fragment,e),m(ge.$$.fragment,e),m($e.$$.fragment,e),Ms=!0)},o(e){o(J.$$.fragment,e),o(x.$$.fragment,e),o(C.$$.fragment,e),o(k.$$.fragment,e),o(N.$$.fragment,e),o(S.$$.fragment,e),o(A.$$.fragment,e),o(T.$$.fragment,e),o(G.$$.fragment,e),o(D.$$.fragment,e),o(w.$$.fragment,e),o(z.$$.fragment,e),o(Y.$$.fragment,e),o(U.$$.fragment,e),o(V.$$.fragment,e),o(X.$$.fragment,e),o(P.$$.fragment,e),o(q.$$.fragment,e),o(K.$$.fragment,e),o(ee.$$.fragment,e),o(ae.$$.fragment,e),o(ne.$$.fragment,e),o(pe.$$.fragment,e),o(re.$$.fragment,e),o(me.$$.fragment,e),o(ue.$$.fragment,e),o(fe.$$.fragment,e),o(ge.$$.fragment,e),o($e.$$.fragment,e),Ms=!1},d(e){e&&(a($),a(g),a(b),a(be),a(v),a(ye),a(Te),a(we),a(L),a(Ue),a(B),a(Je),a(ve),a(_),a(xe),a(Ce),a(W),a(Le),a(Be),a(I),a(ke),a(_e),a(Z),a(Ne),a(We),a(Se),a(E),a(Ie),a(Ae),a(Ze),a(Ge),a(Q),a(Ee),a(De),a(F),a(ze),a(H),a(Qe),a(Ye),a(Fe),a(R),a(He),a(Ve),a(Re),a(Xe),a(O),a(Pe),a(qe),a(Oe),a(se),a(Ke),a(es),a(te),a(ss),a(as),a(le),a(ts),a(ie),a(ns),a(ls),a(is),a(ce),a(ps),a(rs),a(oe),a(cs),a(ms),a(he),a(os),a(us),a(de),a(hs),a(fs),a(Me),a(ds),a(gs),a(je)),a(i),u(J,e),u(x,e),u(C,e),u(k,e),u(N,e),u(S,e),u(A,e),u(T,e),u(G,e),u(D,e),u(w,e),u(z,e),u(Y,e),u(U,e),u(V,e),u(X,e),u(P,e),u(q,e),u(K,e),u(ee,e),u(ae,e),u(ne,e),u(pe,e),u(re,e),u(me,e),u(ue,e),u(fe,e),u(ge,e),u($e,e)}}}const na='{"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 la(y){return Rs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oa extends Xs{constructor(i){super(),Ps(this,i,la,ta,Vs,{})}}export{oa as component};
