Buckets:
အခန်း (၄) ဆိုင်ရာ မေးခွန်းများ[[end-of-chapter-quiz]]
ဒီအခန်းမှာ သင်ယူခဲ့တာတွေကို စစ်ဆေးကြည့်ရအောင်။
၁။ Hub ပေါ်က models တွေဟာ ဘာတွေနဲ့ ကန့်သတ်ထားလဲ။
<Question choices={[ { text: "🤗 Transformers library က models တွေ။", explain: "🤗 Transformers library က models တွေကို Hugging Face Hub ပေါ်မှာ ထောက်ပံ့ပေးထားပေမယ့်၊ အဲဒါတွေ တစ်ခုတည်းတော့ မဟုတ်ပါဘူး!" }, { text: "🤗 Transformers နဲ့ ဆင်တူတဲ့ interface ရှိတဲ့ models အားလုံး။", explain: "Hugging Face Hub ကို models တွေ upload လုပ်တဲ့အခါ interface လိုအပ်ချက် မရှိပါဘူး။" }, { text: "ကန့်သတ်ချက် မရှိပါဘူး။", explain: "မှန်ပါတယ်။ Hub ကို models တွေ upload လုပ်တဲ့အခါ ကန့်သတ်ချက် မရှိပါဘူး။", correct: true }, { text: "NLP နဲ့ တစ်နည်းနည်း ဆက်စပ်နေတဲ့ models တွေ။", explain: "အသုံးချနယ်ပယ်နဲ့ ပတ်သက်တဲ့ လိုအပ်ချက် မသတ်မှတ်ထားပါဘူး!" } ]} />
၂။ Hub ပေါ်မှာ models တွေကို ဘယ်လို စီမံခန့်ခွဲနိုင်မလဲ။
<Question
choices={[
{
text: "GCP account မှတစ်ဆင့်။",
explain: "မမှန်ပါဘူး!"
},
{
text: "peer-to-peer distribution မှတစ်ဆင့်။",
explain: "မမှန်ပါဘူး!"
},
{
text: "git နဲ့ git-lfs မှတစ်ဆင့်။",
explain: "မှန်ပါတယ်။ Hub ပေါ်က models တွေဟာ ရိုးရှင်းတဲ့ Git repositories တွေဖြစ်ပြီး၊ large files တွေအတွက် git-lfs ကို အကျိုးယူပါတယ်။",
correct: true
}
]}
/>
၃။ Hugging Face Hub web interface ကို အသုံးပြုပြီး ဘာတွေလုပ်ဆောင်နိုင်မလဲ။
<Question choices={[ { text: "လက်ရှိ repository ကို fork လုပ်ပါ။", explain: "Hugging Face Hub မှာ repository တစ်ခုကို fork လုပ်လို့ မရပါဘူး။" }, { text: "model repository အသစ်တစ်ခု ဖန်တီးပါ။", explain: "မှန်ပါတယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။", correct: true }, { text: "ဖိုင်တွေကို စီမံခန့်ခွဲပြီး ပြင်ဆင်ပါ။", explain: "မှန်ပါတယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်း အဖြေမှန် မဟုတ်ပါဘူး။", correct: true }, { text: "ဖိုင်တွေကို upload လုပ်ပါ။", explain: "မှန်ပါတယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။", correct: true }, { text: "versions တွေအလိုက် diffs တွေကို ကြည့်ပါ။", explain: "မှန်ပါတယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။", correct: true } ]} />
၄။ Model card ဆိုတာဘာလဲ။
<Question choices={[ { text: "model ရဲ့ ကြမ်းတမ်းတဲ့ ဖော်ပြချက်တစ်ခုဖြစ်ပြီး၊ model နဲ့ tokenizer files တွေထက် အရေးမကြီးပါဘူး။", explain: "ဒါဟာ model ရဲ့ ဖော်ပြချက်တစ်ခုဖြစ်ပေမယ့်၊ အရေးကြီးတဲ့ အစိတ်အပိုင်းတစ်ခုပါ။ ဒါက မပြည့်စုံဘူးဆိုရင် ဒါမှမဟုတ် မရှိဘူးဆိုရင် model ရဲ့ အသုံးဝင်မှုက သိသိသာသာ လျော့ကျသွားပါလိမ့်မယ်။" }, { text: "reproducibility, reusability, နဲ့ fairness ကို သေချာစေမယ့် နည်းလမ်းတစ်ခု။", explain: "မှန်ပါတယ်။ model card မှာ မှန်ကန်တဲ့ အချက်အလက်တွေ မျှဝေခြင်းက သုံးစွဲသူတွေကို သင့် model ကို အကျိုးယူနိုင်စေပြီး ၎င်းရဲ့ ကန့်သတ်ချက်တွေနဲ့ ဘက်လိုက်မှုတွေကို သိရှိစေပါလိမ့်မယ်။", correct: true }, { text: "model အကြောင်း အချက်အလက်တွေ ပြန်လည်ရယူဖို့ run နိုင်တဲ့ Python file တစ်ခု။", explain: "Model cards တွေဟာ ရိုးရှင်းတဲ့ Markdown files တွေပါ။" } ]} />
၅။ 🤗 Transformers library ရဲ့ ဘယ် objects တွေက push_to_hub() နဲ့ Hub ပေါ်မှာ တိုက်ရိုက်မျှဝေနိုင်လဲ။
{#if fw === 'pt'}
<Question
choices={[
{
text: "Tokenizer",
explain: "မှန်ပါတယ်။ Tokenizers အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက tokenizer files (vocabulary, tokenizer ရဲ့ architecture စသည်) အားလုံးကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ အဖြေမှန် မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Model configuration",
explain: "မှန်ပါတယ်။ Model configurations အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့ကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ အခြားဘာတွေ မျှဝေနိုင်သေးလဲ။",
correct: true
},
{
text: "Model",
explain: "မှန်ပါတယ်။ Models အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့နဲ့ ၎င်းတို့ရဲ့ configuration files တွေကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Trainer",
explain: "မှန်ပါတယ်။ Trainer ကလည်း push_to_hub method ကို အကောင်အထည်ဖော်ထားပြီး၊ အဲဒါကို အသုံးပြုခြင်းက model၊ ၎င်းရဲ့ configuration၊ tokenizer နဲ့ model card draft တို့ကို သတ်မှတ်ထားတဲ့ repo သို့ upload လုပ်ပါလိမ့်မယ်။ အခြားအဖြေတစ်ခု စမ်းကြည့်ပါ။",
correct: true
}
]}
/>
{:else}
<Question
choices={[
{
text: "Tokenizer",
explain: "မှန်ပါတယ်။ Tokenizers အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက tokenizer files (vocabulary, tokenizer ရဲ့ architecture စသည်) အားလုံးကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ အဖြေမှန် မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Model configuration",
explain: "မှန်ပါတယ်။ Model configurations အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့ကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ အခြားဘာတွေ မျှဝေနိုင်သေးလဲ။",
correct: true
},
{
text: "Model",
explain: "မှန်ပါတယ်။ Models အားလုံးမှာ push_to_hub method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့နဲ့ ၎င်းတို့ရဲ့ configuration files တွေကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။",
correct: true
},
{
text: "အထက်ပါအရာအားလုံးကို သီးသန့် callback တစ်ခုဖြင့်",
explain: "မှန်ပါတယ်။ PushToHubCallback က training လုပ်နေစဉ် အဲဒီ objects အားလုံးကို repo သို့ ပုံမှန် ပေးပို့ပါလိမ့်မယ်။",
correct: true
}
]}
/>
{/if}
၆။ push_to_hub() method သို့မဟုတ် CLI tools တွေကို အသုံးပြုတဲ့အခါ ပထမဆုံးအဆင့်က ဘာလဲ။
<Question choices={[ { text: "website ပေါ်မှာ login ဝင်ပါ။", explain: "ဒါက သင့် local machine မှာ အကူအညီဖြစ်မှာ မဟုတ်ပါဘူး။" }, { text: "terminal မှာ 'huggingface-cli login' ကို run ပါ။", explain: "မှန်ပါတယ် — ဒါက သင့်ရဲ့ personal token ကို download လုပ်ပြီး cache လုပ်ပါလိမ့်မယ်။", correct: true }, { text: "notebook မှာ 'notebook_login()' ကို run ပါ။", explain: "မှန်ပါတယ် — ဒါက သင့်ကို authentication လုပ်ခွင့်ပေးမယ့် widget တစ်ခုကို ပြသပါလိမ့်မယ်။", correct: true }, ]} />
၇။ သင်ဟာ model တစ်ခုနဲ့ tokenizer တစ်ခုကို အသုံးပြုနေတယ် — ၎င်းတို့ကို Hub သို့ ဘယ်လို upload လုပ်မလဲ။
<Question
choices={[
{
text: "model နဲ့ tokenizer ပေါ်မှာ push_to_hub method ကို တိုက်ရိုက်ခေါ်ခြင်းဖြင့်။",
explain: "မှန်ပါတယ်!",
correct: true
},
{
text: "Python runtime ထဲမှာ ၎င်းတို့ကို huggingface_hub utility တစ်ခုနဲ့ wrap လုပ်ခြင်းဖြင့်။",
explain: "Models တွေနဲ့ tokenizers တွေက huggingface_hub utilities တွေကနေ အကျိုးကျေးဇူးတွေ ရနေပြီးသားပါ။ ထပ်ဆောင်း wrap လုပ်ဖို့ မလိုပါဘူး!"
},
{
text: "၎င်းတို့ကို disk ထဲသို့ save လုပ်ပြီး transformers-cli upload-model ကို ခေါ်ခြင်းဖြင့်။",
explain: "upload-model command က မရှိပါဘူး။"
}
]}
/>
၈။ Repository class ကို အသုံးပြုပြီး ဘယ် git operations တွေ လုပ်ဆောင်နိုင်လဲ။
<Question
choices={[
{
text: "A commit။",
explain: "မှန်ပါတယ်။ git_commit() method က ဒါအတွက် ရှိနေပါတယ်။",
correct: true
},
{
text: "A pull",
explain: "git_pull() method ရဲ့ ရည်ရွယ်ချက်က ဒါပါပဲ။",
correct: true
},
{
text: "A push",
explain: "git_push() method က ဒါကို လုပ်ဆောင်ပါတယ်။",
correct: true
},
{
text: "A merge",
explain: "မမှန်ပါဘူး၊ အဲဒီ operation က ဒီ API နဲ့ ဘယ်တော့မှ ဖြစ်နိုင်မှာ မဟုတ်ပါဘူး။"
}
]}
/>
ဝေါဟာရ ရှင်းလင်းချက် (Glossary)
- Models: Artificial Intelligence (AI) နယ်ပယ်တွင် အချက်အလက်များကို လေ့လာပြီး ခန့်မှန်းချက်များ ပြုလုပ်ရန် ဒီဇိုင်းထုတ်ထားသော သင်္ချာဆိုင်ရာဖွဲ့စည်းပုံများ။
- Hub (Hugging Face Hub): AI မော်ဒယ်တွေ၊ datasets တွေနဲ့ demo တွေကို အခြားသူတွေနဲ့ မျှဝေဖို့၊ ရှာဖွေဖို့နဲ့ ပြန်လည်အသုံးပြုဖို့အတွက် အွန်လိုင်း platform တစ်ခု ဖြစ်ပါတယ်။
- 🤗 Transformers Library: Hugging Face က ထုတ်လုပ်ထားတဲ့ library တစ်ခုဖြစ်ပြီး Transformer မော်ဒယ်တွေကို အသုံးပြုပြီး Natural Language Processing (NLP), computer vision, audio processing စတဲ့ နယ်ပယ်တွေမှာ အဆင့်မြင့် AI မော်ဒယ်တွေကို တည်ဆောက်ပြီး အသုံးပြုနိုင်စေပါတယ်။
- Interface: ဆော့ဖ်ဝဲလ် နှစ်ခုကြား သို့မဟုတ် အသုံးပြုသူနှင့် ဆော့ဖ်ဝဲလ်ကြား အပြန်အလှန် ချိတ်ဆက်ဆောင်ရွက်နိုင်သော စနစ်။
- NLP (Natural Language Processing): ကွန်ပျူတာတွေ လူသားဘာသာစကားကို နားလည်၊ အဓိပ္ပာယ်ဖော်ပြီး၊ ဖန်တီးနိုင်အောင် လုပ်ဆောင်ပေးတဲ့ Artificial Intelligence (AI) ရဲ့ နယ်ပယ်ခွဲတစ်ခုပါ။
- GCP (Google Cloud Platform): Google မှ ပံ့ပိုးပေးသော cloud computing ဝန်ဆောင်မှုများ။
- Peer-to-peer distribution: ကွန်ရက်တစ်ခုရှိ ကွန်ပျူတာများကြား ဖိုင်များ သို့မဟုတ် ဒေတာများကို တိုက်ရိုက်မျှဝေခြင်း။
git: Version control system တစ်ခုဖြစ်ပြီး project files တွေကို ခြေရာခံ၊ စီမံခန့်ခွဲရာတွင် အသုံးပြုသည်။git-lfs(Git Large File Storage): ကြီးမားသော binary files များကို Git repository များတွင် ထိရောက်စွာ ကိုင်တွယ်နိုင်ရန် Git ၏ extension တစ်ခု။- Git Repositories: Git version control system ကို အသုံးပြု၍ project တစ်ခု၏ files များနှင့် ၎င်းတို့၏ ပြောင်းလဲမှု မှတ်တမ်းများကို သိမ်းဆည်းထားသော နေရာ။
- Fork: လက်ရှိ repository ၏ မိတ္တူတစ်ခုကို ဖန်တီးပြီး သီးခြားစီ ပြောင်းလဲပြင်ဆင်ခြင်း။
- Model Repository: Git version control system ကို အသုံးပြု၍ model file များ၊ tokenizer file များ၊ model card (README.md) နှင့် အခြားဆက်စပ်ဖိုင်များကို သိမ်းဆည်းထားသော နေရာ။
- Diffs: ဖိုင်နှစ်ခုကြား ကွာခြားချက်များကို ပြသခြင်း။
- Model Card: Hugging Face Hub တွင် မော်ဒယ်တစ်ခုစီအတွက် ပါရှိသော အချက်အလက်များပါသည့် စာမျက်နှာ။ ၎င်းတွင် မော်ဒယ်ကို မည်သို့လေ့ကျင့်ခဲ့သည်၊ မည်သည့် datasets များကို အသုံးပြုခဲ့သည်၊ ၎င်း၏ ကန့်သတ်ချက်များ၊ ဘက်လိုက်မှုများ (biases) နှင့် အသုံးပြုနည်းများ ပါဝင်သည်။
- Reproducibility: သတ်မှတ်ထားသော code နှင့် data ကို အသုံးပြု၍ တူညီသော ရလဒ်များကို ပြန်လည်ထုတ်လုပ်နိုင်ခြင်း။
- Reusability: ဆော့ဖ်ဝဲလ်အစိတ်အပိုင်းများ သို့မဟုတ် မော်ဒယ်များကို အခြား project များတွင် ပြန်လည်အသုံးပြုနိုင်ခြင်း။
- Fairness: AI စနစ်များက အဖွဲ့အစည်းများ သို့မဟုတ် တစ်ဦးချင်းအပေါ် ဘက်လိုက်မှုမရှိဘဲ တန်းတူညီမျှစွာ ဆက်ဆံခြင်း။
- Tokenizer: စာသား (သို့မဟုတ် အခြားဒေတာ) ကို AI မော်ဒယ်များ စီမံဆောင်ရွက်နိုင်ရန် tokens တွေအဖြစ် ပိုင်းခြားပေးသည့် ကိရိယာ သို့မဟုတ် လုပ်ငန်းစဉ်။
push_to_hub()Method: Hugging Face Transformers library မှ model, tokenizer, သို့မဟုတ် configuration များကို Hugging Face Hub သို့ upload လုပ်ရန် အသုံးပြုသော method။- Model Configuration: model ၏ ဖွဲ့စည်းပုံ (architecture, hyperparameters စသည်) ကို ဖော်ပြသော အချက်အလက်များ။
- Trainer: Hugging Face Transformers library မှ model များကို လေ့ကျင့်ရန်အတွက် မြင့်မားသောအဆင့် (high-level) API။
- Vocabulary: tokenizer သို့မဟုတ် model တစ်ခုက သိရှိနားလည်ပြီး ကိုင်တွယ်နိုင်သော ထူးခြားသည့် tokens များ စုစုပေါင်း။
PushToHubCallback: PyTorch Trainer တွင် အသုံးပြုသော callback တစ်ခုဖြစ်ပြီး training လုပ်နေစဉ်အတွင်း models, tokenizers, configuration များနှင့် model card draft များကို Hub သို့ ပုံမှန် update လုပ်ရန်။- CLI Tools (Command Line Interface Tools): command line မှတစ်ဆင့် အပြန်အလှန်တုံ့ပြန်နိုင်သော ဆော့ဖ်ဝဲလ်ကိရိယာများ။
huggingface-cli login: Hugging Face CLI (Command Line Interface) မှ Hugging Face Hub သို့ login ဝင်ရန် အသုံးပြုသော command။- Personal Token: Hugging Face Hub တွင် အကောင့် authentication အတွက် အသုံးပြုသော ထူးခြားသည့် ကုဒ်။
- Cache: မကြာခဏ အသုံးပြုရသော ဒေတာများကို မြန်မြန်ဆန်ဆန် ဝင်ရောက်ကြည့်ရှုနိုင်ရန် သိမ်းဆည်းထားသော ယာယီသိုလှောင်ရာနေရာ။
notebook_login(): Jupyter/Colab Notebooks များတွင် Hugging Face Hub သို့ login ဝင်ရန် အသုံးပြုသော function။- Widget: Graphical User Interface (GUI) တွင် အသုံးပြုသူနှင့် အပြန်အလှန်တုံ့ပြန်နိုင်သော အစိတ်အပိုင်းများ (ဥပမာ- input box, button)။
huggingface_hubUtility: Hugging Face Hub နှင့် အပြန်အလှန်ဆက်သွယ်ရန် အသုံးပြုသော Python library။- Python Runtime: Python code ကို လက်ရှိ run နေသော ပတ်ဝန်းကျင်။
RepositoryClass:huggingface_hublibrary မှ Git repository များကို ကိုင်တွယ်ရန်အတွက် class။- Git Operations: Git version control system ဖြင့် လုပ်ဆောင်နိုင်သော လုပ်ငန်းများ (ဥပမာ- commit, pull, push, merge)။
- Commit: Git repository တွင် ပြောင်းလဲမှုများကို မှတ်တမ်းတင်ခြင်း။
git_commit()Method:Repositoryclass မှ commit လုပ်ရန်အတွက် method။- Pull: အဝေးထိန်း repository (remote repository) မှ ပြောင်းလဲမှုများကို local repository သို့ ရယူခြင်း။
git_pull()Method:Repositoryclass မှ pull လုပ်ရန်အတွက် method။- Push: Local repository မှ ပြောင်းလဲမှုများကို အဝေးထိန်း repository သို့ ပေးပို့ခြင်း။
git_push()Method:Repositoryclass မှ push လုပ်ရန်အတွက် method။- Merge: Git တွင် မတူညီသော branches များမှ ပြောင်းလဲမှုများကို ပေါင်းစပ်ခြင်း။
Xet Storage Details
- Size:
- 24.4 kB
- Xet hash:
- d69a29e4eb6fbb20dd9fd11d7fcdf4f7e69a38225842a37f689dc9ed42dcbb7a
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.