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