import{s as pt,n as ct,o as mt}from"../chunks/scheduler.4cd3e004.js";import{S as ft,i as _t,e as d,s as n,c as p,h as ut,a as l,d as a,b as o,f as C,g as c,j as i,k as F,l as r,m as s,n as m,t as f,o as _,p as u}from"../chunks/index.b664cb2d.js";import{D as ie}from"../chunks/Docstring.9ceb4334.js";import{H as V,E as ht}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.179b63f8.js";function gt(Oe){let T,me,pe,fe,E,_e,j,Re="A collection of functions that could be useful for non-PeftModel models, e.g. transformers or diffusers integration",ue,D,Ye="The functions provided here can be considered “public API” of PEFT and hence are safe to be used by packages that provide PEFT integrations.",he,L,ge,$,M,Le,W,Je="A helper method to cast the adapter weights to the correct dtype.",Me,O,Ke="Currently, this only upcasts float16 and bfloat16 to float32.",ve,k,$e,b,q,ke,R,Qe="Delete an existing PEFT adapter.",qe,Y,Xe=`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.`,be,I,xe,h,H,Ie,J,Ze="Get the state dict of the given adapter of the PEFT model.",He,K,et=`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>.`,Se,Q,tt=`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.`,Te,S,ye,g,A,Ae,X,at="Create PEFT layers and inject them into the model in-place.",Ne,Z,nt="Currently the API does not support prompt learning methods and adaption prompt.",ze,ee,ot=`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.`,we,N,Pe,x,z,Be,te,rt="Set the active PEFT adapter(s) of the model.",Ge,ae,st=`Active adapters are those adapters that participate in the forward pass. Use this function if you want to switch
between multiple PEFT adapters.`,Ce,B,Fe,v,G,Ue,ne,dt="Set the state dict of the PEFT model.",Ve,oe,lt=`Given a PEFT <code>state_dict</code> (as returned by <a href="/docs/peft/main/en/package_reference/functional#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/functional#peft.inject_adapter_in_model">inject_adapter_in_model()</a>).`,We,re,it=`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.`,Ee,U,je,ce,De;return E=new V({props:{title:"Functions for PEFT integration",local:"functions-for-peft-integration",headingTag:"h1"}}),L=new V({props:{title:"Cast the adapter weight dtypes",local:"peft.tuners.tuners_utils.cast_adapter_dtype",headingTag:"h2"}}),M=new ie({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#L1839"}}),k=new V({props:{title:"Delete the PEFT adapter from model",local:"peft.tuners.tuners_utils.delete_adapter",headingTag:"h2"}}),q=new ie({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#L1800",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>
`}}),I=new V({props:{title:"Get the state dict of the PEFT adapter",local:"peft.get_peft_model_state_dict",headingTag:"h2"}}),H=new ie({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#L57"}}),S=new V({props:{title:"Inject a PEFT adapter into the model based on a PEFT config",local:"peft.inject_adapter_in_model",headingTag:"h2"}}),A=new ie({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"}}),N=new V({props:{title:"Set the active PEFT adapter(s) of the model",local:"peft.tuners.tuners_utils.set_adapter",headingTag:"h2"}}),z=new ie({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#L1764"}}),B=new V({props:{title:"Load the weights of the PEFT state dict into the model",local:"peft.set_peft_model_state_dict",headingTag:"h2"}}),G=new ie({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#L405"}}),U=new ht({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/package_reference/functional.md"}}),{c(){T=d("meta"),me=n(),pe=d("p"),fe=n(),p(E.$$.fragment),_e=n(),j=d("p"),j.textContent=Re,ue=n(),D=d("p"),D.textContent=Ye,he=n(),p(L.$$.fragment),ge=n(),$=d("div"),p(M.$$.fragment),Le=n(),W=d("p"),W.textContent=Je,Me=n(),O=d("p"),O.textContent=Ke,ve=n(),p(k.$$.fragment),$e=n(),b=d("div"),p(q.$$.fragment),ke=n(),R=d("p"),R.textContent=Qe,qe=n(),Y=d("p"),Y.innerHTML=Xe,be=n(),p(I.$$.fragment),xe=n(),h=d("div"),p(H.$$.fragment),Ie=n(),J=d("p"),J.textContent=Ze,He=n(),K=d("p"),K.innerHTML=et,Se=n(),Q=d("p"),Q.innerHTML=tt,Te=n(),p(S.$$.fragment),ye=n(),g=d("div"),p(A.$$.fragment),Ae=n(),X=d("p"),X.textContent=at,Ne=n(),Z=d("p"),Z.textContent=nt,ze=n(),ee=d("p"),ee.innerHTML=ot,we=n(),p(N.$$.fragment),Pe=n(),x=d("div"),p(z.$$.fragment),Be=n(),te=d("p"),te.textContent=rt,Ge=n(),ae=d("p"),ae.textContent=st,Ce=n(),p(B.$$.fragment),Fe=n(),v=d("div"),p(G.$$.fragment),Ue=n(),ne=d("p"),ne.textContent=dt,Ve=n(),oe=d("p"),oe.innerHTML=lt,We=n(),re=d("p"),re.textContent=it,Ee=n(),p(U.$$.fragment),je=n(),ce=d("p"),this.h()},l(e){const t=ut("svelte-u9bgzb",document.head);T=l(t,"META",{name:!0,content:!0}),t.forEach(a),me=o(e),pe=l(e,"P",{}),C(pe).forEach(a),fe=o(e),c(E.$$.fragment,e),_e=o(e),j=l(e,"P",{"data-svelte-h":!0}),i(j)!=="svelte-1lozxs3"&&(j.textContent=Re),ue=o(e),D=l(e,"P",{"data-svelte-h":!0}),i(D)!=="svelte-lkesqg"&&(D.textContent=Ye),he=o(e),c(L.$$.fragment,e),ge=o(e),$=l(e,"DIV",{class:!0});var se=C($);c(M.$$.fragment,se),Le=o(se),W=l(se,"P",{"data-svelte-h":!0}),i(W)!=="svelte-xcbuq9"&&(W.textContent=Je),Me=o(se),O=l(se,"P",{"data-svelte-h":!0}),i(O)!=="svelte-duui02"&&(O.textContent=Ke),se.forEach(a),ve=o(e),c(k.$$.fragment,e),$e=o(e),b=l(e,"DIV",{class:!0});var de=C(b);c(q.$$.fragment,de),ke=o(de),R=l(de,"P",{"data-svelte-h":!0}),i(R)!=="svelte-1ibhfjd"&&(R.textContent=Qe),qe=o(de),Y=l(de,"P",{"data-svelte-h":!0}),i(Y)!=="svelte-fjkgve"&&(Y.innerHTML=Xe),de.forEach(a),be=o(e),c(I.$$.fragment,e),xe=o(e),h=l(e,"DIV",{class:!0});var y=C(h);c(H.$$.fragment,y),Ie=o(y),J=l(y,"P",{"data-svelte-h":!0}),i(J)!=="svelte-gnbqlm"&&(J.textContent=Ze),He=o(y),K=l(y,"P",{"data-svelte-h":!0}),i(K)!=="svelte-qojlyp"&&(K.innerHTML=et),Se=o(y),Q=l(y,"P",{"data-svelte-h":!0}),i(Q)!=="svelte-1o6kmyi"&&(Q.innerHTML=tt),y.forEach(a),Te=o(e),c(S.$$.fragment,e),ye=o(e),g=l(e,"DIV",{class:!0});var w=C(g);c(A.$$.fragment,w),Ae=o(w),X=l(w,"P",{"data-svelte-h":!0}),i(X)!=="svelte-pzx6vm"&&(X.textContent=at),Ne=o(w),Z=l(w,"P",{"data-svelte-h":!0}),i(Z)!=="svelte-1kmvq6f"&&(Z.textContent=nt),ze=o(w),ee=l(w,"P",{"data-svelte-h":!0}),i(ee)!=="svelte-bdqa4j"&&(ee.innerHTML=ot),w.forEach(a),we=o(e),c(N.$$.fragment,e),Pe=o(e),x=l(e,"DIV",{class:!0});var le=C(x);c(z.$$.fragment,le),Be=o(le),te=l(le,"P",{"data-svelte-h":!0}),i(te)!=="svelte-1rz47ta"&&(te.textContent=rt),Ge=o(le),ae=l(le,"P",{"data-svelte-h":!0}),i(ae)!=="svelte-1r4gjvt"&&(ae.textContent=st),le.forEach(a),Ce=o(e),c(B.$$.fragment,e),Fe=o(e),v=l(e,"DIV",{class:!0});var P=C(v);c(G.$$.fragment,P),Ue=o(P),ne=l(P,"P",{"data-svelte-h":!0}),i(ne)!=="svelte-prfap2"&&(ne.textContent=dt),Ve=o(P),oe=l(P,"P",{"data-svelte-h":!0}),i(oe)!=="svelte-k7vwrp"&&(oe.innerHTML=lt),We=o(P),re=l(P,"P",{"data-svelte-h":!0}),i(re)!=="svelte-2dtopq"&&(re.textContent=it),P.forEach(a),Ee=o(e),c(U.$$.fragment,e),je=o(e),ce=l(e,"P",{}),C(ce).forEach(a),this.h()},h(){F(T,"name","hf:doc:metadata"),F(T,"content",vt),F($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(v,"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,me,t),s(e,pe,t),s(e,fe,t),m(E,e,t),s(e,_e,t),s(e,j,t),s(e,ue,t),s(e,D,t),s(e,he,t),m(L,e,t),s(e,ge,t),s(e,$,t),m(M,$,null),r($,Le),r($,W),r($,Me),r($,O),s(e,ve,t),m(k,e,t),s(e,$e,t),s(e,b,t),m(q,b,null),r(b,ke),r(b,R),r(b,qe),r(b,Y),s(e,be,t),m(I,e,t),s(e,xe,t),s(e,h,t),m(H,h,null),r(h,Ie),r(h,J),r(h,He),r(h,K),r(h,Se),r(h,Q),s(e,Te,t),m(S,e,t),s(e,ye,t),s(e,g,t),m(A,g,null),r(g,Ae),r(g,X),r(g,Ne),r(g,Z),r(g,ze),r(g,ee),s(e,we,t),m(N,e,t),s(e,Pe,t),s(e,x,t),m(z,x,null),r(x,Be),r(x,te),r(x,Ge),r(x,ae),s(e,Ce,t),m(B,e,t),s(e,Fe,t),s(e,v,t),m(G,v,null),r(v,Ue),r(v,ne),r(v,Ve),r(v,oe),r(v,We),r(v,re),s(e,Ee,t),m(U,e,t),s(e,je,t),s(e,ce,t),De=!0},p:ct,i(e){De||(f(E.$$.fragment,e),f(L.$$.fragment,e),f(M.$$.fragment,e),f(k.$$.fragment,e),f(q.$$.fragment,e),f(I.$$.fragment,e),f(H.$$.fragment,e),f(S.$$.fragment,e),f(A.$$.fragment,e),f(N.$$.fragment,e),f(z.$$.fragment,e),f(B.$$.fragment,e),f(G.$$.fragment,e),f(U.$$.fragment,e),De=!0)},o(e){_(E.$$.fragment,e),_(L.$$.fragment,e),_(M.$$.fragment,e),_(k.$$.fragment,e),_(q.$$.fragment,e),_(I.$$.fragment,e),_(H.$$.fragment,e),_(S.$$.fragment,e),_(A.$$.fragment,e),_(N.$$.fragment,e),_(z.$$.fragment,e),_(B.$$.fragment,e),_(G.$$.fragment,e),_(U.$$.fragment,e),De=!1},d(e){e&&(a(me),a(pe),a(fe),a(_e),a(j),a(ue),a(D),a(he),a(ge),a($),a(ve),a($e),a(b),a(be),a(xe),a(h),a(Te),a(ye),a(g),a(we),a(Pe),a(x),a(Ce),a(Fe),a(v),a(Ee),a(je),a(ce)),a(T),u(E,e),u(L,e),u(M),u(k,e),u(q),u(I,e),u(H),u(S,e),u(A),u(N,e),u(z),u(B,e),u(G),u(U,e)}}}const vt='{"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":"Load the weights of the PEFT state dict into the model","local":"peft.set_peft_model_state_dict","sections":[],"depth":2}],"depth":1}';function $t(Oe){return mt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends ft{constructor(T){super(),_t(this,T,$t,gt,pt,{})}}export{wt as component};
