Cosmos and Omnimodal World Foundation Models › Foundation-Model Infrastructure for Simulation
World Models HandbookAll chapters Cosmos and Omnimodal World Foundation Models › Foundation-Model Infrastructure for SimulationOne section · Sections in this chapter5 / 8 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The model also needs a data and serving pipeline. Tokenizer rate, sampling schedule, hardware, and filtering throughput affect cost and usefulness, alongside architecture and model quality. Published generator weights are tied to their trained tokenizer and input interface; two teams cannot freely substitute arbitrary tokenizers and expect the same model to work. The calculations below isolate a few resource terms rather than ranking their real-world importance.
The cost model
We can write down two dominant matrix-multiplication terms for an illustrative full-attention transformer. This is an order-of-magnitude comparison of tokenization choices, not a latency or hardware-sizing estimate for a released Cosmos model. For tokens, model width , layers, and sampling steps, the simplified forward cost per step is
The attention score/value term is quadratic in token count; the feed-forward term is linear in tokens and quadratic in width. The estimate omits Q/K/V/output projections, embeddings, normalization, tokenizer and decoder work, and communication. Tiled exact attention can avoid materializing the quadratic attention matrix, while its arithmetic remains quadratic. Hardware utilization and memory traffic also shape wall-clock time, so the numbers below are illustrative FLOP estimates, not measured runtime or strict latency lower bounds.
def token_count(frames, height, width, ct, ch, cw):
"""Nominal latent-grid cells; not necessarily transformer tokens."""
return int(
np.ceil(frames / ct) * np.ceil(height / ch) * np.ceil(width / cw)
)
def diffusion_cost(tokens, n_layers, d_model, steps):
"""Two matmul FLOP terms for a hypothetical dense transformer sampler."""
attention = n_layers * 4 * tokens**2 * d_model
feedforward = n_layers * 16 * tokens * d_model**2
return {
"attention": attention,
"feedforward": feedforward,
"total": steps * (attention + feedforward),
}
scenarios = [
("720p, 10 s, 30 fps, 8x8x8", 300, 720, 1280, 8, 8, 8),
("720p, 10 s, 30 fps, 8x16x16", 300, 720, 1280, 8, 16, 16),
("1080p, 10 s, 30 fps, 8x16x16", 300, 1080, 1920, 8, 16, 16),
("480p, 4 s, 10 fps, 4x8x8", 40, 480, 640, 4, 8, 8),
]
scenario_tokens = [(name, token_count(*args)) for name, *args in scenarios] 720p, 10 s, 30 fps, 8x8x8 : 547,200 nominal latent-grid cells
720p, 10 s, 30 fps, 8x16x16 : 136,800 nominal latent-grid cells
1080p, 10 s, 30 fps, 8x16x16 : 310,080 nominal latent-grid cells
480p, 4 s, 10 fps, 4x8x8 : 48,000 nominal latent-grid cells
At 720p and ten seconds, 8x8x8 yields 547,200 latent-grid cells;
8x16x16 yields 136,800, before generator patchification or conditions.Now we sweep the generation horizon at a fixed resolution and compression, and watch the attention term take over.
N_LAYERS, D_MODEL, N_STEPS = 40, 2048, 35
ASSUMED_FLOPS_PER_SECOND = (
4e14 # hypothetical sustained arithmetic throughput; not a device benchmark
)
cost_rows = []
for seconds in np.arange(2, 21, 2):
frames = int(seconds * 30)
tokens_8 = token_count(frames, 720, 1280, 8, 8, 8)
tokens_16 = token_count(frames, 720, 1280, 8, 16, 16)
cost_rows.append(
{
"seconds": float(seconds),
"tokens_8x8x8": tokens_8,
"tokens_8x16x16": tokens_16,
"cost_8x8x8": diffusion_cost(tokens_8, N_LAYERS, D_MODEL, N_STEPS)[
"total"
],
"cost_8x16x16": diffusion_cost(
tokens_16, N_LAYERS, D_MODEL, N_STEPS
)["total"],
}
)8x8x8 grid cells: 115,200 at 2 s -> 1,080,000 at 20 s 8x16x16 grid cells: 28,800 at 2 s -> 270,000 at 20 s token growth over the horizon : 9.4x compute growth over the horizon : 82.7x attention share of total at 20 s : 99% Quartering the assumed sequence length (8x16x16) multiplies the two-term FLOP estimate by 0.06x at the same horizon.
The aggregate number hides which term is responsible. Under this deliberately dense full-attention formula, attention already dominates the shortest horizon plotted and its share rises further as the horizon grows.
flops_split = []
for row in cost_rows:
parts = diffusion_cost(row["tokens_8x8x8"], N_LAYERS, D_MODEL, N_STEPS)
flops_split.append(
{
"seconds": row["seconds"],
"attention": parts["attention"],
"feedforward": parts["feedforward"],
}
)
In this full-attention estimate, compute grows faster than token count because its largest term is quadratic. Quartering tokens cuts that term by sixteen, though it does not cut total serving cost by sixteen when other work remains. Memory-efficient exact attention avoids storing the full matrix; ring attention distributes long sequences across devices, while windowed attention changes the connectivity and FLOP model. A FLOP curve alone cannot establish that memory fails before compute on a particular accelerator.
For scale only, compare with the scalar toy model trained above. These calculations count matrix multiplications, not complete program operations, and the scalar future and video clip are unlike workloads.
import time
start = time.perf_counter()
_ = sample_model(model, 0.5, 256, steps=100, seed=1)
toy_seconds = time.perf_counter() - start
toy_samples_per_second = 256 / max(toy_seconds, 1e-9)
toy_matmul_flops_per_future = 100 * 2 * (3 * 64 + 64 * 64 + 64 * 1)
illustrative_one_second_clip_flops = diffusion_cost(
token_count(30, 720, 1280, 8, 16, 16), N_LAYERS, D_MODEL, N_STEPS
)["total"]
scale_gap = illustrative_one_second_clip_flops / toy_matmul_flops_per_futuretoy flow model : 29,401 scalar futures per second on CPU (870,400 matmul-only FLOPs per future) illustrative full-attention model: 3.73e+15 FLOPs for one standalone 1-second video clip unlike-workload arithmetic ratio: roughly 4e+09x one 20 s clip at 8x16x16: 861.4 PFLOPs = 2153.6 GPU-seconds at an assumed 4e+14 FLOP/s = 5982 GPU-hours for a 10,000-clip dataset ideal compute-only spread over 64 accelerators: 93.5 hours of wall clock
These assumptions are deliberately coarse. The calculated GPU-hours describe this hypothetical full-attention configuration, a chosen effective FLOP rate, and an ideal compute-only schedule; they do not predict the cost or utility of a released model. Dataset value still requires downstream validation. The calculation shows why teams test compression and organize batching, scheduling, and caching rather than selecting a tokenizer on reconstruction quality alone.


