import{s as Ye,n as Ve,o as Oe}from"../chunks/scheduler.c9113122.js";import{S as Qe,i as De,e as o,s as a,c as p,h as Ke,a as i,d as l,b as n,f as Se,g as r,j as u,k as Ae,l as et,m as s,n as h,t as d,o as m,p as M}from"../chunks/index.667522bb.js";import{C as Ce}from"../chunks/CodeBlock.78f8cced.js";import{H as w,E as tt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.2eeed2e2.js";function lt(He){let c,V,S,O,f,Q,j,We="It’s time to submit your project! This year the smol course will use a leaderboard based submission. Here’s the plan:",D,g,xe="<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>",K,y,qe="On this page we will go through each step.",ee,J,te,b,Le='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>.',le,I,se,$,_e="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:",ae,v,ne,U,Be='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>.',oe,C,ie,A,ze="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.",ue,H,pe,W,Ee="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.",re,T,Ne="<p>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.</p>",he,x,de,q,Ge="You are now ready to submit your model to the leaderboard!  You need to do two things:",me,L,ke="<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,_,ce,B,Ze='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.',we,z,Te,E,fe,N,Pe="Within the PR text, share you evaluation command. For example:",je,G,ge,k,Re="This will help us to reproduce your model evaluation before we add it to the leaderboard.",ye,Z,Je,P,Xe='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>.',be,R,Ie,X,Fe=`You’ve completed the unit — great work!
Now put your learning to the test by taking the <a href="https://huggingface.co/spaces/smol-course/unit_1_quiz" rel="nofollow">quiz</a>.`,$e,F,ve,Y,Ue;return f=new w({props:{title:"Submit your final project!",local:"submit-your-final-project",headingTag:"h1"}}),J=new w({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"}}),I=new w({props:{title:"3. Push the model to the Hugging Face Hub",local:"3-push-the-model-to-the-hugging-face-hub",headingTag:"h2"}}),v=new Ce({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}}),C=new w({props:{title:"4. Evaluate the model using hf jobs",local:"4-evaluate-the-model-using-hf-jobs",headingTag:"h2"}}),H=new Ce({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}}),x=new w({props:{title:"5. Open a pull request on the leaderboard space",local:"5-open-a-pull-request-on-the-leaderboard-space",headingTag:"h2"}}),_=new w({props:{title:"Add your model’s results to submissions.json",local:"add-your-models-results-to-submissionsjson",headingTag:"h3"}}),z=new Ce({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}}),E=new w({props:{title:"Share you evaluation command in the PR text.",local:"share-you-evaluation-command-in-the-pr-text",headingTag:"h3"}}),G=new Ce({props:{code:"aGYlMjBqb2JzJTIwdXYlMjBydW4lMjAuLi4=",highlighted:'<span class="hljs-function"><span class="hljs-title">hf</span></span> jobs uv run ...',wrap:!1}}),Z=new w({props:{title:"Wait for the PR to be merged",local:"wait-for-the-pr-to-be-merged",headingTag:"h3"}}),R=new w({props:{title:"Test your knowledge",local:"test-your-knowledge",headingTag:"h2"}}),F=new tt({props:{source:"https://github.com/huggingface/smol-course/blob/main/units/en/unit1/6.md"}}),{c(){c=o("meta"),V=a(),S=o("p"),O=a(),p(f.$$.fragment),Q=a(),j=o("p"),j.textContent=We,D=a(),g=o("ol"),g.innerHTML=xe,K=a(),y=o("p"),y.textContent=qe,ee=a(),p(J.$$.fragment),te=a(),b=o("p"),b.innerHTML=Le,le=a(),p(I.$$.fragment),se=a(),$=o("p"),$.innerHTML=_e,ae=a(),p(v.$$.fragment),ne=a(),U=o("p"),U.innerHTML=Be,oe=a(),p(C.$$.fragment),ie=a(),A=o("p"),A.innerHTML=ze,ue=a(),p(H.$$.fragment),pe=a(),W=o("p"),W.innerHTML=Ee,re=a(),T=o("blockquote"),T.innerHTML=Ne,he=a(),p(x.$$.fragment),de=a(),q=o("p"),q.textContent=Ge,me=a(),L=o("ol"),L.innerHTML=ke,Me=a(),p(_.$$.fragment),ce=a(),B=o("p"),B.innerHTML=Ze,we=a(),p(z.$$.fragment),Te=a(),p(E.$$.fragment),fe=a(),N=o("p"),N.textContent=Pe,je=a(),p(G.$$.fragment),ge=a(),k=o("p"),k.textContent=Re,ye=a(),p(Z.$$.fragment),Je=a(),P=o("p"),P.innerHTML=Xe,be=a(),p(R.$$.fragment),Ie=a(),X=o("p"),X.innerHTML=Fe,$e=a(),p(F.$$.fragment),ve=a(),Y=o("p"),this.h()},l(e){const t=Ke("svelte-u9bgzb",document.head);c=i(t,"META",{name:!0,content:!0}),t.forEach(l),V=n(e),S=i(e,"P",{}),Se(S).forEach(l),O=n(e),r(f.$$.fragment,e),Q=n(e),j=i(e,"P",{"data-svelte-h":!0}),u(j)!=="svelte-wonj32"&&(j.textContent=We),D=n(e),g=i(e,"OL",{"data-svelte-h":!0}),u(g)!=="svelte-1o2cbb5"&&(g.innerHTML=xe),K=n(e),y=i(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-1qwargy"&&(y.textContent=qe),ee=n(e),r(J.$$.fragment,e),te=n(e),b=i(e,"P",{"data-svelte-h":!0}),u(b)!=="svelte-15cqvq"&&(b.innerHTML=Le),le=n(e),r(I.$$.fragment,e),se=n(e),$=i(e,"P",{"data-svelte-h":!0}),u($)!=="svelte-71za7v"&&($.innerHTML=_e),ae=n(e),r(v.$$.fragment,e),ne=n(e),U=i(e,"P",{"data-svelte-h":!0}),u(U)!=="svelte-1o1ar0u"&&(U.innerHTML=Be),oe=n(e),r(C.$$.fragment,e),ie=n(e),A=i(e,"P",{"data-svelte-h":!0}),u(A)!=="svelte-1mgg0oo"&&(A.innerHTML=ze),ue=n(e),r(H.$$.fragment,e),pe=n(e),W=i(e,"P",{"data-svelte-h":!0}),u(W)!=="svelte-fnysjl"&&(W.innerHTML=Ee),re=n(e),T=i(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),u(T)!=="svelte-1j74m23"&&(T.innerHTML=Ne),he=n(e),r(x.$$.fragment,e),de=n(e),q=i(e,"P",{"data-svelte-h":!0}),u(q)!=="svelte-l889jz"&&(q.textContent=Ge),me=n(e),L=i(e,"OL",{"data-svelte-h":!0}),u(L)!=="svelte-i8buu4"&&(L.innerHTML=ke),Me=n(e),r(_.$$.fragment,e),ce=n(e),B=i(e,"P",{"data-svelte-h":!0}),u(B)!=="svelte-1c2cw0z"&&(B.innerHTML=Ze),we=n(e),r(z.$$.fragment,e),Te=n(e),r(E.$$.fragment,e),fe=n(e),N=i(e,"P",{"data-svelte-h":!0}),u(N)!=="svelte-7fpivj"&&(N.textContent=Pe),je=n(e),r(G.$$.fragment,e),ge=n(e),k=i(e,"P",{"data-svelte-h":!0}),u(k)!=="svelte-1vwki5p"&&(k.textContent=Re),ye=n(e),r(Z.$$.fragment,e),Je=n(e),P=i(e,"P",{"data-svelte-h":!0}),u(P)!=="svelte-6r8604"&&(P.innerHTML=Xe),be=n(e),r(R.$$.fragment,e),Ie=n(e),X=i(e,"P",{"data-svelte-h":!0}),u(X)!=="svelte-12iyozg"&&(X.innerHTML=Fe),$e=n(e),r(F.$$.fragment,e),ve=n(e),Y=i(e,"P",{}),Se(Y).forEach(l),this.h()},h(){Ae(c,"name","hf:doc:metadata"),Ae(c,"content",st),Ae(T,"class","tip")},m(e,t){et(document.head,c),s(e,V,t),s(e,S,t),s(e,O,t),h(f,e,t),s(e,Q,t),s(e,j,t),s(e,D,t),s(e,g,t),s(e,K,t),s(e,y,t),s(e,ee,t),h(J,e,t),s(e,te,t),s(e,b,t),s(e,le,t),h(I,e,t),s(e,se,t),s(e,$,t),s(e,ae,t),h(v,e,t),s(e,ne,t),s(e,U,t),s(e,oe,t),h(C,e,t),s(e,ie,t),s(e,A,t),s(e,ue,t),h(H,e,t),s(e,pe,t),s(e,W,t),s(e,re,t),s(e,T,t),s(e,he,t),h(x,e,t),s(e,de,t),s(e,q,t),s(e,me,t),s(e,L,t),s(e,Me,t),h(_,e,t),s(e,ce,t),s(e,B,t),s(e,we,t),h(z,e,t),s(e,Te,t),h(E,e,t),s(e,fe,t),s(e,N,t),s(e,je,t),h(G,e,t),s(e,ge,t),s(e,k,t),s(e,ye,t),h(Z,e,t),s(e,Je,t),s(e,P,t),s(e,be,t),h(R,e,t),s(e,Ie,t),s(e,X,t),s(e,$e,t),h(F,e,t),s(e,ve,t),s(e,Y,t),Ue=!0},p:Ve,i(e){Ue||(d(f.$$.fragment,e),d(J.$$.fragment,e),d(I.$$.fragment,e),d(v.$$.fragment,e),d(C.$$.fragment,e),d(H.$$.fragment,e),d(x.$$.fragment,e),d(_.$$.fragment,e),d(z.$$.fragment,e),d(E.$$.fragment,e),d(G.$$.fragment,e),d(Z.$$.fragment,e),d(R.$$.fragment,e),d(F.$$.fragment,e),Ue=!0)},o(e){m(f.$$.fragment,e),m(J.$$.fragment,e),m(I.$$.fragment,e),m(v.$$.fragment,e),m(C.$$.fragment,e),m(H.$$.fragment,e),m(x.$$.fragment,e),m(_.$$.fragment,e),m(z.$$.fragment,e),m(E.$$.fragment,e),m(G.$$.fragment,e),m(Z.$$.fragment,e),m(R.$$.fragment,e),m(F.$$.fragment,e),Ue=!1},d(e){e&&(l(V),l(S),l(O),l(Q),l(j),l(D),l(g),l(K),l(y),l(ee),l(te),l(b),l(le),l(se),l($),l(ae),l(ne),l(U),l(oe),l(ie),l(A),l(ue),l(pe),l(W),l(re),l(T),l(he),l(de),l(q),l(me),l(L),l(Me),l(ce),l(B),l(we),l(Te),l(fe),l(N),l(je),l(ge),l(k),l(ye),l(Je),l(P),l(be),l(Ie),l(X),l($e),l(ve),l(Y)),l(c),M(f,e),M(J,e),M(I,e),M(v,e),M(C,e),M(H,e),M(x,e),M(_,e),M(z,e),M(E,e),M(G,e),M(Z,e),M(R,e),M(F,e)}}}const st='{"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},{"title":"Test your knowledge","local":"test-your-knowledge","sections":[],"depth":2}],"depth":1}';function at(He){return Oe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pt extends Qe{constructor(c){super(),De(this,c,at,lt,Ye,{})}}export{pt as component};
