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