Serving, and the two throughput regimes
A deployment may need two quite different operating regimes; it need not use the same model or serve both.
Offline data generation emphasizes validated clips per unit cost. Batching, parallel generation, sampler distillation, reduced-precision inference, and caching can help if supported and measured for the chosen model. Fewer tokens can lower cost, but the resulting loss of small objects or labels must be checked against downstream utility.
Interactive simulation has a per-step latency budget imposed by its controller and sensors. Causal or autoregressive models, caching, local attention, and shorter diffusion schedules are possible responses, each requiring task-specific quality and timing checks. The full-attention curves above illustrate why one dense architecture may be expensive; they do not set a universal lookahead limit for every serving design.
Suppose a synchronous controller runs at 10 Hz and requires camera, depth, and semantic outputs at every step. The complete model-and-sensor pipeline then has at most 100 ms before the next decision. One 80-ms denoising step leaves too little time for a multi-step sampler and other work. This does not imply that Cosmos's long-video extension meets interactive latency: Predict2's documented autoregressive inference chains diffusion-generated clips and reruns denoising for each chunk. It differs from Predict1's discrete autoregressive model. Measure end-to-end rate before calling either an interactive simulator.
Simulation integration and the sim-to-real bridge
The place where all of this becomes concrete is the simulator. Four integration patterns recur.
Real2sim reconstruction. Take a real scene and estimate simulator assets, layout, trajectories, and camera poses to obtain a scene that can be varied. This is hard and largely outside the generator. Reconstruction errors can propagate into later variations, although later fitting and validation may detect or correct some of them.
Conditional photorealization. Render a reconstructed scene with simulator labels such as depth, segmentation, boxes, and optical flow; supply the render and supported controls to a generator. Adaptive multimodal control can improve alignment, but generated appearance does not automatically preserve the labels or reproduce the real-world distribution. Measure adherence, reject or relabel mismatches, and validate whether the retained clips help a downstream perception model.
Neural evaluation environments. Use the world model directly as a policy evaluation environment. This ambitious use needs especially strong checks: model errors can bias the evaluation metric, and an optimizer may exploit weaknesses in a learned simulator. Part VIII discusses this model-exploitation risk. Compare important results with independent evidence from real tests or a separately validated simulator; optimization against the learned environment alone cannot establish deployment performance.
Sensor simulation. Synthesize LiDAR or radar returns as well as camera images. Consistent cross-sensor outputs benefit from geometric structure or aligned geometric cues, but an explicitly geometric shared latent is not the only design: LiDAR diffusion can use a sensor-specific latent, and camera-conditioned radar generation uses a radar representation with geometric guidance. The evaluation question is whether generated modalities agree on scene geometry and sensor-specific effects.
What the infrastructure does not solve
It is worth being explicit about the boundary, because infrastructure discourse tends to overclaim.
More accelerators can raise generation throughput, but that change alone does not establish physical plausibility, long-horizon consistency, control adherence, or calibration. A faster generator can also increase the number of clips that require screening. A production pipeline therefore needs measured acceptance rates and downstream utility, not an assumed fraction of usable outputs. Curation continues after generation because synthetic clips can contain physical or label-consistency failures absent from the simulator source.