LLM Course documentation
အခန်း (၇) ဆိုင်ရာ မေးခွန်းများ
အခန်း (၇) ဆိုင်ရာ မေးခွန်းများ
ဒီအခန်းမှာ သင်ယူခဲ့တာတွေကို စစ်ဆေးကြည့်ရအောင်။
၁။ အောက်ပါ tasks တွေထဲက ဘယ်ဟာတွေကို token classification problem အဖြစ် ပုံဖော်နိုင်သလဲ။
၂။ token classification အတွက် preprocessing ရဲ့ ဘယ်အပိုင်းက အခြား preprocessing pipelines တွေနဲ့ ကွာခြားသလဲ။
၃။ token classification problem တစ်ခုမှာ words တွေကို tokenize လုပ်ပြီး tokens တွေကို label လုပ်ချင်တဲ့အခါ ဘယ်ပြဿနာ ဖြစ်ပေါ်လာသလဲ။
၄။ “Domain adaptation” ဆိုတာ ဘာကိုဆိုလိုသလဲ။
၅။ Masked language modeling problem မှာ labels တွေက ဘာတွေလဲ။
၆။ အောက်ပါ tasks တွေထဲက ဘယ်ဟာတွေကို sequence-to-sequence problem အဖြစ် မြင်နိုင်သလဲ။
၇။ sequence-to-sequence problem အတွက် data ကို မှန်ကန်စွာ preprocess လုပ်ဖို့ နည်းလမ်းက ဘာလဲ။
၈။ sequence-to-sequence problems တွေအတွက် <code> Trainer </code> ရဲ့ သီးခြား subclass တစ်ခု ဘာကြောင့် ရှိတာလဲ။
၁၀။ model အသစ်တစ်ခုကို ဘယ်အချိန်မှာ pretrain လုပ်သင့်လဲ။
၁၁။ language model တစ်ခုကို texts အများကြီးပေါ်မှာ pretrain လုပ်ဖို့ ဘာကြောင့် လွယ်ကူတာလဲ။
၁၂။ question answering task အတွက် data ကို preprocess လုပ်တဲ့အခါ အဓိက စိန်ခေါ်မှုတွေက ဘာတွေလဲ။
၁၃။ question answering မှာ post-processing ကို ပုံမှန်အားဖြင့် ဘယ်လိုလုပ်ဆောင်သလဲ။
ဝေါဟာရ ရှင်းလင်းချက် (Glossary)
- Token Classification Problem: စာသား sequence တစ်ခုအတွင်းရှိ token တစ်ခုစီကို အမျိုးအစားခွဲခြားသတ်မှတ်ခြင်း လုပ်ငန်း (ဥပမာ- Named Entity Recognition)။
- Grammatical Components: စာကြောင်းတစ်ကြောင်းအတွင်းရှိ သဒ္ဒါဆိုင်ရာ အစိတ်အပိုင်းများ (ဥပမာ- noun, verb, adjective)။
- Sequence Classification Problem: စာသား sequence တစ်ခုလုံးကို သတ်မှတ်ထားသော အမျိုးအစားတစ်ခုသို့ ခွဲခြားသတ်မှတ်ခြင်း လုပ်ငန်း။
- Named Entity Recognition (NER): စာသားထဲက လူအမည်၊ နေရာအမည်၊ အဖွဲ့အစည်းအမည် စတဲ့ သီးခြားအမည်တွေကို ရှာဖွေဖော်ထုတ်ခြင်း။
- Preprocessing Pipelines: AI မော်ဒယ်များအတွက် ဒေတာများကို ပြင်ဆင်ရန် အဆင့်ဆင့်လုပ်ဆောင်ရသော လုပ်ငန်းစဉ်များ။
- Tokenize: စာသား (သို့မဟုတ် အခြားဒေတာ) ကို AI မော်ဒယ်များ စီမံဆောင်ရွက်နိုင်ရန် tokens တွေအဖြစ် ပိုင်းခြားပေးသည့် လုပ်ငန်းစဉ်။
- Subword Tokenization Model: စကားလုံးများကို သေးငယ်သော subword units (ဥပမာ- word pieces, byte-pair encodings) များအဖြစ် ပိုင်းခြားသော model။
- Full Tokenization Pipeline: စာသားကို tokens များအဖြစ် ပြောင်းလဲရန် လိုအပ်သော အဆင့်များအားလုံး (ဥပမာ- splitting, subword tokenization, special token addition)။
- Special Tokens: Model များအတွက် အထူးအဓိပ္ပာယ်ရှိသော tokens များ (ဥပမာ-
[CLS],[SEP],[PAD])။ -100(Label): Loss တွက်ချက်မှုတွင် လျစ်လျူရှုရန် သတ်မှတ်ထားသော label တန်ဖိုး။- Truncate: input sequence ကို အရှည်သတ်မှတ်ချက်တစ်ခုအထိ ဖြတ်တောက်ခြင်း။
- Pad: input sequence များကို သတ်မှတ်ထားသော အရှည်အထိ တူညီအောင် အပို tokens များထည့်သွင်းခြင်း။
- Labels: AI မော်ဒယ်ကို လေ့ကျင့်ရာတွင် အသုံးပြုသော မှန်ကန်သည့် output တန်ဖိုးများ။
- Original Labels: preprocessing မလုပ်မီက ဒေတာနှင့် တွဲလျက်ပါရှိသော မူရင်း labels များ။
- Align Labels: original labels များကို tokenization ပြုလုပ်ပြီးနောက် ရရှိလာသော tokens များနှင့် ကိုက်ညီအောင် ချိန်ညှိခြင်း။
- Domain Adaptation: မော်ဒယ်တစ်ခုကို မူလလေ့ကျင့်ထားသော domain မှ ကွဲပြားခြားနားသော domain အသစ်တစ်ခုတွင် ပိုမိုကောင်းမွန်စွာ လုပ်ဆောင်နိုင်စေရန် ချိန်ညှိခြင်း။
- Inference: လေ့ကျင့်ပြီးသား Artificial Intelligence (AI) မော်ဒယ်တစ်ခုကို အသုံးပြုပြီး input data ကနေ ခန့်မှန်းချက်တွေ ဒါမှမဟုတ် output တွေကို ထုတ်လုပ်တဲ့ လုပ်ငန်းစဉ်။
- Fine-tune: ကြိုတင်လေ့ကျင့်ထားပြီးသား (pre-trained) မော်ဒယ်တစ်ခုကို သီးခြားလုပ်ငန်းတစ်ခု (specific task) အတွက် အနည်းငယ်သော ဒေတာနဲ့ ထပ်မံလေ့ကျင့်ပေးခြင်းကို ဆိုလိုပါတယ်။
- Robust: မတူညီသော input များ သို့မဟုတ် အခြေအနေများအောက်တွင် ကောင်းစွာလုပ်ဆောင်နိုင်ခြင်း။
- Masked Language Modeling (MLM): စာကြောင်းတစ်ခုထဲမှ စကားလုံးအချို့ကို ဝှက်ထားပြီး ၎င်းတို့ကို ခန့်မှန်းစေခြင်းဖြင့် model ကို လေ့ကျင့်သော task (BERT ကဲ့သို့)။
- Input Sentence: model သို့ ပေးပို့သော စာကြောင်း။
- Randomly Masked: ကျပန်းရွေးချယ်ထားသော စကားလုံးများကို ဖုံးကွယ်ထားခြင်း။
- Original Input Tokens: mask မလုပ်မီက မူရင်း input sequence ရှိ tokens များ။
- Causal Language Modeling: စာကြောင်းတစ်ခု၏ နောက်ဆက်တွဲ token (စကားလုံး) ကို ခန့်မှန်းခြင်းဖြင့် model ကို လေ့ကျင့်သော task (GPT-2 ကဲ့သို့)။
- Data Augmentation: Training data ကို အမျိုးမျိုးသော နည်းလမ်းများဖြင့် တိုးချဲ့ခြင်း။
- Sequence-to-sequence Problem: input sequence တစ်ခုမှ output sequence တစ်ခုသို့ ပြောင်းလဲခြင်း လုပ်ငန်း (ဥပမာ- translation, summarization)။
- Summarization: ရှည်လျားသော စာသားတစ်ခု၏ အနှစ်ချုပ်ကို ထုတ်လုပ်ခြင်း။
- Question Answering Problem: ပေးထားသော စာသားတစ်ခုမှ မေးခွန်းတစ်ခု၏ အဖြေကို ရှာဖွေခြင်း။
- Translation Problem: ဘာသာစကားတစ်ခုမှ အခြားဘာသာစကားတစ်ခုသို့ စာသားများကို ဘာသာပြန်ခြင်း။
- Inputs: model သို့ ပေးပို့သော ဒေတာ။
- Targets: model ၏ လိုချင်သော output များ (labels)။
- Context Manager (Python):
withstatement ကို အသုံးပြု၍ အရင်းအမြစ်များကို စီမံခန့်ခွဲရန် ကူညီပေးသော Python အင်္ဂါရပ်။ Trainer: Hugging Face Transformers library မှ model များကို လေ့ကျင့်ရန်အတွက် မြင့်မားသောအဆင့် (high-level) API။- Custom Loss: ပုံမှန် loss function မဟုတ်ဘဲ သီးခြားလိုအပ်ချက်များအတွက် ဖန်တီးထားသော loss function။
- Evaluation Loop: model ၏ စွမ်းဆောင်ရည်ကို အကဲဖြတ်ရန် လုပ်ဆောင်သော လုပ်ငန်းစဉ်။
generate()Method: Sequence-to-sequence models များတွင် text ကို generate (ထုတ်လုပ်) ရန် အသုံးပြုသော method။- Encoder: Transformer Architecture ၏ အစိတ်အပိုင်းတစ်ခုဖြစ်ပြီး input data (ဥပမာ- စာသား) ကို နားလည်ပြီး ကိုယ်စားပြုတဲ့ အချက်အလက် (representation) အဖြစ် ပြောင်းလဲပေးပါတယ်။
- Decoder: Transformer Architecture ၏ အစိတ်အပိုင်းတစ်ခုဖြစ်ပြီး encoder ကနေ ရရှိတဲ့ အချက်အလက် (representation) ကို အသုံးပြုပြီး output data (ဥပမာ- ဘာသာပြန်ထားတဲ့ စာသား) ကို ထုတ်ပေးပါတယ်။
compile()Method: Keras API တွင် model ကို training အတွက် ပြင်ဆင်ရန် အသုံးပြုသော method။ ၎င်းသည် optimizer, loss function နှင့် metrics များကို သတ်မှတ်သည်။- Unsupervised Learning: Labels မပါဝင်သော data များကို အသုံးပြု၍ model ကို လေ့ကျင့်ခြင်း။
- Loss Function: Model ၏ ခန့်မှန်းချက်များနှင့် အမှန်တကယ် labels များကြား ကွာခြားမှုကို တိုင်းတာသော function။
model.internal_loss_output: model ၏အတွင်းပိုင်းမှ ထုတ်လုပ်သော loss တန်ဖိုး။model.fit(): Keras API တွင် model ကို training data ဖြင့် လေ့ကျင့်ရန် အသုံးပြုသော method။- Pretrain a New Model: မည်သည့် ကြိုတင်လေ့ကျင့်မှုမျှ မရှိဘဲ လုံးဝအသစ်ကနေ model တစ်ခုကို လေ့ကျင့်ခြင်း။
- Compute Costs: AI model များ လေ့ကျင့်ရန်အတွက် လိုအပ်သော ကွန်ပျူတာ အရင်းအမြစ်များ (CPU, GPU) ၏ ကုန်ကျစရိတ်။
- Self-supervised Problem: Input data ကိုယ်တိုင်ကနေ labels တွေကို ဖန်တီးယူပြီး model ကို လေ့ကျင့်တဲ့ ပြဿနာ (ဥပမာ- language modeling)။
- Contexts (QA): မေးခွန်းရဲ့ အဖြေပါဝင်နိုင်တဲ့ ရှည်လျားသော စာသား။
- Training Features: training အတွက် ပြင်ဆင်ထားသော input data ၏ အစိတ်အပိုင်းများ။
- Answer Span: မေးခွန်းရဲ့ အဖြေပါဝင်တဲ့ text ထဲက အပိုင်း။
- Start/End Token: answer span ရဲ့ စတင်တဲ့ token နဲ့ ဆုံးဖြတ်တဲ့ token ရဲ့ အနေအထား။
- Post-processing: Model ၏ output များကို နောက်ဆုံးအသုံးပြုမှုအတွက် ပြင်ဆင်ခြင်း လုပ်ငန်းစဉ်။
- Decode: token IDs များကို မူရင်းစာသား (သို့မဟုတ် အခြားပုံစံ) အဖြစ် ပြန်လည်ပြောင်းလဲခြင်း။
- Score: Model က ခန့်မှန်းချက်တစ်ခုအတွက် ပေးသော ယုံကြည်စိတ်ချရမှု တန်ဖိုး။