import{s as j,a as z,n as O,o as Q}from"../chunks/scheduler.4cd3e004.js";import{S as U,i as V,e as f,s as n,c as A,h as B,a as p,d as a,b as l,f as $,g as D,j as F,k as g,l as J,m as r,n as R,t as q,o as G,p as I}from"../chunks/index.b664cb2d.js";import{H as K,E as N}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.179b63f8.js";function W(C){let s,w,h,x,d,v,m,L="🤗 PEFT (Parameter-Efficient Fine-Tuning) is a library for efficiently adapting large pretrained models to various downstream applications without fine-tuning all of a model’s parameters because it is prohibitively costly. PEFT methods only fine-tune a small number of (extra) model parameters - significantly decreasing computational and storage costs - while yielding performance comparable to a fully fine-tuned model. This makes it more accessible to train and store large language models (LLMs) on consumer hardware.",y,c,M="PEFT is integrated with the Transformers, Diffusers, and Accelerate libraries to provide a faster and easier way to load, train, and use large models for inference.",_,i,S='<div class="w-full flex flex-col space-y-4 md:space-y-0 md:grid md:grid-cols-2 md:gap-y-4 md:gap-x-5"><a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="quicktour"><div class="w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Quicktour</div> <p class="text-gray-700">Start here if you&#39;re new to 🤗 PEFT to get an overview of the library&#39;s main features, and how to train a model with a PEFT method.</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./task_guides/prompt_based_methods"><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">How-to guides</div> <p class="text-gray-700">Practical guides demonstrating how to apply various PEFT methods across different types of tasks like image classification, causal language modeling, automatic speech recognition, and more. Learn how to use 🤗 PEFT with the DeepSpeed and Fully Sharded Data Parallel scripts.</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./conceptual_guides/adapter"><div class="w-full text-center bg-gradient-to-br from-pink-400 to-pink-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Conceptual guides</div> <p class="text-gray-700">Get a better theoretical understanding of how LoRA and various soft prompting methods help reduce the number of trainable parameters to make training more efficient.</p></a> <a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./package_reference/config"><div class="w-full text-center bg-gradient-to-br from-purple-400 to-purple-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Reference</div> <p class="text-gray-700">Technical descriptions of how 🤗 PEFT classes and methods work.</p></a></div>',P,o,H,E,u,k,b,T;return d=new K({props:{title:"PEFT",local:"peft",headingTag:"h1"}}),u=new N({props:{source:"https://github.com/huggingface/peft/blob/main/docs/source/index.md"}}),{c(){s=f("meta"),w=n(),h=f("p"),x=n(),A(d.$$.fragment),v=n(),m=f("p"),m.textContent=L,y=n(),c=f("p"),c.textContent=M,_=n(),i=f("div"),i.innerHTML=S,P=n(),o=f("iframe"),E=n(),A(u.$$.fragment),k=n(),b=f("p"),this.h()},l(e){const t=B("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(a),w=l(e),h=p(e,"P",{}),$(h).forEach(a),x=l(e),D(d.$$.fragment,e),v=l(e),m=p(e,"P",{"data-svelte-h":!0}),F(m)!=="svelte-cehkfa"&&(m.textContent=L),y=l(e),c=p(e,"P",{"data-svelte-h":!0}),F(c)!=="svelte-n0kp74"&&(c.textContent=M),_=l(e),i=p(e,"DIV",{class:!0,"data-svelte-h":!0}),F(i)!=="svelte-m1i9g5"&&(i.innerHTML=S),P=l(e),o=p(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),$(o).forEach(a),E=l(e),D(u.$$.fragment,e),k=l(e),b=p(e,"P",{}),$(b).forEach(a),this.h()},h(){g(s,"name","hf:doc:metadata"),g(s,"content",X),g(i,"class","mt-10"),z(o.src,H="https://stevhliu-peft-methods.hf.space")||g(o,"src",H),g(o,"frameborder","0"),g(o,"width","850"),g(o,"height","620")},m(e,t){J(document.head,s),r(e,w,t),r(e,h,t),r(e,x,t),R(d,e,t),r(e,v,t),r(e,m,t),r(e,y,t),r(e,c,t),r(e,_,t),r(e,i,t),r(e,P,t),r(e,o,t),r(e,E,t),R(u,e,t),r(e,k,t),r(e,b,t),T=!0},p:O,i(e){T||(q(d.$$.fragment,e),q(u.$$.fragment,e),T=!0)},o(e){G(d.$$.fragment,e),G(u.$$.fragment,e),T=!1},d(e){e&&(a(w),a(h),a(x),a(v),a(m),a(y),a(c),a(_),a(i),a(P),a(o),a(E),a(k),a(b)),a(s),I(d,e),I(u,e)}}}const X='{"title":"PEFT","local":"peft","sections":[],"depth":1}';function Y(C){return Q(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ae extends U{constructor(s){super(),V(this,s,Y,W,j,{})}}export{ae as component};
