A4.1.2 · Machine learning fundamentals
Machine Learning Hardware
Training a model to sort two categories of data and training one to drive a car are both "machine learning," but they need wildly different hardware underneath them. Matching the hardware to the actual scenario, not just reaching for the most powerful option available, is the actual skill here.
Explainer
Hardware for machine learning spans a genuine spectrum, from a standard laptop right up to infrastructure most people will never personally own. Where a scenario sits on that spectrum depends on three factors: how much processing the task actually needs, how much data has to be stored, and whether the setup needs to scale up later.
Choosing machine learning hardware means weighing processing power (how fast calculations happen), storage (how much data can be held and how quickly it can be read), and scalability (how easily the setup grows if the task gets bigger) against each other for the specific scenario at hand.
Worked example
Eight hardware options
Click each one to see what it is, how it stacks up on processing, storage and scalability, and a genuine scenario where it's the right choice.
Check your understanding
A delivery robot needs to recognise obstacles the instant its camera sees them, with no time to wait for a distant server to respond. Which hardware setup fits this scenario best?
Common mistake
RecurringA genuinely documented pattern: with so many processor types to keep straight (CPU, GPU, TPU, ASIC, FPGA), candidates frequently treat ASICs and FPGAs as interchangeable, since both are described as "custom" hardware built for a specific job. The distinguishing fact is reprogrammability: once an ASIC is manufactured, its function is fixed permanently; an FPGA can be reconfigured after manufacturing to do a different job entirely.
Treats them as the same idea: "ASICs and FPGAs are both custom chips built for one specific machine learning task, so they work the same way." Correctly identifies both as specialised, but misses the one fact that actually separates them.
Names the actual difference: "An ASIC is manufactured to do one fixed job forever, which makes it extremely efficient but useless if the task changes. An FPGA can be reconfigured after manufacturing, trading some of that efficiency for the ability to be reprogrammed as requirements change." States the real distinguishing fact: fixed versus reconfigurable.
Revision questions
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
[2]Define the term edge device, and state one reason it suits real-time machine learning tasks.
Marking points
评分要点
- An edge device runs computation locally, near where the data is produced, rather than sending the data to a remote server.
- It suits real-time tasks because local processing removes network round-trip delay (and keeps working without a connection), so responses are fast.
- 边缘设备在本地、靠近数据产生处运行计算,而不是把数据发送到远程服务器。
- 它适合实时任务,因为本地处理消除了网络往返延迟(且在没有连接时仍能工作),所以响应快。
[3]Distinguish between an ASIC and an FPGA, referring to reprogrammability in your answer.
Marking points
评分要点
- An ASIC is a chip built for one fixed task; it is very fast and power-efficient for that task but cannot be changed after manufacture.
- An FPGA can be reprogrammed after manufacture, so its hardware logic can be reconfigured for a new or changed model.
- The trade-off: the FPGA gives up some of the ASIC's raw speed and efficiency in exchange for that reprogrammability.
- ASIC 是为单一固定任务而制造的芯片;它对该任务非常快且省电,但制造后无法更改。
- FPGA 可以在制造后重新编程,因此其硬件逻辑可以为新的或改变的模型重新配置。
- 权衡:FPGA 放弃了 ASIC 的一部分原始速度和效率,以换取这种可重新编程性。
[6]A university research group needs to train a very large climate-simulation model, reusing the same fixed hardware for years across many research projects. Identify the most suitable hardware option and justify your choice, referring to processing, storage and scalability.
Marking points
评分要点
- The most suitable option is on-premises hardware, likely GPU clusters (or dedicated ASICs for a fixed workload).
- Processing: training a very large model needs sustained massive parallel arithmetic, which GPUs or purpose-built accelerators provide.
- Storage: large climate data sets and model checkpoints need substantial local high-speed storage, which the group can provision once.
- Scalability: the workload is steady and long-lived over years, so a fixed owned cluster avoids repeated cloud rental costs and can be sized for the known demand.
- Cloud would scale on demand with no upfront cost, but for a heavy workload reused for years the cumulative rental cost would exceed buying the hardware.
- Since the same fixed hardware is reused across many projects, the one-off capital cost is amortised and on-premises is justified.
- 最合适的选择是本地硬件,很可能是 GPU 集群(或针对固定工作负载的专用 ASIC)。
- 处理:训练一个非常大的模型需要持续的大规模并行运算,这由 GPU 或专用加速器提供。
- 存储:庞大的气候数据集和模型检查点需要可观的本地高速存储,该团队可以一次性配置。
- 可扩展性:工作负载稳定且跨年长期存在,所以一个固定自有集群避免了反复的云租赁成本,并可按已知需求确定规模。
- 云端会按需扩展且无前期成本,但对于一个跨年反复使用的繁重工作负载,累计租赁成本会超过购买硬件。
- 由于同一固定硬件在许多项目间反复使用,一次性资本支出得以摊薄,本地部署是合理的。
Flashcards
Active recall for this statement’s key terms.
Keep this statement’s practice with you
Free account: unlock every revision question and flashcard for A4.1.2, and every other IB CS 2027 statement.