import{s as Re,o as Xe,n as Fe}from"../chunks/scheduler.3e4cb221.js";import{S as Se,i as ke,g as o,s as a,r,A as Ye,h as i,f as l,c as n,j as Ze,u as h,x as p,k as Pe,y as Ve,a as s,v as d,d as m,t as M,w as c}from"../chunks/index.e1c70545.js";import{H as T,T as Oe,E as Qe}from"../chunks/getInferenceSnippets.49b7df6c.js";import{C as Ie}from"../chunks/CodeBlock.72e9ab19.js";function De(V){let u,j="We have not explored evaluation in this course yet, but in chapter 2 we will explore evaluation in more detail. For now, we’re focusing on training and submitting your model.";return{c(){u=o("p"),u.textContent=j},l(w){u=i(w,"P",{"data-svelte-h":!0}),p(u)!=="svelte-1yh34fy"&&(u.textContent=j)},m(w,k){s(w,u,k)},p:Fe,d(w){w&&l(u)}}}function Ke(V){let u,j,w,k,y,O,g,ve="It’s time to submit your project! This year the smol course will use a leaderboard based submission. Here’s the plan:",Q,J,Ue="<li>Read the written guide for the chapter ✅</li> <li>Train a model using what you learned in the chapter.</li> <li>Push the model to the Hugging Face Hub.</li> <li>Evaluate the model using <code>hf jobs</code>.</li> <li>Open a pull request on the leaderboard.</li>",D,b,Ce="On this page we will go through each step.",K,$,ee,I,Ae='For chapter 1’s submission, you should read all the materials in the chapter and train a model using what you learned. Most of the training code is in the page on <a href="./3">Supervised Fine-Tuning</a>, but you’ll need to combine this with the code on <a href="./2">Chat Templates</a> and the code on <a href="./5">Training with Hugging Face Jobs</a>.',te,v,le,U,We="Once you’ve trained a model, you’ll need to push it to a repo on the Hugging Face Hub. In fact, TRL will take care of this for you if you add the <code>--push_to_hub</code> flag to your training command. So let’s say you trained a model using <code>hf jobs</code>, then this parameter will look like this:",se,C,ae,A,xe='Your trained model will be available at <code>your-username/your-model-name</code>. For detailed documentation, check out the <a href="https://huggingface.co/docs/transformers/trainer#checkpoints" rel="nofollow">checkpoints documentation</a> from <code>transformers</code>.',ne,W,oe,x,He="Now, we will need to evaluate the model. We will use <code>hf jobs</code> to evaluate the model as well and combine it with <code>openbench</code>. We will push the evaluation results to a dataset on the hub.",ie,H,ue,q,qe="This command will evaluate the model using <code>lighteval</code> and <code>vllm</code> and save the results to the Hugging Face Hub in the dataset repo that you defined.",pe,f,re,_,he,L,_e="You are now ready to submit your model to the leaderboard!  You need to do two things:",de,B,Le="<li>add your model’s results to <code>submissions.json</code></li> <li>share you evaluation command (using <code>hf jobs</code>) in the PR text.</li>",me,E,Me,G,Be='Open a pull request on the <a href="https://huggingface.co/spaces/smol-course/leaderboard/edit/main/submissions.json" rel="nofollow">leaderboard space</a> to submit your model. You just need to model info and reference to the dataset you created in the previous step. We will pull the results and display them on the leaderboard.',ce,N,we,z,fe,Z,Ee="Within the PR text, share you evaluation command. For example:",Te,P,je,R,Ge="This will help us to reproduce your model evaluation before we add it to the leaderboard.",ye,X,ge,F,Ne='Once the PR is merged, your model will be added to the leaderboard! You can check the leaderboard <a href="https://huggingface.co/spaces/smol-course/leaderboard" rel="nofollow">here</a>.',Je,S,be,Y,$e;return y=new T({props:{title:"Submit your final project!",local:"submit-your-final-project",headingTag:"h1"}}),$=new T({props:{title:"1. Read the written guide for the chapter and 2. Train a model using what you learned in the chapter.",local:"1-read-the-written-guide-for-the-chapter-and-2-train-a-model-using-what-you-learned-in-the-chapter",headingTag:"h2"}}),v=new T({props:{title:"3. Push the model to the Hugging Face Hub",local:"3-push-the-model-to-the-hugging-face-hub",headingTag:"h2"}}),C=new Ie({props:{code:"aGYlMjBqb2JzJTIwdXYlMjBydW4lMjAlNUMlMEElMjAlMjAlMjAlMjAtLWZsYXZvciUyMGExMDAtbGFyZ2UlMjAlNUMlMEElMjAlMjAlMjAlMjAtLXNlY3JldHMlMjBIRl9UT0tFTiUyMCU1QyUwQSUyMCUyMCUyMCUyMCUyMnRybCUyRnNjcmlwdHMlMkZzZnQucHklMjIlMjAlNUMlMEElMjAlMjAlMjAlMjAuLi4lMEElMjAlMjAlMjAlMjAtLXB1c2hfdG9faHViJTIwJTIzJTIwdGhpcyUyMHdpbGwlMjBwdXNoJTIwdGhlJTIwbW9kZWwlMjB0byUyMHRoZSUyMEh1Z2dpbmclMjBGYWNlJTIwSHVi",highlighted:`hf <span class="hljs-built_in">jobs</span> uv run \\
    --flavor a100-large \\
    --secrets HF_TOKEN \\
    <span class="hljs-string">&quot;trl/scripts/sft.py&quot;</span> \\
    ...
    --push_to_hub <span class="hljs-comment"># this will push the model to the Hugging Face Hub</span>`,wrap:!1}}),W=new T({props:{title:"4. Evaluate the model using hf jobs",local:"4-evaluate-the-model-using-hf-jobs",headingTag:"h2"}}),H=new Ie({props:{code:"aGYlMjBqb2JzJTIwdXYlMjBydW4lMjAlNUMlMjAlMjMlMjBydW4lMjBhJTIwaGYlMjBqb2JzJTIwam9iJTIwd2l0aCUyMHV2JTBBLS1mbGF2b3IlMjBhMTBnLWxhcmdlJTIwJTVDJTIwJTIzJTIwc2VsZWN0JTIwdGhlJTIwbWFjaGluZSUyMHNpemUlMEEtLXdpdGglMjAlMjJsaWdodGV2YWwlNUJ2bGxtJTVEJTIyJTIwJTVDJTIwJTIzJTIwaW5zdGFsbCUyMGxpZ2h0ZXZhbCUyMHdpdGglMjB2bGxtJTIwZGVwZW5kZW5jaWVzJTBBcyUyMEhGX1RPS0VOJTIwJTVDJTIwJTIzJTIwc2hhcmUlMjB0aGUlMjBodWdnaW5nZmFjZSUyMHdyaXRlJTIwdG9rZW4lMEFsaWdodGV2YWwlMjB2bGxtJTIwJTIybW9kZWxfbmFtZSUzRCUzQ3lvdXItdXNlcm5hbWUlM0UlMkYlM0N5b3VyLW1vZGVsLW5hbWUlM0UlMjIlMjAlMjJsaWdodGV2YWwlN0Nnc204ayU3QzAlN0MwJTIyJTIwLS1wdXNoLXRvLWh1YiUyMC0tcmVzdWx0cy1vcmclMjAlM0N5b3VyLXVzZXJuYW1lJTNF",highlighted:`hf <span class="hljs-built_in">jobs</span> uv run \\ <span class="hljs-comment"># run a hf jobs job with uv</span>
--flavor a10g-large \\ <span class="hljs-comment"># select the machine size</span>
--with <span class="hljs-string">&quot;lighteval[vllm]&quot;</span> \\ <span class="hljs-comment"># install lighteval with vllm dependencies</span>
s HF_TOKEN \\ <span class="hljs-comment"># share the huggingface write token</span>
lighteval vllm <span class="hljs-string">&quot;model_name=&lt;your-username&gt;/&lt;your-model-name&gt;&quot;</span> <span class="hljs-string">&quot;lighteval|gsm8k|0|0&quot;</span> --push-to-hub --results-org &lt;your-username&gt;`,wrap:!1}}),f=new Oe({props:{$$slots:{default:[De]},$$scope:{ctx:V}}}),_=new T({props:{title:"5. Open a pull request on the leaderboard space",local:"5-open-a-pull-request-on-the-leaderboard-space",headingTag:"h2"}}),E=new T({props:{title:"Add your model’s results to submissions.json",local:"add-your-models-results-to-submissionsjson",headingTag:"h3"}}),N=new Ie({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJTIyc3VibWlzc2lvbnMlMjIlM0ElMjAlNUIlMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAuLi4lMjAlMjMlMjBleGlzdGluZyUyMHN1Ym1pc3Npb25zJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydXNlcm5hbWUlMjIlM0ElMjAlMjIlM0N5b3VyLXVzZXJuYW1lJTNFJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybW9kZWxfbmFtZSUyMiUzQSUyMCUyMiUzQ3lvdXItbW9kZWwtbmFtZSUzRSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmNoYXB0ZXIlMjIlM0ElMjAlMjIxJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyc3VibWlzc2lvbl9kYXRlJTIyJTNBJTIwJTIyJTNDeW91ci1zdWJtaXNzaW9uLWRhdGUlM0UlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJyZXN1bHRzLWRhdGFzZXQlMjIlM0ElMjAlMjIlM0N5b3VyLXJlc3VsdHMtZGF0YXNldCUzRSUyMiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUwQSUyMCUyMCUyMCUyMCU1RCUwQSU3RA==",highlighted:`<span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;submissions&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>

        ... # existing submissions
        
        <span class="hljs-punctuation">{</span>
            <span class="hljs-attr">&quot;username&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&lt;your-username&gt;&quot;</span><span class="hljs-punctuation">,</span>
            <span class="hljs-attr">&quot;model_name&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&lt;your-model-name&gt;&quot;</span><span class="hljs-punctuation">,</span>
            <span class="hljs-attr">&quot;chapter&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;1&quot;</span><span class="hljs-punctuation">,</span>
            <span class="hljs-attr">&quot;submission_date&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&lt;your-submission-date&gt;&quot;</span><span class="hljs-punctuation">,</span>
            <span class="hljs-attr">&quot;results-dataset&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&lt;your-results-dataset&gt;&quot;</span>
        <span class="hljs-punctuation">}</span>
    <span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span>`,wrap:!1}}),z=new T({props:{title:"Share you evaluation command in the PR text.",local:"share-you-evaluation-command-in-the-pr-text",headingTag:"h3"}}),P=new Ie({props:{code:"aGYlMjBqb2JzJTIwdXYlMjBydW4lMjAuLi4=",highlighted:'<span class="hljs-function"><span class="hljs-title">hf</span></span> jobs uv run ...',wrap:!1}}),X=new T({props:{title:"Wait for the PR to be merged",local:"wait-for-the-pr-to-be-merged",headingTag:"h3"}}),S=new Qe({props:{source:"https://github.com/huggingface/smol-course/blob/main/units/en/unit1/6.md"}}),{c(){u=o("meta"),j=a(),w=o("p"),k=a(),r(y.$$.fragment),O=a(),g=o("p"),g.textContent=ve,Q=a(),J=o("ol"),J.innerHTML=Ue,D=a(),b=o("p"),b.textContent=Ce,K=a(),r($.$$.fragment),ee=a(),I=o("p"),I.innerHTML=Ae,te=a(),r(v.$$.fragment),le=a(),U=o("p"),U.innerHTML=We,se=a(),r(C.$$.fragment),ae=a(),A=o("p"),A.innerHTML=xe,ne=a(),r(W.$$.fragment),oe=a(),x=o("p"),x.innerHTML=He,ie=a(),r(H.$$.fragment),ue=a(),q=o("p"),q.innerHTML=qe,pe=a(),r(f.$$.fragment),re=a(),r(_.$$.fragment),he=a(),L=o("p"),L.textContent=_e,de=a(),B=o("ol"),B.innerHTML=Le,me=a(),r(E.$$.fragment),Me=a(),G=o("p"),G.innerHTML=Be,ce=a(),r(N.$$.fragment),we=a(),r(z.$$.fragment),fe=a(),Z=o("p"),Z.textContent=Ee,Te=a(),r(P.$$.fragment),je=a(),R=o("p"),R.textContent=Ge,ye=a(),r(X.$$.fragment),ge=a(),F=o("p"),F.innerHTML=Ne,Je=a(),r(S.$$.fragment),be=a(),Y=o("p"),this.h()},l(e){const t=Ye("svelte-u9bgzb",document.head);u=i(t,"META",{name:!0,content:!0}),t.forEach(l),j=n(e),w=i(e,"P",{}),Ze(w).forEach(l),k=n(e),h(y.$$.fragment,e),O=n(e),g=i(e,"P",{"data-svelte-h":!0}),p(g)!=="svelte-wonj32"&&(g.textContent=ve),Q=n(e),J=i(e,"OL",{"data-svelte-h":!0}),p(J)!=="svelte-1o2cbb5"&&(J.innerHTML=Ue),D=n(e),b=i(e,"P",{"data-svelte-h":!0}),p(b)!=="svelte-1qwargy"&&(b.textContent=Ce),K=n(e),h($.$$.fragment,e),ee=n(e),I=i(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-15cqvq"&&(I.innerHTML=Ae),te=n(e),h(v.$$.fragment,e),le=n(e),U=i(e,"P",{"data-svelte-h":!0}),p(U)!=="svelte-71za7v"&&(U.innerHTML=We),se=n(e),h(C.$$.fragment,e),ae=n(e),A=i(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1o1ar0u"&&(A.innerHTML=xe),ne=n(e),h(W.$$.fragment,e),oe=n(e),x=i(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1mgg0oo"&&(x.innerHTML=He),ie=n(e),h(H.$$.fragment,e),ue=n(e),q=i(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-fnysjl"&&(q.innerHTML=qe),pe=n(e),h(f.$$.fragment,e),re=n(e),h(_.$$.fragment,e),he=n(e),L=i(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-l889jz"&&(L.textContent=_e),de=n(e),B=i(e,"OL",{"data-svelte-h":!0}),p(B)!=="svelte-i8buu4"&&(B.innerHTML=Le),me=n(e),h(E.$$.fragment,e),Me=n(e),G=i(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-1c2cw0z"&&(G.innerHTML=Be),ce=n(e),h(N.$$.fragment,e),we=n(e),h(z.$$.fragment,e),fe=n(e),Z=i(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-7fpivj"&&(Z.textContent=Ee),Te=n(e),h(P.$$.fragment,e),je=n(e),R=i(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1vwki5p"&&(R.textContent=Ge),ye=n(e),h(X.$$.fragment,e),ge=n(e),F=i(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-6r8604"&&(F.innerHTML=Ne),Je=n(e),h(S.$$.fragment,e),be=n(e),Y=i(e,"P",{}),Ze(Y).forEach(l),this.h()},h(){Pe(u,"name","hf:doc:metadata"),Pe(u,"content",et)},m(e,t){Ve(document.head,u),s(e,j,t),s(e,w,t),s(e,k,t),d(y,e,t),s(e,O,t),s(e,g,t),s(e,Q,t),s(e,J,t),s(e,D,t),s(e,b,t),s(e,K,t),d($,e,t),s(e,ee,t),s(e,I,t),s(e,te,t),d(v,e,t),s(e,le,t),s(e,U,t),s(e,se,t),d(C,e,t),s(e,ae,t),s(e,A,t),s(e,ne,t),d(W,e,t),s(e,oe,t),s(e,x,t),s(e,ie,t),d(H,e,t),s(e,ue,t),s(e,q,t),s(e,pe,t),d(f,e,t),s(e,re,t),d(_,e,t),s(e,he,t),s(e,L,t),s(e,de,t),s(e,B,t),s(e,me,t),d(E,e,t),s(e,Me,t),s(e,G,t),s(e,ce,t),d(N,e,t),s(e,we,t),d(z,e,t),s(e,fe,t),s(e,Z,t),s(e,Te,t),d(P,e,t),s(e,je,t),s(e,R,t),s(e,ye,t),d(X,e,t),s(e,ge,t),s(e,F,t),s(e,Je,t),d(S,e,t),s(e,be,t),s(e,Y,t),$e=!0},p(e,[t]){const ze={};t&2&&(ze.$$scope={dirty:t,ctx:e}),f.$set(ze)},i(e){$e||(m(y.$$.fragment,e),m($.$$.fragment,e),m(v.$$.fragment,e),m(C.$$.fragment,e),m(W.$$.fragment,e),m(H.$$.fragment,e),m(f.$$.fragment,e),m(_.$$.fragment,e),m(E.$$.fragment,e),m(N.$$.fragment,e),m(z.$$.fragment,e),m(P.$$.fragment,e),m(X.$$.fragment,e),m(S.$$.fragment,e),$e=!0)},o(e){M(y.$$.fragment,e),M($.$$.fragment,e),M(v.$$.fragment,e),M(C.$$.fragment,e),M(W.$$.fragment,e),M(H.$$.fragment,e),M(f.$$.fragment,e),M(_.$$.fragment,e),M(E.$$.fragment,e),M(N.$$.fragment,e),M(z.$$.fragment,e),M(P.$$.fragment,e),M(X.$$.fragment,e),M(S.$$.fragment,e),$e=!1},d(e){e&&(l(j),l(w),l(k),l(O),l(g),l(Q),l(J),l(D),l(b),l(K),l(ee),l(I),l(te),l(le),l(U),l(se),l(ae),l(A),l(ne),l(oe),l(x),l(ie),l(ue),l(q),l(pe),l(re),l(he),l(L),l(de),l(B),l(me),l(Me),l(G),l(ce),l(we),l(fe),l(Z),l(Te),l(je),l(R),l(ye),l(ge),l(F),l(Je),l(be),l(Y)),l(u),c(y,e),c($,e),c(v,e),c(C,e),c(W,e),c(H,e),c(f,e),c(_,e),c(E,e),c(N,e),c(z,e),c(P,e),c(X,e),c(S,e)}}}const et='{"title":"Submit your final project!","local":"submit-your-final-project","sections":[{"title":"1. Read the written guide for the chapter and 2. Train a model using what you learned in the chapter.","local":"1-read-the-written-guide-for-the-chapter-and-2-train-a-model-using-what-you-learned-in-the-chapter","sections":[],"depth":2},{"title":"3. Push the model to the Hugging Face Hub","local":"3-push-the-model-to-the-hugging-face-hub","sections":[],"depth":2},{"title":"4. Evaluate the model using hf jobs","local":"4-evaluate-the-model-using-hf-jobs","sections":[],"depth":2},{"title":"5. Open a pull request on the leaderboard space","local":"5-open-a-pull-request-on-the-leaderboard-space","sections":[{"title":"Add your model’s results to submissions.json","local":"add-your-models-results-to-submissionsjson","sections":[],"depth":3},{"title":"Share you evaluation command in the PR text.","local":"share-you-evaluation-command-in-the-pr-text","sections":[],"depth":3},{"title":"Wait for the PR to be merged","local":"wait-for-the-pr-to-be-merged","sections":[],"depth":3}],"depth":2}],"depth":1}';function tt(V){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ot extends Se{constructor(u){super(),ke(this,u,tt,Ke,Re,{})}}export{ot as component};
