Buckets:
| import{s as ft,o as mt,n as ut}from"../chunks/scheduler.37c15a92.js";import{S as ct,i as ht,g as r,s as o,r as P,A as dt,h as p,f as n,c as l,j as lt,u as M,x as m,k as rt,y as $t,a,v as k,d as E,t as A,w as I}from"../chunks/index.7cb9c9b8.js";import{T as pt}from"../chunks/Tip.d10b3fc9.js";import{C as gt}from"../chunks/CourseFloatingBanner.df82c153.js";import{F as wt}from"../chunks/FrameworkSwitchCourse.97630871.js";import{H as vt,E as _t}from"../chunks/getInferenceSnippets.a2135f3c.js";function bt($){let i,u='📚 <strong>Essential Resources</strong>: Before starting, you might want to review the <a href="https://huggingface.co/docs/datasets/" rel="nofollow">🤗 Datasets documentation</a> for data processing.';return{c(){i=r("p"),i.innerHTML=u},l(s){i=p(s,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1byty9r"&&(i.innerHTML=u)},m(s,f){a(s,i,f)},p:ut,d(s){s&&n(i)}}}function Tt($){let i,u="🎯 <strong>What You’ll Build</strong>: By the end of this chapter, you’ll have fine-tuned a BERT model for text classification and understand how to adapt the techniques to your own datasets and tasks.";return{c(){i=r("p"),i.innerHTML=u},l(s){i=p(s,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1pf9s5"&&(i.innerHTML=u)},m(s,f){a(s,i,f)},p:ut,d(s){s&&n(i)}}}function Ht($){let i,u,s,f,c,B,g,F,w,S,v,Q='In <a href="/course/chapter2">Chapter 2</a> we explored how to use tokenizers and pretrained models to make predictions. But what if you want to fine-tune a pretrained model to solve a specific task? That’s the topic of this chapter! You will learn:',j,_,V="<li>How to prepare a large dataset from the Hub using the latest 🤗 Datasets features</li> <li>How to use the high-level <code>Trainer</code> API to fine-tune a model with modern best practices</li> <li>How to implement a custom training loop with optimization techniques</li> <li>How to leverage the 🤗 Accelerate library to easily run distributed training on any setup</li> <li>How to apply current fine-tuning best practices for maximum performance</li>",q,h,D,b,X="This chapter will also serve as an introduction to some Hugging Face libraries beyond the 🤗 Transformers library! We’ll see how libraries like 🤗 Datasets, 🤗 Tokenizers, 🤗 Accelerate, and 🤗 Evaluate can help you train models more efficiently and effectively.",R,T,Z="Each of the main sections in this chapter will teach you something different:",U,H,tt="<li><strong>Section 2</strong>: Learn modern data preprocessing techniques and efficient dataset handling</li> <li><strong>Section 3</strong>: Master the powerful Trainer API with all its latest features</li> <li><strong>Section 4</strong>: Implement training loops from scratch and understand distributed training with Accelerate</li>",W,y,et="By the end of this chapter, you’ll be able to fine-tune models on your own datasets using both high-level APIs and custom training loops, applying the latest best practices in the field.",Y,d,G,x,nt="This chapter focuses exclusively on <strong>PyTorch</strong>, as it has become the standard framework for modern deep learning research and production. We’ll use the latest APIs and best practices from the Hugging Face ecosystem.",N,C,at='To upload your trained models to the Hugging Face Hub, you will need a Hugging Face account: <a href="https://huggingface.co/join" rel="nofollow">create an account</a>',O,L,J,z,K;return c=new wt({props:{fw:$[0]}}),g=new vt({props:{title:"Introduction",local:"introduction",headingTag:"h1"}}),w=new gt({props:{chapter:3,classNames:"absolute z-10 right-0 top-0"}}),h=new pt({props:{$$slots:{default:[bt]},$$scope:{ctx:$}}}),d=new pt({props:{$$slots:{default:[Tt]},$$scope:{ctx:$}}}),L=new _t({props:{source:"https://github.com/huggingface/course/blob/main/chapters/en/chapter3/1.mdx"}}),{c(){i=r("meta"),u=o(),s=r("p"),f=o(),P(c.$$.fragment),B=o(),P(g.$$.fragment),F=o(),P(w.$$.fragment),S=o(),v=r("p"),v.innerHTML=Q,j=o(),_=r("ul"),_.innerHTML=V,q=o(),P(h.$$.fragment),D=o(),b=r("p"),b.textContent=X,R=o(),T=r("p"),T.textContent=Z,U=o(),H=r("ul"),H.innerHTML=tt,W=o(),y=r("p"),y.textContent=et,Y=o(),P(d.$$.fragment),G=o(),x=r("p"),x.innerHTML=nt,N=o(),C=r("p"),C.innerHTML=at,O=o(),P(L.$$.fragment),J=o(),z=r("p"),this.h()},l(t){const e=dt("svelte-u9bgzb",document.head);i=p(e,"META",{name:!0,content:!0}),e.forEach(n),u=l(t),s=p(t,"P",{}),lt(s).forEach(n),f=l(t),M(c.$$.fragment,t),B=l(t),M(g.$$.fragment,t),F=l(t),M(w.$$.fragment,t),S=l(t),v=p(t,"P",{"data-svelte-h":!0}),m(v)!=="svelte-7djaj1"&&(v.innerHTML=Q),j=l(t),_=p(t,"UL",{"data-svelte-h":!0}),m(_)!=="svelte-vcp0as"&&(_.innerHTML=V),q=l(t),M(h.$$.fragment,t),D=l(t),b=p(t,"P",{"data-svelte-h":!0}),m(b)!=="svelte-1hrwtbp"&&(b.textContent=X),R=l(t),T=p(t,"P",{"data-svelte-h":!0}),m(T)!=="svelte-tqzevx"&&(T.textContent=Z),U=l(t),H=p(t,"UL",{"data-svelte-h":!0}),m(H)!=="svelte-3bjzwl"&&(H.innerHTML=tt),W=l(t),y=p(t,"P",{"data-svelte-h":!0}),m(y)!=="svelte-loujt5"&&(y.textContent=et),Y=l(t),M(d.$$.fragment,t),G=l(t),x=p(t,"P",{"data-svelte-h":!0}),m(x)!=="svelte-15tacqh"&&(x.innerHTML=nt),N=l(t),C=p(t,"P",{"data-svelte-h":!0}),m(C)!=="svelte-10k4lsn"&&(C.innerHTML=at),O=l(t),M(L.$$.fragment,t),J=l(t),z=p(t,"P",{}),lt(z).forEach(n),this.h()},h(){rt(i,"name","hf:doc:metadata"),rt(i,"content",yt)},m(t,e){$t(document.head,i),a(t,u,e),a(t,s,e),a(t,f,e),k(c,t,e),a(t,B,e),k(g,t,e),a(t,F,e),k(w,t,e),a(t,S,e),a(t,v,e),a(t,j,e),a(t,_,e),a(t,q,e),k(h,t,e),a(t,D,e),a(t,b,e),a(t,R,e),a(t,T,e),a(t,U,e),a(t,H,e),a(t,W,e),a(t,y,e),a(t,Y,e),k(d,t,e),a(t,G,e),a(t,x,e),a(t,N,e),a(t,C,e),a(t,O,e),k(L,t,e),a(t,J,e),a(t,z,e),K=!0},p(t,[e]){const it={};e&1&&(it.fw=t[0]),c.$set(it);const st={};e&2&&(st.$$scope={dirty:e,ctx:t}),h.$set(st);const ot={};e&2&&(ot.$$scope={dirty:e,ctx:t}),d.$set(ot)},i(t){K||(E(c.$$.fragment,t),E(g.$$.fragment,t),E(w.$$.fragment,t),E(h.$$.fragment,t),E(d.$$.fragment,t),E(L.$$.fragment,t),K=!0)},o(t){A(c.$$.fragment,t),A(g.$$.fragment,t),A(w.$$.fragment,t),A(h.$$.fragment,t),A(d.$$.fragment,t),A(L.$$.fragment,t),K=!1},d(t){t&&(n(u),n(s),n(f),n(B),n(F),n(S),n(v),n(j),n(_),n(q),n(D),n(b),n(R),n(T),n(U),n(H),n(W),n(y),n(Y),n(G),n(x),n(N),n(C),n(O),n(J),n(z)),n(i),I(c,t),I(g,t),I(w,t),I(h,t),I(d,t),I(L,t)}}}const yt='{"title":"Introduction","local":"introduction","sections":[],"depth":1}';function xt($,i,u){let s="pt";return mt(()=>{const f=new URLSearchParams(window.location.search);u(0,s=f.get("fw")||"pt")}),[s]}class At extends ct{constructor(i){super(),ht(this,i,xt,Ht,ft,{})}}export{At as component}; | |
Xet Storage Details
- Size:
- 6.49 kB
- Xet hash:
- 6f8399ab6f6b00c6018c819136ee5ba715fff627b5664568b852e7434813d2af
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.