import{s as Si,o as Di,n as Ke}from"../chunks/scheduler.78382b47.js";import{S as Gi,i as Hi,e as n,s as a,c,h as Qi,a as s,d as r,b as o,f as T,g as f,j as d,k as y,l as t,m as p,n as m,t as g,o as u,p as h}from"../chunks/index.6dd35eb6.js";import{C as Xi,H as ue,E as zi}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.fed9dfe4.js";import{D as x}from"../chunks/Docstring.32e826ec.js";import{C as et}from"../chunks/CodeBlock.af1ec02e.js";import{E as Oe}from"../chunks/ExampleCodeBlock.7f184f2e.js";function Yi(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function Oi(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function Ki(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function ep(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function tp(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function ap(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function op(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function np(U){let _,J="Example:",$,b,w;return b=new et({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(){_=n("p"),_.textContent=J,$=a(),c(b.$$.fragment)},l(l){_=s(l,"P",{"data-svelte-h":!0}),d(_)!=="svelte-11lpom8"&&(_.textContent=J),$=o(l),f(b.$$.fragment,l)},m(l,j){p(l,_,j),p(l,$,j),m(b,l,j),w=!0},p:Ke,i(l){w||(g(b.$$.fragment,l),w=!0)},o(l){u(b.$$.fragment,l),w=!1},d(l){l&&(r(_),r($)),h(b,l)}}}function sp(U){let _,J,$,b,w,l,j,Mn,tt,Sl='<a href="/docs/peft/main/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.',yn,at,vn,M,ot,fs,ha,Dl="Base model encompassing various Peft methods.",ms,_a,Gl="<strong>Attributes</strong>:",gs,ba,Hl=`<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/main/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/main/en/package_reference/p_tuning#peft.PromptEncoder">PromptEncoder</a>) — The prompt encoder used for Peft if
using <a href="/docs/peft/main/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/main/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/main/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/main/en/package_reference/config#peft.PromptLearningConfig">PromptLearningConfig</a>.</li>`,us,E,nt,hs,Ma,Ql="Add an adapter to the model based on the passed configuration.",_s,ya,Xl='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',bs,va,zl="The name for the new adapter should be unique.",Ms,Ta,Yl=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,ys,ae,st,vs,wa,Ol="Updates or create model card to include information about peft:",Ts,xa,Kl="<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>",ws,ye,rt,xs,$a,ed="Deletes an existing adapter.",$s,oe,lt,js,ja,td="Context manager that disables the adapter module. Use this to run inference on the base model.",Cs,ve,Ps,Te,dt,Js,Ca,ad="Forward pass of the model.",Us,ne,it,qs,Pa,od="Instantiate a PEFT model from a pretrained model and loaded PEFT weights.",Fs,Ja,nd="Note that the passed <code>model</code> may be modified inplace.",ks,we,pt,Is,Ua,sd="Returns the base model.",Es,S,ct,Zs,qa,rd="Get the status of each adapter layer in the model.",Ls,Fa,ld=`This method returns a list of <code>TunerLayerStatus</code> dataclass instances, each of which contains the following
attributes:`,Ws,ka,dd=`<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>`,As,D,ft,Vs,Ia,id="Get the status of tuners of the model.",Bs,Ea,pd="This method returns a <code>TunerModelStatus</code> dataclass instance, which contains the following attributes:",Rs,Za,cd=`<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>`,Ns,xe,mt,Ss,La,fd="Returns the number of trainable parameters and the number of all parameters in the model.",Ds,$e,gt,Gs,Wa,md="Returns the virtual prompts to use for Peft. Only applicable when using a prompt learning method.",Hs,je,ut,Qs,Aa,gd=`Returns the prompt embedding to save when saving the model. Only applicable when using a prompt learning
method.`,Xs,G,ht,zs,Va,ud="Load a trained adapter into the model.",Ys,Ba,hd="The name for the new adapter should be unique.",Os,Ra,_d=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,Ks,Ce,_t,er,Na,bd="Prepares the model for gradient checkpointing if necessary",tr,se,bt,ar,Sa,Md="Prints the number of trainable parameters in the model.",or,Da,yd=`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.`,nr,Pe,Mt,sr,Ga,vd=`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/main/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.`,rr,H,yt,lr,Ha,Td="Sets the active adapter.",dr,Qa,wd="Only one adapter can be active at a time.",ir,Xa,xd=`Additionally, this function will set the specified adapter to trainable (i.e., requires_grad=True) unless
inference_mode is True.`,pr,re,vt,cr,za,$d="Enable or disable gradients on the given adapter(s).",fr,Ya,jd="Note: Not supported for prompt learning methods like prompt tuning.",mr,le,Tt,gr,Oa,Cd="Whether it is possible for the adapter of this model to be converted to LoRA.",ur,Ka,Pd="Normally, this works if the PEFT method is additive, i.e. W’ = W_base + delta_weight.",Tn,wt,wn,xt,Jd="A <code>PeftModel</code> for sequence classification tasks.",xn,k,$t,hr,eo,Ud="Peft model for sequence classification tasks.",_r,to,qd="<strong>Attributes</strong>:",br,ao,Fd="<li><strong>config</strong> (<code>PretrainedConfig</code>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>",Mr,Je,$n,jt,jn,Ct,kd="A <code>PeftModel</code> for token classification tasks.",Cn,q,Pt,yr,oo,Id="Peft model for token classification tasks.",vr,no,Ed="<strong>Attributes</strong>:",Tr,so,Zd="<li><strong>config</strong> (<code>PretrainedConfig</code>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>",wr,Ue,xr,Z,Jt,$r,ro,Ld="Add an adapter to the model based on the passed configuration.",jr,lo,Wd='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',Cr,io,Ad="The name for the new adapter should be unique.",Pr,po,Vd=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,Pn,Ut,Jn,qt,Bd="A <code>PeftModel</code> for causal language modeling.",Un,O,Ft,Jr,co,Rd="Peft model for causal language modeling.",Ur,qe,qn,kt,Fn,It,Nd="A <code>PeftModel</code> for sequence-to-sequence language modeling.",kn,K,Et,qr,fo,Sd="Peft model for sequence-to-sequence language modeling.",Fr,Fe,In,Zt,En,Lt,Dd="A <code>PeftModel</code> for question answering.",Zn,F,Wt,kr,mo,Gd="Peft model for extractive question answering.",Ir,go,Hd="<strong>Attributes</strong>:",Er,uo,Qd="<li><strong>config</strong> (<code>PretrainedConfig</code>) — The configuration object of the base model.</li> <li><strong>cls_layer_name</strong> (<code>str</code>) — The name of the classification layer.</li>",Zr,ke,Lr,L,At,Wr,ho,Xd="Add an adapter to the model based on the passed configuration.",Ar,_o,zd='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',Vr,bo,Yd="The name for the new adapter should be unique.",Br,Mo,Od=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,Ln,Vt,Wn,Bt,Kd="A <code>PeftModel</code> for getting extracting features/embeddings from transformer models.",An,I,Rt,Rr,yo,ei="Peft model for extracting features/embeddings from transformer models",Nr,vo,ti="<strong>Attributes</strong>:",Sr,To,ai="<li><strong>config</strong> (<code>PretrainedConfig</code>) — The configuration object of the base model.</li>",Dr,Ie,Vn,Nt,Bn,St,oi="A <code>PeftModel</code> for mixing different adapter types (e.g. LoRA and LoHa).",Rn,C,Dt,Gr,wo,ni="PeftMixedModel for loading mixing different types of adapters for inference.",Hr,xo,si=`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>.`,Qr,Gt,ri=`<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>`,Xr,Ee,zr,W,Ht,Yr,$o,li="Add an adapter to the model based on the passed configuration.",Or,jo,di='This adapter is not trained. To load a trained adapter, check out <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.load_adapter">PeftModel.load_adapter()</a>.',Kr,Co,ii="The name for the new adapter should be unique.",el,Po,pi=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,tl,Ze,Qt,al,Jo,ci="Disables the adapter module.",ol,Le,Xt,nl,Uo,fi="Forward pass of the model.",sl,de,zt,rl,qo,mi="Instantiate a PEFT mixed model from a pretrained model and loaded PEFT weights.",ll,Fo,gi="Note that the passed <code>model</code> may be modified inplace.",dl,We,Yt,il,ko,ui="Generate output.",pl,Ae,Ot,cl,Io,hi="Returns the number of trainable parameters and number of all parameters in the model.",fl,Q,Kt,ml,Eo,_i="Load a trained adapter into the model.",gl,Zo,bi="The name for the new adapter should be unique.",ul,Lo,Mi=`The new adapter is not automatically set as the active adapter. Use <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel.set_adapter">PeftModel.set_adapter()</a> to set the active
adapter.`,hl,Ve,ea,_l,Wo,yi=`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.`,bl,ie,ta,Ml,Ao,vi="Prints the number of trainable parameters in the model.",yl,Vo,Ti=`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.`,vl,X,aa,Tl,Bo,wi="Sets the active adapter(s) for the model.",wl,Ro,xi=`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.`,xl,No,$i=`Additionally, this function will set the specified adapter to trainable (i.e., requires_grad=True) unless
inference_mode is True.`,$l,Be,oa,jl,So,ji=`Gets back the base model by removing all the adapter modules without merging. This gives back the original base
model.`,Nn,na,Sn,ee,sa,Cl,Do,Ci=`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.`,Pl,Go,Pi="<code>torch.bfloat16</code> as per the mixed-precision training you are performing.",Dn,he,ra,Jl,Ho,Ji="Returns a Peft model object from a model and a config, where the model will be modified in-place.",Gn,A,la,Ul,Qo,Ui="Create PEFT layers and inject them into the model in-place.",ql,Xo,qi="Currently the API does not support prompt learning methods and adaption prompt.",Fl,zo,Fi=`This function is similar to <a href="/docs/peft/main/en/package_reference/peft_model#peft.get_peft_model">get_peft_model()</a> but it does not return a <a href="/docs/peft/main/en/package_reference/peft_model#peft.PeftModel">PeftModel</a> instance. Instead, it returns
the original, mutated instance of the passed model.`,Hn,V,da,kl,Yo,ki="Get the state dict of the given adapter of the PEFT model.",Il,Oo,Ii=`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>.`,El,Ko,Ei=`Note that the adapter name is removed from the <code>state_dict</code>, as this is just an arbitrary name that can be changed
when loading the adapter. So e.g. if the adapter name is <code>&#39;default&#39;</code> and the original key is
<code>&#39;model.q_proj.lora_A.default.weight&#39;</code>, the returned key will be <code>&#39;model.q_proj.lora_A.weight&#39;</code>. Use this function
in conjunction with <a href="/docs/peft/main/en/package_reference/functional#peft.set_peft_model_state_dict">set_peft_model_state_dict()</a> to take care of the adapter name when loading weights.`,Qn,te,ia,Zl,en,Zi="Note this method only works for <code>transformers</code> models.",Ll,tn,Li=`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`,Xn,B,pa,Wl,an,Wi="Get the status of each adapter layer in the model.",Al,on,Ai=`This function returns a list of <code>TunerLayerStatus</code> dataclass instances, each of which contains the following
attributes:`,Vl,nn,Vi=`<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>`,zn,R,ca,Bl,sn,Bi="Get the status of tuners of the model.",Rl,rn,Ri="This function returns a <code>TunerModelStatus</code> dataclass instance, which contains the following attributes:",Nl,ln,Ni=`<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>`,Yn,fa,On,bn,Kn;return w=new Xi({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),j=new ue({props:{title:"Models",local:"models",headingTag:"h1"}}),at=new ue({props:{title:"PeftModel",local:"peft.PeftModel",headingTag:"h2"}}),ot=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,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/main/src/peft/peft_model.py#L72"}}),nt=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"},{name:"autocast_adapter_dtype",val:": bool = True"}],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/main/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"},{anchor:"peft.PeftModel.add_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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1020"}}),st=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/main/src/peft/peft_model.py#L1572"}}),rt=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/main/src/peft/peft_model.py#L1098"}}),lt=new x({props:{name:"disable_adapter",anchor:"peft.PeftModel.disable_adapter",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L960"}}),ve=new Oe({props:{anchor:"peft.PeftModel.disable_adapter.example",$$slots:{default:[Yi]},$$scope:{ctx:U}}}),dt=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/main/src/peft/peft_model.py#L939"}}),it=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,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/main/src/peft/peft_model.py#L398"}}),pt=new x({props:{name:"get_base_model",anchor:"peft.PeftModel.get_base_model",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1014"}}),ct=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/main/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/main/src/peft/peft_model.py#L1130",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>
`}}),ft=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/main/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/main/src/peft/peft_model.py#L1160",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>
`}}),mt=new x({props:{name:"get_nb_trainable_parameters",anchor:"peft.PeftModel.get_nb_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L870"}}),gt=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/main/src/peft/peft_model.py#L745"}}),ut=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/main/src/peft/peft_model.py#L724"}}),ht=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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,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/main/src/peft/peft_model.py#L1324"}}),_t=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/main/src/peft/peft_model.py#L702"}}),bt=new x({props:{name:"print_trainable_parameters",anchor:"peft.PeftModel.print_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L900"}}),Mt=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</code>, <em>optional</em>) &#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/main/src/peft/peft_model.py#L190"}}),yt=new x({props:{name:"set_adapter",anchor:"peft.PeftModel.set_adapter",parameters:[{name:"adapter_name",val:": str"},{name:"inference_mode",val:": bool = False"}],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"},{anchor:"peft.PeftModel.set_adapter.inference_mode",description:`<strong>inference_mode</strong> (<code>bool</code>, optional) &#x2014;
Whether the activated adapter should be frozen (i.e. <code>requires_grad=False</code>). Default is False.`,name:"inference_mode"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1497"}}),vt=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/main/src/peft/peft_model.py#L1522"}}),Tt=new x({props:{name:"supports_lora_conversion",anchor:"peft.PeftModel.supports_lora_conversion",parameters:[{name:"adapter_name",val:": str = 'default'"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1637"}}),wt=new ue({props:{title:"PeftModelForSequenceClassification",local:"peft.PeftModelForSequenceClassification",headingTag:"h2"}}),$t=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1653"}}),Je=new Oe({props:{anchor:"peft.PeftModelForSequenceClassification.example",$$slots:{default:[Oi]},$$scope:{ctx:U}}}),jt=new ue({props:{title:"PeftModelForTokenClassification",local:"peft.PeftModelForTokenClassification",headingTag:"h2"}}),Pt=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L2551"}}),Ue=new Oe({props:{anchor:"peft.PeftModelForTokenClassification.example",$$slots:{default:[Ki]},$$scope:{ctx:U}}}),Jt=new x({props:{name:"add_adapter",anchor:"peft.PeftModelForTokenClassification.add_adapter",parameters:[{name:"adapter_name",val:": str"},{name:"peft_config",val:": PeftConfig"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"autocast_adapter_dtype",val:": bool = True"}],parametersDescription:[{anchor:"peft.PeftModelForTokenClassification.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.PeftModelForTokenClassification.add_adapter.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/main/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
The configuration of the adapter to be added.`,name:"peft_config"},{anchor:"peft.PeftModelForTokenClassification.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"},{anchor:"peft.PeftModelForTokenClassification.add_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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L2621"}}),Ut=new ue({props:{title:"PeftModelForCausalLM",local:"peft.PeftModelForCausalLM",headingTag:"h2"}}),Ft=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L1911"}}),qe=new Oe({props:{anchor:"peft.PeftModelForCausalLM.example",$$slots:{default:[ep]},$$scope:{ctx:U}}}),kt=new ue({props:{title:"PeftModelForSeq2SeqLM",local:"peft.PeftModelForSeq2SeqLM",headingTag:"h2"}}),Et=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L2271"}}),Fe=new Oe({props:{anchor:"peft.PeftModelForSeq2SeqLM.example",$$slots:{default:[tp]},$$scope:{ctx:U}}}),Zt=new ue({props:{title:"PeftModelForQuestionAnswering",local:"peft.PeftModelForQuestionAnswering",headingTag:"h2"}}),Wt=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L2789"}}),ke=new Oe({props:{anchor:"peft.PeftModelForQuestionAnswering.example",$$slots:{default:[ap]},$$scope:{ctx:U}}}),At=new x({props:{name:"add_adapter",anchor:"peft.PeftModelForQuestionAnswering.add_adapter",parameters:[{name:"adapter_name",val:": str"},{name:"peft_config",val:": PeftConfig"},{name:"low_cpu_mem_usage",val:": bool = False"},{name:"autocast_adapter_dtype",val:": bool = True"}],parametersDescription:[{anchor:"peft.PeftModelForQuestionAnswering.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.PeftModelForQuestionAnswering.add_adapter.peft_config",description:`<strong>peft_config</strong> (<a href="/docs/peft/main/en/package_reference/config#peft.PeftConfig">PeftConfig</a>) &#x2014;
The configuration of the adapter to be added.`,name:"peft_config"},{anchor:"peft.PeftModelForQuestionAnswering.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"},{anchor:"peft.PeftModelForQuestionAnswering.add_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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L2857"}}),Vt=new ue({props:{title:"PeftModelForFeatureExtraction",local:"peft.PeftModelForFeatureExtraction",headingTag:"h2"}}),Rt=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/main/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/main/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>, 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. If set to <code>False</code>, the dtypes will stay the same as those of the corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/peft_model.py#L3048"}}),Ie=new Oe({props:{anchor:"peft.PeftModelForFeatureExtraction.example",$$slots:{default:[op]},$$scope:{ctx:U}}}),Nt=new ue({props:{title:"PeftMixedModel",local:"peft.PeftMixedModel",headingTag:"h2"}}),Dt=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/main/src/peft/mixed_model.py#L67"}}),Ee=new Oe({props:{anchor:"peft.PeftMixedModel.example",$$slots:{default:[np]},$$scope:{ctx:U}}}),Ht=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"},{name:"autocast_adapter_dtype",val:": bool = True"}],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/main/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"},{anchor:"peft.PeftMixedModel.add_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. If set to <code>False</code>, the dtypes will stay the same as those of the
corresponding layer.`,name:"autocast_adapter_dtype"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/mixed_model.py#L203"}}),Qt=new x({props:{name:"disable_adapter",anchor:"peft.PeftMixedModel.disable_adapter",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/mixed_model.py#L192"}}),Xt=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/main/src/peft/mixed_model.py#L180"}}),zt=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/main/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/main/src/peft/mixed_model.py#L394"}}),Yt=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/main/src/peft/mixed_model.py#L186"}}),Ot=new x({props:{name:"get_nb_trainable_parameters",anchor:"peft.PeftMixedModel.get_nb_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/mixed_model.py#L126"}}),Kt=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/main/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/main/src/peft/mixed_model.py#L345"}}),ea=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/main/src/peft/mixed_model.py#L308"}}),ta=new x({props:{name:"print_trainable_parameters",anchor:"peft.PeftMixedModel.print_trainable_parameters",parameters:[],source:"https://github.com/huggingface/peft/blob/main/src/peft/mixed_model.py#L151"}}),aa=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/main/src/peft/mixed_model.py#L266"}}),oa=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/main/src/peft/mixed_model.py#L325"}}),na=new ue({props:{title:"Utilities",local:"peft.cast_mixed_precision_params",headingTag:"h2"}}),sa=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/main/src/peft/utils/other.py#L1364"}}),ra=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/main/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/main/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/main/src/peft/mapping_func.py#L30"}}),la=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/main/src/peft/mapping.py#L47"}}),da=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/main/en/package_reference/peft_model#peft.PeftModel">PeftModel</a>) &#x2014; The Peft model. When using torch.nn.DistributedDataParallel, DeepSpeed or FSDP,
the model should be the underlying model/unwrapped model (i.e. model.module).`,name:"model"},{anchor:"peft.get_peft_model_state_dict.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The state dict of the model. If not provided, the state dict of the passed model will be used.`,name:"state_dict"},{anchor:"peft.get_peft_model_state_dict.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The name of the adapter whose state dict should be returned.`,name:"adapter_name"},{anchor:"peft.get_peft_model_state_dict.unwrap_compiled",description:`<strong>unwrap_compiled</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to unwrap the model if torch.compile was used.`,name:"unwrap_compiled"},{anchor:"peft.get_peft_model_state_dict.save_embedding_layers",description:`<strong>save_embedding_layers</strong> (<code>Union[bool, str]</code>, , <em>optional</em>, defaults to <code>auto</code>) &#x2014;
If <code>True</code>, save the embedding layers in addition to adapter weights. If <code>auto</code>, checks the common embedding
layers <code>peft.utils.other.EMBEDDING_LAYER_NAMES</code> in config&#x2019;s <code>target_modules</code> when available. Based on it
sets the boolean flag. This only works for &#x1F917; transformers models.`,name:"save_embedding_layers"}],source:"https://github.com/huggingface/peft/blob/main/src/peft/utils/save_and_load.py#L77"}}),ia=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/main/src/peft/utils/other.py#L141"}}),pa=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/main/src/peft/peft_model.py#L3169",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>
`}}),ca=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/main/src/peft/peft_model.py#L3296",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>
`}}),fa=new zi({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/package_reference/peft_model.md"}}),{c(){_=n("meta"),J=a(),$=n("p"),b=a(),c(w.$$.fragment),l=a(),c(j.$$.fragment),Mn=a(),tt=n("p"),tt.innerHTML=Sl,yn=a(),c(at.$$.fragment),vn=a(),M=n("div"),c(ot.$$.fragment),fs=a(),ha=n("p"),ha.textContent=Dl,ms=a(),_a=n("p"),_a.innerHTML=Gl,gs=a(),ba=n("ul"),ba.innerHTML=Hl,us=a(),E=n("div"),c(nt.$$.fragment),hs=a(),Ma=n("p"),Ma.textContent=Ql,_s=a(),ya=n("p"),ya.innerHTML=Xl,bs=a(),va=n("p"),va.textContent=zl,Ms=a(),Ta=n("p"),Ta.innerHTML=Yl,ys=a(),ae=n("div"),c(st.$$.fragment),vs=a(),wa=n("p"),wa.textContent=Ol,Ts=a(),xa=n("ol"),xa.innerHTML=Kl,ws=a(),ye=n("div"),c(rt.$$.fragment),xs=a(),$a=n("p"),$a.textContent=ed,$s=a(),oe=n("div"),c(lt.$$.fragment),js=a(),ja=n("p"),ja.textContent=td,Cs=a(),c(ve.$$.fragment),Ps=a(),Te=n("div"),c(dt.$$.fragment),Js=a(),Ca=n("p"),Ca.textContent=ad,Us=a(),ne=n("div"),c(it.$$.fragment),qs=a(),Pa=n("p"),Pa.textContent=od,Fs=a(),Ja=n("p"),Ja.innerHTML=nd,ks=a(),we=n("div"),c(pt.$$.fragment),Is=a(),Ua=n("p"),Ua.textContent=sd,Es=a(),S=n("div"),c(ct.$$.fragment),Zs=a(),qa=n("p"),qa.textContent=rd,Ls=a(),Fa=n("p"),Fa.innerHTML=ld,Ws=a(),ka=n("ul"),ka.innerHTML=dd,As=a(),D=n("div"),c(ft.$$.fragment),Vs=a(),Ia=n("p"),Ia.textContent=id,Bs=a(),Ea=n("p"),Ea.innerHTML=pd,Rs=a(),Za=n("ul"),Za.innerHTML=cd,Ns=a(),xe=n("div"),c(mt.$$.fragment),Ss=a(),La=n("p"),La.textContent=fd,Ds=a(),$e=n("div"),c(gt.$$.fragment),Gs=a(),Wa=n("p"),Wa.textContent=md,Hs=a(),je=n("div"),c(ut.$$.fragment),Qs=a(),Aa=n("p"),Aa.textContent=gd,Xs=a(),G=n("div"),c(ht.$$.fragment),zs=a(),Va=n("p"),Va.textContent=ud,Ys=a(),Ba=n("p"),Ba.textContent=hd,Os=a(),Ra=n("p"),Ra.innerHTML=_d,Ks=a(),Ce=n("div"),c(_t.$$.fragment),er=a(),Na=n("p"),Na.textContent=bd,tr=a(),se=n("div"),c(bt.$$.fragment),ar=a(),Sa=n("p"),Sa.textContent=Md,or=a(),Da=n("p"),Da.textContent=yd,nr=a(),Pe=n("div"),c(Mt.$$.fragment),sr=a(),Ga=n("p"),Ga.innerHTML=vd,rr=a(),H=n("div"),c(yt.$$.fragment),lr=a(),Ha=n("p"),Ha.textContent=Td,dr=a(),Qa=n("p"),Qa.textContent=wd,ir=a(),Xa=n("p"),Xa.textContent=xd,pr=a(),re=n("div"),c(vt.$$.fragment),cr=a(),za=n("p"),za.textContent=$d,fr=a(),Ya=n("p"),Ya.textContent=jd,mr=a(),le=n("div"),c(Tt.$$.fragment),gr=a(),Oa=n("p"),Oa.textContent=Cd,ur=a(),Ka=n("p"),Ka.textContent=Pd,Tn=a(),c(wt.$$.fragment),wn=a(),xt=n("p"),xt.innerHTML=Jd,xn=a(),k=n("div"),c($t.$$.fragment),hr=a(),eo=n("p"),eo.textContent=Ud,_r=a(),to=n("p"),to.innerHTML=qd,br=a(),ao=n("ul"),ao.innerHTML=Fd,Mr=a(),c(Je.$$.fragment),$n=a(),c(jt.$$.fragment),jn=a(),Ct=n("p"),Ct.innerHTML=kd,Cn=a(),q=n("div"),c(Pt.$$.fragment),yr=a(),oo=n("p"),oo.textContent=Id,vr=a(),no=n("p"),no.innerHTML=Ed,Tr=a(),so=n("ul"),so.innerHTML=Zd,wr=a(),c(Ue.$$.fragment),xr=a(),Z=n("div"),c(Jt.$$.fragment),$r=a(),ro=n("p"),ro.textContent=Ld,jr=a(),lo=n("p"),lo.innerHTML=Wd,Cr=a(),io=n("p"),io.textContent=Ad,Pr=a(),po=n("p"),po.innerHTML=Vd,Pn=a(),c(Ut.$$.fragment),Jn=a(),qt=n("p"),qt.innerHTML=Bd,Un=a(),O=n("div"),c(Ft.$$.fragment),Jr=a(),co=n("p"),co.textContent=Rd,Ur=a(),c(qe.$$.fragment),qn=a(),c(kt.$$.fragment),Fn=a(),It=n("p"),It.innerHTML=Nd,kn=a(),K=n("div"),c(Et.$$.fragment),qr=a(),fo=n("p"),fo.textContent=Sd,Fr=a(),c(Fe.$$.fragment),In=a(),c(Zt.$$.fragment),En=a(),Lt=n("p"),Lt.innerHTML=Dd,Zn=a(),F=n("div"),c(Wt.$$.fragment),kr=a(),mo=n("p"),mo.textContent=Gd,Ir=a(),go=n("p"),go.innerHTML=Hd,Er=a(),uo=n("ul"),uo.innerHTML=Qd,Zr=a(),c(ke.$$.fragment),Lr=a(),L=n("div"),c(At.$$.fragment),Wr=a(),ho=n("p"),ho.textContent=Xd,Ar=a(),_o=n("p"),_o.innerHTML=zd,Vr=a(),bo=n("p"),bo.textContent=Yd,Br=a(),Mo=n("p"),Mo.innerHTML=Od,Ln=a(),c(Vt.$$.fragment),Wn=a(),Bt=n("p"),Bt.innerHTML=Kd,An=a(),I=n("div"),c(Rt.$$.fragment),Rr=a(),yo=n("p"),yo.textContent=ei,Nr=a(),vo=n("p"),vo.innerHTML=ti,Sr=a(),To=n("ul"),To.innerHTML=ai,Dr=a(),c(Ie.$$.fragment),Vn=a(),c(Nt.$$.fragment),Bn=a(),St=n("p"),St.innerHTML=oi,Rn=a(),C=n("div"),c(Dt.$$.fragment),Gr=a(),wo=n("p"),wo.textContent=ni,Hr=a(),xo=n("p"),xo.innerHTML=si,Qr=a(),Gt=n("blockquote"),Gt.innerHTML=ri,Xr=a(),c(Ee.$$.fragment),zr=a(),W=n("div"),c(Ht.$$.fragment),Yr=a(),$o=n("p"),$o.textContent=li,Or=a(),jo=n("p"),jo.innerHTML=di,Kr=a(),Co=n("p"),Co.textContent=ii,el=a(),Po=n("p"),Po.innerHTML=pi,tl=a(),Ze=n("div"),c(Qt.$$.fragment),al=a(),Jo=n("p"),Jo.textContent=ci,ol=a(),Le=n("div"),c(Xt.$$.fragment),nl=a(),Uo=n("p"),Uo.textContent=fi,sl=a(),de=n("div"),c(zt.$$.fragment),rl=a(),qo=n("p"),qo.textContent=mi,ll=a(),Fo=n("p"),Fo.innerHTML=gi,dl=a(),We=n("div"),c(Yt.$$.fragment),il=a(),ko=n("p"),ko.textContent=ui,pl=a(),Ae=n("div"),c(Ot.$$.fragment),cl=a(),Io=n("p"),Io.textContent=hi,fl=a(),Q=n("div"),c(Kt.$$.fragment),ml=a(),Eo=n("p"),Eo.textContent=_i,gl=a(),Zo=n("p"),Zo.textContent=bi,ul=a(),Lo=n("p"),Lo.innerHTML=Mi,hl=a(),Ve=n("div"),c(ea.$$.fragment),_l=a(),Wo=n("p"),Wo.textContent=yi,bl=a(),ie=n("div"),c(ta.$$.fragment),Ml=a(),Ao=n("p"),Ao.textContent=vi,yl=a(),Vo=n("p"),Vo.textContent=Ti,vl=a(),X=n("div"),c(aa.$$.fragment),Tl=a(),Bo=n("p"),Bo.textContent=wi,wl=a(),Ro=n("p"),Ro.textContent=xi,xl=a(),No=n("p"),No.textContent=$i,$l=a(),Be=n("div"),c(oa.$$.fragment),jl=a(),So=n("p"),So.textContent=ji,Nn=a(),c(na.$$.fragment),Sn=a(),ee=n("div"),c(sa.$$.fragment),Cl=a(),Do=n("p"),Do.innerHTML=Ci,Pl=a(),Go=n("p"),Go.innerHTML=Pi,Dn=a(),he=n("div"),c(ra.$$.fragment),Jl=a(),Ho=n("p"),Ho.textContent=Ji,Gn=a(),A=n("div"),c(la.$$.fragment),Ul=a(),Qo=n("p"),Qo.textContent=Ui,ql=a(),Xo=n("p"),Xo.textContent=qi,Fl=a(),zo=n("p"),zo.innerHTML=Fi,Hn=a(),V=n("div"),c(da.$$.fragment),kl=a(),Yo=n("p"),Yo.textContent=ki,Il=a(),Oo=n("p"),Oo.innerHTML=Ii,El=a(),Ko=n("p"),Ko.innerHTML=Ei,Qn=a(),te=n("div"),c(ia.$$.fragment),Zl=a(),en=n("p"),en.innerHTML=Zi,Ll=a(),tn=n("p"),tn.textContent=Li,Xn=a(),B=n("div"),c(pa.$$.fragment),Wl=a(),an=n("p"),an.textContent=Wi,Al=a(),on=n("p"),on.innerHTML=Ai,Vl=a(),nn=n("ul"),nn.innerHTML=Vi,zn=a(),R=n("div"),c(ca.$$.fragment),Bl=a(),sn=n("p"),sn.textContent=Bi,Rl=a(),rn=n("p"),rn.innerHTML=Ri,Nl=a(),ln=n("ul"),ln.innerHTML=Ni,Yn=a(),c(fa.$$.fragment),On=a(),bn=n("p"),this.h()},l(e){const i=Qi("svelte-u9bgzb",document.head);_=s(i,"META",{name:!0,content:!0}),i.forEach(r),J=o(e),$=s(e,"P",{}),T($).forEach(r),b=o(e),f(w.$$.fragment,e),l=o(e),f(j.$$.fragment,e),Mn=o(e),tt=s(e,"P",{"data-svelte-h":!0}),d(tt)!=="svelte-1gjku9r"&&(tt.innerHTML=Sl),yn=o(e),f(at.$$.fragment,e),vn=o(e),M=s(e,"DIV",{class:!0});var v=T(M);f(ot.$$.fragment,v),fs=o(v),ha=s(v,"P",{"data-svelte-h":!0}),d(ha)!=="svelte-1e4ptyx"&&(ha.textContent=Dl),ms=o(v),_a=s(v,"P",{"data-svelte-h":!0}),d(_a)!=="svelte-1xx6nm4"&&(_a.innerHTML=Gl),gs=o(v),ba=s(v,"UL",{"data-svelte-h":!0}),d(ba)!=="svelte-uypxoz"&&(ba.innerHTML=Hl),us=o(v),E=s(v,"DIV",{class:!0});var N=T(E);f(nt.$$.fragment,N),hs=o(N),Ma=s(N,"P",{"data-svelte-h":!0}),d(Ma)!=="svelte-eev0p"&&(Ma.textContent=Ql),_s=o(N),ya=s(N,"P",{"data-svelte-h":!0}),d(ya)!=="svelte-1x0rbv8"&&(ya.innerHTML=Xl),bs=o(N),va=s(N,"P",{"data-svelte-h":!0}),d(va)!=="svelte-1vybd74"&&(va.textContent=zl),Ms=o(N),Ta=s(N,"P",{"data-svelte-h":!0}),d(Ta)!=="svelte-36arxn"&&(Ta.innerHTML=Yl),N.forEach(r),ys=o(v),ae=s(v,"DIV",{class:!0});var _e=T(ae);f(st.$$.fragment,_e),vs=o(_e),wa=s(_e,"P",{"data-svelte-h":!0}),d(wa)!=="svelte-ebboe5"&&(wa.textContent=Ol),Ts=o(_e),xa=s(_e,"OL",{"data-svelte-h":!0}),d(xa)!=="svelte-1apgpm7"&&(xa.innerHTML=Kl),_e.forEach(r),ws=o(v),ye=s(v,"DIV",{class:!0});var ma=T(ye);f(rt.$$.fragment,ma),xs=o(ma),$a=s(ma,"P",{"data-svelte-h":!0}),d($a)!=="svelte-1cw64z1"&&($a.textContent=ed),ma.forEach(r),$s=o(v),oe=s(v,"DIV",{class:!0});var be=T(oe);f(lt.$$.fragment,be),js=o(be),ja=s(be,"P",{"data-svelte-h":!0}),d(ja)!=="svelte-1lt46qk"&&(ja.textContent=td),Cs=o(be),f(ve.$$.fragment,be),be.forEach(r),Ps=o(v),Te=s(v,"DIV",{class:!0});var ga=T(Te);f(dt.$$.fragment,ga),Js=o(ga),Ca=s(ga,"P",{"data-svelte-h":!0}),d(Ca)!=="svelte-1dahdh7"&&(Ca.textContent=ad),ga.forEach(r),Us=o(v),ne=s(v,"DIV",{class:!0});var Me=T(ne);f(it.$$.fragment,Me),qs=o(Me),Pa=s(Me,"P",{"data-svelte-h":!0}),d(Pa)!=="svelte-1wsj5dv"&&(Pa.textContent=od),Fs=o(Me),Ja=s(Me,"P",{"data-svelte-h":!0}),d(Ja)!=="svelte-1dimxoj"&&(Ja.innerHTML=nd),Me.forEach(r),ks=o(v),we=s(v,"DIV",{class:!0});var ua=T(we);f(pt.$$.fragment,ua),Is=o(ua),Ua=s(ua,"P",{"data-svelte-h":!0}),d(Ua)!=="svelte-utls5q"&&(Ua.textContent=sd),ua.forEach(r),Es=o(v),S=s(v,"DIV",{class:!0});var Re=T(S);f(ct.$$.fragment,Re),Zs=o(Re),qa=s(Re,"P",{"data-svelte-h":!0}),d(qa)!=="svelte-qbv9wu"&&(qa.textContent=rd),Ls=o(Re),Fa=s(Re,"P",{"data-svelte-h":!0}),d(Fa)!=="svelte-106rfnj"&&(Fa.innerHTML=ld),Ws=o(Re),ka=s(Re,"UL",{"data-svelte-h":!0}),d(ka)!=="svelte-300tyf"&&(ka.innerHTML=dd),Re.forEach(r),As=o(v),D=s(v,"DIV",{class:!0});var Ne=T(D);f(ft.$$.fragment,Ne),Vs=o(Ne),Ia=s(Ne,"P",{"data-svelte-h":!0}),d(Ia)!=="svelte-19lq8ai"&&(Ia.textContent=id),Bs=o(Ne),Ea=s(Ne,"P",{"data-svelte-h":!0}),d(Ea)!=="svelte-oh1795"&&(Ea.innerHTML=pd),Rs=o(Ne),Za=s(Ne,"UL",{"data-svelte-h":!0}),d(Za)!=="svelte-29q9g0"&&(Za.innerHTML=cd),Ne.forEach(r),Ns=o(v),xe=s(v,"DIV",{class:!0});var es=T(xe);f(mt.$$.fragment,es),Ss=o(es),La=s(es,"P",{"data-svelte-h":!0}),d(La)!=="svelte-1obczxw"&&(La.textContent=fd),es.forEach(r),Ds=o(v),$e=s(v,"DIV",{class:!0});var ts=T($e);f(gt.$$.fragment,ts),Gs=o(ts),Wa=s(ts,"P",{"data-svelte-h":!0}),d(Wa)!=="svelte-1w4gp53"&&(Wa.textContent=md),ts.forEach(r),Hs=o(v),je=s(v,"DIV",{class:!0});var as=T(je);f(ut.$$.fragment,as),Qs=o(as),Aa=s(as,"P",{"data-svelte-h":!0}),d(Aa)!=="svelte-1o38l72"&&(Aa.textContent=gd),as.forEach(r),Xs=o(v),G=s(v,"DIV",{class:!0});var Se=T(G);f(ht.$$.fragment,Se),zs=o(Se),Va=s(Se,"P",{"data-svelte-h":!0}),d(Va)!=="svelte-1ijv65v"&&(Va.textContent=ud),Ys=o(Se),Ba=s(Se,"P",{"data-svelte-h":!0}),d(Ba)!=="svelte-1vybd74"&&(Ba.textContent=hd),Os=o(Se),Ra=s(Se,"P",{"data-svelte-h":!0}),d(Ra)!=="svelte-36arxn"&&(Ra.innerHTML=_d),Se.forEach(r),Ks=o(v),Ce=s(v,"DIV",{class:!0});var os=T(Ce);f(_t.$$.fragment,os),er=o(os),Na=s(os,"P",{"data-svelte-h":!0}),d(Na)!=="svelte-lxfha5"&&(Na.textContent=bd),os.forEach(r),tr=o(v),se=s(v,"DIV",{class:!0});var dn=T(se);f(bt.$$.fragment,dn),ar=o(dn),Sa=s(dn,"P",{"data-svelte-h":!0}),d(Sa)!=="svelte-nsmqzk"&&(Sa.textContent=Md),or=o(dn),Da=s(dn,"P",{"data-svelte-h":!0}),d(Da)!=="svelte-1m6zd72"&&(Da.textContent=yd),dn.forEach(r),nr=o(v),Pe=s(v,"DIV",{class:!0});var ns=T(Pe);f(Mt.$$.fragment,ns),sr=o(ns),Ga=s(ns,"P",{"data-svelte-h":!0}),d(Ga)!=="svelte-36fqg2"&&(Ga.innerHTML=vd),ns.forEach(r),rr=o(v),H=s(v,"DIV",{class:!0});var De=T(H);f(yt.$$.fragment,De),lr=o(De),Ha=s(De,"P",{"data-svelte-h":!0}),d(Ha)!=="svelte-sr40it"&&(Ha.textContent=Td),dr=o(De),Qa=s(De,"P",{"data-svelte-h":!0}),d(Qa)!=="svelte-1buhq29"&&(Qa.textContent=wd),ir=o(De),Xa=s(De,"P",{"data-svelte-h":!0}),d(Xa)!=="svelte-1020tdh"&&(Xa.textContent=xd),De.forEach(r),pr=o(v),re=s(v,"DIV",{class:!0});var pn=T(re);f(vt.$$.fragment,pn),cr=o(pn),za=s(pn,"P",{"data-svelte-h":!0}),d(za)!=="svelte-aqtirv"&&(za.textContent=$d),fr=o(pn),Ya=s(pn,"P",{"data-svelte-h":!0}),d(Ya)!=="svelte-dj3tqe"&&(Ya.textContent=jd),pn.forEach(r),mr=o(v),le=s(v,"DIV",{class:!0});var cn=T(le);f(Tt.$$.fragment,cn),gr=o(cn),Oa=s(cn,"P",{"data-svelte-h":!0}),d(Oa)!=="svelte-1nhbp7j"&&(Oa.textContent=Cd),ur=o(cn),Ka=s(cn,"P",{"data-svelte-h":!0}),d(Ka)!=="svelte-61ytn0"&&(Ka.textContent=Pd),cn.forEach(r),v.forEach(r),Tn=o(e),f(wt.$$.fragment,e),wn=o(e),xt=s(e,"P",{"data-svelte-h":!0}),d(xt)!=="svelte-ndtvg4"&&(xt.innerHTML=Jd),xn=o(e),k=s(e,"DIV",{class:!0});var pe=T(k);f($t.$$.fragment,pe),hr=o(pe),eo=s(pe,"P",{"data-svelte-h":!0}),d(eo)!=="svelte-1v2olwg"&&(eo.textContent=Ud),_r=o(pe),to=s(pe,"P",{"data-svelte-h":!0}),d(to)!=="svelte-1xx6nm4"&&(to.innerHTML=qd),br=o(pe),ao=s(pe,"UL",{"data-svelte-h":!0}),d(ao)!=="svelte-1x24h9u"&&(ao.innerHTML=Fd),Mr=o(pe),f(Je.$$.fragment,pe),pe.forEach(r),$n=o(e),f(jt.$$.fragment,e),jn=o(e),Ct=s(e,"P",{"data-svelte-h":!0}),d(Ct)!=="svelte-29bbti"&&(Ct.innerHTML=kd),Cn=o(e),q=s(e,"DIV",{class:!0});var z=T(q);f(Pt.$$.fragment,z),yr=o(z),oo=s(z,"P",{"data-svelte-h":!0}),d(oo)!=="svelte-1nor8hq"&&(oo.textContent=Id),vr=o(z),no=s(z,"P",{"data-svelte-h":!0}),d(no)!=="svelte-1xx6nm4"&&(no.innerHTML=Ed),Tr=o(z),so=s(z,"UL",{"data-svelte-h":!0}),d(so)!=="svelte-1x24h9u"&&(so.innerHTML=Zd),wr=o(z),f(Ue.$$.fragment,z),xr=o(z),Z=s(z,"DIV",{class:!0});var ce=T(Z);f(Jt.$$.fragment,ce),$r=o(ce),ro=s(ce,"P",{"data-svelte-h":!0}),d(ro)!=="svelte-eev0p"&&(ro.textContent=Ld),jr=o(ce),lo=s(ce,"P",{"data-svelte-h":!0}),d(lo)!=="svelte-1x0rbv8"&&(lo.innerHTML=Wd),Cr=o(ce),io=s(ce,"P",{"data-svelte-h":!0}),d(io)!=="svelte-1vybd74"&&(io.textContent=Ad),Pr=o(ce),po=s(ce,"P",{"data-svelte-h":!0}),d(po)!=="svelte-36arxn"&&(po.innerHTML=Vd),ce.forEach(r),z.forEach(r),Pn=o(e),f(Ut.$$.fragment,e),Jn=o(e),qt=s(e,"P",{"data-svelte-h":!0}),d(qt)!=="svelte-1tlttqn"&&(qt.innerHTML=Bd),Un=o(e),O=s(e,"DIV",{class:!0});var fn=T(O);f(Ft.$$.fragment,fn),Jr=o(fn),co=s(fn,"P",{"data-svelte-h":!0}),d(co)!=="svelte-1xidneb"&&(co.textContent=Rd),Ur=o(fn),f(qe.$$.fragment,fn),fn.forEach(r),qn=o(e),f(kt.$$.fragment,e),Fn=o(e),It=s(e,"P",{"data-svelte-h":!0}),d(It)!=="svelte-1jmb61f"&&(It.innerHTML=Nd),kn=o(e),K=s(e,"DIV",{class:!0});var mn=T(K);f(Et.$$.fragment,mn),qr=o(mn),fo=s(mn,"P",{"data-svelte-h":!0}),d(fo)!=="svelte-i4jzn3"&&(fo.textContent=Sd),Fr=o(mn),f(Fe.$$.fragment,mn),mn.forEach(r),In=o(e),f(Zt.$$.fragment,e),En=o(e),Lt=s(e,"P",{"data-svelte-h":!0}),d(Lt)!=="svelte-5ypilt"&&(Lt.innerHTML=Dd),Zn=o(e),F=s(e,"DIV",{class:!0});var Y=T(F);f(Wt.$$.fragment,Y),kr=o(Y),mo=s(Y,"P",{"data-svelte-h":!0}),d(mo)!=="svelte-aqv7qc"&&(mo.textContent=Gd),Ir=o(Y),go=s(Y,"P",{"data-svelte-h":!0}),d(go)!=="svelte-1xx6nm4"&&(go.innerHTML=Hd),Er=o(Y),uo=s(Y,"UL",{"data-svelte-h":!0}),d(uo)!=="svelte-1x24h9u"&&(uo.innerHTML=Qd),Zr=o(Y),f(ke.$$.fragment,Y),Lr=o(Y),L=s(Y,"DIV",{class:!0});var fe=T(L);f(At.$$.fragment,fe),Wr=o(fe),ho=s(fe,"P",{"data-svelte-h":!0}),d(ho)!=="svelte-eev0p"&&(ho.textContent=Xd),Ar=o(fe),_o=s(fe,"P",{"data-svelte-h":!0}),d(_o)!=="svelte-1x0rbv8"&&(_o.innerHTML=zd),Vr=o(fe),bo=s(fe,"P",{"data-svelte-h":!0}),d(bo)!=="svelte-1vybd74"&&(bo.textContent=Yd),Br=o(fe),Mo=s(fe,"P",{"data-svelte-h":!0}),d(Mo)!=="svelte-36arxn"&&(Mo.innerHTML=Od),fe.forEach(r),Y.forEach(r),Ln=o(e),f(Vt.$$.fragment,e),Wn=o(e),Bt=s(e,"P",{"data-svelte-h":!0}),d(Bt)!=="svelte-zn19al"&&(Bt.innerHTML=Kd),An=o(e),I=s(e,"DIV",{class:!0});var me=T(I);f(Rt.$$.fragment,me),Rr=o(me),yo=s(me,"P",{"data-svelte-h":!0}),d(yo)!=="svelte-lta6tj"&&(yo.textContent=ei),Nr=o(me),vo=s(me,"P",{"data-svelte-h":!0}),d(vo)!=="svelte-1xx6nm4"&&(vo.innerHTML=ti),Sr=o(me),To=s(me,"UL",{"data-svelte-h":!0}),d(To)!=="svelte-52ldfc"&&(To.innerHTML=ai),Dr=o(me),f(Ie.$$.fragment,me),me.forEach(r),Vn=o(e),f(Nt.$$.fragment,e),Bn=o(e),St=s(e,"P",{"data-svelte-h":!0}),d(St)!=="svelte-1mnmrm0"&&(St.innerHTML=oi),Rn=o(e),C=s(e,"DIV",{class:!0});var P=T(C);f(Dt.$$.fragment,P),Gr=o(P),wo=s(P,"P",{"data-svelte-h":!0}),d(wo)!=="svelte-1fqn09x"&&(wo.textContent=ni),Hr=o(P),xo=s(P,"P",{"data-svelte-h":!0}),d(xo)!=="svelte-vb6bb3"&&(xo.innerHTML=si),Qr=o(P),Gt=s(P,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(Gt)!=="svelte-tug1np"&&(Gt.innerHTML=ri),Xr=o(P),f(Ee.$$.fragment,P),zr=o(P),W=s(P,"DIV",{class:!0});var ge=T(W);f(Ht.$$.fragment,ge),Yr=o(ge),$o=s(ge,"P",{"data-svelte-h":!0}),d($o)!=="svelte-eev0p"&&($o.textContent=li),Or=o(ge),jo=s(ge,"P",{"data-svelte-h":!0}),d(jo)!=="svelte-1x0rbv8"&&(jo.innerHTML=di),Kr=o(ge),Co=s(ge,"P",{"data-svelte-h":!0}),d(Co)!=="svelte-1vybd74"&&(Co.textContent=ii),el=o(ge),Po=s(ge,"P",{"data-svelte-h":!0}),d(Po)!=="svelte-36arxn"&&(Po.innerHTML=pi),ge.forEach(r),tl=o(P),Ze=s(P,"DIV",{class:!0});var ss=T(Ze);f(Qt.$$.fragment,ss),al=o(ss),Jo=s(ss,"P",{"data-svelte-h":!0}),d(Jo)!=="svelte-10kge19"&&(Jo.textContent=ci),ss.forEach(r),ol=o(P),Le=s(P,"DIV",{class:!0});var rs=T(Le);f(Xt.$$.fragment,rs),nl=o(rs),Uo=s(rs,"P",{"data-svelte-h":!0}),d(Uo)!=="svelte-1dahdh7"&&(Uo.textContent=fi),rs.forEach(r),sl=o(P),de=s(P,"DIV",{class:!0});var gn=T(de);f(zt.$$.fragment,gn),rl=o(gn),qo=s(gn,"P",{"data-svelte-h":!0}),d(qo)!=="svelte-7485e6"&&(qo.textContent=mi),ll=o(gn),Fo=s(gn,"P",{"data-svelte-h":!0}),d(Fo)!=="svelte-1dimxoj"&&(Fo.innerHTML=gi),gn.forEach(r),dl=o(P),We=s(P,"DIV",{class:!0});var ls=T(We);f(Yt.$$.fragment,ls),il=o(ls),ko=s(ls,"P",{"data-svelte-h":!0}),d(ko)!=="svelte-12wcp4m"&&(ko.textContent=ui),ls.forEach(r),pl=o(P),Ae=s(P,"DIV",{class:!0});var ds=T(Ae);f(Ot.$$.fragment,ds),cl=o(ds),Io=s(ds,"P",{"data-svelte-h":!0}),d(Io)!=="svelte-1hlrv9t"&&(Io.textContent=hi),ds.forEach(r),fl=o(P),Q=s(P,"DIV",{class:!0});var Ge=T(Q);f(Kt.$$.fragment,Ge),ml=o(Ge),Eo=s(Ge,"P",{"data-svelte-h":!0}),d(Eo)!=="svelte-1ijv65v"&&(Eo.textContent=_i),gl=o(Ge),Zo=s(Ge,"P",{"data-svelte-h":!0}),d(Zo)!=="svelte-1vybd74"&&(Zo.textContent=bi),ul=o(Ge),Lo=s(Ge,"P",{"data-svelte-h":!0}),d(Lo)!=="svelte-36arxn"&&(Lo.innerHTML=Mi),Ge.forEach(r),hl=o(P),Ve=s(P,"DIV",{class:!0});var is=T(Ve);f(ea.$$.fragment,is),_l=o(is),Wo=s(is,"P",{"data-svelte-h":!0}),d(Wo)!=="svelte-1pmlbbw"&&(Wo.textContent=yi),is.forEach(r),bl=o(P),ie=s(P,"DIV",{class:!0});var un=T(ie);f(ta.$$.fragment,un),Ml=o(un),Ao=s(un,"P",{"data-svelte-h":!0}),d(Ao)!=="svelte-nsmqzk"&&(Ao.textContent=vi),yl=o(un),Vo=s(un,"P",{"data-svelte-h":!0}),d(Vo)!=="svelte-1m6zd72"&&(Vo.textContent=Ti),un.forEach(r),vl=o(P),X=s(P,"DIV",{class:!0});var He=T(X);f(aa.$$.fragment,He),Tl=o(He),Bo=s(He,"P",{"data-svelte-h":!0}),d(Bo)!=="svelte-1lcepem"&&(Bo.textContent=wi),wl=o(He),Ro=s(He,"P",{"data-svelte-h":!0}),d(Ro)!=="svelte-13u0frm"&&(Ro.textContent=xi),xl=o(He),No=s(He,"P",{"data-svelte-h":!0}),d(No)!=="svelte-1020tdh"&&(No.textContent=$i),He.forEach(r),$l=o(P),Be=s(P,"DIV",{class:!0});var ps=T(Be);f(oa.$$.fragment,ps),jl=o(ps),So=s(ps,"P",{"data-svelte-h":!0}),d(So)!=="svelte-1thkzpl"&&(So.textContent=ji),ps.forEach(r),P.forEach(r),Nn=o(e),f(na.$$.fragment,e),Sn=o(e),ee=s(e,"DIV",{class:!0});var hn=T(ee);f(sa.$$.fragment,hn),Cl=o(hn),Do=s(hn,"P",{"data-svelte-h":!0}),d(Do)!=="svelte-4feb4l"&&(Do.innerHTML=Ci),Pl=o(hn),Go=s(hn,"P",{"data-svelte-h":!0}),d(Go)!=="svelte-1a5uwl6"&&(Go.innerHTML=Pi),hn.forEach(r),Dn=o(e),he=s(e,"DIV",{class:!0});var cs=T(he);f(ra.$$.fragment,cs),Jl=o(cs),Ho=s(cs,"P",{"data-svelte-h":!0}),d(Ho)!=="svelte-1ihkopr"&&(Ho.textContent=Ji),cs.forEach(r),Gn=o(e),A=s(e,"DIV",{class:!0});var Qe=T(A);f(la.$$.fragment,Qe),Ul=o(Qe),Qo=s(Qe,"P",{"data-svelte-h":!0}),d(Qo)!=="svelte-pzx6vm"&&(Qo.textContent=Ui),ql=o(Qe),Xo=s(Qe,"P",{"data-svelte-h":!0}),d(Xo)!=="svelte-1kmvq6f"&&(Xo.textContent=qi),Fl=o(Qe),zo=s(Qe,"P",{"data-svelte-h":!0}),d(zo)!=="svelte-bdqa4j"&&(zo.innerHTML=Fi),Qe.forEach(r),Hn=o(e),V=s(e,"DIV",{class:!0});var Xe=T(V);f(da.$$.fragment,Xe),kl=o(Xe),Yo=s(Xe,"P",{"data-svelte-h":!0}),d(Yo)!=="svelte-gnbqlm"&&(Yo.textContent=ki),Il=o(Xe),Oo=s(Xe,"P",{"data-svelte-h":!0}),d(Oo)!=="svelte-qojlyp"&&(Oo.innerHTML=Ii),El=o(Xe),Ko=s(Xe,"P",{"data-svelte-h":!0}),d(Ko)!=="svelte-1o6kmyi"&&(Ko.innerHTML=Ei),Xe.forEach(r),Qn=o(e),te=s(e,"DIV",{class:!0});var _n=T(te);f(ia.$$.fragment,_n),Zl=o(_n),en=s(_n,"P",{"data-svelte-h":!0}),d(en)!=="svelte-1a0dqf5"&&(en.innerHTML=Zi),Ll=o(_n),tn=s(_n,"P",{"data-svelte-h":!0}),d(tn)!=="svelte-8wbipw"&&(tn.textContent=Li),_n.forEach(r),Xn=o(e),B=s(e,"DIV",{class:!0});var ze=T(B);f(pa.$$.fragment,ze),Wl=o(ze),an=s(ze,"P",{"data-svelte-h":!0}),d(an)!=="svelte-qbv9wu"&&(an.textContent=Wi),Al=o(ze),on=s(ze,"P",{"data-svelte-h":!0}),d(on)!=="svelte-la6m46"&&(on.innerHTML=Ai),Vl=o(ze),nn=s(ze,"UL",{"data-svelte-h":!0}),d(nn)!=="svelte-160lblm"&&(nn.innerHTML=Vi),ze.forEach(r),zn=o(e),R=s(e,"DIV",{class:!0});var Ye=T(R);f(ca.$$.fragment,Ye),Bl=o(Ye),sn=s(Ye,"P",{"data-svelte-h":!0}),d(sn)!=="svelte-19lq8ai"&&(sn.textContent=Bi),Rl=o(Ye),rn=s(Ye,"P",{"data-svelte-h":!0}),d(rn)!=="svelte-1ebt70o"&&(rn.innerHTML=Ri),Nl=o(Ye),ln=s(Ye,"UL",{"data-svelte-h":!0}),d(ln)!=="svelte-r7myae"&&(ln.innerHTML=Ni),Ye.forEach(r),Yn=o(e),f(fa.$$.fragment,e),On=o(e),bn=s(e,"P",{}),T(bn).forEach(r),this.h()},h(){y(_,"name","hf:doc:metadata"),y(_,"content",rp),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Gt,"class","tip"),y(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(R,"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(e,J,i),p(e,$,i),p(e,b,i),m(w,e,i),p(e,l,i),m(j,e,i),p(e,Mn,i),p(e,tt,i),p(e,yn,i),m(at,e,i),p(e,vn,i),p(e,M,i),m(ot,M,null),t(M,fs),t(M,ha),t(M,ms),t(M,_a),t(M,gs),t(M,ba),t(M,us),t(M,E),m(nt,E,null),t(E,hs),t(E,Ma),t(E,_s),t(E,ya),t(E,bs),t(E,va),t(E,Ms),t(E,Ta),t(M,ys),t(M,ae),m(st,ae,null),t(ae,vs),t(ae,wa),t(ae,Ts),t(ae,xa),t(M,ws),t(M,ye),m(rt,ye,null),t(ye,xs),t(ye,$a),t(M,$s),t(M,oe),m(lt,oe,null),t(oe,js),t(oe,ja),t(oe,Cs),m(ve,oe,null),t(M,Ps),t(M,Te),m(dt,Te,null),t(Te,Js),t(Te,Ca),t(M,Us),t(M,ne),m(it,ne,null),t(ne,qs),t(ne,Pa),t(ne,Fs),t(ne,Ja),t(M,ks),t(M,we),m(pt,we,null),t(we,Is),t(we,Ua),t(M,Es),t(M,S),m(ct,S,null),t(S,Zs),t(S,qa),t(S,Ls),t(S,Fa),t(S,Ws),t(S,ka),t(M,As),t(M,D),m(ft,D,null),t(D,Vs),t(D,Ia),t(D,Bs),t(D,Ea),t(D,Rs),t(D,Za),t(M,Ns),t(M,xe),m(mt,xe,null),t(xe,Ss),t(xe,La),t(M,Ds),t(M,$e),m(gt,$e,null),t($e,Gs),t($e,Wa),t(M,Hs),t(M,je),m(ut,je,null),t(je,Qs),t(je,Aa),t(M,Xs),t(M,G),m(ht,G,null),t(G,zs),t(G,Va),t(G,Ys),t(G,Ba),t(G,Os),t(G,Ra),t(M,Ks),t(M,Ce),m(_t,Ce,null),t(Ce,er),t(Ce,Na),t(M,tr),t(M,se),m(bt,se,null),t(se,ar),t(se,Sa),t(se,or),t(se,Da),t(M,nr),t(M,Pe),m(Mt,Pe,null),t(Pe,sr),t(Pe,Ga),t(M,rr),t(M,H),m(yt,H,null),t(H,lr),t(H,Ha),t(H,dr),t(H,Qa),t(H,ir),t(H,Xa),t(M,pr),t(M,re),m(vt,re,null),t(re,cr),t(re,za),t(re,fr),t(re,Ya),t(M,mr),t(M,le),m(Tt,le,null),t(le,gr),t(le,Oa),t(le,ur),t(le,Ka),p(e,Tn,i),m(wt,e,i),p(e,wn,i),p(e,xt,i),p(e,xn,i),p(e,k,i),m($t,k,null),t(k,hr),t(k,eo),t(k,_r),t(k,to),t(k,br),t(k,ao),t(k,Mr),m(Je,k,null),p(e,$n,i),m(jt,e,i),p(e,jn,i),p(e,Ct,i),p(e,Cn,i),p(e,q,i),m(Pt,q,null),t(q,yr),t(q,oo),t(q,vr),t(q,no),t(q,Tr),t(q,so),t(q,wr),m(Ue,q,null),t(q,xr),t(q,Z),m(Jt,Z,null),t(Z,$r),t(Z,ro),t(Z,jr),t(Z,lo),t(Z,Cr),t(Z,io),t(Z,Pr),t(Z,po),p(e,Pn,i),m(Ut,e,i),p(e,Jn,i),p(e,qt,i),p(e,Un,i),p(e,O,i),m(Ft,O,null),t(O,Jr),t(O,co),t(O,Ur),m(qe,O,null),p(e,qn,i),m(kt,e,i),p(e,Fn,i),p(e,It,i),p(e,kn,i),p(e,K,i),m(Et,K,null),t(K,qr),t(K,fo),t(K,Fr),m(Fe,K,null),p(e,In,i),m(Zt,e,i),p(e,En,i),p(e,Lt,i),p(e,Zn,i),p(e,F,i),m(Wt,F,null),t(F,kr),t(F,mo),t(F,Ir),t(F,go),t(F,Er),t(F,uo),t(F,Zr),m(ke,F,null),t(F,Lr),t(F,L),m(At,L,null),t(L,Wr),t(L,ho),t(L,Ar),t(L,_o),t(L,Vr),t(L,bo),t(L,Br),t(L,Mo),p(e,Ln,i),m(Vt,e,i),p(e,Wn,i),p(e,Bt,i),p(e,An,i),p(e,I,i),m(Rt,I,null),t(I,Rr),t(I,yo),t(I,Nr),t(I,vo),t(I,Sr),t(I,To),t(I,Dr),m(Ie,I,null),p(e,Vn,i),m(Nt,e,i),p(e,Bn,i),p(e,St,i),p(e,Rn,i),p(e,C,i),m(Dt,C,null),t(C,Gr),t(C,wo),t(C,Hr),t(C,xo),t(C,Qr),t(C,Gt),t(C,Xr),m(Ee,C,null),t(C,zr),t(C,W),m(Ht,W,null),t(W,Yr),t(W,$o),t(W,Or),t(W,jo),t(W,Kr),t(W,Co),t(W,el),t(W,Po),t(C,tl),t(C,Ze),m(Qt,Ze,null),t(Ze,al),t(Ze,Jo),t(C,ol),t(C,Le),m(Xt,Le,null),t(Le,nl),t(Le,Uo),t(C,sl),t(C,de),m(zt,de,null),t(de,rl),t(de,qo),t(de,ll),t(de,Fo),t(C,dl),t(C,We),m(Yt,We,null),t(We,il),t(We,ko),t(C,pl),t(C,Ae),m(Ot,Ae,null),t(Ae,cl),t(Ae,Io),t(C,fl),t(C,Q),m(Kt,Q,null),t(Q,ml),t(Q,Eo),t(Q,gl),t(Q,Zo),t(Q,ul),t(Q,Lo),t(C,hl),t(C,Ve),m(ea,Ve,null),t(Ve,_l),t(Ve,Wo),t(C,bl),t(C,ie),m(ta,ie,null),t(ie,Ml),t(ie,Ao),t(ie,yl),t(ie,Vo),t(C,vl),t(C,X),m(aa,X,null),t(X,Tl),t(X,Bo),t(X,wl),t(X,Ro),t(X,xl),t(X,No),t(C,$l),t(C,Be),m(oa,Be,null),t(Be,jl),t(Be,So),p(e,Nn,i),m(na,e,i),p(e,Sn,i),p(e,ee,i),m(sa,ee,null),t(ee,Cl),t(ee,Do),t(ee,Pl),t(ee,Go),p(e,Dn,i),p(e,he,i),m(ra,he,null),t(he,Jl),t(he,Ho),p(e,Gn,i),p(e,A,i),m(la,A,null),t(A,Ul),t(A,Qo),t(A,ql),t(A,Xo),t(A,Fl),t(A,zo),p(e,Hn,i),p(e,V,i),m(da,V,null),t(V,kl),t(V,Yo),t(V,Il),t(V,Oo),t(V,El),t(V,Ko),p(e,Qn,i),p(e,te,i),m(ia,te,null),t(te,Zl),t(te,en),t(te,Ll),t(te,tn),p(e,Xn,i),p(e,B,i),m(pa,B,null),t(B,Wl),t(B,an),t(B,Al),t(B,on),t(B,Vl),t(B,nn),p(e,zn,i),p(e,R,i),m(ca,R,null),t(R,Bl),t(R,sn),t(R,Rl),t(R,rn),t(R,Nl),t(R,ln),p(e,Yn,i),m(fa,e,i),p(e,On,i),p(e,bn,i),Kn=!0},p(e,[i]){const v={};i&2&&(v.$$scope={dirty:i,ctx:e}),ve.$set(v);const N={};i&2&&(N.$$scope={dirty:i,ctx:e}),Je.$set(N);const _e={};i&2&&(_e.$$scope={dirty:i,ctx:e}),Ue.$set(_e);const ma={};i&2&&(ma.$$scope={dirty:i,ctx:e}),qe.$set(ma);const be={};i&2&&(be.$$scope={dirty:i,ctx:e}),Fe.$set(be);const ga={};i&2&&(ga.$$scope={dirty:i,ctx:e}),ke.$set(ga);const Me={};i&2&&(Me.$$scope={dirty:i,ctx:e}),Ie.$set(Me);const ua={};i&2&&(ua.$$scope={dirty:i,ctx:e}),Ee.$set(ua)},i(e){Kn||(g(w.$$.fragment,e),g(j.$$.fragment,e),g(at.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(st.$$.fragment,e),g(rt.$$.fragment,e),g(lt.$$.fragment,e),g(ve.$$.fragment,e),g(dt.$$.fragment,e),g(it.$$.fragment,e),g(pt.$$.fragment,e),g(ct.$$.fragment,e),g(ft.$$.fragment,e),g(mt.$$.fragment,e),g(gt.$$.fragment,e),g(ut.$$.fragment,e),g(ht.$$.fragment,e),g(_t.$$.fragment,e),g(bt.$$.fragment,e),g(Mt.$$.fragment,e),g(yt.$$.fragment,e),g(vt.$$.fragment,e),g(Tt.$$.fragment,e),g(wt.$$.fragment,e),g($t.$$.fragment,e),g(Je.$$.fragment,e),g(jt.$$.fragment,e),g(Pt.$$.fragment,e),g(Ue.$$.fragment,e),g(Jt.$$.fragment,e),g(Ut.$$.fragment,e),g(Ft.$$.fragment,e),g(qe.$$.fragment,e),g(kt.$$.fragment,e),g(Et.$$.fragment,e),g(Fe.$$.fragment,e),g(Zt.$$.fragment,e),g(Wt.$$.fragment,e),g(ke.$$.fragment,e),g(At.$$.fragment,e),g(Vt.$$.fragment,e),g(Rt.$$.fragment,e),g(Ie.$$.fragment,e),g(Nt.$$.fragment,e),g(Dt.$$.fragment,e),g(Ee.$$.fragment,e),g(Ht.$$.fragment,e),g(Qt.$$.fragment,e),g(Xt.$$.fragment,e),g(zt.$$.fragment,e),g(Yt.$$.fragment,e),g(Ot.$$.fragment,e),g(Kt.$$.fragment,e),g(ea.$$.fragment,e),g(ta.$$.fragment,e),g(aa.$$.fragment,e),g(oa.$$.fragment,e),g(na.$$.fragment,e),g(sa.$$.fragment,e),g(ra.$$.fragment,e),g(la.$$.fragment,e),g(da.$$.fragment,e),g(ia.$$.fragment,e),g(pa.$$.fragment,e),g(ca.$$.fragment,e),g(fa.$$.fragment,e),Kn=!0)},o(e){u(w.$$.fragment,e),u(j.$$.fragment,e),u(at.$$.fragment,e),u(ot.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(rt.$$.fragment,e),u(lt.$$.fragment,e),u(ve.$$.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(_t.$$.fragment,e),u(bt.$$.fragment,e),u(Mt.$$.fragment,e),u(yt.$$.fragment,e),u(vt.$$.fragment,e),u(Tt.$$.fragment,e),u(wt.$$.fragment,e),u($t.$$.fragment,e),u(Je.$$.fragment,e),u(jt.$$.fragment,e),u(Pt.$$.fragment,e),u(Ue.$$.fragment,e),u(Jt.$$.fragment,e),u(Ut.$$.fragment,e),u(Ft.$$.fragment,e),u(qe.$$.fragment,e),u(kt.$$.fragment,e),u(Et.$$.fragment,e),u(Fe.$$.fragment,e),u(Zt.$$.fragment,e),u(Wt.$$.fragment,e),u(ke.$$.fragment,e),u(At.$$.fragment,e),u(Vt.$$.fragment,e),u(Rt.$$.fragment,e),u(Ie.$$.fragment,e),u(Nt.$$.fragment,e),u(Dt.$$.fragment,e),u(Ee.$$.fragment,e),u(Ht.$$.fragment,e),u(Qt.$$.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),u(ra.$$.fragment,e),u(la.$$.fragment,e),u(da.$$.fragment,e),u(ia.$$.fragment,e),u(pa.$$.fragment,e),u(ca.$$.fragment,e),u(fa.$$.fragment,e),Kn=!1},d(e){e&&(r(J),r($),r(b),r(l),r(Mn),r(tt),r(yn),r(vn),r(M),r(Tn),r(wn),r(xt),r(xn),r(k),r($n),r(jn),r(Ct),r(Cn),r(q),r(Pn),r(Jn),r(qt),r(Un),r(O),r(qn),r(Fn),r(It),r(kn),r(K),r(In),r(En),r(Lt),r(Zn),r(F),r(Ln),r(Wn),r(Bt),r(An),r(I),r(Vn),r(Bn),r(St),r(Rn),r(C),r(Nn),r(Sn),r(ee),r(Dn),r(he),r(Gn),r(A),r(Hn),r(V),r(Qn),r(te),r(Xn),r(B),r(zn),r(R),r(Yn),r(On),r(bn)),r(_),h(w,e),h(j,e),h(at,e),h(ot),h(nt),h(st),h(rt),h(lt),h(ve),h(dt),h(it),h(pt),h(ct),h(ft),h(mt),h(gt),h(ut),h(ht),h(_t),h(bt),h(Mt),h(yt),h(vt),h(Tt),h(wt,e),h($t),h(Je),h(jt,e),h(Pt),h(Ue),h(Jt),h(Ut,e),h(Ft),h(qe),h(kt,e),h(Et),h(Fe),h(Zt,e),h(Wt),h(ke),h(At),h(Vt,e),h(Rt),h(Ie),h(Nt,e),h(Dt),h(Ee),h(Ht),h(Qt),h(Xt),h(zt),h(Yt),h(Ot),h(Kt),h(ea),h(ta),h(aa),h(oa),h(na,e),h(sa),h(ra),h(la),h(da),h(ia),h(pa),h(ca),h(fa,e)}}}const rp='{"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 lp(U){return Di(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gp extends Gi{constructor(_){super(),Hi(this,_,lp,sp,Si,{})}}export{gp as component};
