import{s as ni,o as si,n as be}from"../chunks/scheduler.78382b47.js";import{S as ri,i as li,e as n,s as a,c as f,h as di,a as s,d as r,b as o,f as $,g as m,j as d,k as w,l as t,m as c,n as g,t as u,o as h,p as _}from"../chunks/index.6dd35eb6.js";import{C as ii,H as fe,E as pi}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8d7e60c0.js";import{D as x}from"../chunks/Docstring.57cb1354.js";import{C as Me}from"../chunks/CodeBlock.4d4112a9.js";import{E as _e}from"../chunks/ExampleCodeBlock.7440be11.js";function ci(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"d2l0aCUyMG1vZGVsLmRpc2FibGVfYWRhcHRlcigpJTNBJTBBJTIwJTIwJTIwJTIwbW9kZWwoaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> model.disable_adapter():
<span class="hljs-meta">... </span>    model(inputs)`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function fi(U){let p,P;return p=new Me({props:{code:"Zm9yJTIwbmFtZSUyQyUyMHBhcmFtJTIwaW4lMjBtb2RlbF9wZWZ0Lm5hbWVkX3BhcmFtZXRlcnMoKSUzQSUwQSUyMCUyMCUyMCUyMGlmJTIwLi4uJTNBJTIwJTIwJTIzJTIwc29tZSUyMGNoZWNrJTIwb24lMjBuYW1lJTIwKGV4LiUyMGlmJTIwJ2xvcmEnJTIwaW4lMjBuYW1lKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHBhcmFtLnJlcXVpcmVzX2dyYWQlMjAlM0QlMjBGYWxzZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> name, param <span class="hljs-keyword">in</span> model_peft.named_parameters():
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> ...:  <span class="hljs-comment"># some check on name (ex. if &#x27;lora&#x27; in name)</span>
<span class="hljs-meta">... </span>        param.requires_grad = <span class="hljs-literal">False</span>`,wrap:!1}}),{c(){f(p.$$.fragment)},l(M){m(p.$$.fragment,M)},m(M,b){g(p,M,b),P=!0},p:be,i(M){P||(u(p.$$.fragment,M),P=!0)},o(M){h(p.$$.fragment,M),P=!1},d(M){_(p,M)}}}function mi(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFmcm9tJTIwcGVmdCUyMGltcG9ydCUyMFBlZnRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMkMlMjBnZXRfcGVmdF9jb25maWclMEElMEFjb25maWclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJwZWZ0X3R5cGUlMjIlM0ElMjAlMjJQUkVGSVhfVFVOSU5HJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGFza190eXBlJTIyJTNBJTIwJTIyU0VRX0NMUyUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmluZmVyZW5jZV9tb2RlJTIyJTNBJTIwRmFsc2UlMkMlMEElMjAlMjAlMjAlMjAlMjJudW1fdmlydHVhbF90b2tlbnMlMjIlM0ElMjAyMCUyQyUwQSUyMCUyMCUyMCUyMCUyMnRva2VuX2RpbSUyMiUzQSUyMDc2OCUyQyUwQSUyMCUyMCUyMCUyMCUyMm51bV90cmFuc2Zvcm1lcl9zdWJtb2R1bGVzJTIyJTNBJTIwMSUyQyUwQSUyMCUyMCUyMCUyMCUyMm51bV9hdHRlbnRpb25faGVhZHMlMjIlM0ElMjAxMiUyQyUwQSUyMCUyMCUyMCUyMCUyMm51bV9sYXllcnMlMjIlM0ElMjAxMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmVuY29kZXJfaGlkZGVuX3NpemUlMjIlM0ElMjA3NjglMkMlMEElMjAlMjAlMjAlMjAlMjJwcmVmaXhfcHJvamVjdGlvbiUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIycG9zdHByb2Nlc3NfcGFzdF9rZXlfdmFsdWVfZnVuY3Rpb24lMjIlM0ElMjBOb25lJTJDJTBBJTdEJTBBJTBBcGVmdF9jb25maWclMjAlM0QlMjBnZXRfcGVmdF9jb25maWcoY29uZmlnKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLWNhc2VkJTIyKSUwQXBlZnRfbW9kZWwlMjAlM0QlMjBQZWZ0TW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uKG1vZGVsJTJDJTIwcGVmdF9jb25maWcpJTBBcGVmdF9tb2RlbC5wcmludF90cmFpbmFibGVfcGFyYW1ldGVycygp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModelForSequenceClassification, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;PREFIX_TUNING&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;SEQ_CLS&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_virtual_tokens&quot;</span>: <span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;token_dim&quot;</span>: <span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_transformer_submodules&quot;</span>: <span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_attention_heads&quot;</span>: <span class="hljs-number">12</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_layers&quot;</span>: <span class="hljs-number">12</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;encoder_hidden_size&quot;</span>: <span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;prefix_projection&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;postprocess_past_key_value_function&quot;</span>: <span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForSequenceClassification(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()
trainable params: <span class="hljs-number">370178</span> || <span class="hljs-built_in">all</span> params: <span class="hljs-number">108680450</span> || trainable%: <span class="hljs-number">0.3406113979101117</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function gi(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFmcm9tJTIwcGVmdCUyMGltcG9ydCUyMFBlZnRNb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24lMkMlMjBnZXRfcGVmdF9jb25maWclMEElMEFjb25maWclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJwZWZ0X3R5cGUlMjIlM0ElMjAlMjJQUkVGSVhfVFVOSU5HJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGFza190eXBlJTIyJTNBJTIwJTIyVE9LRU5fQ0xTJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyaW5mZXJlbmNlX21vZGUlMjIlM0ElMjBGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMCUyMm51bV92aXJ0dWFsX3Rva2VucyUyMiUzQSUyMDIwJTJDJTBBJTIwJTIwJTIwJTIwJTIydG9rZW5fZGltJTIyJTNBJTIwNzY4JTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX3RyYW5zZm9ybWVyX3N1Ym1vZHVsZXMlMjIlM0ElMjAxJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX2F0dGVudGlvbl9oZWFkcyUyMiUzQSUyMDEyJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX2xheWVycyUyMiUzQSUyMDEyJTJDJTBBJTIwJTIwJTIwJTIwJTIyZW5jb2Rlcl9oaWRkZW5fc2l6ZSUyMiUzQSUyMDc2OCUyQyUwQSUyMCUyMCUyMCUyMCUyMnByZWZpeF9wcm9qZWN0aW9uJTIyJTNBJTIwRmFsc2UlMkMlMEElMjAlMjAlMjAlMjAlMjJwb3N0cHJvY2Vzc19wYXN0X2tleV92YWx1ZV9mdW5jdGlvbiUyMiUzQSUyME5vbmUlMkMlMEElN0QlMEElMEFwZWZ0X2NvbmZpZyUyMCUzRCUyMGdldF9wZWZ0X2NvbmZpZyhjb25maWcpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBcGVmdF9tb2RlbCUyMCUzRCUyMFBlZnRNb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24obW9kZWwlMkMlMjBwZWZ0X2NvbmZpZyklMEFwZWZ0X21vZGVsLnByaW50X3RyYWluYWJsZV9wYXJhbWV0ZXJzKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModelForTokenClassification, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;PREFIX_TUNING&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;TOKEN_CLS&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_virtual_tokens&quot;</span>: <span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;token_dim&quot;</span>: <span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_transformer_submodules&quot;</span>: <span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_attention_heads&quot;</span>: <span class="hljs-number">12</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_layers&quot;</span>: <span class="hljs-number">12</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;encoder_hidden_size&quot;</span>: <span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;prefix_projection&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;postprocess_past_key_value_function&quot;</span>: <span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForTokenClassification(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()
trainable params: <span class="hljs-number">370178</span> || <span class="hljs-built_in">all</span> params: <span class="hljs-number">108680450</span> || trainable%: <span class="hljs-number">0.3406113979101117</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function ui(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBZnJvbSUyMHBlZnQlMjBpbXBvcnQlMjBQZWZ0TW9kZWxGb3JDYXVzYWxMTSUyQyUyMGdldF9wZWZ0X2NvbmZpZyUwQSUwQWNvbmZpZyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnBlZnRfdHlwZSUyMiUzQSUyMCUyMlBSRUZJWF9UVU5JTkclMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ0YXNrX3R5cGUlMjIlM0ElMjAlMjJDQVVTQUxfTE0lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJpbmZlcmVuY2VfbW9kZSUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX3ZpcnR1YWxfdG9rZW5zJTIyJTNBJTIwMjAlMkMlMEElMjAlMjAlMjAlMjAlMjJ0b2tlbl9kaW0lMjIlM0ElMjAxMjgwJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX3RyYW5zZm9ybWVyX3N1Ym1vZHVsZXMlMjIlM0ElMjAxJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX2F0dGVudGlvbl9oZWFkcyUyMiUzQSUyMDIwJTJDJTBBJTIwJTIwJTIwJTIwJTIybnVtX2xheWVycyUyMiUzQSUyMDM2JTJDJTBBJTIwJTIwJTIwJTIwJTIyZW5jb2Rlcl9oaWRkZW5fc2l6ZSUyMiUzQSUyMDEyODAlMkMlMEElMjAlMjAlMjAlMjAlMjJwcmVmaXhfcHJvamVjdGlvbiUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIycG9zdHByb2Nlc3NfcGFzdF9rZXlfdmFsdWVfZnVuY3Rpb24lMjIlM0ElMjBOb25lJTJDJTBBJTdEJTBBJTBBcGVmdF9jb25maWclMjAlM0QlMjBnZXRfcGVmdF9jb25maWcoY29uZmlnKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmdwdDItbGFyZ2UlMjIpJTBBcGVmdF9tb2RlbCUyMCUzRCUyMFBlZnRNb2RlbEZvckNhdXNhbExNKG1vZGVsJTJDJTIwcGVmdF9jb25maWcpJTBBcGVmdF9tb2RlbC5wcmludF90cmFpbmFibGVfcGFyYW1ldGVycygp",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> PeftModelForCausalLM, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;PREFIX_TUNING&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;CAUSAL_LM&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_virtual_tokens&quot;</span>: <span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;token_dim&quot;</span>: <span class="hljs-number">1280</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_transformer_submodules&quot;</span>: <span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_attention_heads&quot;</span>: <span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;num_layers&quot;</span>: <span class="hljs-number">36</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;encoder_hidden_size&quot;</span>: <span class="hljs-number">1280</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;prefix_projection&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;postprocess_past_key_value_function&quot;</span>: <span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;gpt2-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForCausalLM(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()
trainable params: <span class="hljs-number">1843200</span> || <span class="hljs-built_in">all</span> params: <span class="hljs-number">775873280</span> || trainable%: <span class="hljs-number">0.23756456724479544</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function hi(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTSUwQWZyb20lMjBwZWZ0JTIwaW1wb3J0JTIwUGVmdE1vZGVsRm9yU2VxMlNlcUxNJTJDJTIwZ2V0X3BlZnRfY29uZmlnJTBBJTBBY29uZmlnJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIycGVmdF90eXBlJTIyJTNBJTIwJTIyTE9SQSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnRhc2tfdHlwZSUyMiUzQSUyMCUyMlNFUV8yX1NFUV9MTSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmluZmVyZW5jZV9tb2RlJTIyJTNBJTIwRmFsc2UlMkMlMEElMjAlMjAlMjAlMjAlMjJyJTIyJTNBJTIwOCUyQyUwQSUyMCUyMCUyMCUyMCUyMnRhcmdldF9tb2R1bGVzJTIyJTNBJTIwJTVCJTIycSUyMiUyQyUyMCUyMnYlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjAlMjJsb3JhX2FscGhhJTIyJTNBJTIwMzIlMkMlMEElMjAlMjAlMjAlMjAlMjJsb3JhX2Ryb3BvdXQlMjIlM0ElMjAwLjElMkMlMEElMjAlMjAlMjAlMjAlMjJmYW5faW5fZmFuX291dCUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIyZW5hYmxlX2xvcmElMjIlM0ElMjBOb25lJTJDJTBBJTIwJTIwJTIwJTIwJTIyYmlhcyUyMiUzQSUyMCUyMm5vbmUlMjIlMkMlMEElN0QlMEElMEFwZWZ0X2NvbmZpZyUyMCUzRCUyMGdldF9wZWZ0X2NvbmZpZyhjb25maWcpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXEyU2VxTE0uZnJvbV9wcmV0cmFpbmVkKCUyMnQ1LWJhc2UlMjIpJTBBcGVmdF9tb2RlbCUyMCUzRCUyMFBlZnRNb2RlbEZvclNlcTJTZXFMTShtb2RlbCUyQyUyMHBlZnRfY29uZmlnKSUwQXBlZnRfbW9kZWwucHJpbnRfdHJhaW5hYmxlX3BhcmFtZXRlcnMoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSeq2SeqLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModelForSeq2SeqLM, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;LORA&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;SEQ_2_SEQ_LM&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;r&quot;</span>: <span class="hljs-number">8</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;target_modules&quot;</span>: [<span class="hljs-string">&quot;q&quot;</span>, <span class="hljs-string">&quot;v&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_alpha&quot;</span>: <span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_dropout&quot;</span>: <span class="hljs-number">0.1</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;fan_in_fan_out&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;enable_lora&quot;</span>: <span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;bias&quot;</span>: <span class="hljs-string">&quot;none&quot;</span>,
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;t5-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForSeq2SeqLM(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()
trainable params: <span class="hljs-number">884736</span> || <span class="hljs-built_in">all</span> params: <span class="hljs-number">223843584</span> || trainable%: <span class="hljs-number">0.3952474242013566</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function _i(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBZnJvbSUyMHBlZnQlMjBpbXBvcnQlMjBQZWZ0TW9kZWxGb3JRdWVzdGlvbkFuc3dlcmluZyUyQyUyMGdldF9wZWZ0X2NvbmZpZyUwQSUwQWNvbmZpZyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnBlZnRfdHlwZSUyMiUzQSUyMCUyMkxPUkElMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ0YXNrX3R5cGUlMjIlM0ElMjAlMjJRVUVTVElPTl9BTlMlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJpbmZlcmVuY2VfbW9kZSUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIyciUyMiUzQSUyMDE2JTJDJTBBJTIwJTIwJTIwJTIwJTIydGFyZ2V0X21vZHVsZXMlMjIlM0ElMjAlNUIlMjJxdWVyeSUyMiUyQyUyMCUyMnZhbHVlJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIybG9yYV9hbHBoYSUyMiUzQSUyMDMyJTJDJTBBJTIwJTIwJTIwJTIwJTIybG9yYV9kcm9wb3V0JTIyJTNBJTIwMC4wNSUyQyUwQSUyMCUyMCUyMCUyMCUyMmZhbl9pbl9mYW5fb3V0JTIyJTNBJTIwRmFsc2UlMkMlMEElMjAlMjAlMjAlMjAlMjJiaWFzJTIyJTNBJTIwJTIybm9uZSUyMiUyQyUwQSU3RCUwQSUwQXBlZnRfY29uZmlnJTIwJTNEJTIwZ2V0X3BlZnRfY29uZmlnKGNvbmZpZyklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBcGVmdF9tb2RlbCUyMCUzRCUyMFBlZnRNb2RlbEZvclF1ZXN0aW9uQW5zd2VyaW5nKG1vZGVsJTJDJTIwcGVmdF9jb25maWcpJTBBcGVmdF9tb2RlbC5wcmludF90cmFpbmFibGVfcGFyYW1ldGVycygp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModelForQuestionAnswering, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;LORA&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;QUESTION_ANS&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;r&quot;</span>: <span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;target_modules&quot;</span>: [<span class="hljs-string">&quot;query&quot;</span>, <span class="hljs-string">&quot;value&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_alpha&quot;</span>: <span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_dropout&quot;</span>: <span class="hljs-number">0.05</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;fan_in_fan_out&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;bias&quot;</span>: <span class="hljs-string">&quot;none&quot;</span>,
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForQuestionAnswering(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()
trainable params: <span class="hljs-number">592900</span> || <span class="hljs-built_in">all</span> params: <span class="hljs-number">108312580</span> || trainable%: <span class="hljs-number">0.5473971721475013</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function bi(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQWZyb20lMjBwZWZ0JTIwaW1wb3J0JTIwUGVmdE1vZGVsRm9yRmVhdHVyZUV4dHJhY3Rpb24lMkMlMjBnZXRfcGVmdF9jb25maWclMEElMEFjb25maWclMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJwZWZ0X3R5cGUlMjIlM0ElMjAlMjJMT1JBJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGFza190eXBlJTIyJTNBJTIwJTIyRkVBVFVSRV9FWFRSQUNUSU9OJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyaW5mZXJlbmNlX21vZGUlMjIlM0ElMjBGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMCUyMnIlMjIlM0ElMjAxNiUyQyUwQSUyMCUyMCUyMCUyMCUyMnRhcmdldF9tb2R1bGVzJTIyJTNBJTIwJTVCJTIycXVlcnklMjIlMkMlMjAlMjJ2YWx1ZSUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMmxvcmFfYWxwaGElMjIlM0ElMjAzMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmxvcmFfZHJvcG91dCUyMiUzQSUyMDAuMDUlMkMlMEElMjAlMjAlMjAlMjAlMjJmYW5faW5fZmFuX291dCUyMiUzQSUyMEZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwJTIyYmlhcyUyMiUzQSUyMCUyMm5vbmUlMjIlMkMlMEElN0QlMEFwZWZ0X2NvbmZpZyUyMCUzRCUyMGdldF9wZWZ0X2NvbmZpZyhjb25maWcpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS1jYXNlZCUyMiklMEFwZWZ0X21vZGVsJTIwJTNEJTIwUGVmdE1vZGVsRm9yRmVhdHVyZUV4dHJhY3Rpb24obW9kZWwlMkMlMjBwZWZ0X2NvbmZpZyklMEFwZWZ0X21vZGVsLnByaW50X3RyYWluYWJsZV9wYXJhbWV0ZXJzKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> PeftModelForFeatureExtraction, get_peft_config

<span class="hljs-meta">&gt;&gt;&gt; </span>config = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;peft_type&quot;</span>: <span class="hljs-string">&quot;LORA&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;task_type&quot;</span>: <span class="hljs-string">&quot;FEATURE_EXTRACTION&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;inference_mode&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;r&quot;</span>: <span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;target_modules&quot;</span>: [<span class="hljs-string">&quot;query&quot;</span>, <span class="hljs-string">&quot;value&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_alpha&quot;</span>: <span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lora_dropout&quot;</span>: <span class="hljs-number">0.05</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;fan_in_fan_out&quot;</span>: <span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;bias&quot;</span>: <span class="hljs-string">&quot;none&quot;</span>,
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_config = get_peft_config(config)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftModelForFeatureExtraction(model, peft_config)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.print_trainable_parameters()`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function Mi(U){let p,P="Example:",M,b,v;return b=new Me({props:{code:"YmFzZV9tb2RlbCUyMCUzRCUyMC4uLiUyMCUyMCUyMyUyMGxvYWQlMjB0aGUlMjBiYXNlJTIwbW9kZWwlMkMlMjBlLmcuJTIwZnJvbSUyMHRyYW5zZm9ybWVycyUwQXBlZnRfbW9kZWwlMjAlM0QlMjBQZWZ0TWl4ZWRNb2RlbC5mcm9tX3ByZXRyYWluZWQoYmFzZV9tb2RlbCUyQyUyMHBhdGhfdG9fYWRhcHRlcjElMkMlMjAlMjJhZGFwdGVyMSUyMikuZXZhbCgpJTBBcGVmdF9tb2RlbC5sb2FkX2FkYXB0ZXIocGF0aF90b19hZGFwdGVyMiUyQyUyMCUyMmFkYXB0ZXIyJTIyKSUwQXBlZnRfbW9kZWwuc2V0X2FkYXB0ZXIoJTVCJTIyYWRhcHRlcjElMjIlMkMlMjAlMjJhZGFwdGVyMiUyMiU1RCklMjAlMjAlMjMlMjBhY3RpdmF0ZSUyMGJvdGglMjBhZGFwdGVycyUwQXBlZnRfbW9kZWwoZGF0YSklMjAlMjAlMjMlMjBmb3J3YXJkJTIwcGFzcyUyMHVzaW5nJTIwYm90aCUyMGFkYXB0ZXJz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>base_model = ...  <span class="hljs-comment"># load the base model, e.g. from transformers</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model = PeftMixedModel.from_pretrained(base_model, path_to_adapter1, <span class="hljs-string">&quot;adapter1&quot;</span>).<span class="hljs-built_in">eval</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.load_adapter(path_to_adapter2, <span class="hljs-string">&quot;adapter2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model.set_adapter([<span class="hljs-string">&quot;adapter1&quot;</span>, <span class="hljs-string">&quot;adapter2&quot;</span>])  <span class="hljs-comment"># activate both adapters</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>peft_model(data)  <span class="hljs-comment"># forward pass using both adapters</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=P,M=a(),f(b.$$.fragment)},l(l){p=s(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=P),M=o(l),m(b.$$.fragment,l)},m(l,j){c(l,p,j),c(l,M,j),g(b,l,j),v=!0},p:be,i(l){v||(u(b.$$.fragment,l),v=!0)},o(l){h(b.$$.fragment,l),v=!1},d(l){l&&(r(p),r(M)),_(b,l)}}}function yi(U){let p,P,M,b,v,l,j,en,Ye,gl='<a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel">PeftModel</a> is the base model class for specifying the base Transformer model and configuration to apply a PEFT method to. The base <code>PeftModel</code> contains methods for loading and saving models from the Hub.',tn,Oe,an,y,Ke,Hn,ia,ul="Base model encompassing various Peft methods.",Xn,pa,hl="<strong>Attributes</strong>:",zn,ca,_l=`<li><strong>base_model</strong> (<code>torch.nn.Module</code>) — The base transformer model used for Peft.</li> <li><strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) — The configuration of the Peft model.</li> <li><strong>modules_to_save</strong> (<code>list</code> of <code>str</code>) — The list of sub-module names to save when
saving the model.</li> <li><strong>prompt_encoder</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/p_tuning#peft.PromptEncoder">PromptEncoder</a>) — The prompt encoder used for Peft if
using <a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PromptLearningConfig">PromptLearningConfig</a>.</li> <li><strong>prompt_tokens</strong> (<code>torch.Tensor</code>) — The virtual prompt tokens used for Peft if
using <a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PromptLearningConfig">PromptLearningConfig</a>.</li> <li><strong>transformer_backbone_name</strong> (<code>str</code>) — The name of the transformer
backbone in the base model if using <a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PromptLearningConfig">PromptLearningConfig</a>.</li> <li><strong>word_embeddings</strong> (<code>torch.nn.Embedding</code>) — The word embeddings of the transformer backbone
in the base model if using <a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PromptLearningConfig">PromptLearningConfig</a>.</li>`,Yn,Z,et,On,fa,bl="Add an adapter to the model based on the passed configuration.",Kn,ma,Ml='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',es,ga,yl="The name for the new adapter should be unique.",ts,ua,vl=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,as,K,tt,os,ha,Tl="Updates or create model card to include information about peft:",ns,_a,wl="<li>Adds <code>peft</code> library tag</li> <li>Adds peft version</li> <li>Adds base model info</li> <li>Adds quantization information if it was used</li>",ss,ye,at,rs,ba,$l="Deletes an existing adapter.",ls,ee,ot,ds,Ma,xl="Context manager that disables the adapter module. Use this to run inference on the base model.",is,ve,ps,Te,nt,cs,ya,jl="Forward pass of the model.",fs,te,st,ms,va,Cl="Instantiate a PEFT model from a pretrained model and loaded PEFT weights.",gs,Ta,Pl="Note that the passed <code>model</code> may be modified inplace.",us,we,rt,hs,wa,Jl="Returns the base model.",_s,N,lt,bs,$a,Ul="Get the status of each adapter layer in the model.",Ms,xa,ql=`This method returns a list of <code>TunerLayerStatus</code> dataclass instances, each of which contains the following
attributes:`,ys,ja,kl=`<li><code>name</code> (<code>str</code>):
The name of the adapter layer, e.g. <code>model.encoder.block.0.layer.0.SelfAttention.q</code>.</li> <li><code>module_type</code> (<code>str</code>):
The type of the adapter layer, e.g. <code>lora.Linear</code>.</li> <li><code>enabled</code> (<code>bool</code>):
Whether the adapter layer is enabled.</li> <li><code>active_adapters</code> (<code>list[str]</code>):
The names of the active adapters, if any, e.g. <code>[&quot;default&quot;]</code>.</li> <li><code>merged_adapters</code> (<code>list[str]</code>):
The names of the merged adapters, if any, e.g. <code>[&quot;default&quot;]</code>.</li> <li><code>available_adapters</code> (<code>list[str]</code>):
The names of the available adapters, e.g. <code>[&quot;default&quot;]</code>.</li>`,vs,S,dt,Ts,Ca,Fl="Get the status of tuners of the model.",ws,Pa,Il="This method returns a <code>TunerModelStatus</code> dataclass instance, which contains the following attributes:",$s,Ja,Zl=`<li><code>base_model_type</code> (<code>str</code>):
The type of the base model, e.g. <code>T5Model</code>.</li> <li><code>adapter_model_type</code> (<code>str</code>):
The type of the adapter model, e.g. <code>LoraModel</code>.</li> <li><code>peft_types</code> (<code>dict[str, str]</code>):
The mapping of adapter name to adapter type, e.g. <code>{&quot;default&quot;: &quot;LORA&quot;}</code>.</li> <li><code>trainable_params</code> (<code>int</code>):
The number of trainable parameters in the model.</li> <li><code>total_params</code> (<code>int</code>):
The total number of parameters in the model.</li> <li><code>num_adapter_layers</code> (<code>int</code>):
The number of adapter layers in the model.</li> <li><code>enabled</code> (<code>bool</code>, <code>Literal[&quot;irregular&quot;]</code>):
Whether all adapter layers are enabled. If some are enabled and some are not, this will be <code>&quot;irregular&quot;</code>.
This means that your model is in an inconsistent state and might not work as expected.</li> <li><code>active_adapters</code> (<code>list[str]</code>, <code>Literal[&quot;irregular&quot;]</code>):
The names of the active adapters. If the active adapters are not consistent across all layers, this will be
<code>&quot;irregular&quot;</code>, which means that your model is in an inconsistent state and might not work as expected.</li> <li><code>merged_adapters</code> (<code>list[str]</code>, <code>Literal[&quot;irregular&quot;]</code>):
The names of the merged adapters. If the merged adapters are not consistent across all layers, this will be
<code>&quot;irregular&quot;</code>, which means that your model is in an inconsistent state and might not work as expected.</li> <li><code>available_adapters</code> (<code>list[str]</code>):
The names of the available adapters, e.g. <code>[&quot;default&quot;]</code>.</li>`,xs,$e,it,js,Ua,El="Returns the number of trainable parameters and the number of all parameters in the model.",Cs,xe,pt,Ps,qa,Ll="Returns the virtual prompts to use for Peft. Only applicable when using a prompt learning method.",Js,je,ct,Us,ka,Wl=`Returns the prompt embedding to save when saving the model. Only applicable when using a prompt learning
method.`,qs,G,ft,ks,Fa,Vl="Load a trained adapter into the model.",Fs,Ia,Al="The name for the new adapter should be unique.",Is,Za,Bl=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,Zs,Ce,mt,Es,Ea,Rl="Prepares the model for gradient checkpointing if necessary",Ls,ae,gt,Ws,La,Nl="Prints the number of trainable parameters in the model.",Vs,Wa,Sl=`Note: print_trainable_parameters() uses get_nb_trainable_parameters() which is different from
num_parameters(only_trainable=True) from huggingface/transformers. get_nb_trainable_parameters() returns
(trainable parameters, all parameters) of the Peft Model which includes modified backbone transformer model.
For techniques like LoRA, the backbone transformer model is modified in place with LoRA modules. However, for
prompt tuning, the backbone transformer model is unmodified. num_parameters(only_trainable=True) returns number
of trainable parameters of the backbone transformer model which can be different.`,As,Pe,ut,Bs,Va,Gl=`This function saves the adapter model and the adapter configuration files to a directory, so that it can be
reloaded using the <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.from_pretrained">PeftModel.from_pretrained()</a> class method, and also used by the <code>PeftModel.push_to_hub()</code>
method.`,Rs,E,ht,Ns,Aa,Dl="Sets the active adapter.",Ss,Ba,Ql="Only one adapter can be active at a time.",Gs,Ra,Hl=`Additionally, this function will set the specified adapter to trainable (i.e., requires_grad=True). If this is
not desired, use the following code.`,Ds,Je,Qs,oe,_t,Hs,Na,Xl="Enable or disable gradients on the given adapter(s).",Xs,Sa,zl="Note: Not supported for prompt learning methods like prompt tuning.",on,bt,nn,Mt,Yl="A <code>PeftModel</code> for sequence classification tasks.",sn,q,yt,zs,Ga,Ol="Peft model for sequence classification tasks.",Ys,Da,Kl="<strong>Attributes</strong>:",Os,Qa,ed='<li><strong>config</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/configuration#transformers.PretrainedConfig" rel="nofollow">PretrainedConfig</a>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>',Ks,Ue,rn,vt,ln,Tt,td="A <code>PeftModel</code> for token classification tasks.",dn,k,wt,er,Ha,ad="Peft model for token classification tasks.",tr,Xa,od="<strong>Attributes</strong>:",ar,za,nd='<li><strong>config</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/configuration#transformers.PretrainedConfig" rel="nofollow">PretrainedConfig</a>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>',or,qe,pn,$t,cn,xt,sd="A <code>PeftModel</code> for causal language modeling.",fn,H,jt,nr,Ya,rd="Peft model for causal language modeling.",sr,ke,mn,Ct,gn,Pt,ld="A <code>PeftModel</code> for sequence-to-sequence language modeling.",un,X,Jt,rr,Oa,dd="Peft model for sequence-to-sequence language modeling.",lr,Fe,hn,Ut,_n,qt,id="A <code>PeftModel</code> for question answering.",bn,F,kt,dr,Ka,pd="Peft model for extractive question answering.",ir,eo,cd="<strong>Attributes</strong>:",pr,to,fd='<li><strong>config</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/configuration#transformers.PretrainedConfig" rel="nofollow">PretrainedConfig</a>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>',cr,Ie,Mn,Ft,yn,It,md="A <code>PeftModel</code> for getting extracting features/embeddings from transformer models.",vn,I,Zt,fr,ao,gd="Peft model for extracting features/embeddings from transformer models",mr,oo,ud="<strong>Attributes</strong>:",gr,no,hd='<li><strong>config</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/configuration#transformers.PretrainedConfig" rel="nofollow">PretrainedConfig</a>) — The configuration object of the base model.</li>',ur,Ze,Tn,Et,wn,Lt,_d="A <code>PeftModel</code> for mixing different adapter types (e.g. LoRA and LoHa).",$n,C,Wt,hr,so,bd="PeftMixedModel for loading mixing different types of adapters for inference.",_r,ro,Md=`This class does not support loading/saving, and it shouldn’t usually be initialized directly. Instead, use
<code>get_peft_model</code> with the argument <code>mixed=True</code>.`,br,Vt,yd=`<p>&gt; Read the <a href="https://huggingface.co/docs/peft/en/developer_guides/mixed_models" rel="nofollow">Mixed adapter types</a> guide
to learn &gt; more about using different adapter types.</p>`,Mr,Ee,yr,L,At,vr,lo,vd="Add an adapter to the model based on the passed configuration.",Tr,io,Td='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',wr,po,wd="The name for the new adapter should be unique.",$r,co,$d=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,xr,Le,Bt,jr,fo,xd="Disables the adapter module.",Cr,We,Rt,Pr,mo,jd="Forward pass of the model.",Jr,ne,Nt,Ur,go,Cd="Instantiate a PEFT mixed model from a pretrained model and loaded PEFT weights.",qr,uo,Pd="Note that the passed <code>model</code> may be modified inplace.",kr,Ve,St,Fr,ho,Jd="Generate output.",Ir,Ae,Gt,Zr,_o,Ud="Returns the number of trainable parameters and number of all parameters in the model.",Er,D,Dt,Lr,bo,qd="Load a trained adapter into the model.",Wr,Mo,kd="The name for the new adapter should be unique.",Vr,yo,Fd=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,Ar,Be,Qt,Br,vo,Id=`This method merges the adapter layers into the base model. This is needed if someone wants to use the base
model as a standalone model.`,Rr,se,Ht,Nr,To,Zd="Prints the number of trainable parameters in the model.",Sr,wo,Ed=`Note: print_trainable_parameters() uses get_nb_trainable_parameters() which is different from
num_parameters(only_trainable=True) from huggingface/transformers. get_nb_trainable_parameters() returns
(trainable parameters, all parameters) of the Peft Model which includes modified backbone transformer model.
For techniques like LoRA, the backbone transformer model is modified in place with LoRA modules. However, for
prompt tuning, the backbone transformer model is unmodified. num_parameters(only_trainable=True) returns number
of trainable parameters of the backbone transformer model which can be different.`,Gr,Q,Xt,Dr,$o,Ld="Sets the active adapter(s) for the model.",Qr,xo,Wd=`Note that the order in which the adapters are applied during the forward pass may not be the same as the order
in which they are passed to this function. Instead, the order during the forward pass is determined by the
order in which the adapters were loaded into the model. The active adapters only determine which adapters are
active during the forward pass, but not the order in which they are applied.`,Hr,jo,Vd=`Additionally, this function will set the specified adapter to trainable (i.e., requires_grad=True) unless
inference_mode is True.`,Xr,Re,zt,zr,Co,Ad=`Gets back the base model by removing all the adapter modules without merging. This gives back the original base
model.`,xn,Yt,jn,z,Ot,Yr,Po,Bd=`Cast all non-trainable parameters of the model to the given <code>dtype</code>. The <code>dtype</code> can be <code>torch.float16</code> or
<code>torch.bfloat16</code> as per the mixed-precision training you are performing. The trainable parameters are cast to full
precision. This is meant to reduce the GPU memory usage when using PEFT methods by using half-precision dtype for
non-trainable parameters. Having the trainable parameters in full-precision preserves training stability when using
automatic mixed-precision training.`,Or,Jo,Rd="<code>torch.bfloat16</code> as per the mixed-precision training you are performing.",Cn,me,Kt,Kr,Uo,Nd="Returns a Peft model object from a model and a config, where the model will be modified in-place.",Pn,W,ea,el,qo,Sd="Create PEFT layers and inject them into the model in-place.",tl,ko,Gd="Currently the API does not support prompt learning methods and adaption prompt.",al,Fo,Dd=`This function is similar to <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.get_peft_model">get_peft_model()</a> but it does not return a <a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel">PeftModel</a> instance. Instead, it returns
the original, mutated instance of the passed model.`,Jn,V,ta,ol,Io,Qd="Get the state dict of the given adapter of the PEFT model.",nl,Zo,Hd=`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>.`,sl,Eo,Xd=`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/v0.18.0.rc0/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.`,Un,Y,aa,rl,Lo,zd="Note this method only works for <code>transformers</code> models.",ll,Wo,Yd=`This method wraps the entire protocol for preparing a model before running a training. This includes:
1- Cast the layernorm in fp32 2- making output embedding layer require grads 3- Add the upcasting of the lm
head to fp32 4- Freezing the base model layers to ensure they are not updated during training`,qn,A,oa,dl,Vo,Od="Get the status of each adapter layer in the model.",il,Ao,Kd=`This function returns a list of <code>TunerLayerStatus</code> dataclass instances, each of which contains the following
attributes:`,pl,Bo,ei=`<li><code>name</code> (<code>str</code>):
The name of the adapter layer, e.g. <code>model.encoder.block.0.layer.0.SelfAttention.q</code>.</li> <li><code>module_type</code> (<code>str</code>):
The type of the adapter layer, e.g. <code>lora.Linear</code>.</li> <li><code>enabled</code> (<code>bool</code>):
Whether the adapter layer is enabled.</li> <li><code>active_adapters</code> (<code>list[str]</code>):
The names of the active adapters, if any, e.g. <code>[&quot;default&quot;]</code>.</li> <li><code>merged_adapters</code> (<code>list[str]</code>):
The names of the merged adapters, if any, e.g. <code>[&quot;default&quot;]</code>.</li> <li>requires_grad : dict[str, bool | Literal[“irregular”]]
The requires_grad status of the parameters for each adapter module. Ideally, it should be either <code>True</code> or
<code>False</code>. If the requires_grad status is not consistent across all parameters, the value will be set to
<code>&quot;irregular&quot;</code>.</li> <li><code>available_adapters</code> (<code>list[str]</code>):
The names of the available adapters, e.g. <code>[&quot;default&quot;]</code>.</li> <li><code>devices</code> (<code>dict[str, list[str]]</code>):
The devices where the parameters of the given adapter are stored, e.g. <code>[&quot;cuda&quot;]</code>.</li>`,kn,B,na,cl,Ro,ti="Get the status of tuners of the model.",fl,No,ai="This function returns a <code>TunerModelStatus</code> dataclass instance, which contains the following attributes:",ml,So,oi=`<li><code>base_model_type</code> (<code>str</code>):
The type of the base model, e.g. <code>T5Model</code>.</li> <li><code>adapter_model_type</code> (<code>str</code>):
The type of the adapter model, e.g. <code>LoraModel</code>.</li> <li><code>peft_types</code> (<code>dict[str, str]</code>):
The mapping of adapter name to adapter type, e.g. <code>{&quot;default&quot;: &quot;LORA&quot;}</code>.</li> <li><code>trainable_params</code> (<code>int</code>):
The number of trainable parameters in the model.</li> <li><code>total_params</code> (<code>int</code>):
The total number of parameters in the model.</li> <li><code>num_adapter_layers</code> (<code>int</code>):
The number of adapter layers in the model.</li> <li><code>enabled</code> (<code>bool</code>, <code>Literal[&quot;irregular&quot;]</code>):
Whether all adapter layers are enabled. If some are enabled and some are not, this will be <code>&quot;irregular&quot;</code>. This
means that your model is in an inconsistent state and might not work as expected.</li> <li><code>active_adapters</code> (<code>list[str]</code>, <code>Literal[&quot;irregular&quot;]</code>):
The names of the active adapters. If the active adapters are not consistent across all layers, this will be
<code>&quot;irregular&quot;</code>, which means that your model is in an inconsistent state and might not work as expected.</li> <li><code>merged_adapters</code> (<code>list[str]</code>, <code>Literal[&quot;irregular&quot;]</code>):
The names of the merged adapters. If the merged adapters are not consistent across all layers, this will be
<code>&quot;irregular&quot;</code>, which means that your model is in an inconsistent state and might not work as expected.</li> <li><code>requires_grad</code> (<code>dict[str, bool | Literal[&quot;irregular&quot;]]</code>):
Whether for the given adapter, all adapter layers have <code>requires_grad</code> set to <code>True</code> or <code>False</code>. If there is a
mix, this will be set to <code>&quot;irregular&quot;</code>, which means that your model is in an inconsistent state and might not
work as expected.</li> <li><code>available_adapters</code> (<code>list[str]</code>):
The names of the available adapters, e.g. <code>[&quot;default&quot;]</code>.</li> <li><code>devices</code> (<code>dict[str, list[str]]</code>):
The devices where the parameters of the given adapter are stored, e.g. <code>[&quot;cuda&quot;]</code>.</li>`,Fn,sa,In,Ko,Zn;return v=new ii({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new fe({props:{title:"Models",local:"models",headingTag:"h1"}}),Oe=new fe({props:{title:"PeftModel",local:"peft.PeftModel",headingTag:"h2"}}),Ke=new x({props:{name:"class peft.PeftModel",anchor:"peft.PeftModel",parameters:[{name:"model",val:": PreTrainedModel"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"autocast_adapter_dtype",val:": bool = True"},{name:"low_cpu_mem_usage",val:": bool = False"}],parametersDescription:[{anchor:"peft.PeftModel.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; The base transformer model used for Peft.',name:"model"},{anchor:"peft.PeftModel.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; The configuration of the Peft model.',name:"peft_config"},{anchor:"peft.PeftModel.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModel.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"},{anchor:"peft.PeftModel.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 loading process.</p>
<blockquote class="tip">
<p>&gt; Don&#x2019;t use <code>low_cpu_mem_usage=True</code> when creating a new PEFT adapter for training.</p>
</blockquote>`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L72"}}),et=new x({props:{name:"add_adapter",anchor:"peft.PeftModel.add_adapter",parameters:[{name:"adapter_name",val:": str"},{name:"peft_config",val:": PeftConfig"},{name:"low_cpu_mem_usage",val:": bool = False"}],parametersDescription:[{anchor:"peft.PeftModel.add_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The name of the adapter to be added.`,name:"adapter_name"},{anchor:"peft.PeftModel.add_adapter.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
The configuration of the adapter to be added.`,name:"peft_config"},{anchor:"peft.PeftModel.add_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 process when loading saved
adapters. Don&#x2019;t use this option when creating a new PEFT adapter for training.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L977"}}),tt=new x({props:{name:"create_or_update_model_card",anchor:"peft.PeftModel.create_or_update_model_card",parameters:[{name:"output_dir",val:": str"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1512"}}),at=new x({props:{name:"delete_adapter",anchor:"peft.PeftModel.delete_adapter",parameters:[{name:"adapter_name",val:": str"}],parametersDescription:[{anchor:"peft.PeftModel.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/v0.18.0.rc0/src/peft/peft_model.py#L1045"}}),ot=new x({props:{name:"disable_adapter",anchor:"peft.PeftModel.disable_adapter",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L923"}}),ve=new _e({props:{anchor:"peft.PeftModel.disable_adapter.example",$$slots:{default:[ci]},$$scope:{ctx:U}}}),nt=new x({props:{name:"forward",anchor:"peft.PeftModel.forward",parameters:[{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L902"}}),st=new x({props:{name:"from_pretrained",anchor:"peft.PeftModel.from_pretrained",parameters:[{name:"model",val:": torch.nn.Module"},{name:"model_id",val:": Union[str, os.PathLike]"},{name:"adapter_name",val:": str = 'default'"},{name:"is_trainable",val:": bool = False"},{name:"config",val:": Optional[PeftConfig] = None"},{name:"autocast_adapter_dtype",val:": bool = True"},{name:"ephemeral_gpu_offload",val:": bool = False"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"key_mapping",val:": Optional[dict[str, str]] = None"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftModel.from_pretrained.model",description:`<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014;
The model to be adapted. For &#x1F917; Transformers models, the model should be initialized with the
<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained" rel="nofollow">from_pretrained</a>.`,name:"model"},{anchor:"peft.PeftModel.from_pretrained.model_id",description:`<strong>model_id</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The name of the PEFT configuration to use. Can be either:
<ul>
<li>A string, the <code>model id</code> of a PEFT configuration hosted inside a model repo on the Hugging Face
Hub.</li>
<li>A path to a directory containing a PEFT configuration file saved using the <code>save_pretrained</code>
method (<code>./my_peft_config_directory/</code>).</li>
</ul>`,name:"model_id"},{anchor:"peft.PeftModel.from_pretrained.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 to be loaded. This is useful for loading multiple adapters.`,name:"adapter_name"},{anchor:"peft.PeftModel.from_pretrained.is_trainable",description:`<strong>is_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the adapter should be trainable or not. If <code>False</code>, the adapter will be frozen and can only be
used for inference.`,name:"is_trainable"},{anchor:"peft.PeftModel.from_pretrained.config",description:`<strong>config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>, <em>optional</em>) &#x2014;
The configuration object to use instead of an automatically loaded configuration. This configuration
object is mutually exclusive with <code>model_id</code> and <code>kwargs</code>. This is useful when configuration is already
loaded before calling <code>from_pretrained</code>.`,name:"config"},{anchor:"peft.PeftModel.from_pretrained.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>. Only relevant for specific adapter types.`,name:"autocast_adapter_dtype"},{anchor:"peft.PeftModel.from_pretrained.ephemeral_gpu_offload",description:`<strong>ephemeral_gpu_offload</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to use ephemeral GPU offloading for partially loaded modules. Defaults to <code>False</code>. This is
useful when parts of the model and/or components (such as adapters) are kept in CPU memory until they
are needed. Rather than perform expensive operations on small data, the data is transferred to the GPU
on-demand, the operation(s) performed, and the results moved back to CPU memory. This brings a slight
momentary VRAM overhead but gives orders of magnitude speedup in certain cases.`,name:"ephemeral_gpu_offload"},{anchor:"peft.PeftModel.from_pretrained.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 before loading the saved weights. Useful to speed up the
process.`,name:"low_cpu_mem_usage"},{anchor:"peft.PeftModel.from_pretrained.torch_device",description:`<strong>torch_device</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
The device to load the adapter on. If <code>None</code>, the device will be inferred.`,name:"torch_device"},{anchor:"peft.PeftModel.from_pretrained.key_mapping",description:`<strong>key_mapping</strong> (dict, <em>optional</em>, defaults to None) &#x2014;
Extra mapping of PEFT <code>state_dict</code> keys applied before loading the <code>state_dict</code>. When this mapping is
applied, the PEFT-specific <code>&quot;base_model.model&quot;</code> prefix is removed beforehand and the adapter name (e.g.
<code>&quot;default&quot;</code>) is not inserted yet. Only pass this argument if you know what you&#x2019;re doing.`,name:"key_mapping"},{anchor:"peft.PeftModel.from_pretrained.kwargs",description:`<strong>kwargs</strong> &#x2014; (<code>optional</code>):
Additional keyword arguments passed along to the specific PEFT configuration class.`,name:"kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L375"}}),rt=new x({props:{name:"get_base_model",anchor:"peft.PeftModel.get_base_model",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L971"}}),lt=new x({props:{name:"get_layer_status",anchor:"peft.PeftModel.get_layer_status",parameters:[],parametersDescription:[{anchor:"peft.PeftModel.get_layer_status.model",description:`<strong>model</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel">~PeftModel</a>) &#x2014;
The model to get the adapter layer status from.`,name:"model"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1077",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of dataclasses, each containing the status of the corresponding adapter layer.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>list<code>peft.peft_model.TunerLayerStatus</code></p>
`}}),dt=new x({props:{name:"get_model_status",anchor:"peft.PeftModel.get_model_status",parameters:[],parametersDescription:[{anchor:"peft.PeftModel.get_model_status.model",description:`<strong>model</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/peft_model#peft.PeftModel">~PeftModel</a>) &#x2014;
The model to get the adapter layer status from.`,name:"model"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1107",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A dataclass containing the status of the model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>peft.peft_model.TunerModelStatus</code></p>
`}}),it=new x({props:{name:"get_nb_trainable_parameters",anchor:"peft.PeftModel.get_nb_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L833"}}),pt=new x({props:{name:"get_prompt",anchor:"peft.PeftModel.get_prompt",parameters:[{name:"batch_size",val:": int"},{name:"task_ids",val:": Optional[torch.Tensor] = None"},{name:"max_cache_len",val:": Optional[int] = None"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L708"}}),ct=new x({props:{name:"get_prompt_embedding_to_save",anchor:"peft.PeftModel.get_prompt_embedding_to_save",parameters:[{name:"adapter_name",val:": str"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L687"}}),ft=new x({props:{name:"load_adapter",anchor:"peft.PeftModel.load_adapter",parameters:[{name:"model_id",val:": Union[str, os.PathLike]"},{name:"adapter_name",val:": str"},{name:"is_trainable",val:": bool = False"},{name:"torch_device",val:": Optional[str] = None"},{name:"autocast_adapter_dtype",val:": bool = True"},{name:"ephemeral_gpu_offload",val:": bool = False"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"key_mapping",val:": Optional[dict[str, str]] = None"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftModel.load_adapter.model_id",description:`<strong>model_id</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The name of the PEFT configuration to use. Can be either:
<ul>
<li>A string, the <code>model id</code> of a PEFT configuration hosted inside a model repo on the Hugging Face
Hub.</li>
<li>A path to a directory containing a PEFT configuration file saved using the <code>save_pretrained</code>
method (<code>./my_peft_config_directory/</code>).</li>
</ul>`,name:"model_id"},{anchor:"peft.PeftModel.load_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The name of the adapter to be added.`,name:"adapter_name"},{anchor:"peft.PeftModel.load_adapter.is_trainable",description:`<strong>is_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the adapter should be trainable or not. If <code>False</code>, the adapter will be frozen and can only be
used for inference.`,name:"is_trainable"},{anchor:"peft.PeftModel.load_adapter.torch_device",description:`<strong>torch_device</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
The device to load the adapter on. If <code>None</code>, the device will be inferred.`,name:"torch_device"},{anchor:"peft.PeftModel.load_adapter.autocast_adapter_dtype",description:`<strong>autocast_adapter_dtype</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to autocast the adapter dtype. Defaults to <code>True</code>. Right now, this will only cast adapter
weights using float16 and bfloat16 to float32, as this is typically required for stable training, and
only affect select PEFT tuners.`,name:"autocast_adapter_dtype"},{anchor:"peft.PeftModel.load_adapter.ephemeral_gpu_offload",description:`<strong>ephemeral_gpu_offload</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use ephemeral GPU offloading for partially loaded modules. Defaults to <code>False</code>.`,name:"ephemeral_gpu_offload"},{anchor:"peft.PeftModel.load_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 before loading the saved weights. Useful to speed up the
process.`,name:"low_cpu_mem_usage"},{anchor:"peft.PeftModel.load_adapter.key_mapping",description:`<strong>key_mapping</strong> (dict, <em>optional</em>, defaults to None) &#x2014;
Extra mapping of PEFT <code>state_dict</code> keys applied before loading the <code>state_dict</code>. When this mapping is
applied, the PEFT-specific <code>&quot;base_model.model&quot;</code> prefix is removed beforehand and the adapter name (e.g.
<code>&quot;default&quot;</code>) is not inserted yet. Only pass this argument if you know what you&#x2019;re doing.`,name:"key_mapping"},{anchor:"peft.PeftModel.load_adapter.kwargs",description:`<strong>kwargs</strong> &#x2014; (<code>optional</code>):
Additional arguments to modify the way the adapter is loaded, e.g. the token for Hugging Face Hub.`,name:"kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1271"}}),mt=new x({props:{name:"prepare_model_for_gradient_checkpointing",anchor:"peft.PeftModel.prepare_model_for_gradient_checkpointing",parameters:[{name:"model",val:": PreTrainedModel"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L665"}}),gt=new x({props:{name:"print_trainable_parameters",anchor:"peft.PeftModel.print_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L863"}}),ut=new x({props:{name:"save_pretrained",anchor:"peft.PeftModel.save_pretrained",parameters:[{name:"save_directory",val:": str"},{name:"safe_serialization",val:": bool = True"},{name:"selected_adapters",val:": Optional[list[str]] = None"},{name:"save_embedding_layers",val:": Union[str, bool] = 'auto'"},{name:"is_main_process",val:": bool = True"},{name:"path_initial_model_for_weight_conversion",val:": Optional[str] = None"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftModel.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
Directory where the adapter model and configuration files will be saved (will be created if it does not
exist).`,name:"save_directory"},{anchor:"peft.PeftModel.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to save the adapter files in safetensors format, defaults to <code>True</code>.`,name:"safe_serialization"},{anchor:"peft.PeftModel.save_pretrained.selected_adapters",description:`<strong>selected_adapters</strong> (<code>List[str]</code>,  <em>optional</em>) &#x2014;
A list of adapters to be saved. If <code>None</code>, will default to all adapters.`,name:"selected_adapters"},{anchor:"peft.PeftModel.save_pretrained.save_embedding_layers",description:`<strong>save_embedding_layers</strong> (<code>Union[bool, str]</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</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.
and automatically sets the boolean flag. This only works for &#x1F917; transformers models.`,name:"save_embedding_layers"},{anchor:"peft.PeftModel.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether the process calling this is the main process or not. Will default to <code>True</code>. Will not save the
checkpoint if not on the main process, which is important for multi device setups (e.g. DDP).`,name:"is_main_process"},{anchor:"peft.PeftModel.save_pretrained.path_initial_model_for_weight_conversion",description:`<strong>path_initial_model_for_weight_conversion</strong> (<code>str, *optional*</code>) &#x2014;
The path to the initialized adapter, which is obtained after initializing the model with
PiSSA/CorDA/OLoRA and before performing any training. When <code>path_initial_model_for_weight_conversion</code>
is not None, the difference in adapter before and after fine-tuning is calculated. This difference can
be represented as the parameters of a standard LoRA adapter. Using this converted adapter does not
require changes to the base model, thus conveniently allowing the use of multiple PiSSA/CorDA/OLoRA
adapters with LoRA adapters, and the activation or deactivation of any adapters. Note that this
conversion is not supported if <code>rslora</code> is used in combination with <code>rank_pattern</code> or <code>alpha_pattern</code>.`,name:"path_initial_model_for_weight_conversion"},{anchor:"peft.PeftModel.save_pretrained.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <code>push_to_hub</code> method.`,name:"kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L177"}}),ht=new x({props:{name:"set_adapter",anchor:"peft.PeftModel.set_adapter",parameters:[{name:"adapter_name",val:": str"}],parametersDescription:[{anchor:"peft.PeftModel.set_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The name of the adapter to be set as active. The adapter must be loaded first.`,name:"adapter_name"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1433"}}),Je=new _e({props:{anchor:"peft.PeftModel.set_adapter.example",$$slots:{default:[fi]},$$scope:{ctx:U}}}),_t=new x({props:{name:"set_requires_grad",anchor:"peft.PeftModel.set_requires_grad",parameters:[{name:"adapter_names",val:": str | Sequence[str]"},{name:"requires_grad",val:": bool = True"}],parametersDescription:[{anchor:"peft.PeftModel.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.PeftModel.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/v0.18.0.rc0/src/peft/peft_model.py#L1462"}}),bt=new fe({props:{title:"PeftModelForSequenceClassification",local:"peft.PeftModelForSequenceClassification",headingTag:"h2"}}),yt=new x({props:{name:"class peft.PeftModelForSequenceClassification",anchor:"peft.PeftModelForSequenceClassification",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForSequenceClassification.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForSequenceClassification.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForSequenceClassification.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForSequenceClassification.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1578"}}),Ue=new _e({props:{anchor:"peft.PeftModelForSequenceClassification.example",$$slots:{default:[mi]},$$scope:{ctx:U}}}),vt=new fe({props:{title:"PeftModelForTokenClassification",local:"peft.PeftModelForTokenClassification",headingTag:"h2"}}),wt=new x({props:{name:"class peft.PeftModelForTokenClassification",anchor:"peft.PeftModelForTokenClassification",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig = None"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForTokenClassification.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForTokenClassification.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForTokenClassification.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForTokenClassification.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L2439"}}),qe=new _e({props:{anchor:"peft.PeftModelForTokenClassification.example",$$slots:{default:[gi]},$$scope:{ctx:U}}}),$t=new fe({props:{title:"PeftModelForCausalLM",local:"peft.PeftModelForCausalLM",headingTag:"h2"}}),jt=new x({props:{name:"class peft.PeftModelForCausalLM",anchor:"peft.PeftModelForCausalLM",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForCausalLM.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForCausalLM.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForCausalLM.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForCausalLM.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L1822"}}),ke=new _e({props:{anchor:"peft.PeftModelForCausalLM.example",$$slots:{default:[ui]},$$scope:{ctx:U}}}),Ct=new fe({props:{title:"PeftModelForSeq2SeqLM",local:"peft.PeftModelForSeq2SeqLM",headingTag:"h2"}}),Jt=new x({props:{name:"class peft.PeftModelForSeq2SeqLM",anchor:"peft.PeftModelForSeq2SeqLM",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForSeq2SeqLM.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForSeq2SeqLM.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForSeq2SeqLM.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForSeq2SeqLM.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L2169"}}),Fe=new _e({props:{anchor:"peft.PeftModelForSeq2SeqLM.example",$$slots:{default:[hi]},$$scope:{ctx:U}}}),Ut=new fe({props:{title:"PeftModelForQuestionAnswering",local:"peft.PeftModelForQuestionAnswering",headingTag:"h2"}}),kt=new x({props:{name:"class peft.PeftModelForQuestionAnswering",anchor:"peft.PeftModelForQuestionAnswering",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForQuestionAnswering.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForQuestionAnswering.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForQuestionAnswering.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForQuestionAnswering.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L2662"}}),Ie=new _e({props:{anchor:"peft.PeftModelForQuestionAnswering.example",$$slots:{default:[_i]},$$scope:{ctx:U}}}),Ft=new fe({props:{title:"PeftModelForFeatureExtraction",local:"peft.PeftModelForFeatureExtraction",headingTag:"h2"}}),Zt=new x({props:{name:"class peft.PeftModelForFeatureExtraction",anchor:"peft.PeftModelForFeatureExtraction",parameters:[{name:"model",val:": torch.nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"peft.PeftModelForFeatureExtraction.model",description:'<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) &#x2014; Base transformer model.',name:"model"},{anchor:"peft.PeftModelForFeatureExtraction.peft_config",description:'<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014; Peft config.',name:"peft_config"},{anchor:"peft.PeftModelForFeatureExtraction.adapter_name",description:"<strong>adapter_name</strong> (<code>str</code>,  <em>optional</em>) &#x2014; The name of the adapter, defaults to <code>&quot;default&quot;</code>.",name:"adapter_name"},{anchor:"peft.PeftModelForFeatureExtraction.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>. Right now, this will only cast adapter weights
using float16 and bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L2906"}}),Ze=new _e({props:{anchor:"peft.PeftModelForFeatureExtraction.example",$$slots:{default:[bi]},$$scope:{ctx:U}}}),Et=new fe({props:{title:"PeftMixedModel",local:"peft.PeftMixedModel",headingTag:"h2"}}),Wt=new x({props:{name:"class peft.PeftMixedModel",anchor:"peft.PeftMixedModel",parameters:[{name:"model",val:": nn.Module"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"}],parametersDescription:[{anchor:"peft.PeftMixedModel.model",description:`<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014;
The model to be tuned.`,name:"model"},{anchor:"peft.PeftMixedModel.config",description:`<strong>config</strong> (<code>PeftConfig</code>) &#x2014;
The config of the model to be tuned. The adapter type must be compatible.`,name:"config"},{anchor:"peft.PeftMixedModel.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 first adapter.`,name:"adapter_name"},{anchor:"peft.PeftMixedModel.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"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L67"}}),Ee=new _e({props:{anchor:"peft.PeftMixedModel.example",$$slots:{default:[Mi]},$$scope:{ctx:U}}}),At=new x({props:{name:"add_adapter",anchor:"peft.PeftMixedModel.add_adapter",parameters:[{name:"adapter_name",val:": str"},{name:"peft_config",val:": PeftConfig"},{name:"low_cpu_mem_usage",val:": bool = False"}],parametersDescription:[{anchor:"peft.PeftMixedModel.add_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The name of the adapter to be added.`,name:"adapter_name"},{anchor:"peft.PeftMixedModel.add_adapter.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
The configuration of the adapter to be added.`,name:"peft_config"},{anchor:"peft.PeftMixedModel.add_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 process when loading saved
adapters.</p>
<blockquote class="tip">
<p>&gt; Don&#x2019;t use <code>low_cpu_mem_usage=True</code> when creating a new PEFT adapter for training (training
is untested &gt; and discouraged for PeftMixedModel in general).</p>
</blockquote>`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L203"}}),Bt=new x({props:{name:"disable_adapter",anchor:"peft.PeftMixedModel.disable_adapter",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L192"}}),Rt=new x({props:{name:"forward",anchor:"peft.PeftMixedModel.forward",parameters:[{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L180"}}),Nt=new x({props:{name:"from_pretrained",anchor:"peft.PeftMixedModel.from_pretrained",parameters:[{name:"model",val:": nn.Module"},{name:"model_id",val:": str | os.PathLike"},{name:"adapter_name",val:": str = 'default'"},{name:"is_trainable",val:": bool = False"},{name:"config",val:": Optional[PeftConfig] = None"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftMixedModel.from_pretrained.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model to be adapted.`,name:"model"},{anchor:"peft.PeftMixedModel.from_pretrained.model_id",description:`<strong>model_id</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The name of the PEFT configuration to use. Can be either:
<ul>
<li>A string, the <code>model id</code> of a PEFT configuration hosted inside a model repo on the Hugging Face
Hub.</li>
<li>A path to a directory containing a PEFT configuration file saved using the <code>save_pretrained</code>
method (<code>./my_peft_config_directory/</code>).</li>
</ul>`,name:"model_id"},{anchor:"peft.PeftMixedModel.from_pretrained.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 to be loaded. This is useful for loading multiple adapters.`,name:"adapter_name"},{anchor:"peft.PeftMixedModel.from_pretrained.is_trainable",description:`<strong>is_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the adapter should be trainable or not. If <code>False</code>, the adapter will be frozen and use for
inference`,name:"is_trainable"},{anchor:"peft.PeftMixedModel.from_pretrained.config",description:`<strong>config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>, <em>optional</em>) &#x2014;
The configuration object to use instead of an automatically loaded configuration. This configuration
object is mutually exclusive with <code>model_id</code> and <code>kwargs</code>. This is useful when configuration is already
loaded before calling <code>from_pretrained</code>.`,name:"config"},{anchor:"peft.PeftMixedModel.from_pretrained.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 before loading the saved weights. Useful to speed up the
process.`,name:"low_cpu_mem_usage"},{anchor:"peft.PeftMixedModel.from_pretrained.kwargs",description:`<strong>kwargs</strong> &#x2014; (<code>optional</code>):
Additional keyword arguments passed along to the specific PEFT configuration class.`,name:"kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L381"}}),St=new x({props:{name:"generate",anchor:"peft.PeftMixedModel.generate",parameters:[{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L186"}}),Gt=new x({props:{name:"get_nb_trainable_parameters",anchor:"peft.PeftMixedModel.get_nb_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L126"}}),Dt=new x({props:{name:"load_adapter",anchor:"peft.PeftMixedModel.load_adapter",parameters:[{name:"model_id",val:": str"},{name:"adapter_name",val:": str"},{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftMixedModel.load_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>) &#x2014;
The name of the adapter to be added.`,name:"adapter_name"},{anchor:"peft.PeftMixedModel.load_adapter.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
The configuration of the adapter to be added.`,name:"peft_config"},{anchor:"peft.PeftMixedModel.load_adapter.is_trainable",description:`<strong>is_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the adapter should be trainable or not. If <code>False</code>, the adapter will be frozen and can only be
used for inference.`,name:"is_trainable"},{anchor:"peft.PeftMixedModel.load_adapter.torch_device",description:`<strong>torch_device</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
The device to load the adapter on. If <code>None</code>, the device will be inferred.`,name:"torch_device"},{anchor:"peft.PeftMixedModel.load_adapter.autocast_adapter_dtype",description:`<strong>autocast_adapter_dtype</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to autocast the adapter dtype. Defaults to <code>True</code>. Right now, this will only cast adapter
weights using float16 and bfloat16 to float32, as this is typically required for stable training, and
only affect select PEFT tuners.`,name:"autocast_adapter_dtype"},{anchor:"peft.PeftMixedModel.load_adapter.ephemeral_gpu_offload",description:`<strong>ephemeral_gpu_offload</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use ephemeral GPU offloading for partially loaded modules. Defaults to <code>False</code>.`,name:"ephemeral_gpu_offload"},{anchor:"peft.PeftMixedModel.load_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 before loading the saved weights. Useful to speed up the
process.`,name:"low_cpu_mem_usage"},{anchor:"peft.PeftMixedModel.load_adapter.kwargs",description:`<strong>kwargs</strong> &#x2014; (<code>optional</code>):
Additional arguments to modify the way the adapter is loaded, e.g. the token for Hugging Face Hub.`,name:"kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L332"}}),Qt=new x({props:{name:"merge_and_unload",anchor:"peft.PeftMixedModel.merge_and_unload",parameters:[{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"peft.PeftMixedModel.merge_and_unload.progressbar",description:`<strong>progressbar</strong> (<code>bool</code>) &#x2014;
whether to show a progressbar indicating the unload and merge process`,name:"progressbar"},{anchor:"peft.PeftMixedModel.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.PeftMixedModel.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/v0.18.0.rc0/src/peft/mixed_model.py#L295"}}),Ht=new x({props:{name:"print_trainable_parameters",anchor:"peft.PeftMixedModel.print_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L151"}}),Xt=new x({props:{name:"set_adapter",anchor:"peft.PeftMixedModel.set_adapter",parameters:[{name:"adapter_name",val:": Union[str, list[str]]"},{name:"inference_mode",val:": bool = False"}],parametersDescription:[{anchor:"peft.PeftMixedModel.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.PeftMixedModel.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/v0.18.0.rc0/src/peft/mixed_model.py#L253"}}),zt=new x({props:{name:"unload",anchor:"peft.PeftMixedModel.unload",parameters:[{name:"*args",val:": Any"},{name:"**kwargs",val:": Any"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mixed_model.py#L312"}}),Yt=new fe({props:{title:"Utilities",local:"peft.cast_mixed_precision_params",headingTag:"h2"}}),Ot=new x({props:{name:"peft.cast_mixed_precision_params",anchor:"peft.cast_mixed_precision_params",parameters:[{name:"model",val:""},{name:"dtype",val:""}],parametersDescription:[{anchor:"peft.cast_mixed_precision_params.model",description:`<strong>model</strong> (<code>torch.nn.Module</code>) &#x2014;
The model to cast the non-trainable parameters of.`,name:"model"},{anchor:"peft.cast_mixed_precision_params.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype to cast the non-trainable parameters to. The <code>dtype</code> can be <code>torch.float16</code> or`,name:"dtype"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/utils/other.py#L1335"}}),Kt=new x({props:{name:"peft.get_peft_model",anchor:"peft.get_peft_model",parameters:[{name:"model",val:": PreTrainedModel"},{name:"peft_config",val:": PeftConfig"},{name:"adapter_name",val:": str = 'default'"},{name:"mixed",val:": bool = False"},{name:"autocast_adapter_dtype",val:": bool = True"},{name:"revision",val:": Optional[str] = None"},{name:"low_cpu_mem_usage",val:": bool = False"}],parametersDescription:[{anchor:"peft.get_peft_model.model",description:`<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/v4.57.1/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">transformers.PreTrainedModel</a>) &#x2014;
Model to be wrapped.`,name:"model"},{anchor:"peft.get_peft_model.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/v0.18.0.rc0/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
Configuration object containing the parameters of the Peft model.`,name:"peft_config"},{anchor:"peft.get_peft_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.get_peft_model.mixed",description:`<strong>mixed</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>False</code>) &#x2014;
Whether to allow mixing different (compatible) adapter types.`,name:"mixed"},{anchor:"peft.get_peft_model.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>. Right now, this will only cast adapter weights
using float16 or bfloat16 to float32, as this is typically required for stable training, and only affect
select PEFT tuners.`,name:"autocast_adapter_dtype"},{anchor:"peft.get_peft_model.revision",description:`<strong>revision</strong> (<code>str</code>, <code>optional</code>, defaults to <code>main</code>) &#x2014;
The revision of the base model. If this isn&#x2019;t set, the saved peft model will load the <code>main</code> revision for
the base model`,name:"revision"},{anchor:"peft.get_peft_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. Leave this setting as
False if you intend on training the model, unless the adapter weights will be replaced by different weights
before training starts.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/mapping_func.py#L31"}}),ea=new x({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/v0.18.0.rc0/src/peft/mapping.py#L47"}}),ta=new x({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/v0.18.0.rc0/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/v0.18.0.rc0/src/peft/utils/save_and_load.py#L57"}}),aa=new x({props:{name:"peft.prepare_model_for_kbit_training",anchor:"peft.prepare_model_for_kbit_training",parameters:[{name:"model",val:""},{name:"use_gradient_checkpointing",val:" = True"},{name:"gradient_checkpointing_kwargs",val:" = None"}],parametersDescription:[{anchor:"peft.prepare_model_for_kbit_training.model",description:`<strong>model</strong> (<code>transformers.PreTrainedModel</code>) &#x2014;
The loaded model from <code>transformers</code>`,name:"model"},{anchor:"peft.prepare_model_for_kbit_training.use_gradient_checkpointing",description:`<strong>use_gradient_checkpointing</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If True, use gradient checkpointing to save memory at the expense of slower backward pass.`,name:"use_gradient_checkpointing"},{anchor:"peft.prepare_model_for_kbit_training.gradient_checkpointing_kwargs",description:`<strong>gradient_checkpointing_kwargs</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Keyword arguments to pass to the gradient checkpointing function, please refer to the documentation of
<code>torch.utils.checkpoint.checkpoint</code> for more details about the arguments that you can pass to that method.
Note this is only available in the latest transformers versions (&gt; 4.34.1).`,name:"gradient_checkpointing_kwargs"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/utils/other.py#L130"}}),oa=new x({props:{name:"peft.get_layer_status",anchor:"peft.get_layer_status",parameters:[{name:"model",val:": torch.nn.Module"}],parametersDescription:[{anchor:"peft.get_layer_status.model",description:`<strong>model</strong> ([Union[<code>~PeftModel</code>, <code>~transformers.PreTrainedModel</code>, <code>nn.Module</code>]]) &#x2014;
The model to get the adapter layer status from.`,name:"model"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L3023",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of dataclasses, each containing the status of the corresponding adapter layer.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>list<code>peft.peft_model.TunerLayerStatus</code></p>
`}}),na=new x({props:{name:"peft.get_model_status",anchor:"peft.get_model_status",parameters:[{name:"model",val:": torch.nn.Module"}],parametersDescription:[{anchor:"peft.get_model_status.model",description:`<strong>model</strong> ([Union[<code>~PeftModel</code>, <code>~transformers.PreTrainedModel</code>, <code>nn.Module</code>]]) &#x2014;
The model to get the adapter layer status from.`,name:"model"}],source:"https://github.com/huggingface/peft/blob/v0.18.0.rc0/src/peft/peft_model.py#L3150",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A dataclass containing the status of the model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>peft.peft_model.TunerModelStatus</code></p>
`}}),sa=new pi({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/package_reference/peft_model.md"}}),{c(){p=n("meta"),P=a(),M=n("p"),b=a(),f(v.$$.fragment),l=a(),f(j.$$.fragment),en=a(),Ye=n("p"),Ye.innerHTML=gl,tn=a(),f(Oe.$$.fragment),an=a(),y=n("div"),f(Ke.$$.fragment),Hn=a(),ia=n("p"),ia.textContent=ul,Xn=a(),pa=n("p"),pa.innerHTML=hl,zn=a(),ca=n("ul"),ca.innerHTML=_l,Yn=a(),Z=n("div"),f(et.$$.fragment),On=a(),fa=n("p"),fa.textContent=bl,Kn=a(),ma=n("p"),ma.innerHTML=Ml,es=a(),ga=n("p"),ga.textContent=yl,ts=a(),ua=n("p"),ua.innerHTML=vl,as=a(),K=n("div"),f(tt.$$.fragment),os=a(),ha=n("p"),ha.textContent=Tl,ns=a(),_a=n("ol"),_a.innerHTML=wl,ss=a(),ye=n("div"),f(at.$$.fragment),rs=a(),ba=n("p"),ba.textContent=$l,ls=a(),ee=n("div"),f(ot.$$.fragment),ds=a(),Ma=n("p"),Ma.textContent=xl,is=a(),f(ve.$$.fragment),ps=a(),Te=n("div"),f(nt.$$.fragment),cs=a(),ya=n("p"),ya.textContent=jl,fs=a(),te=n("div"),f(st.$$.fragment),ms=a(),va=n("p"),va.textContent=Cl,gs=a(),Ta=n("p"),Ta.innerHTML=Pl,us=a(),we=n("div"),f(rt.$$.fragment),hs=a(),wa=n("p"),wa.textContent=Jl,_s=a(),N=n("div"),f(lt.$$.fragment),bs=a(),$a=n("p"),$a.textContent=Ul,Ms=a(),xa=n("p"),xa.innerHTML=ql,ys=a(),ja=n("ul"),ja.innerHTML=kl,vs=a(),S=n("div"),f(dt.$$.fragment),Ts=a(),Ca=n("p"),Ca.textContent=Fl,ws=a(),Pa=n("p"),Pa.innerHTML=Il,$s=a(),Ja=n("ul"),Ja.innerHTML=Zl,xs=a(),$e=n("div"),f(it.$$.fragment),js=a(),Ua=n("p"),Ua.textContent=El,Cs=a(),xe=n("div"),f(pt.$$.fragment),Ps=a(),qa=n("p"),qa.textContent=Ll,Js=a(),je=n("div"),f(ct.$$.fragment),Us=a(),ka=n("p"),ka.textContent=Wl,qs=a(),G=n("div"),f(ft.$$.fragment),ks=a(),Fa=n("p"),Fa.textContent=Vl,Fs=a(),Ia=n("p"),Ia.textContent=Al,Is=a(),Za=n("p"),Za.innerHTML=Bl,Zs=a(),Ce=n("div"),f(mt.$$.fragment),Es=a(),Ea=n("p"),Ea.textContent=Rl,Ls=a(),ae=n("div"),f(gt.$$.fragment),Ws=a(),La=n("p"),La.textContent=Nl,Vs=a(),Wa=n("p"),Wa.textContent=Sl,As=a(),Pe=n("div"),f(ut.$$.fragment),Bs=a(),Va=n("p"),Va.innerHTML=Gl,Rs=a(),E=n("div"),f(ht.$$.fragment),Ns=a(),Aa=n("p"),Aa.textContent=Dl,Ss=a(),Ba=n("p"),Ba.textContent=Ql,Gs=a(),Ra=n("p"),Ra.textContent=Hl,Ds=a(),f(Je.$$.fragment),Qs=a(),oe=n("div"),f(_t.$$.fragment),Hs=a(),Na=n("p"),Na.textContent=Xl,Xs=a(),Sa=n("p"),Sa.textContent=zl,on=a(),f(bt.$$.fragment),nn=a(),Mt=n("p"),Mt.innerHTML=Yl,sn=a(),q=n("div"),f(yt.$$.fragment),zs=a(),Ga=n("p"),Ga.textContent=Ol,Ys=a(),Da=n("p"),Da.innerHTML=Kl,Os=a(),Qa=n("ul"),Qa.innerHTML=ed,Ks=a(),f(Ue.$$.fragment),rn=a(),f(vt.$$.fragment),ln=a(),Tt=n("p"),Tt.innerHTML=td,dn=a(),k=n("div"),f(wt.$$.fragment),er=a(),Ha=n("p"),Ha.textContent=ad,tr=a(),Xa=n("p"),Xa.innerHTML=od,ar=a(),za=n("ul"),za.innerHTML=nd,or=a(),f(qe.$$.fragment),pn=a(),f($t.$$.fragment),cn=a(),xt=n("p"),xt.innerHTML=sd,fn=a(),H=n("div"),f(jt.$$.fragment),nr=a(),Ya=n("p"),Ya.textContent=rd,sr=a(),f(ke.$$.fragment),mn=a(),f(Ct.$$.fragment),gn=a(),Pt=n("p"),Pt.innerHTML=ld,un=a(),X=n("div"),f(Jt.$$.fragment),rr=a(),Oa=n("p"),Oa.textContent=dd,lr=a(),f(Fe.$$.fragment),hn=a(),f(Ut.$$.fragment),_n=a(),qt=n("p"),qt.innerHTML=id,bn=a(),F=n("div"),f(kt.$$.fragment),dr=a(),Ka=n("p"),Ka.textContent=pd,ir=a(),eo=n("p"),eo.innerHTML=cd,pr=a(),to=n("ul"),to.innerHTML=fd,cr=a(),f(Ie.$$.fragment),Mn=a(),f(Ft.$$.fragment),yn=a(),It=n("p"),It.innerHTML=md,vn=a(),I=n("div"),f(Zt.$$.fragment),fr=a(),ao=n("p"),ao.textContent=gd,mr=a(),oo=n("p"),oo.innerHTML=ud,gr=a(),no=n("ul"),no.innerHTML=hd,ur=a(),f(Ze.$$.fragment),Tn=a(),f(Et.$$.fragment),wn=a(),Lt=n("p"),Lt.innerHTML=_d,$n=a(),C=n("div"),f(Wt.$$.fragment),hr=a(),so=n("p"),so.textContent=bd,_r=a(),ro=n("p"),ro.innerHTML=Md,br=a(),Vt=n("blockquote"),Vt.innerHTML=yd,Mr=a(),f(Ee.$$.fragment),yr=a(),L=n("div"),f(At.$$.fragment),vr=a(),lo=n("p"),lo.textContent=vd,Tr=a(),io=n("p"),io.innerHTML=Td,wr=a(),po=n("p"),po.textContent=wd,$r=a(),co=n("p"),co.innerHTML=$d,xr=a(),Le=n("div"),f(Bt.$$.fragment),jr=a(),fo=n("p"),fo.textContent=xd,Cr=a(),We=n("div"),f(Rt.$$.fragment),Pr=a(),mo=n("p"),mo.textContent=jd,Jr=a(),ne=n("div"),f(Nt.$$.fragment),Ur=a(),go=n("p"),go.textContent=Cd,qr=a(),uo=n("p"),uo.innerHTML=Pd,kr=a(),Ve=n("div"),f(St.$$.fragment),Fr=a(),ho=n("p"),ho.textContent=Jd,Ir=a(),Ae=n("div"),f(Gt.$$.fragment),Zr=a(),_o=n("p"),_o.textContent=Ud,Er=a(),D=n("div"),f(Dt.$$.fragment),Lr=a(),bo=n("p"),bo.textContent=qd,Wr=a(),Mo=n("p"),Mo.textContent=kd,Vr=a(),yo=n("p"),yo.innerHTML=Fd,Ar=a(),Be=n("div"),f(Qt.$$.fragment),Br=a(),vo=n("p"),vo.textContent=Id,Rr=a(),se=n("div"),f(Ht.$$.fragment),Nr=a(),To=n("p"),To.textContent=Zd,Sr=a(),wo=n("p"),wo.textContent=Ed,Gr=a(),Q=n("div"),f(Xt.$$.fragment),Dr=a(),$o=n("p"),$o.textContent=Ld,Qr=a(),xo=n("p"),xo.textContent=Wd,Hr=a(),jo=n("p"),jo.textContent=Vd,Xr=a(),Re=n("div"),f(zt.$$.fragment),zr=a(),Co=n("p"),Co.textContent=Ad,xn=a(),f(Yt.$$.fragment),jn=a(),z=n("div"),f(Ot.$$.fragment),Yr=a(),Po=n("p"),Po.innerHTML=Bd,Or=a(),Jo=n("p"),Jo.innerHTML=Rd,Cn=a(),me=n("div"),f(Kt.$$.fragment),Kr=a(),Uo=n("p"),Uo.textContent=Nd,Pn=a(),W=n("div"),f(ea.$$.fragment),el=a(),qo=n("p"),qo.textContent=Sd,tl=a(),ko=n("p"),ko.textContent=Gd,al=a(),Fo=n("p"),Fo.innerHTML=Dd,Jn=a(),V=n("div"),f(ta.$$.fragment),ol=a(),Io=n("p"),Io.textContent=Qd,nl=a(),Zo=n("p"),Zo.innerHTML=Hd,sl=a(),Eo=n("p"),Eo.innerHTML=Xd,Un=a(),Y=n("div"),f(aa.$$.fragment),rl=a(),Lo=n("p"),Lo.innerHTML=zd,ll=a(),Wo=n("p"),Wo.textContent=Yd,qn=a(),A=n("div"),f(oa.$$.fragment),dl=a(),Vo=n("p"),Vo.textContent=Od,il=a(),Ao=n("p"),Ao.innerHTML=Kd,pl=a(),Bo=n("ul"),Bo.innerHTML=ei,kn=a(),B=n("div"),f(na.$$.fragment),cl=a(),Ro=n("p"),Ro.textContent=ti,fl=a(),No=n("p"),No.innerHTML=ai,ml=a(),So=n("ul"),So.innerHTML=oi,Fn=a(),f(sa.$$.fragment),In=a(),Ko=n("p"),this.h()},l(e){const i=di("svelte-u9bgzb",document.head);p=s(i,"META",{name:!0,content:!0}),i.forEach(r),P=o(e),M=s(e,"P",{}),$(M).forEach(r),b=o(e),m(v.$$.fragment,e),l=o(e),m(j.$$.fragment,e),en=o(e),Ye=s(e,"P",{"data-svelte-h":!0}),d(Ye)!=="svelte-16uye0k"&&(Ye.innerHTML=gl),tn=o(e),m(Oe.$$.fragment,e),an=o(e),y=s(e,"DIV",{class:!0});var T=$(y);m(Ke.$$.fragment,T),Hn=o(T),ia=s(T,"P",{"data-svelte-h":!0}),d(ia)!=="svelte-1e4ptyx"&&(ia.textContent=ul),Xn=o(T),pa=s(T,"P",{"data-svelte-h":!0}),d(pa)!=="svelte-1xx6nm4"&&(pa.innerHTML=hl),zn=o(T),ca=s(T,"UL",{"data-svelte-h":!0}),d(ca)!=="svelte-17cuju3"&&(ca.innerHTML=_l),Yn=o(T),Z=s(T,"DIV",{class:!0});var R=$(Z);m(et.$$.fragment,R),On=o(R),fa=s(R,"P",{"data-svelte-h":!0}),d(fa)!=="svelte-eev0p"&&(fa.textContent=bl),Kn=o(R),ma=s(R,"P",{"data-svelte-h":!0}),d(ma)!=="svelte-rs4gyb"&&(ma.innerHTML=Ml),es=o(R),ga=s(R,"P",{"data-svelte-h":!0}),d(ga)!=="svelte-1vybd74"&&(ga.textContent=yl),ts=o(R),ua=s(R,"P",{"data-svelte-h":!0}),d(ua)!=="svelte-1x8ubcq"&&(ua.innerHTML=vl),R.forEach(r),as=o(T),K=s(T,"DIV",{class:!0});var ge=$(K);m(tt.$$.fragment,ge),os=o(ge),ha=s(ge,"P",{"data-svelte-h":!0}),d(ha)!=="svelte-ebboe5"&&(ha.textContent=Tl),ns=o(ge),_a=s(ge,"OL",{"data-svelte-h":!0}),d(_a)!=="svelte-1apgpm7"&&(_a.innerHTML=wl),ge.forEach(r),ss=o(T),ye=s(T,"DIV",{class:!0});var ra=$(ye);m(at.$$.fragment,ra),rs=o(ra),ba=s(ra,"P",{"data-svelte-h":!0}),d(ba)!=="svelte-1cw64z1"&&(ba.textContent=$l),ra.forEach(r),ls=o(T),ee=s(T,"DIV",{class:!0});var ue=$(ee);m(ot.$$.fragment,ue),ds=o(ue),Ma=s(ue,"P",{"data-svelte-h":!0}),d(Ma)!=="svelte-1lt46qk"&&(Ma.textContent=xl),is=o(ue),m(ve.$$.fragment,ue),ue.forEach(r),ps=o(T),Te=s(T,"DIV",{class:!0});var la=$(Te);m(nt.$$.fragment,la),cs=o(la),ya=s(la,"P",{"data-svelte-h":!0}),d(ya)!=="svelte-1dahdh7"&&(ya.textContent=jl),la.forEach(r),fs=o(T),te=s(T,"DIV",{class:!0});var he=$(te);m(st.$$.fragment,he),ms=o(he),va=s(he,"P",{"data-svelte-h":!0}),d(va)!=="svelte-1wsj5dv"&&(va.textContent=Cl),gs=o(he),Ta=s(he,"P",{"data-svelte-h":!0}),d(Ta)!=="svelte-1dimxoj"&&(Ta.innerHTML=Pl),he.forEach(r),us=o(T),we=s(T,"DIV",{class:!0});var da=$(we);m(rt.$$.fragment,da),hs=o(da),wa=s(da,"P",{"data-svelte-h":!0}),d(wa)!=="svelte-utls5q"&&(wa.textContent=Jl),da.forEach(r),_s=o(T),N=s(T,"DIV",{class:!0});var O=$(N);m(lt.$$.fragment,O),bs=o(O),$a=s(O,"P",{"data-svelte-h":!0}),d($a)!=="svelte-qbv9wu"&&($a.textContent=Ul),Ms=o(O),xa=s(O,"P",{"data-svelte-h":!0}),d(xa)!=="svelte-106rfnj"&&(xa.innerHTML=ql),ys=o(O),ja=s(O,"UL",{"data-svelte-h":!0}),d(ja)!=="svelte-300tyf"&&(ja.innerHTML=kl),O.forEach(r),vs=o(T),S=s(T,"DIV",{class:!0});var Ne=$(S);m(dt.$$.fragment,Ne),Ts=o(Ne),Ca=s(Ne,"P",{"data-svelte-h":!0}),d(Ca)!=="svelte-19lq8ai"&&(Ca.textContent=Fl),ws=o(Ne),Pa=s(Ne,"P",{"data-svelte-h":!0}),d(Pa)!=="svelte-oh1795"&&(Pa.innerHTML=Il),$s=o(Ne),Ja=s(Ne,"UL",{"data-svelte-h":!0}),d(Ja)!=="svelte-29q9g0"&&(Ja.innerHTML=Zl),Ne.forEach(r),xs=o(T),$e=s(T,"DIV",{class:!0});var En=$($e);m(it.$$.fragment,En),js=o(En),Ua=s(En,"P",{"data-svelte-h":!0}),d(Ua)!=="svelte-1obczxw"&&(Ua.textContent=El),En.forEach(r),Cs=o(T),xe=s(T,"DIV",{class:!0});var Ln=$(xe);m(pt.$$.fragment,Ln),Ps=o(Ln),qa=s(Ln,"P",{"data-svelte-h":!0}),d(qa)!=="svelte-1w4gp53"&&(qa.textContent=Ll),Ln.forEach(r),Js=o(T),je=s(T,"DIV",{class:!0});var Wn=$(je);m(ct.$$.fragment,Wn),Us=o(Wn),ka=s(Wn,"P",{"data-svelte-h":!0}),d(ka)!=="svelte-1o38l72"&&(ka.textContent=Wl),Wn.forEach(r),qs=o(T),G=s(T,"DIV",{class:!0});var Se=$(G);m(ft.$$.fragment,Se),ks=o(Se),Fa=s(Se,"P",{"data-svelte-h":!0}),d(Fa)!=="svelte-1ijv65v"&&(Fa.textContent=Vl),Fs=o(Se),Ia=s(Se,"P",{"data-svelte-h":!0}),d(Ia)!=="svelte-1vybd74"&&(Ia.textContent=Al),Is=o(Se),Za=s(Se,"P",{"data-svelte-h":!0}),d(Za)!=="svelte-1x8ubcq"&&(Za.innerHTML=Bl),Se.forEach(r),Zs=o(T),Ce=s(T,"DIV",{class:!0});var Vn=$(Ce);m(mt.$$.fragment,Vn),Es=o(Vn),Ea=s(Vn,"P",{"data-svelte-h":!0}),d(Ea)!=="svelte-lxfha5"&&(Ea.textContent=Rl),Vn.forEach(r),Ls=o(T),ae=s(T,"DIV",{class:!0});var Go=$(ae);m(gt.$$.fragment,Go),Ws=o(Go),La=s(Go,"P",{"data-svelte-h":!0}),d(La)!=="svelte-nsmqzk"&&(La.textContent=Nl),Vs=o(Go),Wa=s(Go,"P",{"data-svelte-h":!0}),d(Wa)!=="svelte-1m6zd72"&&(Wa.textContent=Sl),Go.forEach(r),As=o(T),Pe=s(T,"DIV",{class:!0});var An=$(Pe);m(ut.$$.fragment,An),Bs=o(An),Va=s(An,"P",{"data-svelte-h":!0}),d(Va)!=="svelte-1b9pbe1"&&(Va.innerHTML=Gl),An.forEach(r),Rs=o(T),E=s(T,"DIV",{class:!0});var re=$(E);m(ht.$$.fragment,re),Ns=o(re),Aa=s(re,"P",{"data-svelte-h":!0}),d(Aa)!=="svelte-sr40it"&&(Aa.textContent=Dl),Ss=o(re),Ba=s(re,"P",{"data-svelte-h":!0}),d(Ba)!=="svelte-1buhq29"&&(Ba.textContent=Ql),Gs=o(re),Ra=s(re,"P",{"data-svelte-h":!0}),d(Ra)!=="svelte-1h3u8lo"&&(Ra.textContent=Hl),Ds=o(re),m(Je.$$.fragment,re),re.forEach(r),Qs=o(T),oe=s(T,"DIV",{class:!0});var Do=$(oe);m(_t.$$.fragment,Do),Hs=o(Do),Na=s(Do,"P",{"data-svelte-h":!0}),d(Na)!=="svelte-aqtirv"&&(Na.textContent=Xl),Xs=o(Do),Sa=s(Do,"P",{"data-svelte-h":!0}),d(Sa)!=="svelte-dj3tqe"&&(Sa.textContent=zl),Do.forEach(r),T.forEach(r),on=o(e),m(bt.$$.fragment,e),nn=o(e),Mt=s(e,"P",{"data-svelte-h":!0}),d(Mt)!=="svelte-ndtvg4"&&(Mt.innerHTML=Yl),sn=o(e),q=s(e,"DIV",{class:!0});var le=$(q);m(yt.$$.fragment,le),zs=o(le),Ga=s(le,"P",{"data-svelte-h":!0}),d(Ga)!=="svelte-1v2olwg"&&(Ga.textContent=Ol),Ys=o(le),Da=s(le,"P",{"data-svelte-h":!0}),d(Da)!=="svelte-1xx6nm4"&&(Da.innerHTML=Kl),Os=o(le),Qa=s(le,"UL",{"data-svelte-h":!0}),d(Qa)!=="svelte-1x7wjjh"&&(Qa.innerHTML=ed),Ks=o(le),m(Ue.$$.fragment,le),le.forEach(r),rn=o(e),m(vt.$$.fragment,e),ln=o(e),Tt=s(e,"P",{"data-svelte-h":!0}),d(Tt)!=="svelte-29bbti"&&(Tt.innerHTML=td),dn=o(e),k=s(e,"DIV",{class:!0});var de=$(k);m(wt.$$.fragment,de),er=o(de),Ha=s(de,"P",{"data-svelte-h":!0}),d(Ha)!=="svelte-1nor8hq"&&(Ha.textContent=ad),tr=o(de),Xa=s(de,"P",{"data-svelte-h":!0}),d(Xa)!=="svelte-1xx6nm4"&&(Xa.innerHTML=od),ar=o(de),za=s(de,"UL",{"data-svelte-h":!0}),d(za)!=="svelte-1x7wjjh"&&(za.innerHTML=nd),or=o(de),m(qe.$$.fragment,de),de.forEach(r),pn=o(e),m($t.$$.fragment,e),cn=o(e),xt=s(e,"P",{"data-svelte-h":!0}),d(xt)!=="svelte-1tlttqn"&&(xt.innerHTML=sd),fn=o(e),H=s(e,"DIV",{class:!0});var Qo=$(H);m(jt.$$.fragment,Qo),nr=o(Qo),Ya=s(Qo,"P",{"data-svelte-h":!0}),d(Ya)!=="svelte-1xidneb"&&(Ya.textContent=rd),sr=o(Qo),m(ke.$$.fragment,Qo),Qo.forEach(r),mn=o(e),m(Ct.$$.fragment,e),gn=o(e),Pt=s(e,"P",{"data-svelte-h":!0}),d(Pt)!=="svelte-1jmb61f"&&(Pt.innerHTML=ld),un=o(e),X=s(e,"DIV",{class:!0});var Ho=$(X);m(Jt.$$.fragment,Ho),rr=o(Ho),Oa=s(Ho,"P",{"data-svelte-h":!0}),d(Oa)!=="svelte-i4jzn3"&&(Oa.textContent=dd),lr=o(Ho),m(Fe.$$.fragment,Ho),Ho.forEach(r),hn=o(e),m(Ut.$$.fragment,e),_n=o(e),qt=s(e,"P",{"data-svelte-h":!0}),d(qt)!=="svelte-5ypilt"&&(qt.innerHTML=id),bn=o(e),F=s(e,"DIV",{class:!0});var ie=$(F);m(kt.$$.fragment,ie),dr=o(ie),Ka=s(ie,"P",{"data-svelte-h":!0}),d(Ka)!=="svelte-aqv7qc"&&(Ka.textContent=pd),ir=o(ie),eo=s(ie,"P",{"data-svelte-h":!0}),d(eo)!=="svelte-1xx6nm4"&&(eo.innerHTML=cd),pr=o(ie),to=s(ie,"UL",{"data-svelte-h":!0}),d(to)!=="svelte-1x7wjjh"&&(to.innerHTML=fd),cr=o(ie),m(Ie.$$.fragment,ie),ie.forEach(r),Mn=o(e),m(Ft.$$.fragment,e),yn=o(e),It=s(e,"P",{"data-svelte-h":!0}),d(It)!=="svelte-zn19al"&&(It.innerHTML=md),vn=o(e),I=s(e,"DIV",{class:!0});var pe=$(I);m(Zt.$$.fragment,pe),fr=o(pe),ao=s(pe,"P",{"data-svelte-h":!0}),d(ao)!=="svelte-lta6tj"&&(ao.textContent=gd),mr=o(pe),oo=s(pe,"P",{"data-svelte-h":!0}),d(oo)!=="svelte-1xx6nm4"&&(oo.innerHTML=ud),gr=o(pe),no=s(pe,"UL",{"data-svelte-h":!0}),d(no)!=="svelte-1bhc9fb"&&(no.innerHTML=hd),ur=o(pe),m(Ze.$$.fragment,pe),pe.forEach(r),Tn=o(e),m(Et.$$.fragment,e),wn=o(e),Lt=s(e,"P",{"data-svelte-h":!0}),d(Lt)!=="svelte-1mnmrm0"&&(Lt.innerHTML=_d),$n=o(e),C=s(e,"DIV",{class:!0});var J=$(C);m(Wt.$$.fragment,J),hr=o(J),so=s(J,"P",{"data-svelte-h":!0}),d(so)!=="svelte-1fqn09x"&&(so.textContent=bd),_r=o(J),ro=s(J,"P",{"data-svelte-h":!0}),d(ro)!=="svelte-vb6bb3"&&(ro.innerHTML=Md),br=o(J),Vt=s(J,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(Vt)!=="svelte-tug1np"&&(Vt.innerHTML=yd),Mr=o(J),m(Ee.$$.fragment,J),yr=o(J),L=s(J,"DIV",{class:!0});var ce=$(L);m(At.$$.fragment,ce),vr=o(ce),lo=s(ce,"P",{"data-svelte-h":!0}),d(lo)!=="svelte-eev0p"&&(lo.textContent=vd),Tr=o(ce),io=s(ce,"P",{"data-svelte-h":!0}),d(io)!=="svelte-rs4gyb"&&(io.innerHTML=Td),wr=o(ce),po=s(ce,"P",{"data-svelte-h":!0}),d(po)!=="svelte-1vybd74"&&(po.textContent=wd),$r=o(ce),co=s(ce,"P",{"data-svelte-h":!0}),d(co)!=="svelte-1x8ubcq"&&(co.innerHTML=$d),ce.forEach(r),xr=o(J),Le=s(J,"DIV",{class:!0});var Bn=$(Le);m(Bt.$$.fragment,Bn),jr=o(Bn),fo=s(Bn,"P",{"data-svelte-h":!0}),d(fo)!=="svelte-10kge19"&&(fo.textContent=xd),Bn.forEach(r),Cr=o(J),We=s(J,"DIV",{class:!0});var Rn=$(We);m(Rt.$$.fragment,Rn),Pr=o(Rn),mo=s(Rn,"P",{"data-svelte-h":!0}),d(mo)!=="svelte-1dahdh7"&&(mo.textContent=jd),Rn.forEach(r),Jr=o(J),ne=s(J,"DIV",{class:!0});var Xo=$(ne);m(Nt.$$.fragment,Xo),Ur=o(Xo),go=s(Xo,"P",{"data-svelte-h":!0}),d(go)!=="svelte-7485e6"&&(go.textContent=Cd),qr=o(Xo),uo=s(Xo,"P",{"data-svelte-h":!0}),d(uo)!=="svelte-1dimxoj"&&(uo.innerHTML=Pd),Xo.forEach(r),kr=o(J),Ve=s(J,"DIV",{class:!0});var Nn=$(Ve);m(St.$$.fragment,Nn),Fr=o(Nn),ho=s(Nn,"P",{"data-svelte-h":!0}),d(ho)!=="svelte-12wcp4m"&&(ho.textContent=Jd),Nn.forEach(r),Ir=o(J),Ae=s(J,"DIV",{class:!0});var Sn=$(Ae);m(Gt.$$.fragment,Sn),Zr=o(Sn),_o=s(Sn,"P",{"data-svelte-h":!0}),d(_o)!=="svelte-1hlrv9t"&&(_o.textContent=Ud),Sn.forEach(r),Er=o(J),D=s(J,"DIV",{class:!0});var Ge=$(D);m(Dt.$$.fragment,Ge),Lr=o(Ge),bo=s(Ge,"P",{"data-svelte-h":!0}),d(bo)!=="svelte-1ijv65v"&&(bo.textContent=qd),Wr=o(Ge),Mo=s(Ge,"P",{"data-svelte-h":!0}),d(Mo)!=="svelte-1vybd74"&&(Mo.textContent=kd),Vr=o(Ge),yo=s(Ge,"P",{"data-svelte-h":!0}),d(yo)!=="svelte-1x8ubcq"&&(yo.innerHTML=Fd),Ge.forEach(r),Ar=o(J),Be=s(J,"DIV",{class:!0});var Gn=$(Be);m(Qt.$$.fragment,Gn),Br=o(Gn),vo=s(Gn,"P",{"data-svelte-h":!0}),d(vo)!=="svelte-1pmlbbw"&&(vo.textContent=Id),Gn.forEach(r),Rr=o(J),se=s(J,"DIV",{class:!0});var zo=$(se);m(Ht.$$.fragment,zo),Nr=o(zo),To=s(zo,"P",{"data-svelte-h":!0}),d(To)!=="svelte-nsmqzk"&&(To.textContent=Zd),Sr=o(zo),wo=s(zo,"P",{"data-svelte-h":!0}),d(wo)!=="svelte-1m6zd72"&&(wo.textContent=Ed),zo.forEach(r),Gr=o(J),Q=s(J,"DIV",{class:!0});var De=$(Q);m(Xt.$$.fragment,De),Dr=o(De),$o=s(De,"P",{"data-svelte-h":!0}),d($o)!=="svelte-1lcepem"&&($o.textContent=Ld),Qr=o(De),xo=s(De,"P",{"data-svelte-h":!0}),d(xo)!=="svelte-13u0frm"&&(xo.textContent=Wd),Hr=o(De),jo=s(De,"P",{"data-svelte-h":!0}),d(jo)!=="svelte-1020tdh"&&(jo.textContent=Vd),De.forEach(r),Xr=o(J),Re=s(J,"DIV",{class:!0});var Dn=$(Re);m(zt.$$.fragment,Dn),zr=o(Dn),Co=s(Dn,"P",{"data-svelte-h":!0}),d(Co)!=="svelte-1thkzpl"&&(Co.textContent=Ad),Dn.forEach(r),J.forEach(r),xn=o(e),m(Yt.$$.fragment,e),jn=o(e),z=s(e,"DIV",{class:!0});var Yo=$(z);m(Ot.$$.fragment,Yo),Yr=o(Yo),Po=s(Yo,"P",{"data-svelte-h":!0}),d(Po)!=="svelte-4feb4l"&&(Po.innerHTML=Bd),Or=o(Yo),Jo=s(Yo,"P",{"data-svelte-h":!0}),d(Jo)!=="svelte-1a5uwl6"&&(Jo.innerHTML=Rd),Yo.forEach(r),Cn=o(e),me=s(e,"DIV",{class:!0});var Qn=$(me);m(Kt.$$.fragment,Qn),Kr=o(Qn),Uo=s(Qn,"P",{"data-svelte-h":!0}),d(Uo)!=="svelte-1ihkopr"&&(Uo.textContent=Nd),Qn.forEach(r),Pn=o(e),W=s(e,"DIV",{class:!0});var Qe=$(W);m(ea.$$.fragment,Qe),el=o(Qe),qo=s(Qe,"P",{"data-svelte-h":!0}),d(qo)!=="svelte-pzx6vm"&&(qo.textContent=Sd),tl=o(Qe),ko=s(Qe,"P",{"data-svelte-h":!0}),d(ko)!=="svelte-1kmvq6f"&&(ko.textContent=Gd),al=o(Qe),Fo=s(Qe,"P",{"data-svelte-h":!0}),d(Fo)!=="svelte-vjvcqz"&&(Fo.innerHTML=Dd),Qe.forEach(r),Jn=o(e),V=s(e,"DIV",{class:!0});var He=$(V);m(ta.$$.fragment,He),ol=o(He),Io=s(He,"P",{"data-svelte-h":!0}),d(Io)!=="svelte-gnbqlm"&&(Io.textContent=Qd),nl=o(He),Zo=s(He,"P",{"data-svelte-h":!0}),d(Zo)!=="svelte-qojlyp"&&(Zo.innerHTML=Hd),sl=o(He),Eo=s(He,"P",{"data-svelte-h":!0}),d(Eo)!=="svelte-1agk593"&&(Eo.innerHTML=Xd),He.forEach(r),Un=o(e),Y=s(e,"DIV",{class:!0});var Oo=$(Y);m(aa.$$.fragment,Oo),rl=o(Oo),Lo=s(Oo,"P",{"data-svelte-h":!0}),d(Lo)!=="svelte-1a0dqf5"&&(Lo.innerHTML=zd),ll=o(Oo),Wo=s(Oo,"P",{"data-svelte-h":!0}),d(Wo)!=="svelte-8wbipw"&&(Wo.textContent=Yd),Oo.forEach(r),qn=o(e),A=s(e,"DIV",{class:!0});var Xe=$(A);m(oa.$$.fragment,Xe),dl=o(Xe),Vo=s(Xe,"P",{"data-svelte-h":!0}),d(Vo)!=="svelte-qbv9wu"&&(Vo.textContent=Od),il=o(Xe),Ao=s(Xe,"P",{"data-svelte-h":!0}),d(Ao)!=="svelte-la6m46"&&(Ao.innerHTML=Kd),pl=o(Xe),Bo=s(Xe,"UL",{"data-svelte-h":!0}),d(Bo)!=="svelte-160lblm"&&(Bo.innerHTML=ei),Xe.forEach(r),kn=o(e),B=s(e,"DIV",{class:!0});var ze=$(B);m(na.$$.fragment,ze),cl=o(ze),Ro=s(ze,"P",{"data-svelte-h":!0}),d(Ro)!=="svelte-19lq8ai"&&(Ro.textContent=ti),fl=o(ze),No=s(ze,"P",{"data-svelte-h":!0}),d(No)!=="svelte-1ebt70o"&&(No.innerHTML=ai),ml=o(ze),So=s(ze,"UL",{"data-svelte-h":!0}),d(So)!=="svelte-r7myae"&&(So.innerHTML=oi),ze.forEach(r),Fn=o(e),m(sa.$$.fragment,e),In=o(e),Ko=s(e,"P",{}),$(Ko).forEach(r),this.h()},h(){w(p,"name","hf:doc:metadata"),w(p,"content",vi),w(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Vt,"class","tip"),w(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(B,"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,i){t(document.head,p),c(e,P,i),c(e,M,i),c(e,b,i),g(v,e,i),c(e,l,i),g(j,e,i),c(e,en,i),c(e,Ye,i),c(e,tn,i),g(Oe,e,i),c(e,an,i),c(e,y,i),g(Ke,y,null),t(y,Hn),t(y,ia),t(y,Xn),t(y,pa),t(y,zn),t(y,ca),t(y,Yn),t(y,Z),g(et,Z,null),t(Z,On),t(Z,fa),t(Z,Kn),t(Z,ma),t(Z,es),t(Z,ga),t(Z,ts),t(Z,ua),t(y,as),t(y,K),g(tt,K,null),t(K,os),t(K,ha),t(K,ns),t(K,_a),t(y,ss),t(y,ye),g(at,ye,null),t(ye,rs),t(ye,ba),t(y,ls),t(y,ee),g(ot,ee,null),t(ee,ds),t(ee,Ma),t(ee,is),g(ve,ee,null),t(y,ps),t(y,Te),g(nt,Te,null),t(Te,cs),t(Te,ya),t(y,fs),t(y,te),g(st,te,null),t(te,ms),t(te,va),t(te,gs),t(te,Ta),t(y,us),t(y,we),g(rt,we,null),t(we,hs),t(we,wa),t(y,_s),t(y,N),g(lt,N,null),t(N,bs),t(N,$a),t(N,Ms),t(N,xa),t(N,ys),t(N,ja),t(y,vs),t(y,S),g(dt,S,null),t(S,Ts),t(S,Ca),t(S,ws),t(S,Pa),t(S,$s),t(S,Ja),t(y,xs),t(y,$e),g(it,$e,null),t($e,js),t($e,Ua),t(y,Cs),t(y,xe),g(pt,xe,null),t(xe,Ps),t(xe,qa),t(y,Js),t(y,je),g(ct,je,null),t(je,Us),t(je,ka),t(y,qs),t(y,G),g(ft,G,null),t(G,ks),t(G,Fa),t(G,Fs),t(G,Ia),t(G,Is),t(G,Za),t(y,Zs),t(y,Ce),g(mt,Ce,null),t(Ce,Es),t(Ce,Ea),t(y,Ls),t(y,ae),g(gt,ae,null),t(ae,Ws),t(ae,La),t(ae,Vs),t(ae,Wa),t(y,As),t(y,Pe),g(ut,Pe,null),t(Pe,Bs),t(Pe,Va),t(y,Rs),t(y,E),g(ht,E,null),t(E,Ns),t(E,Aa),t(E,Ss),t(E,Ba),t(E,Gs),t(E,Ra),t(E,Ds),g(Je,E,null),t(y,Qs),t(y,oe),g(_t,oe,null),t(oe,Hs),t(oe,Na),t(oe,Xs),t(oe,Sa),c(e,on,i),g(bt,e,i),c(e,nn,i),c(e,Mt,i),c(e,sn,i),c(e,q,i),g(yt,q,null),t(q,zs),t(q,Ga),t(q,Ys),t(q,Da),t(q,Os),t(q,Qa),t(q,Ks),g(Ue,q,null),c(e,rn,i),g(vt,e,i),c(e,ln,i),c(e,Tt,i),c(e,dn,i),c(e,k,i),g(wt,k,null),t(k,er),t(k,Ha),t(k,tr),t(k,Xa),t(k,ar),t(k,za),t(k,or),g(qe,k,null),c(e,pn,i),g($t,e,i),c(e,cn,i),c(e,xt,i),c(e,fn,i),c(e,H,i),g(jt,H,null),t(H,nr),t(H,Ya),t(H,sr),g(ke,H,null),c(e,mn,i),g(Ct,e,i),c(e,gn,i),c(e,Pt,i),c(e,un,i),c(e,X,i),g(Jt,X,null),t(X,rr),t(X,Oa),t(X,lr),g(Fe,X,null),c(e,hn,i),g(Ut,e,i),c(e,_n,i),c(e,qt,i),c(e,bn,i),c(e,F,i),g(kt,F,null),t(F,dr),t(F,Ka),t(F,ir),t(F,eo),t(F,pr),t(F,to),t(F,cr),g(Ie,F,null),c(e,Mn,i),g(Ft,e,i),c(e,yn,i),c(e,It,i),c(e,vn,i),c(e,I,i),g(Zt,I,null),t(I,fr),t(I,ao),t(I,mr),t(I,oo),t(I,gr),t(I,no),t(I,ur),g(Ze,I,null),c(e,Tn,i),g(Et,e,i),c(e,wn,i),c(e,Lt,i),c(e,$n,i),c(e,C,i),g(Wt,C,null),t(C,hr),t(C,so),t(C,_r),t(C,ro),t(C,br),t(C,Vt),t(C,Mr),g(Ee,C,null),t(C,yr),t(C,L),g(At,L,null),t(L,vr),t(L,lo),t(L,Tr),t(L,io),t(L,wr),t(L,po),t(L,$r),t(L,co),t(C,xr),t(C,Le),g(Bt,Le,null),t(Le,jr),t(Le,fo),t(C,Cr),t(C,We),g(Rt,We,null),t(We,Pr),t(We,mo),t(C,Jr),t(C,ne),g(Nt,ne,null),t(ne,Ur),t(ne,go),t(ne,qr),t(ne,uo),t(C,kr),t(C,Ve),g(St,Ve,null),t(Ve,Fr),t(Ve,ho),t(C,Ir),t(C,Ae),g(Gt,Ae,null),t(Ae,Zr),t(Ae,_o),t(C,Er),t(C,D),g(Dt,D,null),t(D,Lr),t(D,bo),t(D,Wr),t(D,Mo),t(D,Vr),t(D,yo),t(C,Ar),t(C,Be),g(Qt,Be,null),t(Be,Br),t(Be,vo),t(C,Rr),t(C,se),g(Ht,se,null),t(se,Nr),t(se,To),t(se,Sr),t(se,wo),t(C,Gr),t(C,Q),g(Xt,Q,null),t(Q,Dr),t(Q,$o),t(Q,Qr),t(Q,xo),t(Q,Hr),t(Q,jo),t(C,Xr),t(C,Re),g(zt,Re,null),t(Re,zr),t(Re,Co),c(e,xn,i),g(Yt,e,i),c(e,jn,i),c(e,z,i),g(Ot,z,null),t(z,Yr),t(z,Po),t(z,Or),t(z,Jo),c(e,Cn,i),c(e,me,i),g(Kt,me,null),t(me,Kr),t(me,Uo),c(e,Pn,i),c(e,W,i),g(ea,W,null),t(W,el),t(W,qo),t(W,tl),t(W,ko),t(W,al),t(W,Fo),c(e,Jn,i),c(e,V,i),g(ta,V,null),t(V,ol),t(V,Io),t(V,nl),t(V,Zo),t(V,sl),t(V,Eo),c(e,Un,i),c(e,Y,i),g(aa,Y,null),t(Y,rl),t(Y,Lo),t(Y,ll),t(Y,Wo),c(e,qn,i),c(e,A,i),g(oa,A,null),t(A,dl),t(A,Vo),t(A,il),t(A,Ao),t(A,pl),t(A,Bo),c(e,kn,i),c(e,B,i),g(na,B,null),t(B,cl),t(B,Ro),t(B,fl),t(B,No),t(B,ml),t(B,So),c(e,Fn,i),g(sa,e,i),c(e,In,i),c(e,Ko,i),Zn=!0},p(e,[i]){const T={};i&2&&(T.$$scope={dirty:i,ctx:e}),ve.$set(T);const R={};i&2&&(R.$$scope={dirty:i,ctx:e}),Je.$set(R);const ge={};i&2&&(ge.$$scope={dirty:i,ctx:e}),Ue.$set(ge);const ra={};i&2&&(ra.$$scope={dirty:i,ctx:e}),qe.$set(ra);const ue={};i&2&&(ue.$$scope={dirty:i,ctx:e}),ke.$set(ue);const la={};i&2&&(la.$$scope={dirty:i,ctx:e}),Fe.$set(la);const he={};i&2&&(he.$$scope={dirty:i,ctx:e}),Ie.$set(he);const da={};i&2&&(da.$$scope={dirty:i,ctx:e}),Ze.$set(da);const O={};i&2&&(O.$$scope={dirty:i,ctx:e}),Ee.$set(O)},i(e){Zn||(u(v.$$.fragment,e),u(j.$$.fragment,e),u(Oe.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(tt.$$.fragment,e),u(at.$$.fragment,e),u(ot.$$.fragment,e),u(ve.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(rt.$$.fragment,e),u(lt.$$.fragment,e),u(dt.$$.fragment,e),u(it.$$.fragment,e),u(pt.$$.fragment,e),u(ct.$$.fragment,e),u(ft.$$.fragment,e),u(mt.$$.fragment,e),u(gt.$$.fragment,e),u(ut.$$.fragment,e),u(ht.$$.fragment,e),u(Je.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(yt.$$.fragment,e),u(Ue.$$.fragment,e),u(vt.$$.fragment,e),u(wt.$$.fragment,e),u(qe.$$.fragment,e),u($t.$$.fragment,e),u(jt.$$.fragment,e),u(ke.$$.fragment,e),u(Ct.$$.fragment,e),u(Jt.$$.fragment,e),u(Fe.$$.fragment,e),u(Ut.$$.fragment,e),u(kt.$$.fragment,e),u(Ie.$$.fragment,e),u(Ft.$$.fragment,e),u(Zt.$$.fragment,e),u(Ze.$$.fragment,e),u(Et.$$.fragment,e),u(Wt.$$.fragment,e),u(Ee.$$.fragment,e),u(At.$$.fragment,e),u(Bt.$$.fragment,e),u(Rt.$$.fragment,e),u(Nt.$$.fragment,e),u(St.$$.fragment,e),u(Gt.$$.fragment,e),u(Dt.$$.fragment,e),u(Qt.$$.fragment,e),u(Ht.$$.fragment,e),u(Xt.$$.fragment,e),u(zt.$$.fragment,e),u(Yt.$$.fragment,e),u(Ot.$$.fragment,e),u(Kt.$$.fragment,e),u(ea.$$.fragment,e),u(ta.$$.fragment,e),u(aa.$$.fragment,e),u(oa.$$.fragment,e),u(na.$$.fragment,e),u(sa.$$.fragment,e),Zn=!0)},o(e){h(v.$$.fragment,e),h(j.$$.fragment,e),h(Oe.$$.fragment,e),h(Ke.$$.fragment,e),h(et.$$.fragment,e),h(tt.$$.fragment,e),h(at.$$.fragment,e),h(ot.$$.fragment,e),h(ve.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(rt.$$.fragment,e),h(lt.$$.fragment,e),h(dt.$$.fragment,e),h(it.$$.fragment,e),h(pt.$$.fragment,e),h(ct.$$.fragment,e),h(ft.$$.fragment,e),h(mt.$$.fragment,e),h(gt.$$.fragment,e),h(ut.$$.fragment,e),h(ht.$$.fragment,e),h(Je.$$.fragment,e),h(_t.$$.fragment,e),h(bt.$$.fragment,e),h(yt.$$.fragment,e),h(Ue.$$.fragment,e),h(vt.$$.fragment,e),h(wt.$$.fragment,e),h(qe.$$.fragment,e),h($t.$$.fragment,e),h(jt.$$.fragment,e),h(ke.$$.fragment,e),h(Ct.$$.fragment,e),h(Jt.$$.fragment,e),h(Fe.$$.fragment,e),h(Ut.$$.fragment,e),h(kt.$$.fragment,e),h(Ie.$$.fragment,e),h(Ft.$$.fragment,e),h(Zt.$$.fragment,e),h(Ze.$$.fragment,e),h(Et.$$.fragment,e),h(Wt.$$.fragment,e),h(Ee.$$.fragment,e),h(At.$$.fragment,e),h(Bt.$$.fragment,e),h(Rt.$$.fragment,e),h(Nt.$$.fragment,e),h(St.$$.fragment,e),h(Gt.$$.fragment,e),h(Dt.$$.fragment,e),h(Qt.$$.fragment,e),h(Ht.$$.fragment,e),h(Xt.$$.fragment,e),h(zt.$$.fragment,e),h(Yt.$$.fragment,e),h(Ot.$$.fragment,e),h(Kt.$$.fragment,e),h(ea.$$.fragment,e),h(ta.$$.fragment,e),h(aa.$$.fragment,e),h(oa.$$.fragment,e),h(na.$$.fragment,e),h(sa.$$.fragment,e),Zn=!1},d(e){e&&(r(P),r(M),r(b),r(l),r(en),r(Ye),r(tn),r(an),r(y),r(on),r(nn),r(Mt),r(sn),r(q),r(rn),r(ln),r(Tt),r(dn),r(k),r(pn),r(cn),r(xt),r(fn),r(H),r(mn),r(gn),r(Pt),r(un),r(X),r(hn),r(_n),r(qt),r(bn),r(F),r(Mn),r(yn),r(It),r(vn),r(I),r(Tn),r(wn),r(Lt),r($n),r(C),r(xn),r(jn),r(z),r(Cn),r(me),r(Pn),r(W),r(Jn),r(V),r(Un),r(Y),r(qn),r(A),r(kn),r(B),r(Fn),r(In),r(Ko)),r(p),_(v,e),_(j,e),_(Oe,e),_(Ke),_(et),_(tt),_(at),_(ot),_(ve),_(nt),_(st),_(rt),_(lt),_(dt),_(it),_(pt),_(ct),_(ft),_(mt),_(gt),_(ut),_(ht),_(Je),_(_t),_(bt,e),_(yt),_(Ue),_(vt,e),_(wt),_(qe),_($t,e),_(jt),_(ke),_(Ct,e),_(Jt),_(Fe),_(Ut,e),_(kt),_(Ie),_(Ft,e),_(Zt),_(Ze),_(Et,e),_(Wt),_(Ee),_(At),_(Bt),_(Rt),_(Nt),_(St),_(Gt),_(Dt),_(Qt),_(Ht),_(Xt),_(zt),_(Yt,e),_(Ot),_(Kt),_(ea),_(ta),_(aa),_(oa),_(na),_(sa,e)}}}const vi='{"title":"Models","local":"models","sections":[{"title":"PeftModel","local":"peft.PeftModel","sections":[],"depth":2},{"title":"PeftModelForSequenceClassification","local":"peft.PeftModelForSequenceClassification","sections":[],"depth":2},{"title":"PeftModelForTokenClassification","local":"peft.PeftModelForTokenClassification","sections":[],"depth":2},{"title":"PeftModelForCausalLM","local":"peft.PeftModelForCausalLM","sections":[],"depth":2},{"title":"PeftModelForSeq2SeqLM","local":"peft.PeftModelForSeq2SeqLM","sections":[],"depth":2},{"title":"PeftModelForQuestionAnswering","local":"peft.PeftModelForQuestionAnswering","sections":[],"depth":2},{"title":"PeftModelForFeatureExtraction","local":"peft.PeftModelForFeatureExtraction","sections":[],"depth":2},{"title":"PeftMixedModel","local":"peft.PeftMixedModel","sections":[],"depth":2},{"title":"Utilities","local":"peft.cast_mixed_precision_params","sections":[],"depth":2}],"depth":1}';function Ti(U){return si(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ji extends ri{constructor(p){super(),li(this,p,Ti,yi,ni,{})}}export{Ji as component};
