import{S as Tt,i as jt,s as zt,e as o,k as c,w as Ut,t as l,M as Jt,c as r,d as a,m as u,a as s,x as Gt,h as n,b as _,F as t,g as d,y as Kt,L as Qt,q as Vt,o as Xt,B as Yt,v as Zt}from"../../chunks/vendor-1e8b365d.js";import{I as te}from"../../chunks/IconCopyLink-483c28ba.js";function ee(kt){let w,O,y,v,C,A,X,q,Y,R,E,Z,g,tt,et,T,f,x,at,ot,I,rt,D,lt,st,nt,M,it,j,b,ht,z,h,S,ct,ut,L,dt,W,ft,pt,mt,B,wt,yt,F,_t,vt,N,Et,U,p,At,k,It,Lt,H,gt,bt,J;return A=new te({}),{c(){w=o("meta"),O=c(),y=o("h1"),v=o("a"),C=o("span"),Ut(A.$$.fragment),X=c(),q=o("span"),Y=l("Introduction"),R=c(),E=o("p"),Z=l("In "),g=o("a"),tt=l("Chapter 3"),et=l(" you got your first taste of the \u{1F917} Datasets library and saw that there were three main steps when it came to fine-tuning a model:"),T=c(),f=o("ol"),x=o("li"),at=l("Load a dataset from the Hugging Face Hub."),ot=c(),I=o("li"),rt=l("Preprocess the data with "),D=o("code"),lt=l("Dataset.map()"),st=l("."),nt=c(),M=o("li"),it=l("Load and compute metrics."),j=c(),b=o("p"),ht=l("But this is just scratching the surface of what \u{1F917} Datasets can do! In this chapter, we will take a deep dive into the library. Along the way, we\u2019ll find answers to the following questions:"),z=c(),h=o("ul"),S=o("li"),ct=l("What do you do when your dataset is not on the Hub?"),ut=c(),L=o("li"),dt=l("How can you slice and dice a dataset? (And what if you "),W=o("em"),ft=l("really"),pt=l(" need to use Pandas?)"),mt=c(),B=o("li"),wt=l("What do you do when your dataset is huge and will melt your laptop\u2019s RAM?"),yt=c(),F=o("li"),_t=l("What the heck are \u201Cmemory mapping\u201D and Apache Arrow?"),vt=c(),N=o("li"),Et=l("How can you create your own dataset and push it to the Hub?"),U=c(),p=o("p"),At=l("The techniques you learn here will prepare you for the advanced tokenization and fine-tuning tasks in "),k=o("a"),It=l("Chapter 6"),Lt=l(" and "),H=o("a"),gt=l("Chapter 7"),bt=l(" \u2014 so grab a coffee and let\u2019s get started!"),this.h()},l(e){const i=Jt('[data-svelte="svelte-1phssyn"]',document.head);w=r(i,"META",{name:!0,content:!0}),i.forEach(a),O=u(e),y=r(e,"H1",{class:!0});var G=s(y);v=r(G,"A",{id:!0,class:!0,href:!0});var Ht=s(v);C=r(Ht,"SPAN",{});var Pt=s(C);Gt(A.$$.fragment,Pt),Pt.forEach(a),Ht.forEach(a),X=u(G),q=r(G,"SPAN",{});var $t=s(q);Y=n($t,"Introduction"),$t.forEach(a),G.forEach(a),R=u(e),E=r(e,"P",{});var K=s(E);Z=n(K,"In "),g=r(K,"A",{href:!0});var Ct=s(g);tt=n(Ct,"Chapter 3"),Ct.forEach(a),et=n(K," you got your first taste of the \u{1F917} Datasets library and saw that there were three main steps when it came to fine-tuning a model:"),K.forEach(a),T=u(e),f=r(e,"OL",{});var P=s(f);x=r(P,"LI",{});var qt=s(x);at=n(qt,"Load a dataset from the Hugging Face Hub."),qt.forEach(a),ot=u(P),I=r(P,"LI",{});var Q=s(I);rt=n(Q,"Preprocess the data with "),D=r(Q,"CODE",{});var xt=s(D);lt=n(xt,"Dataset.map()"),xt.forEach(a),st=n(Q,"."),Q.forEach(a),nt=u(P),M=r(P,"LI",{});var Dt=s(M);it=n(Dt,"Load and compute metrics."),Dt.forEach(a),P.forEach(a),j=u(e),b=r(e,"P",{});var Mt=s(b);ht=n(Mt,"But this is just scratching the surface of what \u{1F917} Datasets can do! In this chapter, we will take a deep dive into the library. Along the way, we\u2019ll find answers to the following questions:"),Mt.forEach(a),z=u(e),h=r(e,"UL",{});var m=s(h);S=r(m,"LI",{});var St=s(S);ct=n(St,"What do you do when your dataset is not on the Hub?"),St.forEach(a),ut=u(m),L=r(m,"LI",{});var V=s(L);dt=n(V,"How can you slice and dice a dataset? (And what if you "),W=r(V,"EM",{});var Wt=s(W);ft=n(Wt,"really"),Wt.forEach(a),pt=n(V," need to use Pandas?)"),V.forEach(a),mt=u(m),B=r(m,"LI",{});var Bt=s(B);wt=n(Bt,"What do you do when your dataset is huge and will melt your laptop\u2019s RAM?"),Bt.forEach(a),yt=u(m),F=r(m,"LI",{});var Ft=s(F);_t=n(Ft,"What the heck are \u201Cmemory mapping\u201D and Apache Arrow?"),Ft.forEach(a),vt=u(m),N=r(m,"LI",{});var Nt=s(N);Et=n(Nt,"How can you create your own dataset and push it to the Hub?"),Nt.forEach(a),m.forEach(a),U=u(e),p=r(e,"P",{});var $=s(p);At=n($,"The techniques you learn here will prepare you for the advanced tokenization and fine-tuning tasks in "),k=r($,"A",{href:!0});var Ot=s(k);It=n(Ot,"Chapter 6"),Ot.forEach(a),Lt=n($," and "),H=r($,"A",{href:!0});var Rt=s(H);gt=n(Rt,"Chapter 7"),Rt.forEach(a),bt=n($," \u2014 so grab a coffee and let\u2019s get started!"),$.forEach(a),this.h()},h(){_(w,"name","hf:doc:metadata"),_(w,"content",JSON.stringify(ae)),_(v,"id","introduction"),_(v,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),_(v,"href","#introduction"),_(y,"class","relative group"),_(g,"href","/course/chapter3"),_(k,"href","/course/chapter6"),_(H,"href","/course/chapter7")},m(e,i){t(document.head,w),d(e,O,i),d(e,y,i),t(y,v),t(v,C),Kt(A,C,null),t(y,X),t(y,q),t(q,Y),d(e,R,i),d(e,E,i),t(E,Z),t(E,g),t(g,tt),t(E,et),d(e,T,i),d(e,f,i),t(f,x),t(x,at),t(f,ot),t(f,I),t(I,rt),t(I,D),t(D,lt),t(I,st),t(f,nt),t(f,M),t(M,it),d(e,j,i),d(e,b,i),t(b,ht),d(e,z,i),d(e,h,i),t(h,S),t(S,ct),t(h,ut),t(h,L),t(L,dt),t(L,W),t(W,ft),t(L,pt),t(h,mt),t(h,B),t(B,wt),t(h,yt),t(h,F),t(F,_t),t(h,vt),t(h,N),t(N,Et),d(e,U,i),d(e,p,i),t(p,At),t(p,k),t(k,It),t(p,Lt),t(p,H),t(H,gt),t(p,bt),J=!0},p:Qt,i(e){J||(Vt(A.$$.fragment,e),J=!0)},o(e){Xt(A.$$.fragment,e),J=!1},d(e){a(w),e&&a(O),e&&a(y),Yt(A),e&&a(R),e&&a(E),e&&a(T),e&&a(f),e&&a(j),e&&a(b),e&&a(z),e&&a(h),e&&a(U),e&&a(p)}}}const ae={local:"introduction",title:"Introduction"};function oe(kt){return Zt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class se extends Tt{constructor(w){super();jt(this,w,oe,ee,zt,{})}}export{se as default,ae as metadata};
