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