forked from rohitg00/ai-engineering-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.json
More file actions
64 lines (64 loc) · 2.68 KB
/
Copy pathquiz.json
File metadata and controls
64 lines (64 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"questions": [
{
"stage": "pre",
"question": "Why do AI projects need a separate virtual environment?",
"options": [
"Virtual environments make code run faster",
"They isolate dependencies so different projects don't conflict",
"Python requires virtual environments to import packages",
"Virtual environments provide GPU access"
],
"correct": 1,
"explanation": "Virtual environments isolate package versions per project. Without them, upgrading PyTorch for one project can break another that depends on an older version."
},
{
"stage": "pre",
"question": "What does CUDA provide for AI workloads?",
"options": [
"A Python package manager for ML libraries",
"A web framework for deploying models",
"Parallel computing on NVIDIA GPUs for matrix operations",
"A container runtime for model serving"
],
"correct": 2,
"explanation": "CUDA is NVIDIA's parallel computing platform that lets you run matrix operations on thousands of GPU cores simultaneously. PyTorch and TensorFlow use it under the hood."
},
{
"stage": "post",
"question": "In the four-layer environment stack, which layer must be installed first?",
"options": [
"AI/ML Libraries (PyTorch, JAX)",
"Package Managers (pip, npm, cargo)",
"Language Runtimes (Python, Node.js)",
"System Foundation (OS, shell, GPU drivers)"
],
"correct": 3,
"explanation": "You install bottom-up: system foundation first (OS, drivers), then package managers, then language runtimes, then AI libraries. Each layer depends on the one below."
},
{
"stage": "post",
"question": "What is the purpose of uv in a Python AI project?",
"options": [
"A GPU monitoring tool",
"An ultra-fast Python package installer and resolver",
"A neural network visualization library",
"A CUDA compiler for custom kernels"
],
"correct": 1,
"explanation": "uv is a fast Python package installer written in Rust. It replaces pip with much faster dependency resolution and installation, often 10-100x faster."
},
{
"stage": "post",
"question": "How do you verify that PyTorch can access your GPU?",
"options": [
"import torch; print(torch.__version__)",
"nvidia-smi --query",
"import torch; print(torch.cuda.is_available())",
"python -c 'import gpu'"
],
"correct": 2,
"explanation": "torch.cuda.is_available() returns True if PyTorch can access CUDA GPUs. On Apple Silicon, use torch.backends.mps.is_available() for Metal Performance Shaders."
}
]
}