Buckets:

rtrm's picture
|
download
raw
4.93 kB

အခန်းပြီးဆုံးခြင်း စစ်ဆေးမှု[[end-of-chapter-quiz]]

1. Language modeling pipeline ၏ အစီအစဉ်က ဘာလဲ။

2. Base Transformer model က ထုတ်ပေးတဲ့ tensor မှာ dimension ဘယ်နှစ်ခုရှိပြီး၊ ဘာတွေလဲ။

3. အောက်ပါတို့ထဲမှ မည်သည့်အရာက subword tokenization ဥပမာတစ်ခုလဲ။

4. Model head ဆိုတာ ဘာလဲ။

5. AutoModel ဆိုတာ ဘာလဲ။

AutoTrain product နဲ့ မှားနေတာလား။" }, { text: "Checkpoint ကို အခြေခံပြီး မှန်ကန်တဲ့ architecture ကို ပြန်ပေးတဲ့ object တစ်ခု။", explain: "မှန်ပါပြီ- AutoModel က မှန်ကန်တဲ့ architecture ကို ပြန်ပေးဖို့အတွက် initialize လုပ်မယ့် checkpoint ကို သိဖို့ပဲ လိုအပ်ပါတယ်။", correct: true }, { text: "၎င်း၏ inputs များအတွက် အသုံးပြုသော ဘာသာစကားကို အလိုအလျောက် ထောက်လှမ်းပြီး မှန်ကန်သော weights များကို load လုပ်ပေးသော model တစ်ခု။", explain: "အချို့ checkpoints တွေနဲ့ models တွေက ဘာသာစကားများစွာကို ကိုင်တွယ်နိုင်စွမ်းရှိပေမယ့်၊ ဘာသာစကားအရ checkpoint ကို အလိုအလျောက် ရွေးချယ်ဖို့အတွက် built-in tools တွေ မရှိသေးပါဘူး။ သင့်လုပ်ငန်းအတွက် အကောင်းဆုံး checkpoint ကို ရှာဖွေဖို့ Model Hub ကို သွားသင့်ပါတယ်။" } ]} />

6. အရှည်မတူညီသော sequences များကို အတူတကွ batch လုပ်သည့်အခါ မည်သည့်နည်းလမ်းများကို သိရှိထားသင့်သလဲ။

7. sequence classification model က ထုတ်ပေးတဲ့ logits တွေပေါ်မှာ SoftMax function ကို အသုံးပြုရခြင်းရဲ့ ရည်ရွယ်ချက်က ဘာလဲ။

8. tokenizer API ရဲ့ အများစုက ဘယ် method ပေါ်မှာ အခြေခံထားလဲ။

encode၊ text ကို IDs အဖြစ် encode လုပ်နိုင်ပြီး IDs တွေကို predictions အဖြစ် encode လုပ်နိုင်လို့ပါ။", explain: "မှားပါတယ်။ encode method ဟာ tokenizers တွေမှာ ရှိပေမယ့် models တွေမှာတော့ မရှိပါဘူး။" }, { text: "tokenizer object ကို တိုက်ရိုက်ခေါ်ခြင်း။", explain: "မှန်ပါပြီ။ tokenizer ရဲ့ __call__ method ဟာ အလွန်အစွမ်းထက်တဲ့ method တစ်ခုဖြစ်ပြီး ဘာမဆိုနီးပါး ကိုင်တွယ်နိုင်ပါတယ်။ ဒါက model ကနေ predictions တွေကို ရယူဖို့ အသုံးပြုတဲ့ method လည်း ဖြစ်ပါတယ်။", correct: true }, { text: "pad", explain: "မှားပါတယ်။ Padding က အလွန်အသုံးဝင်ပေမယ့် tokenizer API ရဲ့ တစ်စိတ်တစ်ပိုင်းမျှသာ ဖြစ်ပါတယ်။" }, { text: "tokenize", explain: "tokenize method ဟာ အသုံးဝင်ဆုံး methods တွေထဲက တစ်ခုဖြစ်ပေမယ့် tokenizer API ရဲ့ အဓိက အစိတ်အပိုင်းတော့ မဟုတ်ပါဘူး။" } ]} />

9. ဒီ code sample မှာ result variable က ဘာတွေ ပါဝင်သလဲ။

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
result = tokenizer.tokenize("Hello!")

10. အောက်ပါ code မှာ တစ်ခုခု မှားနေတာ ရှိပါသလား။

from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
model = AutoModel.from_pretrained("gpt2")

encoded = tokenizer("Hey!", return_tensors="pt")
result = model(**encoded)

Xet Storage Details

Size:
4.93 kB
·
Xet hash:
d4a766ce9cd35eaa9dd784edfd941afcf2da8345af71cd76d010489fd1c0ca66

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