Buckets:

rtrm's picture
|
download
raw
24.4 kB
# အခန်း (၄) ဆိုင်ရာ မေးခွန်းများ[[end-of-chapter-quiz]]
<CourseFloatingBanner
chapter={4}
classNames="absolute z-10 right-0 top-0"
/>
ဒီအခန်းမှာ သင်ယူခဲ့တာတွေကို စစ်ဆေးကြည့်ရအောင်။
### ၁။ 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 ွေအတက် <code>git-lfs</code> ကို အကျိုးယူပါတယ်။",
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 ားုံးှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက tokenizer files (vocabulary, tokenizer ရဲ့ architecture စသည်) အားလုံးကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ အဖြေမှန် မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Model configuration",
explain: "မှန်ပါတယ်။ Model configurations အားလုံးမှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့ကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ အခြားဘာတွေ မျှဝေနိုင်သေးလဲ။",
correct: true
},
{
text: "Model",
explain: "မှန်ပါတယ်။ Models အားလုံးမှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့နဲ့ ၎င်းတို့ရဲ့ configuration files တွေကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Trainer",
explain: "မှန်ပါတယ်။ <code>Trainer</code> ကလည်း <code>push_to_hub</code> method ကို အကောင်အထည်ဖော်ထားပြီး၊ အဲဒါကို အသုံးပြုခြင်းက model၊ ၎င်းရဲ့ configuration၊ tokenizer နဲ့ model card draft တို့ကို သတ်မှတ်ထားတဲ့ repo သို့ upload လုပ်ပါလိမ့်မယ်။ အခြားအဖြေတစ်ခု စမ်းကြည့်ပါ။",
correct: true
}
]}
/>
{:else}
<Question
choices={[
{
text: "Tokenizer",
explain: "မှန်ပါတယ်။ Tokenizers အားလုံးမှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက tokenizer files (vocabulary, tokenizer ရဲ့ architecture စသည်) အားလုံးကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ အဖြေမှန် မဟုတ်ပါဘူး။",
correct: true
},
{
text: "Model configuration",
explain: "မှန်ပါတယ်။ Model configurations အားလုံးမှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့ကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ အခြားဘာတွေ မျှဝေနိုင်သေးလဲ။",
correct: true
},
{
text: "Model",
explain: "မှန်ပါတယ်။ Models အားလုံးမှာ <code>push_to_hub</code> method ပါဝင်ပြီး၊ အဲဒါကို အသုံးပြုခြင်းက ၎င်းတို့နဲ့ ၎င်းတို့ရဲ့ configuration files တွေကို သတ်မှတ်ထားတဲ့ repo သို့ push လုပ်ပါလိမ့်မယ်။ ဒါပေမယ့် ဒါတစ်ခုတည်းတော့ မဟုတ်ပါဘူး။",
correct: true
},
{
text: "အထက်ပါအရာအားလုံးကို သီးသန့် callback တစ်ခုဖြင့်",
explain: "မှန်ပါတယ်။ <code>PushToHubCallback</code> က 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 ှာ ၎်းို့ကို <code>huggingface_hub</code> utility တစ်ခုနဲ့ wrap လုပ်ခြင်းဖြင့်။",
explain: "Models တွေနဲ့ tokenizers တွေက <code>huggingface_hub</code> utilities တွေကနေ အကျိုးကျေးဇူးတွေ ရနေပြီးသားပါ။ ထပ်ဆောင်း wrap လုပ်ဖို့ မလိုပါဘူး!"
},
{
text: "၎င်းတို့ကို disk ထဲသို့ save လုပ်ပြီး <code>transformers-cli upload-model</code> ကို ခေါ်ခြင်းဖြင့်။",
explain: "<code>upload-model</code> command က မရှိပါဘူး။"
}
]}
/>
### ၈။ `Repository` class ကို အသုံးပြုပြီး ဘယ် git operations တွေ လုပ်ဆောင်နိုင်လဲ။
<Question
choices={[
{
text: "A commit။",
explain: "တယ်။ <code>git_commit()</code> method က ဒါအတွက် ရှိနေပါတယ်။",
correct: true
},
{
text: "A pull",
explain: "<code>git_pull()</code> method ရဲ့ ရည်ရွယ်ချက်က ဒါပါပဲ။",
correct: true
},
{
text: "A push",
explain: "<code>git_push()</code> 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_hub` Utility**: Hugging Face Hub နှင့် အပြန်အလှန်ဆက်သွယ်ရန် အသုံးပြုသော Python library။
* **Python Runtime**: Python code ကို လက်ရှိ run နေသော ပတ်ဝန်းကျင်။
* **`Repository` Class**: `huggingface_hub` library မှ Git repository များကို ကိုင်တွယ်ရန်အတွက် class။
* **Git Operations**: Git version control system ဖြင့် လုပ်ဆောင်နိုင်သော လုပ်ငန်းများ (ဥပမာ- commit, pull, push, merge)။
* **Commit**: Git repository တွင် ပြောင်းလဲမှုများကို မှတ်တမ်းတင်ခြင်း။
* **`git_commit()` Method**: `Repository` class မှ commit လုပ်ရန်အတွက် method။
* **Pull**: အဝေးထိန်း repository (remote repository) မှ ပြောင်းလဲမှုများကို local repository သို့ ရယူခြင်း။
* **`git_pull()` Method**: `Repository` class မှ pull လုပ်ရန်အတွက် method။
* **Push**: Local repository မှ ပြောင်းလဲမှုများကို အဝေးထိန်း repository သို့ ပေးပို့ခြင်း။
* **`git_push()` Method**: `Repository` class မှ push လုပ်ရန်အတွက် method။
* **Merge**: Git တွင် မတူညီသော branches များမှ ပြောင်းလဲမှုများကို ပေါင်းစပ်ခြင်း။
<EditOnGithub source="https://github.com/huggingface/course/blob/main/chapters/my/chapter4/6.mdx" />

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.