Buckets:
| import{s as de,o as we}from"../chunks/scheduler.37c15a92.js";import{S as ke,i as ye,g as le,s as a,r as s,A as He,h as me,f as r,c as u,j as xe,u as l,x as Te,k as _e,y as ze,a as n,v as m,t as $,b as Pe,d as p,w as f,p as qe}from"../chunks/index.2bf4358c.js";import{C as Ce}from"../chunks/CourseFloatingBanner.6add7356.js";import{Q as _}from"../chunks/Question.668688bc.js";import{F as Fe}from"../chunks/FrameworkSwitchCourse.8d4d4ab6.js";import{H as x,E as ve}from"../chunks/getInferenceSnippets.24b50994.js";function Ee(w){let o,c;return o=new _({props:{choices:[{text:"tokenizer",explain:"ถูกต้องแล้ว! tokenizer ทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันไฟล์ทั้งหมดของ tokenizer (คำศัพท์ (vocabulary), สถาปัตยกรรมของ tokenizer และอื่นๆ) ไปยัง repo ที่กำหนดได้ แต่นี่ก็ไม่ใช่คำตอบที่ถูกเพียงข้อเดียว!",correct:!0},{text:"model configuration",explain:"ถูกต้องแล้ว! ไฟล์สำหรับกำหนดค่าของโมเดล (model configurations) ทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันพวกมันขึ้นไปยัง repo ที่กำหนดได้ มีอะไรอีกที่คุณสามารถแบ่งปันได้?",correct:!0},{text:"model",explain:"ถูกต้องแล้ว! โมเดลทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันพวกมันและไฟล์กำหนดค่าของพวกมันขึ้นไปยัง repo ที่กำหนดได้ แต่นั่นก็ไม่ใช่ทั้งหมดที่คุณแบ่งปันได้",correct:!0},{text:"ทั้งหมดที่กล่าวมารวมกับ callback ที่อุทิศให้",explain:"ถูกต้อง — โดยปกติ <code>PushToHubCallback</code> จะส่งวัตถุทั้งหมดเหล่านั้นไปยัง repo ระหว่างการเทรน",correct:!0}]}}),{c(){s(o.$$.fragment)},l(i){l(o.$$.fragment,i)},m(i,h){m(o,i,h),c=!0},i(i){c||(p(o.$$.fragment,i),c=!0)},o(i){$(o.$$.fragment,i),c=!1},d(i){f(o,i)}}}function je(w){let o,c;return o=new _({props:{choices:[{text:"tokenizer",explain:"ถูกต้องแล้ว! tokenizer ทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันไฟล์ทั้งหมดของ tokenizer (คำศัพท์ (vocabulary), สถาปัตยกรรมของ tokenizer และอื่นๆ) ไปยัง repo ที่กำหนดได้ แต่นี่ก็ไม่ใช่คำตอบที่ถูกเพียงข้อเดียว!",correct:!0},{text:"model configuration",explain:"ถูกต้องแล้ว! ไฟล์สำหรับกำหนดค่าของโมเดล (model configurations) ทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันพวกมันขึ้นไปยัง repo ที่กำหนดได้ มีอะไรอีกที่คุณสามารถแบ่งปันได้?",correct:!0},{text:"model",explain:"ถูกต้องแล้ว! โมเดลทั้งหมดมีคำสั่ง <code>push_to_hub</code> และใช้มันในการดันพวกมันและไฟล์กำหนดค่าของพวกมันขึ้นไปยัง repo ที่กำหนดได้ แต่นั่นก็ไม่ใช่ทั้งหมดที่คุณแบ่งปันได้",correct:!0},{text:"Trainer",explain:"ถูกต้อง — <code>Trainer</code> ก็มีคำสั่ง <code>push_to_hub</code> และใช้มันในการอัพโหลดโมเดล, ไฟล์กำหนดค่า, tokenizer และดราฟของการ์ดโมเดลไปยัง repo ที่กำหนดได้ ลองตอบข้ออื่นดู!",correct:!0}]}}),{c(){s(o.$$.fragment)},l(i){l(o.$$.fragment,i)},m(i,h){m(o,i,h),c=!0},i(i){c||(p(o.$$.fragment,i),c=!0)},o(i){$(o.$$.fragment,i),c=!1},d(i){f(o,i)}}}function Le(w){let o,c,i,h,d,O,k,U,y,D,H,ce="มาทดสอบความรู้ที่คุณได้เรียนในบทนี้กันเถอะ!",J,T,K,z,V,P,W,q,X,C,Y,F,Z,v,ee,E,te,j,re,g,b,Q,L,ie,R,ne,S,oe,A,ae,G,ue,I,$e,M,pe,B,se;d=new Fe({props:{fw:w[0]}}),k=new x({props:{title:"คำถามท้ายบท",local:"คำถามทายบท",headingTag:"h1"}}),y=new Ce({props:{chapter:4,classNames:"absolute z-10 right-0 top-0"}}),T=new x({props:{title:"1. อะไรคือข้อจำกัดของโมเดลบน Hub?",local:"1-อะไรคอขอจำกดของโมเดลบน-hub",headingTag:"h3"}}),z=new _({props:{choices:[{text:"โมเดลจาก 🤗 Transformers library",explain:"แม้ว่า Hugging Face Hub รับรองโมเดลจาก 🤗 Transformers library แต่นั่นก็ไม่ใช่ทั้งหมดที่มี!"},{text:"ทุกโมเดลที่มีอินเตอร์เฟซเหมือนกับ 🤗 Transformers",explain:"ไม่มีข้อบังคับเกี่ยวกับอินเตอร์เฟซเมื่อทำการอัพโหลดโมเดลขึ้นสู่ Hugging Face Hub"},{text:"ไม่มีข้อจำกัดใดๆ",explain:"ถูกต้องแล้ว! ไม่มีข้อจำกัดใดๆในการอัพโหลดโมเดลขึ้นสู่ Hub",explain:"Right! There are no limits when uploading models to the Hub.",correct:!0},{text:"โมเดลที่ใช้ได้กับงานประเภท NLP",explain:"ไม่มีข้อบังคับเกี่ยวกับประเภทของการใช้งาน!"}]}}),P=new x({props:{title:"2. คุณสามารถจัดการโมเดลบน Hub ได้อย่างไร?",local:"2-คณสามารถจดการโมเดลบน-hub-ไดอยางไร",headingTag:"h3"}}),q=new _({props:{choices:[{text:"ผ่านบัญชี GCP",explain:"ไม่ถูกต้อง!"},{text:"ผ่านการกระจายแบบ peer-to-peer",explain:"ไม่ถูกต้อง!"},{text:"ผ่าน git และ git-lfs",explain:"ถูกต้องแล้ว! โมเดลบน Hub เป็น Git repositories แบบเรียบง่าย มีการใช้งาน <code>git-lfs</code> สำหรับไฟล์ขนาดใหญ่",correct:!0}]}}),C=new x({props:{title:"3. คุณสามารถใช้ web interface ของ Hugging Face Hub ทำอะไรได้บ้าง?",local:"3-คณสามารถใช-web-interface-ของ-hugging-face-hub-ทำอะไรไดบาง",headingTag:"h3"}}),F=new _({props:{choices:[{text:"Fork repository ที่มีอยู่แล้ว",explain:"การ Fork repository ไม่สามารถทำได้บน Hugging Face Hub"},{text:"สร้าง model repository ใหม่",explain:"ถูกต้องแล้ว! แต่นั้นก็ไม่ใช่ทั้งหมดที่คุณทำได้",correct:!0},{text:"จัดการและแก้ไขไฟล์",explain:"ถูกต้องแล้ว! แต่นั้นก็ไม่ใช่คำตอบที่ถูกเพียงข้อเดียว",correct:!0},{text:"อัพโหลดไฟล์",explain:"ถูกต้องแล้ว! แต่ยังไม่ใช่ทั้งหมด",correct:!0},{text:"ดูความแตกต่างระหว่างเวอร์ชั่นต่างๆ",explain:"ถูกต้องแล้ว! แต่นั้นก็ไม่ใช่ทั้งหมดที่คุณทำได้",correct:!0}]}}),v=new x({props:{title:"4. การ์ดโมเดลคืออะไร?",local:"4-การดโมเดลคออะไร",headingTag:"h3"}}),E=new _({props:{choices:[{text:"คำอธิบายโมเดลแบบหยาบๆ ดังนั้นจึงสำคัญน้อยกว่าไฟล์โมเดลและ tokenizer",explain:"มันคือคำอธิบายของโมเดล แต่มันเป็นชิ้นที่สำคัญมาก: ถ้ามันไม่สมบูรณ์หรือขาดตกบกพร่องบางอย่างไป คุณประโยชน์ของโมเดลจะลงลดอย่างมาก"},{text:"วิธีที่ใช้ในการรับประกันความสามารถในการทำซ้ำ (reproducibility), ความสามารถในการนำกลับมาใช้ (reusability) และความเท่าเทียม (fairness)",explain:"ถูกต้องแล้ว! การแบ่งปันข้อมูลที่ถูกต้องในการ์ดโมเดลจะช่วยให้ผู้ใช้สามารถนำโมเดลของคุณไปใช้และคำนึงถึงข้อจำกัดและความลำเอียงของมัน",correct:!0},{text:"ไฟล์ Python ที่สามารถรันเพื่อดึงข้อมูลเกี่ยวกับโมเดลได้",explain:"การ์ดโมเดลเป็นไฟล์ Markdown แบบเรียบง่าย"}]}}),j=new x({props:{title:"5. วัตถุ (objects) ใดต่อไปนี้ของ 🤗 Transformers library ที่สามารถถูกแบ่งปันได้โดยตรงบน Hub ผ่านคำสั่ง push_to_hub() ?",local:"5-วตถ-objects-ใดตอไปนของ--transformers-library-ทสามารถถกแบงปนไดโดยตรงบน-hub-ผานคำสง-pushtohub-",headingTag:"h3"}});const ge=[je,Ee],N=[];function be(e,t){return e[0]==="pt"?0:1}return g=be(w),b=N[g]=ge[g](w),L=new x({props:{title:"6. อะไรคือขั้นตอนแรกในการใช้คำสั่ง push_to_hub() หรือเครื่องมือ CLI?",local:"6-อะไรคอขนตอนแรกในการใชคำสง-pushtohub-หรอเครองมอ-cli",headingTag:"h3"}}),R=new _({props:{choices:[{text:"Log in เข้าสู่หน้าเว็บไซต์",explain:"การทำแบบนี้ไม่ได้ช่วยอะไรกับ local machine ของคุณเลย"},{text:"รันคำสั่ง 'huggingface-cli login' ใน terminal",explain:"ถูกต้อง — การทำแบบนี้จะดาวน์โหลดและเก็บโทเค็นส่วนตัวของคุณไว้ใน cache",correct:!0},{text:"รันคำสั่ง 'notebook_login()' ใน notebook",explain:"ถูกต้อง — การทำแบบนี้จะแสดงเครื่องมือ (widget) ให้คุณรับรองความถูกต้อง (authentication)",correct:!0}]}}),S=new x({props:{title:"7. คุณกำลังใช้งานโมเดลและ tokenizer อยู่ — คุณจะสามารถอัพโหลดพวกมันขึ้นไปบน Hub ได้อย่างไร?",local:"7-คณกำลงใชงานโมเดลและ-tokenizer-อย--คณจะสามารถอพโหลดพวกมนขนไปบน-hub-ไดอยางไร",headingTag:"h3"}}),A=new _({props:{choices:[{text:"โดยการเรียกคำสั่ง push_to_hub โดยตรงจากโมเดลและ tokenizer",explain:"ถูกต้องแล้ว!",correct:!0},{text:"ภายใน Python runtime คลุมพวกมันเอาไว้ด้วย <code>huggingface_hub</code> utility",explain:"โมเดลและ tokenizers ถ้ารับประโยชน์จาก <code>huggingface_hub</code> utilities อยู่แล้ว: ไม่จำเป็นจะต้องมีการคลุมเพิ่ม!"},{text:"โดยการบันทึกพวกมันลงบนเครื่องและเรียกใช้คำสั่ง <code>transformers-cli upload-model</code>",explain:"ไม่มีคำสั่ง <code>upload-model</code> นี้อยู่"}]}}),G=new x({props:{title:"8. มีการดำเนินการ git (git operations) ใดบ้างที่คุณสามารถทำได้กับคลาส Repository ?",local:"8-มการดำเนนการ-git-git-operations-ใดบางทคณสามารถทำไดกบคลาส-repository-",headingTag:"h3"}}),I=new _({props:{choices:[{text:"commit",explain:"ถูกต้อง คำสั่ง <code>git_commit()</code> มีไว้สำหรับสิ่งนี้",correct:!0},{text:"pull",explain:"นั่นคือวัตถุประสงค์ของคำสั่ง <code>git_pull()</code>",correct:!0},{text:"push",explain:"คำสั่ง <code>git_push()</code> มีไว้ทำสิ่งนี้",correct:!0},{text:"merge",explain:"ไม่ การดำเนินการนี้ไม่สามารถทำได้กับ API นี้"}]}}),M=new ve({props:{source:"https://github.com/huggingface/course/blob/main/chapters/th/chapter4/6.mdx"}}),{c(){o=le("meta"),c=a(),i=le("p"),h=a(),s(d.$$.fragment),O=a(),s(k.$$.fragment),U=a(),s(y.$$.fragment),D=a(),H=le("p"),H.textContent=ce,J=a(),s(T.$$.fragment),K=a(),s(z.$$.fragment),V=a(),s(P.$$.fragment),W=a(),s(q.$$.fragment),X=a(),s(C.$$.fragment),Y=a(),s(F.$$.fragment),Z=a(),s(v.$$.fragment),ee=a(),s(E.$$.fragment),te=a(),s(j.$$.fragment),re=a(),b.c(),Q=a(),s(L.$$.fragment),ie=a(),s(R.$$.fragment),ne=a(),s(S.$$.fragment),oe=a(),s(A.$$.fragment),ae=a(),s(G.$$.fragment),ue=a(),s(I.$$.fragment),$e=a(),s(M.$$.fragment),pe=a(),B=le("p"),this.h()},l(e){const t=He("svelte-u9bgzb",document.head);o=me(t,"META",{name:!0,content:!0}),t.forEach(r),c=u(e),i=me(e,"P",{}),xe(i).forEach(r),h=u(e),l(d.$$.fragment,e),O=u(e),l(k.$$.fragment,e),U=u(e),l(y.$$.fragment,e),D=u(e),H=me(e,"P",{"data-svelte-h":!0}),Te(H)!=="svelte-1ad0c4q"&&(H.textContent=ce),J=u(e),l(T.$$.fragment,e),K=u(e),l(z.$$.fragment,e),V=u(e),l(P.$$.fragment,e),W=u(e),l(q.$$.fragment,e),X=u(e),l(C.$$.fragment,e),Y=u(e),l(F.$$.fragment,e),Z=u(e),l(v.$$.fragment,e),ee=u(e),l(E.$$.fragment,e),te=u(e),l(j.$$.fragment,e),re=u(e),b.l(e),Q=u(e),l(L.$$.fragment,e),ie=u(e),l(R.$$.fragment,e),ne=u(e),l(S.$$.fragment,e),oe=u(e),l(A.$$.fragment,e),ae=u(e),l(G.$$.fragment,e),ue=u(e),l(I.$$.fragment,e),$e=u(e),l(M.$$.fragment,e),pe=u(e),B=me(e,"P",{}),xe(B).forEach(r),this.h()},h(){_e(o,"name","hf:doc:metadata"),_e(o,"content",Re)},m(e,t){ze(document.head,o),n(e,c,t),n(e,i,t),n(e,h,t),m(d,e,t),n(e,O,t),m(k,e,t),n(e,U,t),m(y,e,t),n(e,D,t),n(e,H,t),n(e,J,t),m(T,e,t),n(e,K,t),m(z,e,t),n(e,V,t),m(P,e,t),n(e,W,t),m(q,e,t),n(e,X,t),m(C,e,t),n(e,Y,t),m(F,e,t),n(e,Z,t),m(v,e,t),n(e,ee,t),m(E,e,t),n(e,te,t),m(j,e,t),n(e,re,t),N[g].m(e,t),n(e,Q,t),m(L,e,t),n(e,ie,t),m(R,e,t),n(e,ne,t),m(S,e,t),n(e,oe,t),m(A,e,t),n(e,ae,t),m(G,e,t),n(e,ue,t),m(I,e,t),n(e,$e,t),m(M,e,t),n(e,pe,t),n(e,B,t),se=!0},p(e,[t]){const he={};t&1&&(he.fw=e[0]),d.$set(he);let fe=g;g=be(e),g!==fe&&(qe(),$(N[fe],1,1,()=>{N[fe]=null}),Pe(),b=N[g],b||(b=N[g]=ge[g](e),b.c()),p(b,1),b.m(Q.parentNode,Q))},i(e){se||(p(d.$$.fragment,e),p(k.$$.fragment,e),p(y.$$.fragment,e),p(T.$$.fragment,e),p(z.$$.fragment,e),p(P.$$.fragment,e),p(q.$$.fragment,e),p(C.$$.fragment,e),p(F.$$.fragment,e),p(v.$$.fragment,e),p(E.$$.fragment,e),p(j.$$.fragment,e),p(b),p(L.$$.fragment,e),p(R.$$.fragment,e),p(S.$$.fragment,e),p(A.$$.fragment,e),p(G.$$.fragment,e),p(I.$$.fragment,e),p(M.$$.fragment,e),se=!0)},o(e){$(d.$$.fragment,e),$(k.$$.fragment,e),$(y.$$.fragment,e),$(T.$$.fragment,e),$(z.$$.fragment,e),$(P.$$.fragment,e),$(q.$$.fragment,e),$(C.$$.fragment,e),$(F.$$.fragment,e),$(v.$$.fragment,e),$(E.$$.fragment,e),$(j.$$.fragment,e),$(b),$(L.$$.fragment,e),$(R.$$.fragment,e),$(S.$$.fragment,e),$(A.$$.fragment,e),$(G.$$.fragment,e),$(I.$$.fragment,e),$(M.$$.fragment,e),se=!1},d(e){e&&(r(c),r(i),r(h),r(O),r(U),r(D),r(H),r(J),r(K),r(V),r(W),r(X),r(Y),r(Z),r(ee),r(te),r(re),r(Q),r(ie),r(ne),r(oe),r(ae),r(ue),r($e),r(pe),r(B)),r(o),f(d,e),f(k,e),f(y,e),f(T,e),f(z,e),f(P,e),f(q,e),f(C,e),f(F,e),f(v,e),f(E,e),f(j,e),N[g].d(e),f(L,e),f(R,e),f(S,e),f(A,e),f(G,e),f(I,e),f(M,e)}}}const Re='{"title":"คำถามท้ายบท","local":"คำถามทายบท","sections":[{"title":"1. อะไรคือข้อจำกัดของโมเดลบน Hub?","local":"1-อะไรคอขอจำกดของโมเดลบน-hub","sections":[],"depth":3},{"title":"2. คุณสามารถจัดการโมเดลบน Hub ได้อย่างไร?","local":"2-คณสามารถจดการโมเดลบน-hub-ไดอยางไร","sections":[],"depth":3},{"title":"3. คุณสามารถใช้ web interface ของ Hugging Face Hub ทำอะไรได้บ้าง?","local":"3-คณสามารถใช-web-interface-ของ-hugging-face-hub-ทำอะไรไดบาง","sections":[],"depth":3},{"title":"4. การ์ดโมเดลคืออะไร?","local":"4-การดโมเดลคออะไร","sections":[],"depth":3},{"title":"5. วัตถุ (objects) ใดต่อไปนี้ของ 🤗 Transformers library ที่สามารถถูกแบ่งปันได้โดยตรงบน Hub ผ่านคำสั่ง push_to_hub() ?","local":"5-วตถ-objects-ใดตอไปนของ--transformers-library-ทสามารถถกแบงปนไดโดยตรงบน-hub-ผานคำสง-pushtohub-","sections":[],"depth":3},{"title":"6. อะไรคือขั้นตอนแรกในการใช้คำสั่ง push_to_hub() หรือเครื่องมือ CLI?","local":"6-อะไรคอขนตอนแรกในการใชคำสง-pushtohub-หรอเครองมอ-cli","sections":[],"depth":3},{"title":"7. คุณกำลังใช้งานโมเดลและ tokenizer อยู่ — คุณจะสามารถอัพโหลดพวกมันขึ้นไปบน Hub ได้อย่างไร?","local":"7-คณกำลงใชงานโมเดลและ-tokenizer-อย--คณจะสามารถอพโหลดพวกมนขนไปบน-hub-ไดอยางไร","sections":[],"depth":3},{"title":"8. มีการดำเนินการ git (git operations) ใดบ้างที่คุณสามารถทำได้กับคลาส Repository ?","local":"8-มการดำเนนการ-git-git-operations-ใดบางทคณสามารถทำไดกบคลาส-repository-","sections":[],"depth":3}],"depth":1}';function Se(w,o,c){let i="pt";return we(()=>{const h=new URLSearchParams(window.location.search);c(0,i=h.get("fw")||"pt")}),[i]}class Be extends ke{constructor(o){super(),ye(this,o,Se,Le,de,{})}}export{Be as component}; | |
Xet Storage Details
- Size:
- 20.6 kB
- Xet hash:
- d69d102dc6a8b1438db65796a6d68b08ef95913b4eca0f27963d90977711e022
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.