import{s as qa,o as Aa,n as Ja}from"../chunks/scheduler.4cd3e004.js";import{S as Ra,i as Ga,e as n,s as a,c as u,h as Xa,a as s,d as l,b as r,f as b,g as c,j as i,k as v,l as e,m as T,n as m,t as f,o as g,p as h}from"../chunks/index.b664cb2d.js";import{D as y}from"../chunks/Docstring.9ceb4334.js";import{C as za}from"../chunks/CodeBlock.8601e34e.js";import{E as Qa}from"../chunks/ExampleCodeBlock.4f57b575.js";import{H as da,E as Sa}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.179b63f8.js";function Oa(tt){let $,X="Example:",k,w,B;return w=new za({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBZnJvbSUyMHBlZnQlMjBpbXBvcnQlMjBQZWZ0TW9kZWwlMEElMEFtb2RlbF9pZCUyMCUzRCUyMC4uLiUwQWJhc2VfbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBcGVmdF9tb2RlbF9pZCUyMCUzRCUyMC4uLiUwQW1vZGVsJTIwJTNEJTIwUGVmdE1vZGVsLmZyb21fcHJldHJhaW5lZChiYXNlX21vZGVsJTJDJTIwcGVmdF9tb2RlbF9pZCklMEFtZXJnZWRfbW9kZWwlMjAlM0QlMjBtb2RlbC5tZXJnZV9hbmRfdW5sb2FkKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = ...
<span class="hljs-meta">&gt;&gt;&gt; </span>base_model = AutoModelForCausalLM.from_pretrained(model_id)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model_id = ...
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PeftModel.from_pretrained(base_model, peft_model_id)
<span class="hljs-meta">&gt;&gt;&gt; </span>merged_model = model.merge_and_unload()`,wrap:!1}}),{c(){$=n("p"),$.textContent=X,k=a(),u(w.$$.fragment)},l(_){$=s(_,"P",{"data-svelte-h":!0}),i($)!=="svelte-11lpom8"&&($.textContent=X),k=r(_),c(w.$$.fragment,_)},m(_,P){T(_,$,P),T(_,k,P),m(w,_,P),B=!0},p:Ja,i(_){B||(f(w.$$.fragment,_),B=!0)},o(_){g(w.$$.fragment,_),B=!1},d(_){_&&(l($),l(k)),h(w,_)}}}function Ya(tt){let $,X,k,w,B,_,P,ia="A tuner (or adapter) is a module that can be plugged into a <code>torch.nn.Module</code>. <code>BaseTuner</code> base class for other tuners and provides shared methods and attributes for preparing an adapter configuration and replacing a target module with the adapter module. <code>BaseTunerLayer</code> is a base class for adapter layers. It offers methods and attributes for managing adapters such as activating and disabling adapters.",at,z,rt,o,Q,ft,fe,pa=`A base tuner model that provides the common methods and attributes for all tuners that are injectable into a
torch.nn.Module`,gt,ge,ua="For adding a new Tuner class, one needs to overwrite the following methods:",ht,he,ca=`<li><strong>_prepare_adapter_config</strong>:
A private method to eventually prepare the adapter config, for example in case the field <code>target_modules</code> is
missing.</li> <li><strong>_create_and_replace</strong>:
A private method to create and replace the target module with the adapter module.</li> <li><strong>_check_target_module_exists</strong>:
A private helper method to check if the passed module’s key name matches any of the target modules in the
adapter_config.</li>`,_t,_e,ma="The easiest is to check what is done in the <code>peft.tuners.lora.LoraModel</code> class.",bt,H,S,vt,be,fa="Deletes an existing adapter.",$t,D,O,xt,ve,ga="Disable all adapters in-place.",yt,$e,ha="When disabling all adapters, the model output corresponds to the output of the base model.",Tt,U,Y,Ct,xe,_a="Enable all adapters in-place",wt,q,K,Bt,ye,ba=`This method gets the config from a model in dictionary form. If model has not attribute config, then this
method returns a default config.`,Lt,E,ee,Mt,Te,va=`Creates adapter layers and replaces the target modules with the adapter layers. This method is called under the
hood by <code>peft.mapping.get_peft_model</code> if a non-prompt tuning adapter class is passed.`,Pt,Ce,$a="The corresponding PEFT config is directly retrieved from the <code>peft_config</code> attribute of the BaseTuner class.",kt,j,te,Dt,we,xa="This method merges the adapter layers into the base model.",Et,Be,ya=`Merging adapters can lead to a speed up of the forward pass. A copy of the adapter weights is still kept in
memory, which is required to unmerge the adapters. In order to merge the adapter weights without keeping them
in memory, please call <code>merge_and_unload</code>.`,jt,C,ae,Ft,Le,Ta="This method merges the adapter layers into the base model.",It,Me,Ca=`This is needed if someone wants to use the base model as a standalone model. The returned model has the same
architecture as the original base model.`,Wt,Pe,wa="It is important to assign the returned model to a variable and use it, this is not an in-place operation!",Vt,A,Zt,J,re,Nt,ke,Ba="Set the active adapter(s).",Ht,F,ne,Ut,De,La="Sets the active adapter(s) on auxiliary modules.",qt,Ee,Ma=`If the subclass (e.g. <code>LoraModel</code>) supports auxiliary modules like <code>modules_to_save</code>, it should call this
method in <code>set_adapter</code> to ensure that those auxiliary modules are being set correctly.`,At,I,se,Jt,je,Pa="Return the base model by removing all the PEFT modules.",Rt,Fe,ka="It is important to assign the returned model to a variable and use it, this is not an in-place operation!",Gt,R,oe,Xt,Ie,Da="This method unmerges all merged adapter layers from the base model.",nt,le,st,x,de,zt,We,Ea="A tuner layer mixin that provides the common methods and attributes for all tuners.",Qt,L,ie,St,Ve,ja="Delete an adapter from the layer",Ot,Ze,Fa="This should be called on all adapter layers, or else we will get an inconsistent state.",Yt,Ne,Ia=`This method will also set a new active adapter if the deleted adapter was an active adapter. It is important
that the new adapter is chosen in a deterministic way, so that the same adapter is chosen on all layers.`,Kt,W,pe,ea,He,Wa="Toggle the enabling and disabling of adapters",ta,Ue,Va="Takes care of setting the requires_grad flag for the adapter weights.",aa,V,ue,ra,qe,Za="(Recursively) get the base_layer.",na,Ae,Na="This is necessary for the case that the tuner layer wraps another tuner layer.",sa,Z,ce,oa,Je,Ha="Set the active adapter(s).",la,Re,Ua=`Additionally, this function will set the specified adapter to trainable (i.e., requires_grad=True) unless
inference_mode is True.`,ot,me,lt,et,dt;return B=new da({props:{title:"Tuners",local:"tuners",headingTag:"h1"}}),z=new da({props:{title:"BaseTuner",local:"peft.tuners.tuners_utils.BaseTuner",headingTag:"h2"}}),Q=new y({props:{name:"class peft.tuners.tuners_utils.BaseTuner",anchor:"peft.tuners.tuners_utils.BaseTuner",parameters:[{name:"model",val:""},{name:"peft_config",val:": Union[PeftConfig, dict[str, PeftConfig]]"},{name:"adapter_name",val:": str"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"state_dict",val:": Optional[dict[str, torch.Tensor]] = None"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.model",description:`<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014;
The model to which the adapter tuner layers will be attached.`,name:"model"},{anchor:"peft.tuners.tuners_utils.BaseTuner.forward",description:`<strong>forward</strong> (<code>Callable</code>) &#x2014;
The forward method of the model.`,name:"forward"},{anchor:"peft.tuners.tuners_utils.BaseTuner.peft_config",description:`<strong>peft_config</strong> (<code>Union[</code>PeftConfig<code>, dict[str, PeftConfig]]</code>) &#x2014;
The adapter configuration object, it should be a dictionary of <code>str</code> to <code>PeftConfig</code> objects. One can also
pass a PeftConfig object and a new adapter will be created with the default name <code>adapter</code> or create a new
dictionary with a key <code>adapter_name</code> and a value of that peft config.`,name:"peft_config"},{anchor:"peft.tuners.tuners_utils.BaseTuner.config",description:`<strong>config</strong> (<code>dict[str, Any]</code>) &#x2014;
The model configuration object, it should be a dictionary of <code>str</code> to <code>Any</code> objects.`,name:"config"},{anchor:"peft.tuners.tuners_utils.BaseTuner.targeted_module_names",description:`<strong>targeted_module_names</strong> (<code>list[str]</code>) &#x2014;
The list of module names that were actually adapted. Can be useful to inspect if you want to quickly
double-check that the <code>config.target_modules</code> were specified correctly.`,name:"targeted_module_names"},{anchor:"peft.tuners.tuners_utils.BaseTuner.targeted_parameter_names",description:`<strong>targeted_parameter_names</strong> (<code>list[str]</code>) &#x2014;
The list of parameter names that were actually adapted. Can be useful to inspect if you want to quickly
double-check that the <code>config.target_parameters</code> were specified correctly.`,name:"targeted_parameter_names"},{anchor:"peft.tuners.tuners_utils.BaseTuner.prefix",description:`<strong>prefix</strong> (<code>str</code>) &#x2014;
The PEFT-method specific unique prefix. E.g. <code>&quot;lora_&quot;</code> for LoRA.`,name:"prefix"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L210"}}),S=new y({props:{name:"delete_adapter",anchor:"peft.tuners.tuners_utils.BaseTuner.delete_adapter",parameters:[{name:"adapter_name",val:": str"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.delete_adapter.adapter_name",description:"<strong>adapter_name</strong> (str) &#x2014; Name of the adapter to be deleted.",name:"adapter_name"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L470"}}),O=new y({props:{name:"disable_adapter_layers",anchor:"peft.tuners.tuners_utils.BaseTuner.disable_adapter_layers",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L446"}}),Y=new y({props:{name:"enable_adapter_layers",anchor:"peft.tuners.tuners_utils.BaseTuner.enable_adapter_layers",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L463"}}),K=new y({props:{name:"get_model_config",anchor:"peft.tuners.tuners_utils.BaseTuner.get_model_config",parameters:[{name:"model",val:": nn.Module"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.get_model_config.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
Model to get the config from.`,name:"model"},{anchor:"peft.tuners.tuners_utils.BaseTuner.get_model_config.default",description:`<strong>default</strong> (<code>dict|None</code>, <em>optional</em>) &#x2014;:
What to return if model does not have a config attribute.`,name:"default"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1126"}}),ee=new y({props:{name:"inject_adapter",anchor:"peft.tuners.tuners_utils.BaseTuner.inject_adapter",parameters:[{name:"model",val:": nn.Module"},{name:"adapter_name",val:": str"},{name:"autocast_adapter_dtype",val:": bool = True"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"state_dict",val:": Optional[dict[str, torch.Tensor]] = None"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.inject_adapter.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model to be tuned.`,name:"model"},{anchor:"peft.tuners.tuners_utils.BaseTuner.inject_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The adapter name.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.BaseTuner.inject_adapter.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"},{anchor:"peft.tuners.tuners_utils.BaseTuner.inject_adapter.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.tuners.tuners_utils.BaseTuner.inject_adapter.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If a state_dict 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 state_dict 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/tuners/tuners_utils.py#L650"}}),te=new y({props:{name:"merge_adapter",anchor:"peft.tuners.tuners_utils.BaseTuner.merge_adapter",parameters:[{name:"adapter_names",val:": Optional[list[str]] = None"},{name:"safe_merge",val:": bool = False"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_adapter.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>, <em>optional</em>) &#x2014;
The list of adapter names that should be merged. If <code>None</code>, all active adapters will be merged.
Defaults to <code>None</code>.`,name:"adapter_names"},{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_adapter.safe_merge",description:`<strong>safe_merge</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, the merge operation will be performed in a copy of the original weights and check for NaNs
before merging the weights. This is useful if you want to check if the merge operation will produce
NaNs. Defaults to <code>False</code>.`,name:"safe_merge"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1059"}}),ae=new y({props:{name:"merge_and_unload",anchor:"peft.tuners.tuners_utils.BaseTuner.merge_and_unload",parameters:[{name:"progressbar",val:": bool = False"},{name:"safe_merge",val:": bool = False"},{name:"adapter_names",val:": Optional[list[str]] = None"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_and_unload.progressbar",description:`<strong>progressbar</strong> (<code>bool</code>) &#x2014;
whether to show a progressbar indicating the unload and merge process (default: False).`,name:"progressbar"},{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_and_unload.safe_merge",description:`<strong>safe_merge</strong> (<code>bool</code>) &#x2014;
whether to activate the safe merging check to check if there is any potential Nan in the adapter
weights.`,name:"safe_merge"},{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_and_unload.adapter_names",description:`<strong>adapter_names</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of adapter names that should be merged. If None, all active adapters will be merged. Defaults
to <code>None</code>.`,name:"adapter_names"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L593"}}),A=new Qa({props:{anchor:"peft.tuners.tuners_utils.BaseTuner.merge_and_unload.example",$$slots:{default:[Oa]},$$scope:{ctx:tt}}}),re=new y({props:{name:"set_adapter",anchor:"peft.tuners.tuners_utils.BaseTuner.set_adapter",parameters:[{name:"adapter_name",val:": str | list[str]"},{name:"inference_mode",val:": bool = False"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.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.BaseTuner.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"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1112"}}),ne=new y({props:{name:"set_auxiliary_adapters",anchor:"peft.tuners.tuners_utils.BaseTuner.set_auxiliary_adapters",parameters:[{name:"adapter_name",val:": str | list[str]"},{name:"inference_mode",val:": bool"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTuner.set_auxiliary_adapters.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code> or <code>list[str]</code>) &#x2014;
The name(s) of the adapter(s) to be set as active. The adapters must be loaded first.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.BaseTuner.set_auxiliary_adapters.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"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1097"}}),se=new y({props:{name:"unload",anchor:"peft.tuners.tuners_utils.BaseTuner.unload",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L631"}}),oe=new y({props:{name:"unmerge_adapter",anchor:"peft.tuners.tuners_utils.BaseTuner.unmerge_adapter",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1088"}}),le=new da({props:{title:"BaseTunerLayer",local:"peft.tuners.tuners_utils.BaseTunerLayer",headingTag:"h2"}}),de=new y({props:{name:"class peft.tuners.tuners_utils.BaseTunerLayer",anchor:"peft.tuners.tuners_utils.BaseTunerLayer",parameters:[],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.is_pluggable",description:`<strong>is_pluggable</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether the adapter layer can be plugged to any pytorch module`,name:"is_pluggable"},{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.active_adapters",description:`<strong>active_adapters</strong> (Union[List<code>str</code>, <code>str</code>], <em>optional</em>) &#x2014;
The name of the active adapter.`,name:"active_adapters"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1167"}}),ie=new y({props:{name:"delete_adapter",anchor:"peft.tuners.tuners_utils.BaseTunerLayer.delete_adapter",parameters:[{name:"adapter_name",val:": str"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.delete_adapter.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>) &#x2014; The name of the adapter to delete",name:"adapter_name"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1319"}}),pe=new y({props:{name:"enable_adapters",anchor:"peft.tuners.tuners_utils.BaseTunerLayer.enable_adapters",parameters:[{name:"enabled",val:": bool"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.enable_adapters.enabled",description:"<strong>enabled</strong> (bool) &#x2014; True to enable adapters, False to disable adapters",name:"enabled"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1262"}}),ue=new y({props:{name:"get_base_layer",anchor:"peft.tuners.tuners_utils.BaseTunerLayer.get_base_layer",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1192"}}),ce=new y({props:{name:"set_adapter",anchor:"peft.tuners.tuners_utils.BaseTunerLayer.set_adapter",parameters:[{name:"adapter_names",val:": str | list[str]"},{name:"inference_mode",val:": bool = False"}],parametersDescription:[{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.set_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code> or <code>list[str]</code>) &#x2014;
The name(s) of the adapter(s) to set as active.`,name:"adapter_name"},{anchor:"peft.tuners.tuners_utils.BaseTunerLayer.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"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/tuners/tuners_utils.py#L1280"}}),me=new Sa({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/package_reference/tuners.md"}}),{c(){$=n("meta"),X=a(),k=n("p"),w=a(),u(B.$$.fragment),_=a(),P=n("p"),P.innerHTML=ia,at=a(),u(z.$$.fragment),rt=a(),o=n("div"),u(Q.$$.fragment),ft=a(),fe=n("p"),fe.textContent=pa,gt=a(),ge=n("p"),ge.textContent=ua,ht=a(),he=n("ul"),he.innerHTML=ca,_t=a(),_e=n("p"),_e.innerHTML=ma,bt=a(),H=n("div"),u(S.$$.fragment),vt=a(),be=n("p"),be.textContent=fa,$t=a(),D=n("div"),u(O.$$.fragment),xt=a(),ve=n("p"),ve.textContent=ga,yt=a(),$e=n("p"),$e.textContent=ha,Tt=a(),U=n("div"),u(Y.$$.fragment),Ct=a(),xe=n("p"),xe.textContent=_a,wt=a(),q=n("div"),u(K.$$.fragment),Bt=a(),ye=n("p"),ye.textContent=ba,Lt=a(),E=n("div"),u(ee.$$.fragment),Mt=a(),Te=n("p"),Te.innerHTML=va,Pt=a(),Ce=n("p"),Ce.innerHTML=$a,kt=a(),j=n("div"),u(te.$$.fragment),Dt=a(),we=n("p"),we.textContent=xa,Et=a(),Be=n("p"),Be.innerHTML=ya,jt=a(),C=n("div"),u(ae.$$.fragment),Ft=a(),Le=n("p"),Le.textContent=Ta,It=a(),Me=n("p"),Me.textContent=Ca,Wt=a(),Pe=n("p"),Pe.textContent=wa,Vt=a(),u(A.$$.fragment),Zt=a(),J=n("div"),u(re.$$.fragment),Nt=a(),ke=n("p"),ke.textContent=Ba,Ht=a(),F=n("div"),u(ne.$$.fragment),Ut=a(),De=n("p"),De.textContent=La,qt=a(),Ee=n("p"),Ee.innerHTML=Ma,At=a(),I=n("div"),u(se.$$.fragment),Jt=a(),je=n("p"),je.textContent=Pa,Rt=a(),Fe=n("p"),Fe.textContent=ka,Gt=a(),R=n("div"),u(oe.$$.fragment),Xt=a(),Ie=n("p"),Ie.textContent=Da,nt=a(),u(le.$$.fragment),st=a(),x=n("div"),u(de.$$.fragment),zt=a(),We=n("p"),We.textContent=Ea,Qt=a(),L=n("div"),u(ie.$$.fragment),St=a(),Ve=n("p"),Ve.textContent=ja,Ot=a(),Ze=n("p"),Ze.textContent=Fa,Yt=a(),Ne=n("p"),Ne.textContent=Ia,Kt=a(),W=n("div"),u(pe.$$.fragment),ea=a(),He=n("p"),He.textContent=Wa,ta=a(),Ue=n("p"),Ue.textContent=Va,aa=a(),V=n("div"),u(ue.$$.fragment),ra=a(),qe=n("p"),qe.textContent=Za,na=a(),Ae=n("p"),Ae.textContent=Na,sa=a(),Z=n("div"),u(ce.$$.fragment),oa=a(),Je=n("p"),Je.textContent=Ha,la=a(),Re=n("p"),Re.textContent=Ua,ot=a(),u(me.$$.fragment),lt=a(),et=n("p"),this.h()},l(t){const p=Xa("svelte-u9bgzb",document.head);$=s(p,"META",{name:!0,content:!0}),p.forEach(l),X=r(t),k=s(t,"P",{}),b(k).forEach(l),w=r(t),c(B.$$.fragment,t),_=r(t),P=s(t,"P",{"data-svelte-h":!0}),i(P)!=="svelte-dsnslo"&&(P.innerHTML=ia),at=r(t),c(z.$$.fragment,t),rt=r(t),o=s(t,"DIV",{class:!0});var d=b(o);c(Q.$$.fragment,d),ft=r(d),fe=s(d,"P",{"data-svelte-h":!0}),i(fe)!=="svelte-1k0hvlq"&&(fe.textContent=pa),gt=r(d),ge=s(d,"P",{"data-svelte-h":!0}),i(ge)!=="svelte-fkgwsm"&&(ge.textContent=ua),ht=r(d),he=s(d,"UL",{"data-svelte-h":!0}),i(he)!=="svelte-uumdnf"&&(he.innerHTML=ca),_t=r(d),_e=s(d,"P",{"data-svelte-h":!0}),i(_e)!=="svelte-1sc4mfu"&&(_e.innerHTML=ma),bt=r(d),H=s(d,"DIV",{class:!0});var it=b(H);c(S.$$.fragment,it),vt=r(it),be=s(it,"P",{"data-svelte-h":!0}),i(be)!=="svelte-1cw64z1"&&(be.textContent=fa),it.forEach(l),$t=r(d),D=s(d,"DIV",{class:!0});var Ge=b(D);c(O.$$.fragment,Ge),xt=r(Ge),ve=s(Ge,"P",{"data-svelte-h":!0}),i(ve)!=="svelte-1hrol74"&&(ve.textContent=ga),yt=r(Ge),$e=s(Ge,"P",{"data-svelte-h":!0}),i($e)!=="svelte-1ecn6m6"&&($e.textContent=ha),Ge.forEach(l),Tt=r(d),U=s(d,"DIV",{class:!0});var pt=b(U);c(Y.$$.fragment,pt),Ct=r(pt),xe=s(pt,"P",{"data-svelte-h":!0}),i(xe)!=="svelte-1l6xdbj"&&(xe.textContent=_a),pt.forEach(l),wt=r(d),q=s(d,"DIV",{class:!0});var ut=b(q);c(K.$$.fragment,ut),Bt=r(ut),ye=s(ut,"P",{"data-svelte-h":!0}),i(ye)!=="svelte-wp66wq"&&(ye.textContent=ba),ut.forEach(l),Lt=r(d),E=s(d,"DIV",{class:!0});var Xe=b(E);c(ee.$$.fragment,Xe),Mt=r(Xe),Te=s(Xe,"P",{"data-svelte-h":!0}),i(Te)!=="svelte-1ybn6sj"&&(Te.innerHTML=va),Pt=r(Xe),Ce=s(Xe,"P",{"data-svelte-h":!0}),i(Ce)!=="svelte-fvf2kw"&&(Ce.innerHTML=$a),Xe.forEach(l),kt=r(d),j=s(d,"DIV",{class:!0});var ze=b(j);c(te.$$.fragment,ze),Dt=r(ze),we=s(ze,"P",{"data-svelte-h":!0}),i(we)!=="svelte-kun7ud"&&(we.textContent=xa),Et=r(ze),Be=s(ze,"P",{"data-svelte-h":!0}),i(Be)!=="svelte-1f1s101"&&(Be.innerHTML=ya),ze.forEach(l),jt=r(d),C=s(d,"DIV",{class:!0});var N=b(C);c(ae.$$.fragment,N),Ft=r(N),Le=s(N,"P",{"data-svelte-h":!0}),i(Le)!=="svelte-kun7ud"&&(Le.textContent=Ta),It=r(N),Me=s(N,"P",{"data-svelte-h":!0}),i(Me)!=="svelte-1xvyps2"&&(Me.textContent=Ca),Wt=r(N),Pe=s(N,"P",{"data-svelte-h":!0}),i(Pe)!=="svelte-1t73dx4"&&(Pe.textContent=wa),Vt=r(N),c(A.$$.fragment,N),N.forEach(l),Zt=r(d),J=s(d,"DIV",{class:!0});var ct=b(J);c(re.$$.fragment,ct),Nt=r(ct),ke=s(ct,"P",{"data-svelte-h":!0}),i(ke)!=="svelte-8teaja"&&(ke.textContent=Ba),ct.forEach(l),Ht=r(d),F=s(d,"DIV",{class:!0});var Qe=b(F);c(ne.$$.fragment,Qe),Ut=r(Qe),De=s(Qe,"P",{"data-svelte-h":!0}),i(De)!=="svelte-4dpw8p"&&(De.textContent=La),qt=r(Qe),Ee=s(Qe,"P",{"data-svelte-h":!0}),i(Ee)!=="svelte-y2ktyw"&&(Ee.innerHTML=Ma),Qe.forEach(l),At=r(d),I=s(d,"DIV",{class:!0});var Se=b(I);c(se.$$.fragment,Se),Jt=r(Se),je=s(Se,"P",{"data-svelte-h":!0}),i(je)!=="svelte-5oaxgp"&&(je.textContent=Pa),Rt=r(Se),Fe=s(Se,"P",{"data-svelte-h":!0}),i(Fe)!=="svelte-1t73dx4"&&(Fe.textContent=ka),Se.forEach(l),Gt=r(d),R=s(d,"DIV",{class:!0});var mt=b(R);c(oe.$$.fragment,mt),Xt=r(mt),Ie=s(mt,"P",{"data-svelte-h":!0}),i(Ie)!=="svelte-2eloeq"&&(Ie.textContent=Da),mt.forEach(l),d.forEach(l),nt=r(t),c(le.$$.fragment,t),st=r(t),x=s(t,"DIV",{class:!0});var M=b(x);c(de.$$.fragment,M),zt=r(M),We=s(M,"P",{"data-svelte-h":!0}),i(We)!=="svelte-1fdxdjn"&&(We.textContent=Ea),Qt=r(M),L=s(M,"DIV",{class:!0});var G=b(L);c(ie.$$.fragment,G),St=r(G),Ve=s(G,"P",{"data-svelte-h":!0}),i(Ve)!=="svelte-950rwb"&&(Ve.textContent=ja),Ot=r(G),Ze=s(G,"P",{"data-svelte-h":!0}),i(Ze)!=="svelte-1nnxg1l"&&(Ze.textContent=Fa),Yt=r(G),Ne=s(G,"P",{"data-svelte-h":!0}),i(Ne)!=="svelte-1vxxy19"&&(Ne.textContent=Ia),G.forEach(l),Kt=r(M),W=s(M,"DIV",{class:!0});var Oe=b(W);c(pe.$$.fragment,Oe),ea=r(Oe),He=s(Oe,"P",{"data-svelte-h":!0}),i(He)!=="svelte-2or2k8"&&(He.textContent=Wa),ta=r(Oe),Ue=s(Oe,"P",{"data-svelte-h":!0}),i(Ue)!=="svelte-ujp0ui"&&(Ue.textContent=Va),Oe.forEach(l),aa=r(M),V=s(M,"DIV",{class:!0});var Ye=b(V);c(ue.$$.fragment,Ye),ra=r(Ye),qe=s(Ye,"P",{"data-svelte-h":!0}),i(qe)!=="svelte-6rdpda"&&(qe.textContent=Za),na=r(Ye),Ae=s(Ye,"P",{"data-svelte-h":!0}),i(Ae)!=="svelte-dptqqh"&&(Ae.textContent=Na),Ye.forEach(l),sa=r(M),Z=s(M,"DIV",{class:!0});var Ke=b(Z);c(ce.$$.fragment,Ke),oa=r(Ke),Je=s(Ke,"P",{"data-svelte-h":!0}),i(Je)!=="svelte-8teaja"&&(Je.textContent=Ha),la=r(Ke),Re=s(Ke,"P",{"data-svelte-h":!0}),i(Re)!=="svelte-1020tdh"&&(Re.textContent=Ua),Ke.forEach(l),M.forEach(l),ot=r(t),c(me.$$.fragment,t),lt=r(t),et=s(t,"P",{}),b(et).forEach(l),this.h()},h(){v($,"name","hf:doc:metadata"),v($,"content",Ka),v(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,$),T(t,X,p),T(t,k,p),T(t,w,p),m(B,t,p),T(t,_,p),T(t,P,p),T(t,at,p),m(z,t,p),T(t,rt,p),T(t,o,p),m(Q,o,null),e(o,ft),e(o,fe),e(o,gt),e(o,ge),e(o,ht),e(o,he),e(o,_t),e(o,_e),e(o,bt),e(o,H),m(S,H,null),e(H,vt),e(H,be),e(o,$t),e(o,D),m(O,D,null),e(D,xt),e(D,ve),e(D,yt),e(D,$e),e(o,Tt),e(o,U),m(Y,U,null),e(U,Ct),e(U,xe),e(o,wt),e(o,q),m(K,q,null),e(q,Bt),e(q,ye),e(o,Lt),e(o,E),m(ee,E,null),e(E,Mt),e(E,Te),e(E,Pt),e(E,Ce),e(o,kt),e(o,j),m(te,j,null),e(j,Dt),e(j,we),e(j,Et),e(j,Be),e(o,jt),e(o,C),m(ae,C,null),e(C,Ft),e(C,Le),e(C,It),e(C,Me),e(C,Wt),e(C,Pe),e(C,Vt),m(A,C,null),e(o,Zt),e(o,J),m(re,J,null),e(J,Nt),e(J,ke),e(o,Ht),e(o,F),m(ne,F,null),e(F,Ut),e(F,De),e(F,qt),e(F,Ee),e(o,At),e(o,I),m(se,I,null),e(I,Jt),e(I,je),e(I,Rt),e(I,Fe),e(o,Gt),e(o,R),m(oe,R,null),e(R,Xt),e(R,Ie),T(t,nt,p),m(le,t,p),T(t,st,p),T(t,x,p),m(de,x,null),e(x,zt),e(x,We),e(x,Qt),e(x,L),m(ie,L,null),e(L,St),e(L,Ve),e(L,Ot),e(L,Ze),e(L,Yt),e(L,Ne),e(x,Kt),e(x,W),m(pe,W,null),e(W,ea),e(W,He),e(W,ta),e(W,Ue),e(x,aa),e(x,V),m(ue,V,null),e(V,ra),e(V,qe),e(V,na),e(V,Ae),e(x,sa),e(x,Z),m(ce,Z,null),e(Z,oa),e(Z,Je),e(Z,la),e(Z,Re),T(t,ot,p),m(me,t,p),T(t,lt,p),T(t,et,p),dt=!0},p(t,[p]){const d={};p&2&&(d.$$scope={dirty:p,ctx:t}),A.$set(d)},i(t){dt||(f(B.$$.fragment,t),f(z.$$.fragment,t),f(Q.$$.fragment,t),f(S.$$.fragment,t),f(O.$$.fragment,t),f(Y.$$.fragment,t),f(K.$$.fragment,t),f(ee.$$.fragment,t),f(te.$$.fragment,t),f(ae.$$.fragment,t),f(A.$$.fragment,t),f(re.$$.fragment,t),f(ne.$$.fragment,t),f(se.$$.fragment,t),f(oe.$$.fragment,t),f(le.$$.fragment,t),f(de.$$.fragment,t),f(ie.$$.fragment,t),f(pe.$$.fragment,t),f(ue.$$.fragment,t),f(ce.$$.fragment,t),f(me.$$.fragment,t),dt=!0)},o(t){g(B.$$.fragment,t),g(z.$$.fragment,t),g(Q.$$.fragment,t),g(S.$$.fragment,t),g(O.$$.fragment,t),g(Y.$$.fragment,t),g(K.$$.fragment,t),g(ee.$$.fragment,t),g(te.$$.fragment,t),g(ae.$$.fragment,t),g(A.$$.fragment,t),g(re.$$.fragment,t),g(ne.$$.fragment,t),g(se.$$.fragment,t),g(oe.$$.fragment,t),g(le.$$.fragment,t),g(de.$$.fragment,t),g(ie.$$.fragment,t),g(pe.$$.fragment,t),g(ue.$$.fragment,t),g(ce.$$.fragment,t),g(me.$$.fragment,t),dt=!1},d(t){t&&(l(X),l(k),l(w),l(_),l(P),l(at),l(rt),l(o),l(nt),l(st),l(x),l(ot),l(lt),l(et)),l($),h(B,t),h(z,t),h(Q),h(S),h(O),h(Y),h(K),h(ee),h(te),h(ae),h(A),h(re),h(ne),h(se),h(oe),h(le,t),h(de),h(ie),h(pe),h(ue),h(ce),h(me,t)}}}const Ka='{"title":"Tuners","local":"tuners","sections":[{"title":"BaseTuner","local":"peft.tuners.tuners_utils.BaseTuner","sections":[],"depth":2},{"title":"BaseTunerLayer","local":"peft.tuners.tuners_utils.BaseTunerLayer","sections":[],"depth":2}],"depth":1}';function er(tt){return Aa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lr extends Ra{constructor($){super(),Ga(this,$,er,Ya,qa,{})}}export{lr as component};
