Practice
1. In the context of tokenization for LLMs, which method is known for using a probabilistic model to determine the most likely tokenization of a sentence?
easy
Solution
Step 1: Identify the method using a probabilistic model.
SentencePiece uses a probabilistic model to tokenize sentences.Step 2: Eliminate wrong options.
BPE and WordPiece do not use probabilistic models; character-level tokenization is too granular.Final Answer:
Option A -> Option AQuick Check:
SentencePiece uses probabilities. [OK]
Hint: SentencePiece uses probabilities. [OK]
Common Mistakes:
2. In a scenario where computational resources are limited, which segmentation approach would be more appropriate to use and why?
medium
Solution
Step 1: Evaluate computational needs
Semantic segmentation is generally less computationally intensive than instance or panoptic segmentation.Step 2: Eliminate wrong options
Instance segmentation is more detailed and resource-heavy, panoptic combines both, and object detection is not segmentation.Final Answer:
Option C -> Option CQuick Check:
Semantic = Less computation than instance [OK]
Hint: Semantic = Less computation than instance [OK]
Common Mistakes:
3. A Naive Bayes model is underperforming on a dataset. What is the most likely cause?
medium
Solution
Step 1: Identify Potential Causes
Naive Bayes assumes feature independence, so correlation can degrade performance.Step 2: Eliminate Other Causes
The model has too many parameters. is incorrect because Naive Bayes is not parameter-heavy. The features are not normalized. is incorrect because normalization is not critical for Naive Bayes. The dataset is too small. is incorrect because Naive Bayes can work well with small datasets.Final Answer:
Option A -> Option AQuick Check:
Correlated features degrade Naive Bayes. [[check]]
Hint: Correlated features degrade Naive Bayes. [[check]]
Common Mistakes:
4. A high-dimensional dataset is causing a model to perform poorly. The model's accuracy is unexpectedly low. What is the most likely root cause?
medium
Solution
Step 1: Identify the impact of high dimensions.
High dimensions often lead to data sparsity, affecting generalization.Step 2: Eliminate wrong options.
The model is underfitting due to insufficient complexity. is about model complexity, not data sparsity. The model is overfitting due to too many parameters. is about overfitting, not generalization. The learning rate is too high, causing unstable training. is about training stability, not generalization.Final Answer:
Option A -> Option AQuick Check:
High dimensions lead to sparsity, hurting generalization. [OK]
Hint: High dimensions lead to sparsity, hurting generalization. [OK]
Common Mistakes:
5. How would you adapt Naive Bayes for a text classification task where word order matters?
hard
Solution
Step 1: Understand the Task Requirements
Word order matters, so capturing sequences is important.Step 2: Evaluate Adaptation Options
Use a bag-of-words model. ignores word order. Use a single Gaussian distribution for all features. is irrelevant to text data. Apply PCA to reduce dimensionality. reduces dimensionality but doesn't capture order. Incorporate n-grams into the feature set. captures sequences with n-grams.Final Answer:
Option C -> Option CQuick Check:
Use n-grams for word order in text. [[check]]
Hint: Use n-grams for word order in text. [[check]]
Common Mistakes:
