Buckets:

rtrm's picture
|
download
raw
31.5 kB
# အမှတ်မပေးသော Quiz[[ungraded-quiz]]
<CourseFloatingBanner
chapter={1}
classNames="absolute z-10 right-0 top-0"
/>
ဒီအခန်းက သင်ကြားရမယ့် အကြောင်းအရာတွေ အများကြီးကို ဖော်ပြခဲ့ပြီးပါပြီ။ အသေးစိတ် အချက်အလက်အားလုံးကို နားမလည်သေးရင်လည်း စိတ်မပူပါနဲ့။ ဒါပေမယ့် ဒီ quiz နဲ့ သင် သင်ယူခဲ့တာတွေကို ပြန်လည်သုံးသပ်ကြည့်ရအောင်။
ဒီ quiz က အမှတ်မပေးတဲ့အတွက် သင်နှစ်သက်သလောက် အကြိမ်ကြိမ် ကြိုးစားဖြေဆိုနိုင်ပါတယ်။ မေးခွန်းအချို့နဲ့ ရုန်းကန်ရရင် အကြံပြုချက်တွေကို လိုက်နာပြီး သင်ခန်းစာတွေကို ပြန်လည်လေ့လာပါ။ ဒီအကြောင်းအရာတွေကို အသိအမှတ်ပြု စာမေးပွဲမှာ ထပ်မံဖြေဆိုရမှာ ဖြစ်ပါတယ်။
### 1. Hub ကို ရှာဖွေပြီး `roberta-large-mnli` checkpoint ကို ရှာပါ။ ၎င်းသည် မည်သည့်လုပ်ငန်းကို လုပ်ဆောင်ပါသနည်း။
<Question
choices={[
{
text: "အက်းျု်း (Summarization)",
explain: "roberta-large-mnli ကှာကို <a href=\"https://huggingface.co/roberta-large-mnli\">ပြန်လည်ကြည့်ရှုပါ။</a>"
},
{
text: "စာသားခွဲခြားသတ်မှတ်ခြင်း (Text classification)",
explain: " ပိုတိတိကျကျပြောရရင် ၎င်းသည် စာကြောင်းနှစ်ကြောင်းက ယုတ္တိရှိရှိ ဆက်စပ်မှုရှိမရှိကို အဆင့်သုံးဆင့် (contradiction, neutral, entailment) နဲ့ ခွဲခြားသတ်မှတ်ပါတယ်။ ဒီလုပ်ငန်းကို <em>natural language inference</em> လို့လည်း ခေါ်ပါတယ်။",
correct: true
},
{
text: "စာသားထုတ်လုပ်ခြင်း (Text generation)",
explain: "roberta-large-mnli စာမျက်နှာကို <a href=\"https://huggingface.co/roberta-large-mnli\">ပြန်လည်ကြည့်ရှုပါ။</a>"
}
]}
/>
### 2. အောက်ပါ code သည် မည်သည့်အရာကို ပြန်ပေးမည်နည်း။
```py
from transformers import pipeline
ner = pipeline("ner", grouped_entities=True)
ner("My name is Sylvain and I work at Hugging Face in Brooklyn.")
```
<Question
choices={[
{
text: "၎်းသညဤစကြော်းအတကclassification scores \"positive\" ို့မဟ် \"negative\" အညွှ်းျား့် ကို ေး့်မည်။",
explain: "က မမကနူး — က `sentiment-analysis` pipeline ့်မယ်။"
},
{
text: "၎်းသညဤစကြော်းကို ့်ကားော ဖနီးားသည့် ားကို ေး့်မည်။",
explain: "က မမကနူး — က `text-generation` pipeline ့်မယ်။",
},
{
text: "၎်းသညိုျား၊ အဖွဲ့အစည်းျား ို့မဟျားကို ကိုားြုသည့် စကားုံးျားကို ေး့်မည်။",
explain: "ို့အပ် `grouped_entities=True` ကို အသုံးြုားောကြော့် ၎်းသည် 'Hugging Face' ကဲ့ို့ော သည့် entity ့် သကိုသည့် စကားုံးျားကို ွဲ့ေး့်မည်။",
correct: true
}
]}
/>
### 3. ဤ code နမူနာတွင် ... နေရာ၌ မည်သည့်အရာကို အစားထိုးသင့်သနည်း။
```py
from transformers import pipeline
filler = pipeline("fill-mask", model="bert-base-cased")
result = filler("...")
```
<Question
choices={[
{
text: "This &#60;mask> has been waiting for you.",
explain: "ဒါက မမှန်ကန်ပါဘူး။ `bert-base-cased` မော်ဒယ်ကတ်ကို ကြည့်ပြီး သင့်ရဲ့ အမှားကို ရှာဖွေကြည့်ပါ။"
},
{
text: "This [MASK] has been waiting for you.",
explain: "ဒီမော်ဒယ်ရဲ့ mask token က `[MASK]` ဖြစ်ပါတယ်။",
correct: true
},
{
text: "This man has been waiting for you.",
explain: "ဒါက မမှန်ကန်ပါဘူး။ ဒီ pipeline က ဝှက်ထားတဲ့ စကားလုံးတွေကို ဖြည့်ဆည်းပေးတာဖြစ်တဲ့အတွက် mask token တစ်ခုခု လိုအပ်ပါတယ်။"
}
]}
/>
### 4. ဤ code သည် အဘယ်ကြောင့် အလုပ်မလုပ်နိုင်သနည်း။
```py
from transformers import pipeline
classifier = pipeline("zero-shot-classification")
result = classifier("This is a course about the Transformers library")
```
<Question
choices={[
{
text: " pipeline သညဤစားကို အမျိုးအစားွဲြားရနအတကအညွှ်းျား (labels) ေးရနိုအပသည်။",
explain: "တယ် — ကနဲ့ code ှာ `candidate_labels=[...]` ကို ထည့််းို့ ိုအပတယ်။",
correct: true
},
{
text: " pipeline သညကြော်းတစကြော်းတည်းမဟကြော်းျားွာ ိုအပသည်။",
explain: "က မမကနူး။ မယ့် ကနွာ အသုံးြုက pipeline ကြော်းရင်းတစကို ောိုတယ်။ (အခြား pipelines ားုံးိုေါ့)"
},
{
text: "🤗 Transformers library သညအမြဲတမ်းိုို ကသည်။",
explain: "အဖြေကို ကျွော်ို့ ကမပေးော့ူး။"
},
{
text: " pipeline သညိုော inputs ျား ိုအပသည်။ input သညအလိုော်းသည်။",
explain: "က မမကနူး။ အလျားော ားကို pipeline က ောဲ့အခောကွားှာ တယ်။"
}
]}
/>
### 5. "Transfer learning" ဆိုတာ ဘာကိုဆိုလိုတာလဲ။
<Question
choices={[
{
text: "ကြိုတငေ့က့်ားော ော်ဒယတစု၏ အသပညကို ော dataset ့် ထပေ့က့််းား့် ော်ဒယအသစို့ ွှဲြော်းေး်း။",
explain: "မဟူး၊ က ော်ဒယတစတည်းဲ့ ား်းွား့်မယ်။"
},
{
text: "ကြိုတငေ့က့်ားော ော်ဒယတစု၏ အသပညကို ယမော်ဒယကို ပထမမော်ဒယ်၏ weights ျား့် စတင်းား့် ော်ဒယအသစို့ ွှဲြော်းေး်း။",
explain: "ယမော်ဒယကို ငန်းအသစတစအတကေ့က့်ောအခါ ၎်းသညပထမမော်ဒယ်၏ အသပညကို 'ွှဲြော်း' ေးတယ်။",
correct: true
},
{
text: "ကြိုတငေ့က့်ားော ော်ဒယတစု၏ အသပညကို ယမော်ဒယကို ပထမမော်ဒယ့် ော architecture ့် တညောက်းား့် ော်ဒယအသစို့ ွှဲြော်းေး်း။",
explain: "Architecture က ော်ဒယကို ဘယိုတညောကားိုကိုြောါ။ ကစမှာ အသပညကို ျှမဟွှဲြော်းေးမရှိူး။"
}
]}
/>
### 6. မှန်လား မှားလား။ Language Model တစ်ခုသည် ၎င်း၏ pretraining အတွက် အညွှန်းများ (labels) မလိုအပ်ပါ။
<Question
choices={[
{
text: "သည်",
explain: "Pretraining က ျားောား့် *self-supervised* တယ်။ က အညွှ်းွေကို inputs ွေကနအလိုအလျောကဖနီးေးတယို့ ိုိုတယ်။ (ဥပမ- ောကစကားုံးကို ခန့််းို့မဟကားဲ့ စကားုံးွေကို ့်ဆည်းေးာ)။",
correct: true
},
{
text: "ှားသည်",
explain: "က ကနဲ့အဖြေ မဟူး။"
}
]}
/>
### 7. "model"၊ "architecture" နှင့် "weights" ဟူသော ဝေါဟာရများကို အကောင်းဆုံး ဖော်ပြသည့် စာကြောင်းကို ရွေးပါ။
<Question
choices={[
{
text: "အကယ်၍ model တစသညအဆောကအအုံတစက်း၏ architecture သညုံို်း (blueprint) ြီး weights ျားသညအတ်း၌ ိုျား သည်။",
explain: "ဥပမအတို်းိုရငweights ွေက အဆောကအအုံကို ောကို့အတကအသုံးြုဲ့ ွေဲ့ အခြားပစစည်းွေ ့်မယ်။"
},
{
text: "Architecture တစသညmodel တစကို တညောကရနြေုံတစြီး ၎်း၏ weights ျားသညြေုံေါ်ော်ားော ြို့ျား သည်။",
explain: "ဥပမဲ့ ဿနကတော့ ြေုံတစက ျားောား့် ှိြီးား အဖတစကို ကိုားြုတယ်။ (သစှာ Paris ို့ အမညရတဲ့ ြို့တစြို့ှိတယ်)။ သတားဲ့ architecture တစအတကweights ျားွာ ိုတယ်။"
},
{
text: "Architecture တစသညmodel တစကို တညောကရနသင်္ျာိုfunctions ျား၏ ဆကိုကစဉတစြီး ၎်း၏ weights ျားသညို functions ျား၏ parameters ျား သည်။",
explain: "ော သင်္ျာိုfunctions အစုံ (architecture) ကို မတော parameters (weights) ျားကို အသုံးြု်း့် မတော model ျားကို တညောကရနအသုံးြုိုသည်။",
correct: true
}
]}
/>
### 8. ဖန်တီးထားသော စာသားများဖြင့် prompts များကို ဖြည့်စွက်ရန်အတွက် မည်သည့်မော်ဒယ်အမျိုးအစားများကို အသုံးပြုမည်နည်း။
<Question
choices={[
{
text: "Encoder model တစု",
explain: "Encoder model တစသညကြော်းတစုံး၏ ကိုားြုှုကို ေးြီး ၎်းသညclassification ကဲ့ို့ော ငန်းျားအတကိုိုသင့်ျော်သည်။"
},
{
text: "Decoder model တစု",
explain: "Decoder model ျားသညprompt တစားရနအတကအပ့်အဝ သင့်ျော်သည်။",
correct: true
},
{
text: "Sequence-to-sequence model တစု",
explain: "Sequence-to-sequence model ျားသညinput ကြော်းျား့် ဆကစပြီး ကြော်းျားကို ဖနီးိုသည့် ငန်းျားအတကိုိုသင့်ျော်ြီး၊ သတားော prompt တစအတကမဟါ။"
}
]}
/>
### 9. စာသားများကို အကျဉ်းချုပ်ရန်အတွက် မည်သည့်မော်ဒယ်အမျိုးအစားများကို အသုံးပြုမည်နည်း။
<Question
choices={[
{
text: "Encoder model တစု",
explain: "Encoder model တစသညကြော်းတစုံး၏ ကိုားြုှုကို ေးြီး ၎်းသညclassification ကဲ့ို့ော ငန်းျားအတကိုိုသင့်ျော်သည်။"
},
{
text: "Decoder model တစု",
explain: "Decoder model ျားသညoutput text (ဥပမ- အက်းျုျား) ကို ရနကော်းော်လည်း၊ ၎်းို့အက်းျုရနားတစုံးကဲ့ို့ော context ကို အသုံးိုသည့် ်းရညမရှိါ။"
},
{
text: "Sequence-to-sequence model တစု",
explain: "Sequence-to-sequence model ျားသညအက်းျု်း ငန်းတစအတကအပ့်အဝ သင့်ျော်သည်။",
correct: true
}
]}
/>
### 10. သတ်မှတ်ထားသော အညွှန်းများ (labels) အတိုင်း စာသား inputs များကို အမျိုးအစားခွဲခြားရန်အတွက် မည်သည့်မော်ဒယ်အမျိုးအစားများကို အသုံးပြုမည်နည်း။
<Question
choices={[
{
text: "Encoder model တစု",
explain: "Encoder model တစသညကြော်းတစုံး၏ ကိုားြုှုကို ေးြီး ၎်းသညclassification ကဲ့ို့ော ငန်းတစအတကအပ့်အဝ သင့်ျော်သည်။",
correct: true
},
{
text: "Decoder model တစု",
explain: "Decoder model ျားသညoutput text ျားကို ရနကော်းြီး၊ ကြော်းတစအညွှ်းတစကို ရနအတကမဟါ။"
},
{
text: "Sequence-to-sequence model တစု",
explain: "Sequence-to-sequence model ျားသညinput ကြော်းတစအပေါ် အခြေြီး ားကို ဖနီးိုသည့် ငန်းျားအတကိုိုသင့်ျော်ြီး၊ အညွှ်းတစအတကမဟါ။",
}
]}
/>
### 11. မော်ဒယ်တစ်ခုတွင် တွေ့ရသော ဘက်လိုက်မှု (bias) သည် မည်သည့်ရင်းမြစ်မှ ဖြစ်ပေါ်လာနိုင်သနည်း။
<Question
choices={[
{
text: "ော်ဒယသညကြိုတငေ့က့်ားော ော်ဒယ်၏ fine-tuned version တစြီး ၎်းဘကိုကှုကို ရယဲ့်း။",
explain: "Transfer Learning ကို အသုံးြုောအခကြိုတငေ့က့်ားော ော်ဒယဝငသည့် ဘကိုကှုသညfine-tuned ော်ဒယဆကလကတညှိသည်။",
correct: true
},
{
text: "ော်ဒယကို ေ့က့်အသုံးြုဲ့ော သညဘကိုကှု ှိ်း။",
explain: "က ဘကိုကှုဲ့ အထငှားုံး ရင်းတစမယ့် တစတည်းော့ မဟူး။",
correct: true
},
{
text: "ော်ဒယက အကော်းုံးောောဲ့ metric ှာ ဘကိုကှု ှိ်း။",
explain: "ဘကိုကှုဲ့ ထငှားှု နည်းဲ့ ရင်းတစကတော့ ော်ဒယကို ေ့က့်ဲ့ နည်းလမ်းါ။ သငွေးဲ့ metric ကို ော်ဒယက ကှိြီး အကော်းုံးောောွားှာ တယ်။",
correct: true
}
]}
/>
## ဝေါဟာရ ရှင်းလင်းချက် (Glossary)
* **Quiz**: သင်ယူခဲ့သည့် အကြောင်းအရာများကို ပြန်လည်စစ်ဆေးရန် မေးခွန်းများ။
* **Transformer Models**: Natural Language Processing (NLP) မှာ အောင်မြင်မှုများစွာရရှိခဲ့တဲ့ deep learning architecture တစ်မျိုးပါ။ ၎င်းတို့ဟာ စာသားတွေထဲက စကားလုံးတွေရဲ့ ဆက်နွယ်မှုတွေကို "attention mechanism" သုံးပြီး နားလည်အောင် သင်ကြားပေးပါတယ်။
* **Hugging Face Hub**: AI မော်ဒယ်တွေ၊ datasets တွေနဲ့ demo တွေကို အခြားသူတွေနဲ့ မျှဝေဖို့၊ ရှာဖွေဖို့နဲ့ ပြန်လည်အသုံးပြုဖို့အတွက် အွန်လိုင်း platform တစ်ခု ဖြစ်ပါတယ်။
* **Checkpoint**: မော်ဒယ်တစ်ခုကို လေ့ကျင့်နေစဉ်အတွင်း အချိန်အတန်ကြာပြီးနောက် အခြေအနေတစ်ခုကို သိမ်းဆည်းထားသော အမှတ်။
* **Task**: AI မော်ဒယ်တစ်ခုက လုပ်ဆောင်ရန် လေ့ကျင့်ထားသော သီးခြားလုပ်ငန်း (ဥပမာ- စာသားခွဲခြားသတ်မှတ်ခြင်း၊ စာသားထုတ်လုပ်ခြင်း)။
* **Summarization**: စာသားတစ်ခုကို အဓိကအချက်အလက်များ မပျောက်ပျက်စေဘဲ ပိုမိုတိုတောင်းသော ပုံစံဖြင့် အကျဉ်းချုပ်ခြင်း။
* **Text Classification**: စာသားတစ်ခုကို ကြိုတင်သတ်မှတ်ထားသော အမျိုးအစားများ သို့မဟုတ် အညွှန်းများထဲသို့ ခွဲခြားသတ်မှတ်ခြင်း။
* **Natural Language Inference (NLI)**: စာကြောင်းနှစ်ကြောင်းကြားရှိ ယုတ္တိဆိုင်ရာ ဆက်နွယ်မှုကို ဆုံးဖြတ်သည့် လုပ်ငန်း။ (ဥပမာ- contradiction, neutral, entailment)
* **Text Generation**: AI မော်ဒယ်များကို အသုံးပြု၍ လူသားကဲ့သို့သော စာသားအသစ်များ ဖန်တီးခြင်း။
* **`pipeline()` function**: Hugging Face Transformers library မှာ ပါဝင်တဲ့ လုပ်ဆောင်ချက်တစ်ခုဖြစ်ပြီး မော်ဒယ်တွေကို သီးခြားလုပ်ငန်းတာဝန်များ (ဥပမာ- စာသားခွဲခြားသတ်မှတ်ခြင်း၊ စာသားထုတ်လုပ်ခြင်း) အတွက် အသုံးပြုရလွယ်ကူအောင် ပြုလုပ်ပေးပါတယ်။
* **`ner` (Named Entity Recognition)**: စာသားထဲက လူအမည်၊ နေရာအမည်၊ အဖွဲ့အစည်းအမည် စတဲ့ သီးခြားအမည်တွေကို ရှာဖွေဖော်ထုတ်ခြင်း။
* **`grouped_entities=True`**: `ner` pipeline တွင် အသုံးပြုသည့် parameter တစ်ခုဖြစ်ပြီး တူညီသော entity နှင့် သက်ဆိုင်သည့် စကားလုံးများကို အုပ်စုဖွဲ့ပေးသည်။
* **`sentiment-analysis` pipeline**: စာသားတစ်ခု၏ စိတ်ခံစားမှု (အပြုသဘော၊ အနုတ်သဘော) ကို ခွဲခြမ်းစိတ်ဖြာရန် အသုံးပြုသော pipeline။
* **`text-generation` pipeline**: input prompt အပေါ် အခြေခံ၍ စာသားအသစ်များကို ဖန်တီးရန် အသုံးပြုသော pipeline။
* **`fill-mask` pipeline**: စာသားတစ်ခုရှိ ဝှက်ထားသော စကားလုံးများ (mask tokens) ကို ဖြည့်ဆည်းပေးရန် အသုံးပြုသော pipeline။
* **`bert-base-cased`**: BERT (Bidirectional Encoder Representations from Transformers) မော်ဒယ်၏ ဗားရှင်းတစ်ခုဖြစ်ပြီး အင်္ဂလိပ်စာလုံးအကြီးအသေးကို ခွဲခြားသိမြင်သည်။ ၎င်း၏ mask token သည် `[MASK]` ဖြစ်သည်။
* **`zero-shot-classification` pipeline**: လေ့ကျင့်မှုဒေတာတွင် မမြင်ဖူးသေးသော အညွှန်းများဖြင့် စာသားများကို အမျိုးအစားခွဲခြားနိုင်သော pipeline။
* **`candidate_labels`**: `zero-shot-classification` pipeline တွင် အသုံးပြုသည့် parameter တစ်ခုဖြစ်ပြီး စာသားကို ခွဲခြားသတ်မှတ်ရန်အတွက် ဖြစ်နိုင်ခြေရှိသော အညွှန်းများ (labels) စာရင်းကို ပေးပို့သည်။
* **Transfer Learning**: ကြိုတင်လေ့ကျင့်ထားသော မော်ဒယ်တစ်ခု၏ အသိပညာကို အခြားလုပ်ငန်းတစ်ခု (new task) အတွက် မော်ဒယ်အသစ်သို့ လွှဲပြောင်းပေးခြင်း။
* **Pretrained Model**: ကြီးမားသော ဒေတာအစုအဝေးများဖြင့် အစောပိုင်းကတည်းက လေ့ကျင့်ထားသော မော်ဒယ်။
* **Fine-tuned Model**: ကြိုတင်လေ့ကျင့်ထားသော မော်ဒယ်တစ်ခုကို သီးခြားလုပ်ငန်းတစ်ခု (specific task) အတွက် အနည်းငယ်သော ဒေတာနှင့် ထပ်မံလေ့ကျင့်ပေးထားသော မော်ဒယ်။
* **Weights**: Machine Learning မော်ဒယ်တစ်ခု၏ သင်ယူနိုင်သော အစိတ်အပိုင်းများ။ ၎င်းတို့သည် လေ့ကျင့်နေစဉ်အတွင်း ဒေတာများမှ ပုံစံများကို သင်ယူကာ ချိန်ညှိပေးသည်။
* **Architecture**: Machine Learning မော်ဒယ်တစ်ခု၏ တည်ဆောက်ပုံ သို့မဟုတ် ဒီဇိုင်း။ ၎င်းသည် သင်္ချာဆိုင်ရာ functions များ၏ အစီအစဉ်နှင့် ၎င်းတို့ မည်သို့ချိတ်ဆက်ထားသည်ကို သတ်မှတ်သည်။
* **Self-supervised Learning**: အညွှန်းများ (labels) ကို inputs များမှ အလိုအလျောက် ထုတ်လုပ်နိုင်သည့် သင်ယူမှုပုံစံတစ်မျိုး။
* **Encoder Model**: Transformer Architecture ၏ အစိတ်အပိုင်းတစ်ခုဖြစ်ပြီး input data (ဥပမာ- စာသား) ကို နားလည်ပြီး ကိုယ်စားပြုတဲ့ အချက်အလက် (representation) အဖြစ် ပြောင်းလဲပေးကာ classification ကဲ့သို့သော လုပ်ငန်းများအတွက် သင့်လျော်သည်။
* **Decoder Model**: Transformer Architecture ၏ အစိတ်အပိုင်းတစ်ခုဖြစ်ပြီး encoder ကနေ ရရှိတဲ့ အချက်အလက် (representation) ကို အသုံးပြုပြီး output data (ဥပမာ- ဘာသာပြန်ထားတဲ့ စာသား သို့မဟုတ် စာသားထုတ်လုပ်ခြင်း) ကို ထုတ်ပေးသည်။
* **Sequence-to-sequence Model**: Encoder နှင့် Decoder နှစ်ခုစလုံး ပါဝင်သော Transformer architecture တစ်မျိုးဖြစ်ပြီး input sequence မှ output sequence တစ်ခုသို့ ပြောင်းလဲခြင်း (ဥပမာ- ဘာသာပြန်ခြင်း၊ အကျဉ်းချုပ်ခြင်း) လုပ်ငန်းများအတွက် အသုံးပြုပါတယ်။
* **Bias**: ဒေတာအစုအဝေး (dataset) သို့မဟုတ် မော်ဒယ်၏ လေ့ကျင့်မှုပုံစံကြောင့် ဖြစ်ပေါ်လာသော ဘက်လိုက်မှုများ။
* **Metric**: မော်ဒယ်တစ်ခု၏ စွမ်းဆောင်ရည်ကို တိုင်းတာရန် အသုံးပြုသော တိုင်းတာမှုစနစ်။
<EditOnGithub source="https://github.com/huggingface/course/blob/main/chapters/my/chapter1/7.mdx" />

Xet Storage Details

Size:
31.5 kB
·
Xet hash:
c41ab7698ff7b3088df422351a00f1d9ecbd48ecb8386441045eb26d83c3aa45

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