Datasets:
task_id stringlengths 6 6 | category stringclasses 5
values | prompt stringlengths 173 375 | api_description stringclasses 1
value | expected_output stringlengths 17 66 |
|---|---|---|---|---|
sc-000 | roofline | An accelerator peaks at 4.0e14 FLOP/s in bf16 and has 1.6e12 bytes/s of HBM bandwidth. Give the critical arithmetic intensity in FLOPs per byte, and classify a kernel whose intensity is 100 FLOPs/byte as exactly 'compute' or 'memory' bound. Return one row [critical_intensity, classification]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[250.0, "memory"]]} |
sc-001 | roofline | A matmul multiplies a [B, D] activation by a [D, F] weight, all bf16 at 2 bytes. With B=1024, D=4096, F=4096, count 2*B*D*F FLOPs and count the bytes of all three arrays (both inputs and the output) moved once. Give the FLOPs, the bytes, and the arithmetic intensity. Return one row [flops, bytes, intensity]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[34359738368.0, 50331648.0, 682.6666666666666]]} |
sc-002 | roofline | The same matmul shape and byte accounting, but with B=1 — a single decode step. Give the FLOPs, the bytes, and the arithmetic intensity. Return one row [flops, bytes, intensity]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[33554432.0, 33570816.0, 0.9995119570522206]]} |
sc-003 | roofline | For the B=1024 matmul of the previous questions on an accelerator peaking at 4.0e14 FLOP/s with 1.6e12 bytes/s of bandwidth, give the compute time in seconds, the memory time in seconds, and the achievable time assuming perfect overlap (the larger of the two). Return one row [compute_s, memory_s, time_s]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[8.589934592e-05, 3.145728e-05, 8.589934592e-05]]} |
sc-004 | roofline | An elementwise add reads two bf16 arrays of N elements and writes one bf16 array of N elements, performing one FLOP per element. Give the arithmetic intensity in FLOPs per byte (it does not depend on N). Return one row [intensity]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[0.16666666666666666]]} |
sc-005 | roofline | A training step performs 3.5e15 FLOPs and takes 0.020 seconds on 8 chips that each peak at 4.0e14 FLOP/s. Give the model FLOPs utilisation (MFU) as a fraction between 0 and 1. Return one row [mfu]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[54.6875]]} |
sc-006 | roofline | For the [B, D] x [D, F] matmul with D=F=4096 and bf16 at 2 bytes, using the same three-array byte accounting, find the smallest INTEGER batch size B at which the arithmetic intensity strictly exceeds a critical intensity of 250 FLOPs/byte. Return one row [smallest_B, its intensity]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[285, 250.1843120445778]]} |
sc-007 | flops | A dense model has N = 7.0e10 parameters and is trained on D = 2.0e12 tokens. Using 6*N*D, give the total training FLOPs, the forward-only FLOPs (2ND) and the backward FLOPs (4ND). Return one row [total, forward, backward]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[8.4e+23, 2.8e+23, 5.6e+23]]} |
sc-008 | flops | One transformer layer has d_model = 8192, d_ff = 28672, and a GATED MLP with three weight matrices (two of shape [d_model, d_ff] and one of [d_ff, d_model]). Attention has four square [d_model, d_model] projections (Q, K, V, O). Give the MLP parameter count, the attention parameter count, and the layer total. Return on... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[704643072.0, 268435456.0, 973078528.0]]} |
sc-009 | flops | The model of the previous question has 80 such layers, plus an embedding matrix of [vocab, d_model] with vocab = 128000 and an untied output matrix of the same size. Give the total parameter count. Return one row [total_params]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[79943434240.0]]} |
sc-010 | flops | Forward-pass attention score FLOPs for one layer, ignoring softmax: computing Q@K^T costs 2*B*S*S*d_model and the weighted sum A@V costs the same, where B is batch, S is sequence length and d_model is the model width summed over all heads. With B=4, S=8192 and d_model=8192, give the QK FLOPs, the AV FLOPs and their sum... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[4398046511104.0, 4398046511104.0, 8796093022208.0]]} |
sc-011 | flops | For one layer with d_model = 8192, d_ff = 28672, batch B = 1 and sequence length S, the MLP forward costs 2*B*S*(3*d_model*d_ff) FLOPs and attention scores cost 4*B*S*S*d_model. Give, for S = 8192, the MLP FLOPs, the attention FLOPs, and attention's share of the two as a fraction. Return one row [mlp, attn, attn_fracti... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[11544872091648.0, 2199023255552.0, 0.16]]} |
sc-012 | flops | Training a model of N = 7.0e10 parameters on D = 2.0e12 tokens with 6ND, on 1024 chips peaking at 4.0e14 FLOP/s each at an MFU of 0.4. Give the total FLOPs, the wall-clock seconds, and the wall-clock days. Return one row [flops, seconds, days]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[8.4e+23, 5126953.125, 59.33973524305556]]} |
sc-013 | flops | The same run: 1024 chips, and the wall-clock time you computed. Give the total chip-hours and, at $2.50 per chip-hour, the dollar cost. Return one row [chip_hours, dollars]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[1458333.3333333333, 3645833.333333333]]} |
sc-014 | flops | A baseline run has N = 7.0e10 parameters and D = 2.0e12 tokens under 6ND. Give the FLOPs ratio, relative to that baseline, of (a) doubling parameters alone, (b) doubling tokens alone, (c) doubling both, and (d) halving parameters while quadrupling tokens. Return one row [double_n, double_d, double_both, half_n_quad_d]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[2.0, 2.0, 4.0, 2.0]]} |
sc-015 | memory | A KV cache stores both K and V for every layer. With 80 layers, 8 key-value heads, head dimension 128, sequence length 8192, batch 32, in bf16 at 2 bytes, give the cache size in bytes and in gibibytes (1 GiB = 2**30 bytes). Return one row [bytes, gib]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[85899345920.0, 80.0]]} |
sc-016 | memory | The same configuration but with multi-head attention: 64 key-value heads instead of 8. Give the cache size in bytes and the factor by which grouped-query attention with 8 kv heads reduces it. Return one row [mha_bytes, reduction_factor]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[687194767360.0, 8.0]]} |
sc-017 | memory | A model has N = 7.0e10 parameters trained with Adam: 2 bytes of bf16 weights, 4 bytes of fp32 master weights, 4 bytes of fp32 first moment and 4 bytes of fp32 second moment per parameter. Give the bytes for weights alone, for optimizer state alone (master + m + v), and the total, each in gibibytes. Return one row [weig... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[130.385160446167, 782.310962677002, 912.696123123169]]} |
sc-018 | memory | That model and optimizer state must fit in chips with 96 GiB of HBM each, of which 90 percent is usable. Give the usable bytes per chip and the minimum number of chips needed. Return one row [usable_bytes_per_chip, min_chips]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[92771293593.6, 11.0]]} |
sc-019 | memory | Activations saved for the backward pass, at 8 bytes per token per layer per unit of d_model, with batch 4, sequence 8192, 80 layers and d_model 8192. Give the bytes and the gibibytes. Return one row [bytes, gib]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[171798691840.0, 160.0]]} |
sc-020 | memory | A chip has 96 GiB of HBM. A KV cache of 320 GiB is needed for the batch. Give the number of chips required to hold the cache alone, and the fraction of one chip's HBM that a single request's 10 GiB cache would occupy. Return one row [chips, fraction]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[4.0, 0.10416666666666667]]} |
sc-021 | sharding | A ring all-gather over N = 8 devices reconstructs a buffer of V = 4.0e9 bytes. Give the bytes each device sends, and the time at 1.8e11 bytes/s of link bandwidth. Return one row [bytes_per_device, seconds]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[3500000000.0, 0.019444444444444445]]} |
sc-022 | sharding | A ring all-reduce over N = 8 devices on a buffer of V = 4.0e9 bytes moves twice what an all-gather does. Give the bytes each device sends and the time at 1.8e11 bytes/s. Return one row [bytes_per_device, seconds]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[7000000000.0, 0.03888888888888889]]} |
sc-023 | sharding | Compare the three ring collectives on V = 4.0e9 bytes over N = 8 devices. Give the per-device bytes for reduce-scatter, all-gather and all-reduce. Return one row [reduce_scatter, all_gather, all_reduce]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[3500000000.0, 3500000000.0, 7000000000.0]]} |
sc-024 | sharding | Data-parallel training over 64 devices all-reduces the gradient of a 7.0e10-parameter model held in bf16 at 2 bytes, once per step. Give the buffer size in bytes, the per-device bytes moved by the ring all-reduce, and the time at 1.8e11 bytes/s. Return one row [buffer_bytes, per_device_bytes, seconds]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[140000000000.0, 275625000000.0, 1.53125]]} |
sc-025 | sharding | If that gradient all-reduce overlaps a step whose compute takes 0.25 seconds, give the communication time as a fraction of compute time, and whether the step is 'communication' or 'compute' bound. Return one row [ratio, classification]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[6.125, "communication"]]} |
sc-026 | sharding | Tensor-parallel over 8 devices all-reduces an activation of shape [4, 8192, 8192] in bf16 at 2 bytes, twice per layer, for 80 layers. Give the bytes of one activation, the per-device bytes for a single all-reduce, and the total per-device bytes for the whole forward pass. Return one row [activation_bytes, per_allreduce... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[536870912.0, 939524096.0, 150323855360.0]]} |
sc-027 | sharding | For the same model, compare per-step per-device communication: data parallelism all-reduces 2*7.0e10 bytes of gradient once over 64 devices, while tensor parallelism all-reduces a [4, 8192, 8192] bf16 activation twice per layer over 8 devices for 80 layers. Give both totals and the ratio of tensor-parallel to data-para... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[275625000000.0, 150323855360.0, 0.5453926725079365]]} |
sc-028 | inference | A decode step with batch 1 must read every weight once. For a 7.0e10-parameter model in bf16 at 2 bytes on a chip with 1.6e12 bytes/s of HBM bandwidth, give the bytes read, the seconds per step, and the resulting tokens per second. Return one row [bytes, seconds, tokens_per_s]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[140000000000.0, 0.0875, 11.428571428571429]]} |
sc-029 | inference | The same decode step performs 2*N FLOPs per token. Give the FLOPs, the arithmetic intensity in FLOPs per byte at batch 1, and whether the step is 'compute' or 'memory' bound against a critical intensity of 250. Return one row [flops, intensity, classification]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[140000000000.0, 1.0, "memory"]]} |
sc-030 | inference | Decode at batch B reads the weights once for the whole batch but performs 2*N FLOPs per sequence. Give the arithmetic intensity at B = 1, B = 128 and B = 512, ignoring the KV cache. Return one row [b1, b128, b512]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[1.0, 128.0, 512.0]]} |
sc-031 | inference | Using that model of decode intensity — 2*N*B FLOPs against 2*N bytes — give the smallest INTEGER batch size at which decode becomes compute-bound against a critical intensity of 250 FLOPs/byte, meaning the intensity strictly exceeds it. Return one row [smallest_batch]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[251]]} |
sc-032 | inference | Prefill processes S = 8192 tokens at once with 2*N FLOPs per token, while a decode step produces one. For N = 7.0e10, give the prefill FLOPs, the decode-step FLOPs, and their ratio. Return one row [prefill, decode, ratio]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[1146880000000000.0, 140000000000.0, 8192.0]]} |
sc-033 | inference | Every decode step also re-reads the whole KV cache. With 80 layers, 8 kv heads, head dim 128, sequence 8192, batch 32 and bf16 at 2 bytes, give the cache bytes, the weight bytes for a 7.0e10-parameter bf16 model, and the cache as a fraction of the total read per step. Return one row [cache_bytes, weight_bytes, cache_fr... | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[85899345920.0, 140000000000.0, 0.38025495633980455]]} |
sc-034 | inference | With that per-step read of weights plus KV cache at 1.6e12 bytes/s and a batch of 32, give the seconds per decode step, the per-sequence tokens per second, and the aggregate tokens per second across the batch. Return one row [seconds, per_sequence_tps, aggregate_tps]. | You are answering quantitative questions about scaling machine-learning
models on accelerators, by COMPUTING the answer rather than recalling it.
Every hardware parameter you need is given in the task. Do not substitute remembered specs for
a real chip — the numbers in the task are the ones to use.
Conventions used t... | {"rows": [[0.1411870912, 7.082800498973662, 226.6496159671572]]} |
scaling-tasks-v1
35 quantitative scaling tasks for the
scaling-env RL
environment, on the topics of Google DeepMind's free book How To Scale Your
Model: rooflines and arithmetic intensity,
transformer FLOPs and parameter counts, KV-cache and optimizer-state memory, collective
communication volume, and decode throughput.
| field | meaning |
|---|---|
task_id |
sc-000 … sc-034 |
category |
roofline / flops / memory / sharding / inference |
prompt |
the question, every parameter it needs, and the exact shape of the answer |
api_description |
the shared preamble (conventions: 6ND, bf16=2B, ring collectives, Adam state) |
expected_output |
JSON {"rows": [...]}, computed by executing a reference solution |
Categories: roofline 7, flops 8, memory 6, sharding 7, inference 7.
No dependencies — every task is answered with math.
Original problems, and every hardware number is stated
Nothing here is copied from the book. And no task requires knowing a real chip's peak FLOPs or HBM bandwidth: the parameters are given in the task.
That second point is the main design decision. An environment that required recalling a spec sheet would measure memorisation of numbers that change with each accelerator generation — and its answer keys would silently become wrong as hardware moves while still looking authoritative. Stating the parameters makes every problem self-contained, permanently valid, and a test of the reasoning rather than the recall.
What the answers look like
The arithmetic that decides real scaling choices, where the result is often counterintuitive: the same matmul is compute-bound at batch 1024 (intensity 683) and memory-bound at batch 1 (intensity 0.9995); attention is only 16% of a layer's FLOPs at S=8192; Adam state is 6× the weights, so a 70B model needs 11 chips of 96 GiB just to be held; a 64-way gradient all-reduce takes 6.1× longer than the step it overlaps; batch-1 decode of a 70B model is 11.4 tokens/s, fixed by bandwidth alone.
Grading
Floats at a 1e-9 relative tolerance; strings, booleans and None exactly. The tolerance
exists for one thing — the order of multiplications and divisions, since
6ND/(chips·peak·mfu) and ((6N)/chips)·(D/peak)/mfu differ in their last bits. It is orders
of magnitude too tight to hide a wrong formula: a missing (N-1)/N, a factor of 2 and an error
of one part in a million all fail, and each of those is an asserted unit check.
Verify with python environments/scaling_env/build_tasks.py --verify (35/35).
Source: https://github.com/eltociear/my-molt-agent/tree/main/environments/scaling_env
- Downloads last month
- 37