import{s as Pt,o as Tt,n as Q}from"../chunks/scheduler.defa9a21.js";import{S as jt,i as Kt,g as $,s,r as d,A as Gt,h as w,f as l,c,j as Y,u as m,x as _,k as N,y as p,a as i,v as f,d as u,t as g,w as h}from"../chunks/index.fe795e71.js";import{T as ut}from"../chunks/Tip.179eb360.js";import{D}from"../chunks/Docstring.90d6fe5c.js";import{C as Ke}from"../chunks/CodeBlock.204b6c34.js";import{E as je}from"../chunks/ExampleCodeBlock.f6fae62d.js";import{H as z,E as Jt}from"../chunks/getInferenceSnippets.2234a8dd.js";function Ut(k){let a,b="Example:",o,n,v;return n=new Ke({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBhY2NlbGVyYXRlLnV0aWxzJTIwaW1wb3J0JTIwQXV0b2Nhc3RLd2FyZ3MlMEElMEFrd2FyZ3MlMjAlM0QlMjBBdXRvY2FzdEt3YXJncyhjYWNoZV9lbmFibGVkJTNEVHJ1ZSklMEFhY2NlbGVyYXRvciUyMCUzRCUyMEFjY2VsZXJhdG9yKGt3YXJnc19oYW5kbGVycyUzRCU1Qmt3YXJncyU1RCk=",highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> AutocastKwargs

kwargs = AutocastKwargs(cache_enabled=<span class="hljs-literal">True</span>)
accelerator = Accelerator(kwargs_handlers=[kwargs])`,wrap:!1}}),{c(){a=$("p"),a.textContent=b,o=s(),d(n.$$.fragment)},l(t){a=w(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-11lpom8"&&(a.textContent=b),o=c(t),m(n.$$.fragment,t)},m(t,y){i(t,a,y),i(t,o,y),f(n,t,y),v=!0},p:Q,i(t){v||(u(n.$$.fragment,t),v=!0)},o(t){g(n.$$.fragment,t),v=!1},d(t){t&&(l(a),l(o)),h(n,t)}}}function Ct(k){let a,b="<code>gradient_as_bucket_view</code> is only available in PyTorch 1.7.0 and later versions.",o,n,v="<code>static_graph</code> is only available in PyTorch 1.11.0 and later versions.";return{c(){a=$("p"),a.innerHTML=b,o=s(),n=$("p"),n.innerHTML=v},l(t){a=w(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-wnn996"&&(a.innerHTML=b),o=c(t),n=w(t,"P",{"data-svelte-h":!0}),_(n)!=="svelte-nj3kvq"&&(n.innerHTML=v)},m(t,y){i(t,a,y),i(t,o,y),i(t,n,y)},p:Q,d(t){t&&(l(a),l(o),l(n))}}}function Yt(k){let a,b="Example:",o,n,v;return n=new Ke({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBhY2NlbGVyYXRlLnV0aWxzJTIwaW1wb3J0JTIwRGlzdHJpYnV0ZWREYXRhUGFyYWxsZWxLd2FyZ3MlMEElMEFrd2FyZ3MlMjAlM0QlMjBEaXN0cmlidXRlZERhdGFQYXJhbGxlbEt3YXJncyhmaW5kX3VudXNlZF9wYXJhbWV0ZXJzJTNEVHJ1ZSklMEFhY2NlbGVyYXRvciUyMCUzRCUyMEFjY2VsZXJhdG9yKGt3YXJnc19oYW5kbGVycyUzRCU1Qmt3YXJncyU1RCk=",highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> DistributedDataParallelKwargs

kwargs = DistributedDataParallelKwargs(find_unused_parameters=<span class="hljs-literal">True</span>)
accelerator = Accelerator(kwargs_handlers=[kwargs])`,wrap:!1}}),{c(){a=$("p"),a.textContent=b,o=s(),d(n.$$.fragment)},l(t){a=w(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-11lpom8"&&(a.textContent=b),o=c(t),m(n.$$.fragment,t)},m(t,y){i(t,a,y),i(t,o,y),f(n,t,y),v=!0},p:Q,i(t){v||(u(n.$$.fragment,t),v=!0)},o(t){g(n.$$.fragment,t),v=!1},d(t){t&&(l(a),l(o)),h(n,t)}}}function Nt(k){let a,b="<code>torch.profiler</code> is only available in PyTorch 1.8.1 and later versions.";return{c(){a=$("p"),a.innerHTML=b},l(o){a=w(o,"P",{"data-svelte-h":!0}),_(a)!=="svelte-27ihid"&&(a.innerHTML=b)},m(o,n){i(o,a,n)},p:Q,d(o){o&&l(a)}}}function Ft(k){let a,b="Example:",o,n,v;return n=new Ke({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBhY2NlbGVyYXRlLnV0aWxzJTIwaW1wb3J0JTIwUHJvZmlsZUt3YXJncyUwQSUwQWt3YXJncyUyMCUzRCUyMFByb2ZpbGVLd2FyZ3MoYWN0aXZpdGllcyUzRCU1QiUyMmNwdSUyMiUyQyUyMCUyMmN1ZGElMjIlNUQpJTBBYWNjZWxlcmF0b3IlMjAlM0QlMjBBY2NlbGVyYXRvcihrd2FyZ3NfaGFuZGxlcnMlM0QlNUJrd2FyZ3MlNUQp",highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> ProfileKwargs

kwargs = ProfileKwargs(activities=[<span class="hljs-string">&quot;cpu&quot;</span>, <span class="hljs-string">&quot;cuda&quot;</span>])
accelerator = Accelerator(kwargs_handlers=[kwargs])`,wrap:!1}}),{c(){a=$("p"),a.textContent=b,o=s(),d(n.$$.fragment)},l(t){a=w(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-11lpom8"&&(a.textContent=b),o=c(t),m(n.$$.fragment,t)},m(t,y){i(t,a,y),i(t,o,y),f(n,t,y),v=!0},p:Q,i(t){v||(u(n.$$.fragment,t),v=!0)},o(t){g(n.$$.fragment,t),v=!1},d(t){t&&(l(a),l(o)),h(n,t)}}}function Rt(k){let a,b=`<code>torch.cuda.amp.GradScaler</code> is only available in PyTorch 1.5.0 and later versions, and <code>torch.amp.GradScaler</code> is
only available in PyTorch 2.4.0 and later versions.`;return{c(){a=$("p"),a.innerHTML=b},l(o){a=w(o,"P",{"data-svelte-h":!0}),_(a)!=="svelte-7quoha"&&(a.innerHTML=b)},m(o,n){i(o,a,n)},p:Q,d(o){o&&l(a)}}}function Xt(k){let a,b="Example:",o,n,v;return n=new Ke({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBhY2NlbGVyYXRlLnV0aWxzJTIwaW1wb3J0JTIwR3JhZFNjYWxlckt3YXJncyUwQSUwQWt3YXJncyUyMCUzRCUyMEdyYWRTY2FsZXJLd2FyZ3MoYmFja29mZl9mYWN0b3IlM0QwLjI1KSUwQWFjY2VsZXJhdG9yJTIwJTNEJTIwQWNjZWxlcmF0b3Ioa3dhcmdzX2hhbmRsZXJzJTNEJTVCa3dhcmdzJTVEKQ==",highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> GradScalerKwargs

kwargs = GradScalerKwargs(backoff_factor=<span class="hljs-number">0.25</span>)
accelerator = Accelerator(kwargs_handlers=[kwargs])`,wrap:!1}}),{c(){a=$("p"),a.textContent=b,o=s(),d(n.$$.fragment)},l(t){a=w(t,"P",{"data-svelte-h":!0}),_(a)!=="svelte-11lpom8"&&(a.textContent=b),o=c(t),m(n.$$.fragment,t)},m(t,y){i(t,a,y),i(t,o,y),f(n,t,y),v=!0},p:Q,i(t){v||(u(n.$$.fragment,t),v=!0)},o(t){g(n.$$.fragment,t),v=!1},d(t){t&&(l(a),l(o)),h(n,t)}}}function Dt(k){let a,b;return a=new Ke({props:{code:"ZnJvbSUyMGRhdGV0aW1lJTIwaW1wb3J0JTIwdGltZWRlbHRhJTBBZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBhY2NlbGVyYXRlLnV0aWxzJTIwaW1wb3J0JTIwSW5pdFByb2Nlc3NHcm91cEt3YXJncyUwQSUwQWt3YXJncyUyMCUzRCUyMEluaXRQcm9jZXNzR3JvdXBLd2FyZ3ModGltZW91dCUzRHRpbWVkZWx0YShzZWNvbmRzJTNEODAwKSklMEFhY2NlbGVyYXRvciUyMCUzRCUyMEFjY2VsZXJhdG9yKGt3YXJnc19oYW5kbGVycyUzRCU1Qmt3YXJncyU1RCk=",highlighted:`<span class="hljs-keyword">from</span> datetime <span class="hljs-keyword">import</span> timedelta
<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> InitProcessGroupKwargs

kwargs = InitProcessGroupKwargs(timeout=timedelta(seconds=<span class="hljs-number">800</span>))
accelerator = Accelerator(kwargs_handlers=[kwargs])`,wrap:!1}}),{c(){d(a.$$.fragment)},l(o){m(a.$$.fragment,o)},m(o,n){f(a,o,n),b=!0},p:Q,i(o){b||(u(a.$$.fragment,o),b=!0)},o(o){g(a.$$.fragment,o),b=!1},d(o){h(a,o)}}}function Et(k){let a,b,o,n,v,t,y,gt=`The following objects can be passed to the main <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize how some PyTorch objects
related to distributed training or mixed precision are created.`,Ge,q,Je,K,O,Ie,$e,ht=`Use this object in your <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize how <code>torch.autocast</code> behaves. Please refer to the
documentation of this <a href="https://pytorch.org/docs/stable/amp.html#torch.autocast" rel="nofollow">context manager</a> for more
information on each argument.`,Se,E,Ue,ee,Ce,M,te,ze,we,$t=`Use this object in your <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize how your model is wrapped in a
<code>torch.nn.parallel.DistributedDataParallel</code>. Please refer to the documentation of this
<a href="https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html" rel="nofollow">wrapper</a> for more
information on each argument.`,Qe,L,qe,V,Ye,ae,Ne,F,re,Oe,be,wt=`Deprecated. Please use one of the proper FP8 recipe kwargs classes such as <code>TERecipeKwargs</code> or <code>MSAMPRecipeKwargs</code>
instead.`,Fe,le,Re,x,oe,et,ve,bt=`Use this object in your <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize the initialization of the profiler. Please refer to the
documentation of this <a href="https://pytorch.org/docs/stable/profiler.html#torch.profiler.profile" rel="nofollow">context manager</a> for
more information on each argument.`,tt,Z,at,H,rt,W,ne,lt,ye,vt="Build a profiler object with the current configuration.",Xe,se,De,P,ce,ot,_e,yt=`Use this object in your <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize the behavior of mixed precision, specifically how the
<code>torch.amp.GradScaler</code> or <code>torch.cuda.amp.GradScaler</code> used is created. Please refer to the documentation of this
<a href="https://pytorch.org/docs/stable/amp.html?highlight=gradscaler" rel="nofollow">scaler</a> for more information on each argument.`,nt,A,st,B,Ee,ie,Le,T,pe,ct,ke,_t=`Use this object in your <a href="/docs/accelerate/v1.10.1/en/package_reference/accelerator#accelerate.Accelerator">Accelerator</a> to customize the initialization of the distributed processes. Please refer
to the documentation of this
<a href="https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group" rel="nofollow">method</a> for more
information on each argument.`,it,xe,kt="Note: If <code>timeout</code> is set to <code>None</code>, the default will be based upon how <code>backend</code> is set.",pt,I,Ve,de,Ze,G,me,dt,Me,xt="Internal mixin that implements a <code>to_kwargs()</code> method for a dataclass.",mt,S,fe,ft,Pe,Mt="Returns a dictionary containing the attributes with values different from the default of this class.",He,ue,We,Te,Ae;return v=new z({props:{title:"Kwargs handlers",local:"kwargs-handlers",headingTag:"h1"}}),q=new z({props:{title:"AutocastKwargs",local:"accelerate.AutocastKwargs",headingTag:"h2"}}),O=new D({props:{name:"class accelerate.AutocastKwargs",anchor:"accelerate.AutocastKwargs",parameters:[{name:"enabled",val:": bool = True"},{name:"cache_enabled",val:": bool = None"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L112"}}),E=new je({props:{anchor:"accelerate.AutocastKwargs.example",$$slots:{default:[Ut]},$$scope:{ctx:k}}}),ee=new z({props:{title:"DistributedDataParallelKwargs",local:"accelerate.DistributedDataParallelKwargs",headingTag:"h2"}}),te=new D({props:{name:"class accelerate.DistributedDataParallelKwargs",anchor:"accelerate.DistributedDataParallelKwargs",parameters:[{name:"dim",val:": int = 0"},{name:"broadcast_buffers",val:": bool = True"},{name:"bucket_cap_mb",val:": int = 25"},{name:"find_unused_parameters",val:": bool = False"},{name:"check_reduction",val:": bool = False"},{name:"gradient_as_bucket_view",val:": bool = False"},{name:"static_graph",val:": bool = False"},{name:"comm_hook",val:": DDPCommunicationHookType = <DDPCommunicationHookType.NO: 'no'>"},{name:"comm_wrapper",val:": typing.Literal[<DDPCommunicationHookType.NO: 'no'>, <DDPCommunicationHookType.FP16: 'fp16'>, <DDPCommunicationHookType.BF16: 'bf16'>] = <DDPCommunicationHookType.NO: 'no'>"},{name:"comm_state_option",val:": dict = <factory>"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L154"}}),L=new ut({props:{warning:!0,$$slots:{default:[Ct]},$$scope:{ctx:k}}}),V=new je({props:{anchor:"accelerate.DistributedDataParallelKwargs.example",$$slots:{default:[Yt]},$$scope:{ctx:k}}}),ae=new z({props:{title:"FP8RecipeKwargs",local:"accelerate.utils.FP8RecipeKwargs",headingTag:"h2"}}),re=new D({props:{name:"class accelerate.utils.FP8RecipeKwargs",anchor:"accelerate.utils.FP8RecipeKwargs",parameters:[{name:"opt_level",val:": typing.Literal['O1', 'O2'] = None"},{name:"use_autocast_during_eval",val:": bool = None"},{name:"margin",val:": int = None"},{name:"interval",val:": int = None"},{name:"fp8_format",val:": typing.Literal['HYBRID', 'E4M3', 'E5M2'] = None"},{name:"amax_history_len",val:": int = None"},{name:"amax_compute_algo",val:": typing.Literal['max', 'most_recent'] = None"},{name:"override_linear_precision",val:": tuple = None"},{name:"backend",val:": typing.Literal['MSAMP', 'TE'] = None"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L422"}}),le=new z({props:{title:"ProfileKwargs",local:"accelerate.ProfileKwargs",headingTag:"h2"}}),oe=new D({props:{name:"class accelerate.ProfileKwargs",anchor:"accelerate.ProfileKwargs",parameters:[{name:"activities",val:": typing.Optional[list[typing.Literal['cpu', 'xpu', 'mtia', 'cuda', 'hpu']]] = None"},{name:"schedule_option",val:": typing.Optional[dict[str, int]] = None"},{name:"on_trace_ready",val:": typing.Optional[typing.Callable] = None"},{name:"record_shapes",val:": bool = False"},{name:"profile_memory",val:": bool = False"},{name:"with_stack",val:": bool = False"},{name:"with_flops",val:": bool = False"},{name:"with_modules",val:": bool = False"},{name:"output_trace_dir",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"accelerate.ProfileKwargs.activities",description:`<strong>activities</strong> (<code>List[str]</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of activity groups to use in profiling. Must be one of <code>&quot;cpu&quot;</code>, <code>&quot;xpu&quot;</code>, <code>&quot;mtia&quot;</code>, &#x201C;hpu&#x201D; or
<code>&quot;cuda&quot;</code>.`,name:"activities"},{anchor:"accelerate.ProfileKwargs.schedule_option",description:`<strong>schedule_option</strong> (<code>Dict[str, int]</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The schedule option to use for the profiler. Available keys are <code>wait</code>, <code>warmup</code>, <code>active</code>, <code>repeat</code> and
<code>skip_first</code>. The profiler will skip the first <code>skip_first</code> steps, then wait for <code>wait</code> steps, then do the
warmup for the next <code>warmup</code> steps, then do the active recording for the next <code>active</code> steps and then
repeat the cycle starting with <code>wait</code> steps. The optional number of cycles is specified with the <code>repeat</code>
parameter, the zero value means that the cycles will continue until the profiling is finished.`,name:"schedule_option"},{anchor:"accelerate.ProfileKwargs.on_trace_ready",description:`<strong>on_trace_ready</strong> (<code>Callable</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
Callable that is called at each step when schedule returns <code>ProfilerAction.RECORD_AND_SAVE</code> during the
profiling.`,name:"on_trace_ready"},{anchor:"accelerate.ProfileKwargs.record_shapes",description:`<strong>record_shapes</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Save information about operator&#x2019;s input shapes.`,name:"record_shapes"},{anchor:"accelerate.ProfileKwargs.profile_memory",description:`<strong>profile_memory</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Track tensor memory allocation/deallocation`,name:"profile_memory"},{anchor:"accelerate.ProfileKwargs.with_stack",description:`<strong>with_stack</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Record source information (file and line number) for the ops.`,name:"with_stack"},{anchor:"accelerate.ProfileKwargs.with_flops",description:`<strong>with_flops</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Use formula to estimate the FLOPS of specific operators`,name:"with_flops"},{anchor:"accelerate.ProfileKwargs.with_modules",description:`<strong>with_modules</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Record module hierarchy (including function names) corresponding to the callstack of the op.`,name:"with_modules"},{anchor:"accelerate.ProfileKwargs.output_trace_dir",description:`<strong>output_trace_dir</strong> (<code>str</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
Exports the collected trace in Chrome JSON format. Chrome use &#x2018;chrome://tracing&#x2019; view json file. Defaults
to None, which means profiling does not store json files.`,name:"output_trace_dir"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L451"}}),Z=new ut({props:{warning:!0,$$slots:{default:[Nt]},$$scope:{ctx:k}}}),H=new je({props:{anchor:"accelerate.ProfileKwargs.example",$$slots:{default:[Ft]},$$scope:{ctx:k}}}),ne=new D({props:{name:"build",anchor:"accelerate.ProfileKwargs.build",parameters:[],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L541",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The profiler object.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>torch.profiler.profile</p>
`}}),se=new z({props:{title:"GradScalerKwargs",local:"accelerate.GradScalerKwargs",headingTag:"h2"}}),ce=new D({props:{name:"class accelerate.GradScalerKwargs",anchor:"accelerate.GradScalerKwargs",parameters:[{name:"init_scale",val:": float = 65536.0"},{name:"growth_factor",val:": float = 2.0"},{name:"backoff_factor",val:": float = 0.5"},{name:"growth_interval",val:": int = 2000"},{name:"enabled",val:": bool = True"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L240"}}),A=new ut({props:{warning:!0,$$slots:{default:[Rt]},$$scope:{ctx:k}}}),B=new je({props:{anchor:"accelerate.GradScalerKwargs.example",$$slots:{default:[Xt]},$$scope:{ctx:k}}}),ie=new z({props:{title:"InitProcessGroupKwargs",local:"accelerate.InitProcessGroupKwargs",headingTag:"h2"}}),pe=new D({props:{name:"class accelerate.InitProcessGroupKwargs",anchor:"accelerate.InitProcessGroupKwargs",parameters:[{name:"backend",val:": typing.Optional[str] = 'nccl'"},{name:"init_method",val:": typing.Optional[str] = None"},{name:"timeout",val:": typing.Optional[datetime.timedelta] = None"}],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L272"}}),I=new je({props:{anchor:"accelerate.InitProcessGroupKwargs.example",$$slots:{default:[Dt]},$$scope:{ctx:k}}}),de=new z({props:{title:"KwargsHandler",local:"accelerate.utils.KwargsHandler",headingTag:"h2"}}),me=new D({props:{name:"class accelerate.utils.KwargsHandler",anchor:"accelerate.utils.KwargsHandler",parameters:[],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L67"}}),fe=new D({props:{name:"to_kwargs",anchor:"accelerate.utils.KwargsHandler.to_kwargs",parameters:[],source:"https://github.com/huggingface/accelerate/blob/v1.10.1/src/accelerate/utils/dataclasses.py#L75"}}),ue=new Jt({props:{source:"https://github.com/huggingface/accelerate/blob/main/docs/source/package_reference/kwargs.md"}}),{c(){a=$("meta"),b=s(),o=$("p"),n=s(),d(v.$$.fragment),t=s(),y=$("p"),y.innerHTML=gt,Ge=s(),d(q.$$.fragment),Je=s(),K=$("div"),d(O.$$.fragment),Ie=s(),$e=$("p"),$e.innerHTML=ht,Se=s(),d(E.$$.fragment),Ue=s(),d(ee.$$.fragment),Ce=s(),M=$("div"),d(te.$$.fragment),ze=s(),we=$("p"),we.innerHTML=$t,Qe=s(),d(L.$$.fragment),qe=s(),d(V.$$.fragment),Ye=s(),d(ae.$$.fragment),Ne=s(),F=$("div"),d(re.$$.fragment),Oe=s(),be=$("p"),be.innerHTML=wt,Fe=s(),d(le.$$.fragment),Re=s(),x=$("div"),d(oe.$$.fragment),et=s(),ve=$("p"),ve.innerHTML=bt,tt=s(),d(Z.$$.fragment),at=s(),d(H.$$.fragment),rt=s(),W=$("div"),d(ne.$$.fragment),lt=s(),ye=$("p"),ye.textContent=vt,Xe=s(),d(se.$$.fragment),De=s(),P=$("div"),d(ce.$$.fragment),ot=s(),_e=$("p"),_e.innerHTML=yt,nt=s(),d(A.$$.fragment),st=s(),d(B.$$.fragment),Ee=s(),d(ie.$$.fragment),Le=s(),T=$("div"),d(pe.$$.fragment),ct=s(),ke=$("p"),ke.innerHTML=_t,it=s(),xe=$("p"),xe.innerHTML=kt,pt=s(),d(I.$$.fragment),Ve=s(),d(de.$$.fragment),Ze=s(),G=$("div"),d(me.$$.fragment),dt=s(),Me=$("p"),Me.innerHTML=xt,mt=s(),S=$("div"),d(fe.$$.fragment),ft=s(),Pe=$("p"),Pe.textContent=Mt,He=s(),d(ue.$$.fragment),We=s(),Te=$("p"),this.h()},l(e){const r=Gt("svelte-u9bgzb",document.head);a=w(r,"META",{name:!0,content:!0}),r.forEach(l),b=c(e),o=w(e,"P",{}),Y(o).forEach(l),n=c(e),m(v.$$.fragment,e),t=c(e),y=w(e,"P",{"data-svelte-h":!0}),_(y)!=="svelte-xw7n3u"&&(y.innerHTML=gt),Ge=c(e),m(q.$$.fragment,e),Je=c(e),K=w(e,"DIV",{class:!0});var R=Y(K);m(O.$$.fragment,R),Ie=c(R),$e=w(R,"P",{"data-svelte-h":!0}),_($e)!=="svelte-wwoevx"&&($e.innerHTML=ht),Se=c(R),m(E.$$.fragment,R),R.forEach(l),Ue=c(e),m(ee.$$.fragment,e),Ce=c(e),M=w(e,"DIV",{class:!0});var J=Y(M);m(te.$$.fragment,J),ze=c(J),we=w(J,"P",{"data-svelte-h":!0}),_(we)!=="svelte-hboilm"&&(we.innerHTML=$t),Qe=c(J),m(L.$$.fragment,J),qe=c(J),m(V.$$.fragment,J),J.forEach(l),Ye=c(e),m(ae.$$.fragment,e),Ne=c(e),F=w(e,"DIV",{class:!0});var ge=Y(F);m(re.$$.fragment,ge),Oe=c(ge),be=w(ge,"P",{"data-svelte-h":!0}),_(be)!=="svelte-1b6vct0"&&(be.innerHTML=wt),ge.forEach(l),Fe=c(e),m(le.$$.fragment,e),Re=c(e),x=w(e,"DIV",{class:!0});var j=Y(x);m(oe.$$.fragment,j),et=c(j),ve=w(j,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-t5quyz"&&(ve.innerHTML=bt),tt=c(j),m(Z.$$.fragment,j),at=c(j),m(H.$$.fragment,j),rt=c(j),W=w(j,"DIV",{class:!0});var he=Y(W);m(ne.$$.fragment,he),lt=c(he),ye=w(he,"P",{"data-svelte-h":!0}),_(ye)!=="svelte-y3n9ph"&&(ye.textContent=vt),he.forEach(l),j.forEach(l),Xe=c(e),m(se.$$.fragment,e),De=c(e),P=w(e,"DIV",{class:!0});var U=Y(P);m(ce.$$.fragment,U),ot=c(U),_e=w(U,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-zvinge"&&(_e.innerHTML=yt),nt=c(U),m(A.$$.fragment,U),st=c(U),m(B.$$.fragment,U),U.forEach(l),Ee=c(e),m(ie.$$.fragment,e),Le=c(e),T=w(e,"DIV",{class:!0});var C=Y(T);m(pe.$$.fragment,C),ct=c(C),ke=w(C,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-nkbwxm"&&(ke.innerHTML=_t),it=c(C),xe=w(C,"P",{"data-svelte-h":!0}),_(xe)!=="svelte-l1d7ay"&&(xe.innerHTML=kt),pt=c(C),m(I.$$.fragment,C),C.forEach(l),Ve=c(e),m(de.$$.fragment,e),Ze=c(e),G=w(e,"DIV",{class:!0});var X=Y(G);m(me.$$.fragment,X),dt=c(X),Me=w(X,"P",{"data-svelte-h":!0}),_(Me)!=="svelte-1g1ngcq"&&(Me.innerHTML=xt),mt=c(X),S=w(X,"DIV",{class:!0});var Be=Y(S);m(fe.$$.fragment,Be),ft=c(Be),Pe=w(Be,"P",{"data-svelte-h":!0}),_(Pe)!=="svelte-1iftwh6"&&(Pe.textContent=Mt),Be.forEach(l),X.forEach(l),He=c(e),m(ue.$$.fragment,e),We=c(e),Te=w(e,"P",{}),Y(Te).forEach(l),this.h()},h(){N(a,"name","hf:doc:metadata"),N(a,"content",Lt),N(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){p(document.head,a),i(e,b,r),i(e,o,r),i(e,n,r),f(v,e,r),i(e,t,r),i(e,y,r),i(e,Ge,r),f(q,e,r),i(e,Je,r),i(e,K,r),f(O,K,null),p(K,Ie),p(K,$e),p(K,Se),f(E,K,null),i(e,Ue,r),f(ee,e,r),i(e,Ce,r),i(e,M,r),f(te,M,null),p(M,ze),p(M,we),p(M,Qe),f(L,M,null),p(M,qe),f(V,M,null),i(e,Ye,r),f(ae,e,r),i(e,Ne,r),i(e,F,r),f(re,F,null),p(F,Oe),p(F,be),i(e,Fe,r),f(le,e,r),i(e,Re,r),i(e,x,r),f(oe,x,null),p(x,et),p(x,ve),p(x,tt),f(Z,x,null),p(x,at),f(H,x,null),p(x,rt),p(x,W),f(ne,W,null),p(W,lt),p(W,ye),i(e,Xe,r),f(se,e,r),i(e,De,r),i(e,P,r),f(ce,P,null),p(P,ot),p(P,_e),p(P,nt),f(A,P,null),p(P,st),f(B,P,null),i(e,Ee,r),f(ie,e,r),i(e,Le,r),i(e,T,r),f(pe,T,null),p(T,ct),p(T,ke),p(T,it),p(T,xe),p(T,pt),f(I,T,null),i(e,Ve,r),f(de,e,r),i(e,Ze,r),i(e,G,r),f(me,G,null),p(G,dt),p(G,Me),p(G,mt),p(G,S),f(fe,S,null),p(S,ft),p(S,Pe),i(e,He,r),f(ue,e,r),i(e,We,r),i(e,Te,r),Ae=!0},p(e,[r]){const R={};r&2&&(R.$$scope={dirty:r,ctx:e}),E.$set(R);const J={};r&2&&(J.$$scope={dirty:r,ctx:e}),L.$set(J);const ge={};r&2&&(ge.$$scope={dirty:r,ctx:e}),V.$set(ge);const j={};r&2&&(j.$$scope={dirty:r,ctx:e}),Z.$set(j);const he={};r&2&&(he.$$scope={dirty:r,ctx:e}),H.$set(he);const U={};r&2&&(U.$$scope={dirty:r,ctx:e}),A.$set(U);const C={};r&2&&(C.$$scope={dirty:r,ctx:e}),B.$set(C);const X={};r&2&&(X.$$scope={dirty:r,ctx:e}),I.$set(X)},i(e){Ae||(u(v.$$.fragment,e),u(q.$$.fragment,e),u(O.$$.fragment,e),u(E.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(L.$$.fragment,e),u(V.$$.fragment,e),u(ae.$$.fragment,e),u(re.$$.fragment,e),u(le.$$.fragment,e),u(oe.$$.fragment,e),u(Z.$$.fragment,e),u(H.$$.fragment,e),u(ne.$$.fragment,e),u(se.$$.fragment,e),u(ce.$$.fragment,e),u(A.$$.fragment,e),u(B.$$.fragment,e),u(ie.$$.fragment,e),u(pe.$$.fragment,e),u(I.$$.fragment,e),u(de.$$.fragment,e),u(me.$$.fragment,e),u(fe.$$.fragment,e),u(ue.$$.fragment,e),Ae=!0)},o(e){g(v.$$.fragment,e),g(q.$$.fragment,e),g(O.$$.fragment,e),g(E.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(L.$$.fragment,e),g(V.$$.fragment,e),g(ae.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(oe.$$.fragment,e),g(Z.$$.fragment,e),g(H.$$.fragment,e),g(ne.$$.fragment,e),g(se.$$.fragment,e),g(ce.$$.fragment,e),g(A.$$.fragment,e),g(B.$$.fragment,e),g(ie.$$.fragment,e),g(pe.$$.fragment,e),g(I.$$.fragment,e),g(de.$$.fragment,e),g(me.$$.fragment,e),g(fe.$$.fragment,e),g(ue.$$.fragment,e),Ae=!1},d(e){e&&(l(b),l(o),l(n),l(t),l(y),l(Ge),l(Je),l(K),l(Ue),l(Ce),l(M),l(Ye),l(Ne),l(F),l(Fe),l(Re),l(x),l(Xe),l(De),l(P),l(Ee),l(Le),l(T),l(Ve),l(Ze),l(G),l(He),l(We),l(Te)),l(a),h(v,e),h(q,e),h(O),h(E),h(ee,e),h(te),h(L),h(V),h(ae,e),h(re),h(le,e),h(oe),h(Z),h(H),h(ne),h(se,e),h(ce),h(A),h(B),h(ie,e),h(pe),h(I),h(de,e),h(me),h(fe),h(ue,e)}}}const Lt='{"title":"Kwargs handlers","local":"kwargs-handlers","sections":[{"title":"AutocastKwargs","local":"accelerate.AutocastKwargs","sections":[],"depth":2},{"title":"DistributedDataParallelKwargs","local":"accelerate.DistributedDataParallelKwargs","sections":[],"depth":2},{"title":"FP8RecipeKwargs","local":"accelerate.utils.FP8RecipeKwargs","sections":[],"depth":2},{"title":"ProfileKwargs","local":"accelerate.ProfileKwargs","sections":[],"depth":2},{"title":"GradScalerKwargs","local":"accelerate.GradScalerKwargs","sections":[],"depth":2},{"title":"InitProcessGroupKwargs","local":"accelerate.InitProcessGroupKwargs","sections":[],"depth":2},{"title":"KwargsHandler","local":"accelerate.utils.KwargsHandler","sections":[],"depth":2}],"depth":1}';function Vt(k){return Tt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zt extends jt{constructor(a){super(),Kt(this,a,Vt,Et,Pt,{})}}export{zt as component};
