Buckets:

rtrm's picture
|
download
raw
4.2 kB

అధ్యాయం ముగింపు క్విజ్[[end-of-chapter-quiz]]

1. Language modeling పైప్లైన్‌లో స్టెప్స్ సరైన క్రమం ఏది?

2. Base Transformer model output గా ఇచ్చే tensor కి ఎన్ని dimensions ఉంటాయి? అవి ఏవి?

3. క్రిందివాటిలో subword tokenization కి ఉదాహరణలు ఏవి?

4. Model head అంటే ఏమిటి?

5. AutoModel అంటే ఏమిటి?

AutoTrain product తో గలత చేయుతున్నారా?" }, { text: "ఇచ్చిన checkpoint ఆధారంగా సరైన architecture ని తిరిగి ఇవ్వగల object", explain: "అచ్చం అదే: AutoModel కి ఏ checkpoint నుండి initialize కావాలో తెలిస్తే, అది సరైన architecture ని ఎంచుకుని load చేస్తుంది.", correct: true }, { text: "Inputs ఏ language లో ఉన్నాయో ఆటోమేటిక్‌గా గుర్తించి, దానికి సరిపోయే weights ని load చేసుకునే model", explain: "కొన్ని checkpoints మరియు models ఒకటి కంటే ఎక్కువ languages ను హ్యాండిల్ చేయగలుగుతాయి; కానీ language ఆధారంగా checkpoint ని ఆటోమేటిక్‌గా ఎంచుకునే built-in tools లేవు. మీ task కి సరైన checkpoint కోసం Model Hub కి వెళ్లాలి!" } ]} />

6. వేర్వేరు పొడవుల sequences ని ఒకే batch లో కలిపేటప్పుడు, ఎలాంటి techniques గురించి తెలుసుకుని ఉండాలి?

7. Sequence classification model ఇచ్చే logits మీద SoftMax function వాడటంలో అసలు ప్రయోజనం ఏమిటి?

8. Tokenizer API లో ప్రధానంగా ఉపయోగించే method ఏది?

encode, ఎందుకంటే అది text ను IDs గా మరియు IDs ను predictions గా మార్చగలదు", explain: "తప్పు! encode method tokenizers మీద ఉంది, కానీ models మీద లేదు." }, { text: "Tokenizer object ని నేరుగా కాల్ చేయడం.", explain: "ఖచ్చితంగా! Tokenizer లోని call method చాల పవర్‌ఫుల్—it చాలా పనులు హ్యాండిల్ చేయగలదు. Model నుండి predictions తీసుకోడానికి కూడా ఇదే method వాడతాం.", correct: true }, { text: "pad", explain: "తప్పు! Padding చాలా ఉపయోగకరమైనది, కానీ tokenizer API లో ఇది ఒక భాగం మాత్రమే." }, { text: "tokenize", explain: "tokenize method బాగా ఉపయోగపడుతుంది, కానీ tokenizer API లో core method కాదు." } ]} />

9. ఈ code sample లో result variable లో ఏముంది?

from transformers import AutoTokenizer

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

call లేదా convert_tokens_to_ids methods వాడాలి!" }, { text: "అన్ని tokens ని కలిపిన ఒకే string", explain: "అలా చేయడం suboptimal; అసలు లక్ష్యం string ని అనేక tokens గా విడదీయడమే." } ]} />

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.2 kB
·
Xet hash:
65e91b01a2455b932e98d357276fe620840f7013497119528651f7d108a9d750

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