import{s as xt,n as Tt,o as yt}from"../chunks/scheduler.78382b47.js";import{S as wt,i as Pt,e as d,s as n,c as p,h as Ct,a as i,d as a,b as o,f as w,g as c,j as l,k as P,l as r,m as s,n as m,t as f,o as _,p as u}from"../chunks/index.6dd35eb6.js";import{C as Et,H as q,E as Ft}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.fed9dfe4.js";import{D as Y}from"../chunks/Docstring.32e826ec.js";function qt(at){let T,ge,ue,$e,D,ve,j,be,L,nt="A collection of functions that could be useful for non-PeftModel models, e.g. transformers or diffusers integration",xe,M,ot="The functions provided here can be considered “public API” of PEFT and hence are safe to be used by packages that provide PEFT integrations.",Te,k,ye,v,I,Ne,J,rt="A helper method to cast the adapter weights to the correct dtype.",Be,Q,st="Currently, this only upcasts float dtypes to float32.",we,S,Pe,b,z,Ve,X,dt="Delete an existing PEFT adapter.",Ge,Z,it=`Note: This function does not delete the PEFT config on the model, if there is one. It will also not completely
purge the PEFT layers if the last PEFT adapter is deleted. For this, consider using <code>model.unload()</code> if using a
PEFT model instance, or just reloading the base model.`,Ce,A,Ee,h,H,Ue,ee,lt="Get the state dict of the given adapter of the PEFT model.",We,te,pt=`This only includes the PEFT parameters, not the parameters of the base model. Thus the returned <code>state_dict</code> is
generally small compared to the full model size. To retrieve the full <code>state_dict</code>, just call <code>model.state_dict()</code>.`,Oe,ae,ct=`Note that the adapter name is removed from the <code>state_dict</code>, as this is just an arbitrary name that can be changed
when loading the adapter. So e.g. if the adapter name is <code>&#39;default&#39;</code> and the original key is
<code>&#39;model.q_proj.lora_A.default.weight&#39;</code>, the returned key will be <code>&#39;model.q_proj.lora_A.weight&#39;</code>. Use this function
in conjunction with <a href="/docs/peft/main/en/package_reference/functional#peft.set_peft_model_state_dict">set_peft_model_state_dict()</a> to take care of the adapter name when loading weights.`,Fe,N,qe,g,B,Re,ne,mt="Create PEFT layers and inject them into the model in-place.",Ke,oe,ft="Currently the API does not support prompt learning methods and adaption prompt.",Ye,re,_t=`This function is similar to <a href="/docs/peft/main/en/package_reference/peft_model#peft.get_peft_model">get_peft_model()</a> but it does not return a <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel">PeftModel</a> instance. Instead, it returns
the original, mutated instance of the passed model.`,De,V,je,x,G,Je,se,ut="Set the active PEFT adapter(s) of the model.",Qe,de,ht=`Active adapters are those adapters that participate in the forward pass. Use this function if you want to switch
between multiple PEFT adapters.`,Le,U,Me,y,W,Xe,ie,gt="Enable or disable gradients on the given adapter(s).",ke,O,Ie,$,R,Ze,le,$t="Set the state dict of the PEFT model.",et,pe,vt=`Given a PEFT <code>state_dict</code> (as returned by <a href="/docs/peft/main/en/package_reference/peft_model#peft.get_peft_model_state_dict">get_peft_model_state_dict()</a>), insert the weights into the model. The
model needs to have the PEFT adapters already in place (e.g. via <a href="/docs/peft/main/en/package_reference/peft_model#peft.inject_adapter_in_model">inject_adapter_in_model()</a>).`,tt,ce,bt=`Setting the adapter weights also takes care of re-inserting the adapter name. This name may be a different name
than the one originally used to train the adapter.`,Se,K,ze,he,Ae;return D=new Et({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new q({props:{title:"Functions for PEFT integration",local:"functions-for-peft-integration",headingTag:"h1"}}),k=new q({props:{title:"Cast the adapter weight dtypes",local:"peft.tuners.tuners_utils.cast_adapter_dtype",headingTag:"h2"}}),I=new Y({props:{name:"peft.tuners.tuners_utils.cast_adapter_dtype",anchor:"peft.tuners.tuners_utils.cast_adapter_dtype",parameters:[{name:"model",val:": nn.Module"},{name:"adapter_name",val:": str"},{name:"autocast_adapter_dtype",val:": bool = True"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.cast_adapter_dtype.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The adapter name.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.cast_adapter_dtype.autocast_adapter_dtype",description:`<strong>autocast_adapter_dtype</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to autocast the adapter dtype. Defaults to <code>True</code>.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L2151"}}),S=new q({props:{title:"Delete the PEFT adapter from model",local:"peft.tuners.tuners_utils.delete_adapter",headingTag:"h2"}}),z=new Y({props:{name:"peft.tuners.tuners_utils.delete_adapter",anchor:"peft.tuners.tuners_utils.delete_adapter",parameters:[{name:"model",val:": nn.Module"},{name:"adapter_name",val:": str"},{name:"prefix",val:": str"},{name:"layer_cls",val:": type[BaseTunerLayer] = <class 'peft.tuners.tuners_utils.BaseTunerLayer'>"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.delete_adapter.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model from which the adapter should be deleted.`,name:"model"},{anchor:"peft.tuners.tuners_utils.delete_adapter.adapter_name",description:`<strong>adapter_name</strong> (str) &#x2014;
The name of the adapter to be deleted.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.delete_adapter.prefix",description:`<strong>prefix</strong> (str) &#x2014;
The prefix of the PEFT method, e.g. &#x201C;lora_&#x201D; for LoRA.`,name:"prefix"},{anchor:"peft.tuners.tuners_utils.delete_adapter.layer_cls",description:`<strong>layer_cls</strong> (type, optional) &#x2014;
The class of the adapter layer. Defaults to <code>BaseTunerLayer</code>.`,name:"layer_cls"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L2112",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The name of remaining adapter(s) after deletion, or <code>None</code> if there are no active adapters left. Use this
to set the new active adapter of the model if necessary.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>new_adapter (list[str] | None)</p>
`}}),A=new q({props:{title:"Get the state dict of the PEFT adapter",local:"peft.get_peft_model_state_dict",headingTag:"h2"}}),H=new Y({props:{name:"peft.get_peft_model_state_dict",anchor:"peft.get_peft_model_state_dict",parameters:[{name:"model",val:""},{name:"state_dict",val:" = None"},{name:"adapter_name",val:" = 'default'"},{name:"unwrap_compiled",val:" = False"},{name:"save_embedding_layers",val:" = 'auto'"}],parametersDescription:[{anchor:"peft.get_peft_model_state_dict.model",description:`<strong>model</strong> (<a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel">PeftModel</a>) &#x2014; The Peft model. When using torch.nn.DistributedDataParallel, DeepSpeed or FSDP,
the model should be the underlying model/unwrapped model (i.e. model.module).`,name:"model"},{anchor:"peft.get_peft_model_state_dict.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The state dict of the model. If not provided, the state dict of the passed model will be used.`,name:"state_dict"},{anchor:"peft.get_peft_model_state_dict.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The name of the adapter whose state dict should be returned.`,name:"adapter_name"},{anchor:"peft.get_peft_model_state_dict.unwrap_compiled",description:`<strong>unwrap_compiled</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to unwrap the model if torch.compile was used.`,name:"unwrap_compiled"},{anchor:"peft.get_peft_model_state_dict.save_embedding_layers",description:`<strong>save_embedding_layers</strong> (<code>Union[bool, str]</code>, , <em>optional</em>, defaults to <code>auto</code>) &#x2014;
If <code>True</code>, save the embedding layers in addition to adapter weights. If <code>auto</code>, checks the common embedding
layers <code>peft.utils.other.EMBEDDING_LAYER_NAMES</code> in config&#x2019;s <code>target_modules</code> when available. Based on it
sets the boolean flag. This only works for &#x1F917; transformers models.`,name:"save_embedding_layers"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/utils/save_and_load.py#L77"}}),N=new q({props:{title:"Inject a PEFT adapter into the model based on a PEFT config",local:"peft.inject_adapter_in_model",headingTag:"h2"}}),B=new Y({props:{name:"peft.inject_adapter_in_model",anchor:"peft.inject_adapter_in_model",parameters:[{name:"peft_config",val:": PeftConfig"},{name:"model",val:": torch.nn.Module"},{name:"adapter_name",val:": str = 'default'"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"state_dict",val:": Optional[dict[str, torch.Tensor]] = None"}],parametersDescription:[{anchor:"peft.inject_adapter_in_model.peft_config",description:`<strong>peft_config</strong> (<code>PeftConfig</code>) &#x2014;
Configuration object containing the parameters of the PEFT model.`,name:"peft_config"},{anchor:"peft.inject_adapter_in_model.model",description:`<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014;
The input model where the adapter will be injected.`,name:"model"},{anchor:"peft.inject_adapter_in_model.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The name of the adapter to be injected, if not provided, the default adapter name is used (&#x201C;default&#x201D;).`,name:"adapter_name"},{anchor:"peft.inject_adapter_in_model.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>False</code>) &#x2014;
Create empty adapter weights on meta device. Useful to speed up the loading process.`,name:"low_cpu_mem_usage"},{anchor:"peft.inject_adapter_in_model.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If a <code>state_dict</code> is passed here, the adapters will be injected based on the entries of the state_dict.
This can be useful when the exact <code>target_modules</code> of the PEFT method is unknown, for instance because the
checkpoint was created without meta data. Note that the values from the <code>state_dict</code> are not used, only the
keys are used to determine the correct layers that should be adapted.`,name:"state_dict"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/mapping.py#L47"}}),V=new q({props:{title:"Set the active PEFT adapter(s) of the model",local:"peft.tuners.tuners_utils.set_adapter",headingTag:"h2"}}),G=new Y({props:{name:"peft.tuners.tuners_utils.set_adapter",anchor:"peft.tuners.tuners_utils.set_adapter",parameters:[{name:"model",val:""},{name:"adapter_name",val:": str | list[str]"},{name:"inference_mode",val:": bool = False"},{name:"layer_cls",val:": type[BaseTunerLayer] = <class 'peft.tuners.tuners_utils.BaseTunerLayer'>"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.set_adapter.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model on which the adapter(s) should be set.`,name:"model"},{anchor:"peft.tuners.tuners_utils.set_adapter.adapter_name",description:`<strong>adapter_name</strong> (str, list[str]) &#x2014;
The name(s) of the adapter(s) to set as active`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.set_adapter.inference_mode",description:`<strong>inference_mode</strong> (bool, optional) &#x2014;
Whether the activated adapter should be frozen (i.e. <code>requires_grad=False</code>). Default is False.`,name:"inference_mode"},{anchor:"peft.tuners.tuners_utils.set_adapter.layer_cls",description:`<strong>layer_cls</strong> (type, optional) &#x2014;
The class of the adapter layer. Defaults to <code>BaseTunerLayer</code>.`,name:"layer_cls"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L2076"}}),U=new q({props:{title:"Set the requires_grad attribute of the specified adapters",local:"peft.tuners.tuners_utils.set_requires_grad",headingTag:"h2"}}),W=new Y({props:{name:"peft.tuners.tuners_utils.set_requires_grad",anchor:"peft.tuners.tuners_utils.set_requires_grad",parameters:[{name:"model",val:""},{name:"adapter_names",val:": str | Sequence[str]"},{name:"requires_grad",val:": bool = True"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.set_requires_grad.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model from which the adapter should be deleted.`,name:"model"},{anchor:"peft.tuners.tuners_utils.set_requires_grad.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code> or <code>Sequence[str]</code>) &#x2014;
The name of the adapter(s) whose gradients should be enabled/disabled.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.set_requires_grad.requires_grad",description:`<strong>requires_grad</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to enable (<code>True</code>, default) or disable (<code>False</code>).`,name:"requires_grad"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L2199"}}),O=new q({props:{title:"Load the weights of the PEFT state dict into the model",local:"peft.set_peft_model_state_dict",headingTag:"h2"}}),R=new Y({props:{name:"peft.set_peft_model_state_dict",anchor:"peft.set_peft_model_state_dict",parameters:[{name:"model",val:""},{name:"peft_model_state_dict",val:""},{name:"adapter_name",val:" = 'default'"},{name:"ignore_mismatched_sizes",val:": bool = False"},{name:"low_cpu_mem_usage",val:": bool = False"}],parametersDescription:[{anchor:"peft.set_peft_model_state_dict.model",description:`<strong>model</strong> (<a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel">PeftModel</a>) &#x2014;
The Peft model.`,name:"model"},{anchor:"peft.set_peft_model_state_dict.peft_model_state_dict",description:`<strong>peft_model_state_dict</strong> (<code>dict</code>) &#x2014;
The state dict of the Peft model.`,name:"peft_model_state_dict"},{anchor:"peft.set_peft_model_state_dict.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The name of the adapter whose state dict should be set.`,name:"adapter_name"},{anchor:"peft.set_peft_model_state_dict.ignore_mismatched_sizes",description:`<strong>ignore_mismatched_sizes</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to ignore mismatched in the state dict.`,name:"ignore_mismatched_sizes"},{anchor:"peft.set_peft_model_state_dict.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>False</code>) &#x2014;
This argument must be <code>True</code> if the <code>model</code> was loaded with adapter weights on the meta device, e.g. after
calling <code>inject_adapter_in_model</code> with <code>low_cpu_mem_usage=True</code>. Otherwise, leave it as <code>False</code>.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/utils/save_and_load.py#L602",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>load_result (<code>_IncompatibleKeys</code>)
A named tuple with <code>missing_keys</code> and <code>unexpected_keys</code> fields.</p>
`}}),K=new Ft({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/package_reference/functional.md"}}),{c(){T=d("meta"),ge=n(),ue=d("p"),$e=n(),p(D.$$.fragment),ve=n(),p(j.$$.fragment),be=n(),L=d("p"),L.textContent=nt,xe=n(),M=d("p"),M.textContent=ot,Te=n(),p(k.$$.fragment),ye=n(),v=d("div"),p(I.$$.fragment),Ne=n(),J=d("p"),J.textContent=rt,Be=n(),Q=d("p"),Q.textContent=st,we=n(),p(S.$$.fragment),Pe=n(),b=d("div"),p(z.$$.fragment),Ve=n(),X=d("p"),X.textContent=dt,Ge=n(),Z=d("p"),Z.innerHTML=it,Ce=n(),p(A.$$.fragment),Ee=n(),h=d("div"),p(H.$$.fragment),Ue=n(),ee=d("p"),ee.textContent=lt,We=n(),te=d("p"),te.innerHTML=pt,Oe=n(),ae=d("p"),ae.innerHTML=ct,Fe=n(),p(N.$$.fragment),qe=n(),g=d("div"),p(B.$$.fragment),Re=n(),ne=d("p"),ne.textContent=mt,Ke=n(),oe=d("p"),oe.textContent=ft,Ye=n(),re=d("p"),re.innerHTML=_t,De=n(),p(V.$$.fragment),je=n(),x=d("div"),p(G.$$.fragment),Je=n(),se=d("p"),se.textContent=ut,Qe=n(),de=d("p"),de.textContent=ht,Le=n(),p(U.$$.fragment),Me=n(),y=d("div"),p(W.$$.fragment),Xe=n(),ie=d("p"),ie.textContent=gt,ke=n(),p(O.$$.fragment),Ie=n(),$=d("div"),p(R.$$.fragment),Ze=n(),le=d("p"),le.textContent=$t,et=n(),pe=d("p"),pe.innerHTML=vt,tt=n(),ce=d("p"),ce.textContent=bt,Se=n(),p(K.$$.fragment),ze=n(),he=d("p"),this.h()},l(e){const t=Ct("svelte-u9bgzb",document.head);T=i(t,"META",{name:!0,content:!0}),t.forEach(a),ge=o(e),ue=i(e,"P",{}),w(ue).forEach(a),$e=o(e),c(D.$$.fragment,e),ve=o(e),c(j.$$.fragment,e),be=o(e),L=i(e,"P",{"data-svelte-h":!0}),l(L)!=="svelte-1lozxs3"&&(L.textContent=nt),xe=o(e),M=i(e,"P",{"data-svelte-h":!0}),l(M)!=="svelte-lkesqg"&&(M.textContent=ot),Te=o(e),c(k.$$.fragment,e),ye=o(e),v=i(e,"DIV",{class:!0});var me=w(v);c(I.$$.fragment,me),Ne=o(me),J=i(me,"P",{"data-svelte-h":!0}),l(J)!=="svelte-xcbuq9"&&(J.textContent=rt),Be=o(me),Q=i(me,"P",{"data-svelte-h":!0}),l(Q)!=="svelte-1ezo696"&&(Q.textContent=st),me.forEach(a),we=o(e),c(S.$$.fragment,e),Pe=o(e),b=i(e,"DIV",{class:!0});var fe=w(b);c(z.$$.fragment,fe),Ve=o(fe),X=i(fe,"P",{"data-svelte-h":!0}),l(X)!=="svelte-1ibhfjd"&&(X.textContent=dt),Ge=o(fe),Z=i(fe,"P",{"data-svelte-h":!0}),l(Z)!=="svelte-fjkgve"&&(Z.innerHTML=it),fe.forEach(a),Ce=o(e),c(A.$$.fragment,e),Ee=o(e),h=i(e,"DIV",{class:!0});var C=w(h);c(H.$$.fragment,C),Ue=o(C),ee=i(C,"P",{"data-svelte-h":!0}),l(ee)!=="svelte-gnbqlm"&&(ee.textContent=lt),We=o(C),te=i(C,"P",{"data-svelte-h":!0}),l(te)!=="svelte-qojlyp"&&(te.innerHTML=pt),Oe=o(C),ae=i(C,"P",{"data-svelte-h":!0}),l(ae)!=="svelte-1o6kmyi"&&(ae.innerHTML=ct),C.forEach(a),Fe=o(e),c(N.$$.fragment,e),qe=o(e),g=i(e,"DIV",{class:!0});var E=w(g);c(B.$$.fragment,E),Re=o(E),ne=i(E,"P",{"data-svelte-h":!0}),l(ne)!=="svelte-pzx6vm"&&(ne.textContent=mt),Ke=o(E),oe=i(E,"P",{"data-svelte-h":!0}),l(oe)!=="svelte-1kmvq6f"&&(oe.textContent=ft),Ye=o(E),re=i(E,"P",{"data-svelte-h":!0}),l(re)!=="svelte-bdqa4j"&&(re.innerHTML=_t),E.forEach(a),De=o(e),c(V.$$.fragment,e),je=o(e),x=i(e,"DIV",{class:!0});var _e=w(x);c(G.$$.fragment,_e),Je=o(_e),se=i(_e,"P",{"data-svelte-h":!0}),l(se)!=="svelte-1rz47ta"&&(se.textContent=ut),Qe=o(_e),de=i(_e,"P",{"data-svelte-h":!0}),l(de)!=="svelte-1r4gjvt"&&(de.textContent=ht),_e.forEach(a),Le=o(e),c(U.$$.fragment,e),Me=o(e),y=i(e,"DIV",{class:!0});var He=w(y);c(W.$$.fragment,He),Xe=o(He),ie=i(He,"P",{"data-svelte-h":!0}),l(ie)!=="svelte-aqtirv"&&(ie.textContent=gt),He.forEach(a),ke=o(e),c(O.$$.fragment,e),Ie=o(e),$=i(e,"DIV",{class:!0});var F=w($);c(R.$$.fragment,F),Ze=o(F),le=i(F,"P",{"data-svelte-h":!0}),l(le)!=="svelte-prfap2"&&(le.textContent=$t),et=o(F),pe=i(F,"P",{"data-svelte-h":!0}),l(pe)!=="svelte-ex4z2t"&&(pe.innerHTML=vt),tt=o(F),ce=i(F,"P",{"data-svelte-h":!0}),l(ce)!=="svelte-2dtopq"&&(ce.textContent=bt),F.forEach(a),Se=o(e),c(K.$$.fragment,e),ze=o(e),he=i(e,"P",{}),w(he).forEach(a),this.h()},h(){P(T,"name","hf:doc:metadata"),P(T,"content",Dt),P(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P($,"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,t){r(document.head,T),s(e,ge,t),s(e,ue,t),s(e,$e,t),m(D,e,t),s(e,ve,t),m(j,e,t),s(e,be,t),s(e,L,t),s(e,xe,t),s(e,M,t),s(e,Te,t),m(k,e,t),s(e,ye,t),s(e,v,t),m(I,v,null),r(v,Ne),r(v,J),r(v,Be),r(v,Q),s(e,we,t),m(S,e,t),s(e,Pe,t),s(e,b,t),m(z,b,null),r(b,Ve),r(b,X),r(b,Ge),r(b,Z),s(e,Ce,t),m(A,e,t),s(e,Ee,t),s(e,h,t),m(H,h,null),r(h,Ue),r(h,ee),r(h,We),r(h,te),r(h,Oe),r(h,ae),s(e,Fe,t),m(N,e,t),s(e,qe,t),s(e,g,t),m(B,g,null),r(g,Re),r(g,ne),r(g,Ke),r(g,oe),r(g,Ye),r(g,re),s(e,De,t),m(V,e,t),s(e,je,t),s(e,x,t),m(G,x,null),r(x,Je),r(x,se),r(x,Qe),r(x,de),s(e,Le,t),m(U,e,t),s(e,Me,t),s(e,y,t),m(W,y,null),r(y,Xe),r(y,ie),s(e,ke,t),m(O,e,t),s(e,Ie,t),s(e,$,t),m(R,$,null),r($,Ze),r($,le),r($,et),r($,pe),r($,tt),r($,ce),s(e,Se,t),m(K,e,t),s(e,ze,t),s(e,he,t),Ae=!0},p:Tt,i(e){Ae||(f(D.$$.fragment,e),f(j.$$.fragment,e),f(k.$$.fragment,e),f(I.$$.fragment,e),f(S.$$.fragment,e),f(z.$$.fragment,e),f(A.$$.fragment,e),f(H.$$.fragment,e),f(N.$$.fragment,e),f(B.$$.fragment,e),f(V.$$.fragment,e),f(G.$$.fragment,e),f(U.$$.fragment,e),f(W.$$.fragment,e),f(O.$$.fragment,e),f(R.$$.fragment,e),f(K.$$.fragment,e),Ae=!0)},o(e){_(D.$$.fragment,e),_(j.$$.fragment,e),_(k.$$.fragment,e),_(I.$$.fragment,e),_(S.$$.fragment,e),_(z.$$.fragment,e),_(A.$$.fragment,e),_(H.$$.fragment,e),_(N.$$.fragment,e),_(B.$$.fragment,e),_(V.$$.fragment,e),_(G.$$.fragment,e),_(U.$$.fragment,e),_(W.$$.fragment,e),_(O.$$.fragment,e),_(R.$$.fragment,e),_(K.$$.fragment,e),Ae=!1},d(e){e&&(a(ge),a(ue),a($e),a(ve),a(be),a(L),a(xe),a(M),a(Te),a(ye),a(v),a(we),a(Pe),a(b),a(Ce),a(Ee),a(h),a(Fe),a(qe),a(g),a(De),a(je),a(x),a(Le),a(Me),a(y),a(ke),a(Ie),a($),a(Se),a(ze),a(he)),a(T),u(D,e),u(j,e),u(k,e),u(I),u(S,e),u(z),u(A,e),u(H),u(N,e),u(B),u(V,e),u(G),u(U,e),u(W),u(O,e),u(R),u(K,e)}}}const Dt='{"title":"Functions for PEFT integration","local":"functions-for-peft-integration","sections":[{"title":"Cast the adapter weight dtypes","local":"peft.tuners.tuners_utils.cast_adapter_dtype","sections":[],"depth":2},{"title":"Delete the PEFT adapter from model","local":"peft.tuners.tuners_utils.delete_adapter","sections":[],"depth":2},{"title":"Get the state dict of the PEFT adapter","local":"peft.get_peft_model_state_dict","sections":[],"depth":2},{"title":"Inject a PEFT adapter into the model based on a PEFT config","local":"peft.inject_adapter_in_model","sections":[],"depth":2},{"title":"Set the active PEFT adapter(s) of the model","local":"peft.tuners.tuners_utils.set_adapter","sections":[],"depth":2},{"title":"Set the requires_grad attribute of the specified adapters","local":"peft.tuners.tuners_utils.set_requires_grad","sections":[],"depth":2},{"title":"Load the weights of the PEFT state dict into the model","local":"peft.set_peft_model_state_dict","sections":[],"depth":2}],"depth":1}';function jt(at){return yt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class St extends wt{constructor(T){super(),Pt(this,T,jt,qt,xt,{})}}export{St as component};
