import{S as ae,i as re,s as le,e as i,k as E,w as D,t as w,M as ne,c as s,d as a,m as b,x as G,a as c,h as _,b as F,G as t,g as A,y as J,q as R,o as Q,B as V,v as ie}from"../../chunks/vendor-hf-doc-builder.js";import{I as se}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as ue}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import{F as ce}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function fe(T){let o,f,u,y,r,m,v,h,L,H,g,k;return{c(){o=i("ul"),f=i("li"),u=w("How to prepare a large dataset from the Hub"),y=E(),r=i("li"),m=w("How to use Keras to fine-tune a model"),v=E(),h=i("li"),L=w("How to use Keras to get predictions"),H=E(),g=i("li"),k=w("How to use a custom metric")},l(d){o=s(d,"UL",{});var l=c(o);f=s(l,"LI",{});var $=c(f);u=_($,"How to prepare a large dataset from the Hub"),$.forEach(a),y=b(l),r=s(l,"LI",{});var I=c(r);m=_(I,"How to use Keras to fine-tune a model"),I.forEach(a),v=b(l),h=s(l,"LI",{});var n=c(h);L=_(n,"How to use Keras to get predictions"),n.forEach(a),H=b(l),g=s(l,"LI",{});var P=c(g);k=_(P,"How to use a custom metric"),P.forEach(a),l.forEach(a)},m(d,l){A(d,o,l),t(o,f),t(f,u),t(o,y),t(o,r),t(r,m),t(o,v),t(o,h),t(h,L),t(o,H),t(o,g),t(g,k)},d(d){d&&a(o)}}}function pe(T){let o,f,u,y,r,m,v,h,L,H,g,k,d,l,$;return{c(){o=i("ul"),f=i("li"),u=w("How to prepare a large dataset from the Hub"),y=E(),r=i("li"),m=w("How to use the high-level "),v=i("code"),h=w("Trainer"),L=w(" API to fine-tune a model"),H=E(),g=i("li"),k=w("How to use a custom training loop"),d=E(),l=i("li"),$=w("How to leverage the \u{1F917} Accelerate library to easily run that custom training loop on any distributed setup")},l(I){o=s(I,"UL",{});var n=c(o);f=s(n,"LI",{});var P=c(f);u=_(P,"How to prepare a large dataset from the Hub"),P.forEach(a),y=b(n),r=s(n,"LI",{});var N=c(r);m=_(N,"How to use the high-level "),v=s(N,"CODE",{});var B=c(v);h=_(B,"Trainer"),B.forEach(a),L=_(N," API to fine-tune a model"),N.forEach(a),H=b(n),g=s(n,"LI",{});var S=c(g);k=_(S,"How to use a custom training loop"),S.forEach(a),d=b(n),l=s(n,"LI",{});var C=c(l);$=_(C,"How to leverage the \u{1F917} Accelerate library to easily run that custom training loop on any distributed setup"),C.forEach(a),n.forEach(a)},m(I,n){A(I,o,n),t(o,f),t(f,u),t(o,y),t(o,r),t(r,m),t(r,v),t(v,h),t(r,L),t(o,H),t(o,g),t(g,k),t(o,d),t(o,l),t(l,$)},d(I){I&&a(o)}}}function he(T){let o,f,u,y,r,m,v,h,L,H,g,k,d,l,$,I,n,P,N,B,S,C,O,K,Y,z;u=new ce({props:{fw:T[0]}}),h=new se({}),d=new ue({props:{chapter:3,classNames:"absolute z-10 right-0 top-0"}});function W(e,p){return e[0]==="pt"?pe:fe}let M=W(T),x=M(T);return{c(){o=i("meta"),f=E(),D(u.$$.fragment),y=E(),r=i("h1"),m=i("a"),v=i("span"),D(h.$$.fragment),L=E(),H=i("span"),g=w("Introduction"),k=E(),D(d.$$.fragment),l=E(),$=i("p"),I=w("In "),n=i("a"),P=w("Chapter 2"),N=w(" we explored how to use tokenizers and pretrained models to make predictions. But what if you want to fine-tune a pretrained model for your own dataset? That\u2019s the topic of this chapter! You will learn:"),B=E(),x.c(),S=E(),C=i("p"),O=w("In order to upload your trained checkpoints to the Hugging Face Hub, you will need a huggingface.co account: "),K=i("a"),Y=w("create an account"),this.h()},l(e){const p=ne('[data-svelte="svelte-1phssyn"]',document.head);o=s(p,"META",{name:!0,content:!0}),p.forEach(a),f=b(e),G(u.$$.fragment,e),y=b(e),r=s(e,"H1",{class:!0});var q=c(r);m=s(q,"A",{id:!0,class:!0,href:!0});var X=c(m);v=s(X,"SPAN",{});var Z=c(v);G(h.$$.fragment,Z),Z.forEach(a),X.forEach(a),L=b(q),H=s(q,"SPAN",{});var ee=c(H);g=_(ee,"Introduction"),ee.forEach(a),q.forEach(a),k=b(e),G(d.$$.fragment,e),l=b(e),$=s(e,"P",{});var U=c($);I=_(U,"In "),n=s(U,"A",{href:!0});var te=c(n);P=_(te,"Chapter 2"),te.forEach(a),N=_(U," we explored how to use tokenizers and pretrained models to make predictions. But what if you want to fine-tune a pretrained model for your own dataset? That\u2019s the topic of this chapter! You will learn:"),U.forEach(a),B=b(e),x.l(e),S=b(e),C=s(e,"P",{});var j=c(C);O=_(j,"In order to upload your trained checkpoints to the Hugging Face Hub, you will need a huggingface.co account: "),K=s(j,"A",{href:!0,rel:!0});var oe=c(K);Y=_(oe,"create an account"),oe.forEach(a),j.forEach(a),this.h()},h(){F(o,"name","hf:doc:metadata"),F(o,"content",JSON.stringify(de)),F(m,"id","introduction"),F(m,"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"),F(m,"href","#introduction"),F(r,"class","relative group"),F(n,"href","/course/chapter2"),F(K,"href","https://huggingface.co/join"),F(K,"rel","nofollow")},m(e,p){t(document.head,o),A(e,f,p),J(u,e,p),A(e,y,p),A(e,r,p),t(r,m),t(m,v),J(h,v,null),t(r,L),t(r,H),t(H,g),A(e,k,p),J(d,e,p),A(e,l,p),A(e,$,p),t($,I),t($,n),t(n,P),t($,N),A(e,B,p),x.m(e,p),A(e,S,p),A(e,C,p),t(C,O),t(C,K),t(K,Y),z=!0},p(e,[p]){const q={};p&1&&(q.fw=e[0]),u.$set(q),M!==(M=W(e))&&(x.d(1),x=M(e),x&&(x.c(),x.m(S.parentNode,S)))},i(e){z||(R(u.$$.fragment,e),R(h.$$.fragment,e),R(d.$$.fragment,e),z=!0)},o(e){Q(u.$$.fragment,e),Q(h.$$.fragment,e),Q(d.$$.fragment,e),z=!1},d(e){a(o),e&&a(f),V(u,e),e&&a(y),e&&a(r),V(h),e&&a(k),V(d,e),e&&a(l),e&&a($),e&&a(B),x.d(e),e&&a(S),e&&a(C)}}}const de={local:"introduction",title:"Introduction"};function me(T,o,f){let u="pt";return ie(()=>{const y=new URLSearchParams(window.location.search);f(0,u=y.get("fw")||"pt")}),[u]}class $e extends ae{constructor(o){super();re(this,o,me,he,le,{})}}export{$e as default,de as metadata};
