Buckets:

rtrm's picture
download
raw
20.8 kB
import{s as ke,o as ye}from"../chunks/scheduler.505acc25.js";import{S as He,i as Te,e as fe,s as a,c as s,h as ze,a as ce,d as r,b as $,f as de,g as l,j as Ce,k as we,l as qe,m as n,n as m,o as p,q as Pe,t as u,p as f,r as Fe}from"../chunks/index.17dd9071.js";import{C as ve,H as h,E as Le}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.ab761b6f.js";import{C as Ee}from"../chunks/CourseFloatingBanner.9496b79e.js";import{Q as _}from"../chunks/Question.ef1b4c7a.js";import{F as je}from"../chunks/FrameworkSwitchCourse.7aa4b983.js";function Me(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,x){m(o,i,x),c=!0},i(i){c||(u(o.$$.fragment,i),c=!0)},o(i){p(o.$$.fragment,i),c=!1},d(i){f(o,i)}}}function Se(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,x){m(o,i,x),c=!0},i(i){c||(u(o.$$.fragment,i),c=!0)},o(i){p(o.$$.fragment,i),c=!1},d(i){f(o,i)}}}function Re(w){let o,c,i,x,d,U,k,D,y,J,H,K,T,be="มาทดสอบความรู้ที่คุณได้เรียนในบทนี้กันเถอะ!",V,z,W,C,X,q,Y,P,Z,F,ee,v,te,L,re,E,ie,j,ne,g,b,B,M,oe,S,ae,R,$e,G,pe,I,ue,N,se,A,le,O,me;d=new je({props:{fw:w[0]}}),k=new ve({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),y=new h({props:{title:"คำถามท้ายบท",local:"คำถามทายบท",headingTag:"h1"}}),H=new Ee({props:{chapter:4,classNames:"absolute z-10 right-0 top-0"}}),z=new h({props:{title:"1. อะไรคือข้อจำกัดของโมเดลบน Hub?",local:"1-อะไรคอขอจำกดของโมเดลบน-hub",headingTag:"h3"}}),C=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:"ไม่มีข้อบังคับเกี่ยวกับประเภทของการใช้งาน!"}]}}),q=new h({props:{title:"2. คุณสามารถจัดการโมเดลบน Hub ได้อย่างไร?",local:"2-คณสามารถจดการโมเดลบน-hub-ไดอยางไร",headingTag:"h3"}}),P=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}]}}),F=new h({props:{title:"3. คุณสามารถใช้ web interface ของ Hugging Face Hub ทำอะไรได้บ้าง?",local:"3-คณสามารถใช-web-interface-ของ-hugging-face-hub-ทำอะไรไดบาง",headingTag:"h3"}}),v=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}]}}),L=new h({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 h({props:{title:"5. วัตถุ (objects) ใดต่อไปนี้ของ 🤗 Transformers library ที่สามารถถูกแบ่งปันได้โดยตรงบน Hub ผ่านคำสั่ง push_to_hub() ?",local:"5-วตถ-objects-ใดตอไปนของ--transformers-library-ทสามารถถกแบงปนไดโดยตรงบน-hub-ผานคำสง-pushtohub-",headingTag:"h3"}});const xe=[Se,Me],Q=[];function he(e,t){return e[0]==="pt"?0:1}return g=he(w),b=Q[g]=xe[g](w),M=new h({props:{title:"6. อะไรคือขั้นตอนแรกในการใช้คำสั่ง push_to_hub() หรือเครื่องมือ CLI?",local:"6-อะไรคอขนตอนแรกในการใชคำสง-pushtohub-หรอเครองมอ-cli",headingTag:"h3"}}),S=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}]}}),R=new h({props:{title:"7. คุณกำลังใช้งานโมเดลและ tokenizer อยู่ — คุณจะสามารถอัพโหลดพวกมันขึ้นไปบน Hub ได้อย่างไร?",local:"7-คณกำลงใชงานโมเดลและ-tokenizer-อย--คณจะสามารถอพโหลดพวกมนขนไปบน-hub-ไดอยางไร",headingTag:"h3"}}),G=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> นี้อยู่"}]}}),I=new h({props:{title:"8. มีการดำเนินการ git (git operations) ใดบ้างที่คุณสามารถทำได้กับคลาส Repository ?",local:"8-มการดำเนนการ-git-git-operations-ใดบางทคณสามารถทำไดกบคลาส-repository-",headingTag:"h3"}}),N=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 นี้"}]}}),A=new Le({props:{source:"https://github.com/huggingface/course/blob/main/chapters/th/chapter4/6.mdx"}}),{c(){o=fe("meta"),c=a(),i=fe("p"),x=a(),s(d.$$.fragment),U=a(),s(k.$$.fragment),D=a(),s(y.$$.fragment),J=a(),s(H.$$.fragment),K=a(),T=fe("p"),T.textContent=be,V=a(),s(z.$$.fragment),W=a(),s(C.$$.fragment),X=a(),s(q.$$.fragment),Y=a(),s(P.$$.fragment),Z=a(),s(F.$$.fragment),ee=a(),s(v.$$.fragment),te=a(),s(L.$$.fragment),re=a(),s(E.$$.fragment),ie=a(),s(j.$$.fragment),ne=a(),b.c(),B=a(),s(M.$$.fragment),oe=a(),s(S.$$.fragment),ae=a(),s(R.$$.fragment),$e=a(),s(G.$$.fragment),pe=a(),s(I.$$.fragment),ue=a(),s(N.$$.fragment),se=a(),s(A.$$.fragment),le=a(),O=fe("p"),this.h()},l(e){const t=ze("svelte-u9bgzb",document.head);o=ce(t,"META",{name:!0,content:!0}),t.forEach(r),c=$(e),i=ce(e,"P",{}),de(i).forEach(r),x=$(e),l(d.$$.fragment,e),U=$(e),l(k.$$.fragment,e),D=$(e),l(y.$$.fragment,e),J=$(e),l(H.$$.fragment,e),K=$(e),T=ce(e,"P",{"data-svelte-h":!0}),Ce(T)!=="svelte-1ad0c4q"&&(T.textContent=be),V=$(e),l(z.$$.fragment,e),W=$(e),l(C.$$.fragment,e),X=$(e),l(q.$$.fragment,e),Y=$(e),l(P.$$.fragment,e),Z=$(e),l(F.$$.fragment,e),ee=$(e),l(v.$$.fragment,e),te=$(e),l(L.$$.fragment,e),re=$(e),l(E.$$.fragment,e),ie=$(e),l(j.$$.fragment,e),ne=$(e),b.l(e),B=$(e),l(M.$$.fragment,e),oe=$(e),l(S.$$.fragment,e),ae=$(e),l(R.$$.fragment,e),$e=$(e),l(G.$$.fragment,e),pe=$(e),l(I.$$.fragment,e),ue=$(e),l(N.$$.fragment,e),se=$(e),l(A.$$.fragment,e),le=$(e),O=ce(e,"P",{}),de(O).forEach(r),this.h()},h(){we(o,"name","hf:doc:metadata"),we(o,"content",Ge)},m(e,t){qe(document.head,o),n(e,c,t),n(e,i,t),n(e,x,t),m(d,e,t),n(e,U,t),m(k,e,t),n(e,D,t),m(y,e,t),n(e,J,t),m(H,e,t),n(e,K,t),n(e,T,t),n(e,V,t),m(z,e,t),n(e,W,t),m(C,e,t),n(e,X,t),m(q,e,t),n(e,Y,t),m(P,e,t),n(e,Z,t),m(F,e,t),n(e,ee,t),m(v,e,t),n(e,te,t),m(L,e,t),n(e,re,t),m(E,e,t),n(e,ie,t),m(j,e,t),n(e,ne,t),Q[g].m(e,t),n(e,B,t),m(M,e,t),n(e,oe,t),m(S,e,t),n(e,ae,t),m(R,e,t),n(e,$e,t),m(G,e,t),n(e,pe,t),m(I,e,t),n(e,ue,t),m(N,e,t),n(e,se,t),m(A,e,t),n(e,le,t),n(e,O,t),me=!0},p(e,[t]){const _e={};t&1&&(_e.fw=e[0]),d.$set(_e);let ge=g;g=he(e),g!==ge&&(Fe(),p(Q[ge],1,1,()=>{Q[ge]=null}),Pe(),b=Q[g],b||(b=Q[g]=xe[g](e),b.c()),u(b,1),b.m(B.parentNode,B))},i(e){me||(u(d.$$.fragment,e),u(k.$$.fragment,e),u(y.$$.fragment,e),u(H.$$.fragment,e),u(z.$$.fragment,e),u(C.$$.fragment,e),u(q.$$.fragment,e),u(P.$$.fragment,e),u(F.$$.fragment,e),u(v.$$.fragment,e),u(L.$$.fragment,e),u(E.$$.fragment,e),u(j.$$.fragment,e),u(b),u(M.$$.fragment,e),u(S.$$.fragment,e),u(R.$$.fragment,e),u(G.$$.fragment,e),u(I.$$.fragment,e),u(N.$$.fragment,e),u(A.$$.fragment,e),me=!0)},o(e){p(d.$$.fragment,e),p(k.$$.fragment,e),p(y.$$.fragment,e),p(H.$$.fragment,e),p(z.$$.fragment,e),p(C.$$.fragment,e),p(q.$$.fragment,e),p(P.$$.fragment,e),p(F.$$.fragment,e),p(v.$$.fragment,e),p(L.$$.fragment,e),p(E.$$.fragment,e),p(j.$$.fragment,e),p(b),p(M.$$.fragment,e),p(S.$$.fragment,e),p(R.$$.fragment,e),p(G.$$.fragment,e),p(I.$$.fragment,e),p(N.$$.fragment,e),p(A.$$.fragment,e),me=!1},d(e){e&&(r(c),r(i),r(x),r(U),r(D),r(J),r(K),r(T),r(V),r(W),r(X),r(Y),r(Z),r(ee),r(te),r(re),r(ie),r(ne),r(B),r(oe),r(ae),r($e),r(pe),r(ue),r(se),r(le),r(O)),r(o),f(d,e),f(k,e),f(y,e),f(H,e),f(z,e),f(C,e),f(q,e),f(P,e),f(F,e),f(v,e),f(L,e),f(E,e),f(j,e),Q[g].d(e),f(M,e),f(S,e),f(R,e),f(G,e),f(I,e),f(N,e),f(A,e)}}}const Ge='{"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 Ie(w,o,c){let i="pt";return ye(()=>{const x=new URLSearchParams(window.location.search);c(0,i=x.get("fw")||"pt")}),[i]}class De extends He{constructor(o){super(),Te(this,o,Ie,Re,ke,{})}}export{De as component};

Xet Storage Details

Size:
20.8 kB
·
Xet hash:
753d0ae13501195e35bf82e7f89e6863afff40550055a8b813abefb1588cb7bc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.