Skip to content
← Free FDE training guides

Free learning / NVIDIA systems lab

NVIDIA systems: a workload-to-procurement lab

Trace CPU-to-GPU work, follow a model request through serving and explain its delay. Compare model partitions, protect evaluation data and inspect critical regressions before making a deployment decision.

No account needed. Use your own copy for writing and keep the original as a reference.

Engineering lab library / Run locally

Make the capacity decision concrete.

Use the local systems lab to compare memory limits and hypothetical rent-or-buy scenarios. The walkthrough explains each input and what still needs real measurement.

Synthetic records. No provider key or model inference. Runs locally with the standard library.

Search titles, outcomes and prerequisites, then narrow by runtime.

6 of 6 labs · All labs

  1. Start here / Python 3.11+ · Standard library

    Collective results · CPU process lab

    Compare complete and partial vectors, sum compatible contributions, inspect both recipients and refuse an incorrect count.

    Python 3.11+ standard library · Two CPU workers · No GPU or network

  2. Python 3.11+ · Standard library

    Model improvement · offline evidence lab

    Find cross-partition leakage, compare supplied review outcomes and explain why a critical regression outweighs an improved total.

    Python 3.11+ standard library · No model, GPU or account

  3. Python 3.11+ · Standard library

    GPU model placement · offline lab

    Compare replicas and model partitions, then check each GPU memory budget and identify missing deployment evidence.

    Python 3.11+ standard library · No GPU or account

  4. Python 3.11+ · Standard library

    Model serving timing · offline trace

    Separate queue, prompt-processing and delivery delay; calculate first-token and last-token timing.

    Python 3.11+ standard library · No GPU or account

  5. Python 3.11+ · Standard library

    CUDA work assignment · CPU-only trace

    Trace valid writes and guarded skips while changing grid and block sizes.

    Python 3.11+ standard library · No GPU or account

  6. Python 3.11+ · Standard library

    GPU capacity and cost lab

    Find a memory admission boundary and compare hypothetical rent/own scenarios.

    Python 3.11+ standard library · No GPU or account

Original LockedIn FDE practice. Start with the visual NVIDIA learning path. Use Python 3.11 or later. No GPU, account, package installation or cloud purchase is required. The case, prices and memory allocations are synthetic. This is a planning and reasoning lab, not a GPU benchmark, vendor certification or authorization to buy hardware.

1. Map the system before choosing a product

The fictional Field Desk drafts maintenance responses using approved procedures. It serves one authenticated team, keeps data in an approved location, and asks a person to accept a draft. It must refuse cross-tenant data access and return a controlled response when capacity is exhausted.

Draw application → model service → GPU execution. Put the approved source store beside the application and a human decision after the draft. Place these labels at their responsibilities: GPU, CUDA, Nemotron, NeMo and NIM. NeMo development tools do not have to sit in every request path.

Keep a decision packet with: task, component, exact version, alternative, evidence needed and owner. Explain the diagram to someone before using an acronym. They should be able to point to the model and the hardware separately.

2. Run the capacity boundary

Start with the visual GPU memory lesson. Open Try it, identify the four budget parts, then change concurrent requests. The browser and this Python program use the same original synthetic assumptions. A safety reserve is a planning allowance, not an observed GPU allocation.

Download nvidia-capacity-lab.py into an empty working folder.

Code example
python3 --version
python3 nvidia-capacity-lab.py test
python3 nvidia-capacity-lab.py memory --concurrency 4
python3 nvidia-capacity-lab.py memory --concurrency 9
python3 nvidia-capacity-lab.py memory --concurrency 10

The default weight estimate is 16 decimal GB (about 14.901 GiB). At concurrency four, the total including fixed overhead and safety reserve is 37.6 GB against 48 GB. At nine, it is 47.6 GB with 0.4 GB remaining after the reserve; this is the largest whole-request count that fits these inputs. It is not a measured service limit. At concurrency ten, it is 49.6 GB and the estimate is refused. The per-request allocation is a supplied assumption; it is not derived from a real Nemotron architecture. A refused estimate is a successful boundary demonstration, so the CLI still exits normally and reports fits_estimate: false.

Keep concurrency at ten and change only --bits 8: the total becomes 41.6 GB. Keeping that precision, change only --request-gb 4: the total becomes 61.6 GB. Explain why the weights shrink in the first comparison while request state grows in the second. The browser generates a matching command in Explain the decision. Lower stored precision changes arithmetic but does not establish acceptable quality. Actual memory depends on the selected model, precision, runtime, context and concurrency. The program models one device; adding several devices requires a placement and interconnect design, not simply adding capacities.

Produce two outputs and a paragraph naming which inputs need real measurements.

2a. Understand why request length changes memory

A model's weights are its learned numbers. Requests using one model copy share those weights. They also need working space. In many autoregressive Transformers, a key-value cache, usually shortened to KV cache, retains attention keys and values from earlier token positions so later generation can reuse them. These are intermediate computations, not an answer database or newly trained weights.

Think of a database server: shared data does not remove the need for working space for concurrent queries. The analogy explains why “the model loaded” is not a complete service-capacity test. The inference runtime still controls where memory lives and when it can be reused.

Prefill processes the prompt. Decode produces subsequent tokens and can extend the attention state. Longer sequences and more simultaneous sequences can increase state even when the model weights are unchanged. Measure the actual bottleneck; those phases do not have one universal speed or memory behavior across all workloads.

Derive one deliberately simple payload

This is a new hypothetical arithmetic example, separate from the preceding capacity lab's supplied 2 decimal GB per request. It describes one sequence per request, identical full-attention layers, equal key/value dimensions and independent requests. It assumes no shared prefixes, offload, sharding or compression. It excludes padding, metadata and runtime allocation overhead. No named NVIDIA model or GPU is being measured.

Text example
Raw KV bytes per sequence =
  2 × attention layers × KV heads × head dimension
    × cached token positions × bytes per element

The first factor counts keys and values. Grouped-query attention, or GQA, lets several query heads share K/V heads: use the KV-head count, not the possibly larger query-head count. Sliding-window, hybrid, latent-attention and distributed implementations need their own accounting.

Use 32 layers, 8 KV heads, head dimension 128 and two-byte K/V elements:

Text example
2 × 32 × 8 × 128 × 2 = 131,072 bytes per cached token
                         = 128 KiB per sequence
4,096 × 128 KiB         = 512 MiB per sequence
4 × 512 MiB            = 2 GiB across four independent requests

KiB is 2¹⁰ bytes, MiB is 2²⁰ and GiB is 2³⁰. These are binary units; GB is one billion bytes. Keep units visible rather than subtracting a GiB payload from a decimal-GB device budget without conversion.

Change from the 4,096-token, four-request baselinePer sequenceTotal raw KV payload
None512 MiB2 GiB
Allow up to 128 more cached positions per sequence528 MiB2.0625 GiB
Double cached length to 8,192, keep four requests1 GiB4 GiB
Keep 4,096 positions, double requests to eight512 MiB4 GiB

The 128 additional positions are a future-state planning allowance. They are not values that have already been computed or proof that the runtime has reserved exactly those bytes. Likewise, equal totals in the last two rows do not imply equal latency or throughput: the runtime schedules different work.

Reproduce the arithmetic with plain Python, then change one dimension:

Code example
layers, kv_heads, head_dimension, bytes_per_element = 32, 8, 128, 2
bytes_per_token = 2 * layers * kv_heads * head_dimension * bytes_per_element
for tokens, requests in [(4096, 4), (4224, 4), (8192, 4), (4096, 8)]:
    per_sequence = bytes_per_token * tokens
    print(tokens, requests, per_sequence / 2**20, "MiB per sequence",
          per_sequence * requests / 2**30, "GiB total")

Predict what happens if kv_heads becomes 4 while everything else stays fixed: raw payload halves. Then explain why changing weight precision from sixteen bits to eight does not change this calculation at all. Its K/V element size is still two bytes. A supported KV-format change needs separate runtime compatibility, overhead and quality checks.

Read the runtime's memory evidence

A serving runtime may allocate a pool and assign blocks from it to requests. Occupied KV payload, reusable allocated space and the device's total reported memory use are different observations. A request finishing can make blocks reusable without returning that pool to the driver. A high number after completion alone does not prove a leak. NIM documents configurations where reducing maximum context does not shrink the preallocated KV pool.

Before choosing a repair, record the model artifact, runtime version, cache format, pool settings, placement and workload. Compare observations before model load, after runtime setup, during serving and after completion. Identify whether the refusal happened while loading weights, admitting work into the KV pool, or allocating working memory during execution. Keep other device users and temporary buffers in the investigation. This workbook records no GPU telemetry and does not diagnose a real leak.

Run a fixed-block allocation trace on your CPU

Use the same nvidia-capacity-lab.py file. Python 3.11+ and its standard library are sufficient; no model, GPU, network, account or paid service is used. The program changes accounting state; it does not allocate KV tensors in host RAM.

Before running, predict the occupied blocks, reusable blocks and active payload after each event. This hypothetical uniform full-attention geometry has 32 layers, 8 KV heads, dimension 128 and two-byte elements: 128 KiB per cached token. Each 16-token block models 2 MiB of raw payload capacity. These dimensions are teaching inputs, not a named model's specification.

Code example
python3 nvidia-capacity-lab.py pool --case lifecycle
python3 nvidia-capacity-lab.py pool --case rounding
python3 nvidia-capacity-lab.py test

In lifecycle, four blocks form an 8 MiB pool. A starts at 17 cached tokens, B takes 16, and A grows to 33. Predict why C's one-token request is refused, and why it succeeds after B completes. At the end active payload and occupied blocks are zero, while the modeled allocated pool remains 8 MiB. Completion returned blocks for reuse inside this model; it did not measure a driver allocation.

In rounding, only two blocks are available. A's 17 tokens occupy both. A request for one more sequence token is refused although 18 raw tokens fit within the 32-token pool capacity. The unused slots belong to A's final block; this model does not lend those slots to B. Compare active_payload_bytes, occupied_block_bytes, internal_slack_bytes and allocated_pool_bytes. A refusal must leave the previously allocated work unchanged.

Keep your prediction beside the actual JSON and explain a changed prediction. The receiving serving engineer must replay both refusal and reuse, then name the pinned model/runtime and authorized observations needed for a real comparison. An executive or platform manager should ask what evidence separates a capacity estimate from a safe serving limit. Neither trace measures throughput, latency, real driver memory or production readiness. Metadata, workspace, prefix sharing, offload, hybrid attention and distributed placement are deliberately absent.

NVIDIA documents runtime KV blocks and configurable allocation/reuse separately from raw payload arithmetic. Inspect the exact deployed version; this teaching model does not implement its scheduler: TensorRT-LLM KV cache system (checked 2 November 2026).

Defend the next engineering experiment

The fictional Field Desk now accepts longer maintenance records. Produce a short capacity note that includes:

  1. The input-length distribution, bounded output allowance and concurrent sequence count, with the exact architecture used for any payload estimate.
  2. Weights, request state, temporary work, allocation behavior and reserve on each device. Keep a pool's reusable space separate from unused hardware.
  3. An admission or bounded queue policy, including what a caller receives when it cannot be served. A larger advertised context is not unlimited capacity.
  4. A proposed comparison on the intended hardware: useful task quality, time to first token, completion latency, failure behavior and accepted throughput across representative lengths, concurrency and overload. Include cancellation and repeatability. This experiment remains unexecuted until evidence exists.

A payload estimate justifies a testable plan. It does not certify the model, establish acceptable answers or prove that the deployment is ready.

Primary references checked 25 October 2026:

UNDERSTAND THE SYSTEM

Longer requests need more than the same model weights.

Four original arithmetic comparisons for a hypothetical decoder. All 32 layers use full attention with 8 KV heads, head dimension 128 and two-byte keys and values. Requests are independent and equal length, with one sequence each. No sharing, offload, sharding or compression is assumed. This is raw KV payload planning, not a GPU recording or a named model specification.

FOLLOW THE WORK

Watch one example, step by step.

4 authored stepsYou control the pace
01 / EXPLORE THE PARTSControls loading · written explanations below
Direction of information or workReturn / feedback

WHAT THIS PART DOES

Attention dimensions

Count attention layers, key/value heads and each head's dimension. Grouped-query attention can have more query heads than KV heads; use the KV count. The factor 2 represents separate key and value tensors.

CONNECTED TO
  • Size each token: Bytes per cached token
Read the full worked example
  1. 01
    Four shorter requests

    At 4,096 cached tokens, one request has 512 MiB of raw KV payload. Four independent requests total 2 GiB. The model weights are additional shared storage in this one-copy example.

    HYPOTHETICAL · KV ONLY: 4,096 tokens × 4 requests → 2 GiB

  2. 02
    Allow for the next 128 tokens

    Plan for 4,096 existing positions plus up to 128 more. The payload plan becomes 528 MiB per request and 2.0625 GiB for four. The extra 64 MiB is a future-state allowance, not an observation of newly computed or allocator-reserved data.

    HYPOTHETICAL · OUTPUT ALLOWANCE: 4,224 tokens × 4 requests → 2.0625 GiB

  3. 03
    Double the cached length

    Keep four requests and every dimension fixed. At 8,192 positions each, the raw KV payload is 1 GiB per request and 4 GiB total. This is a separate comparison from the preceding output-allowance case. Weights have not doubled.

    HYPOTHETICAL · LENGTH CHANGE: 8,192 tokens × 4 requests → 4 GiB

  4. 04
    Double the number of requests

    Return to 4,096 positions and admit eight independent requests. Raw KV payload is again 4 GiB. Equal totals do not imply equal latency or throughput: longer sequences and more concurrent sequences schedule different work.

    HYPOTHETICAL · CONCURRENCY CHANGE: 4,096 tokens × 8 requests → 4 GiB

Read the connections in plain English
  1. 01
    Attention dimensions → Bytes per cached token

    Two tensors times layers, KV heads, head dimension and bytes per value.

  2. 02
    Bytes per cached token → One request's state

    Multiply by the sequence's cached tokens or explicitly labeled planning allowance.

  3. 03
    One request's state → Concurrent sequences

    Add independent sequence payloads rather than copying the whole model per request.

  4. 04
    Concurrent sequences → Complete device budget

    KV payload must coexist with all other allocations on each device.

  5. 05
    Complete device budget → Verify the service

    Validate allocation behavior, useful outputs and the service envelope.

Check your understanding: If stored weights move from sixteen bits to eight, does this KV calculation halve?

No. Weight storage and KV storage are separate choices. This example still assumes two-byte keys and values. A supported cache-format change needs its own accounting, runtime compatibility and quality evidence. The existing decimal-GB capacity lab uses a supplied per-request allowance; these binary-unit examples do not replace that assumption with a measured value.

2b. Place the model across GPUs

Understand the connections first

A topology is a map of what connects to what. Think of two servers and their RAM: adding the second server does not automatically make an unchanged process use both memory pools. GPU software also needs a supported placement and communication strategy. Some systems support remote memory access or coherence; that does not make every model/runtime automatically compatible.

NameWhat it isWhat to ask
GPU and attached memoryCompute and the device's local storage for weights and working dataWhat must fit on each participating device?
PCIeA system interconnect for devices such as GPUs and network adaptersWhich actual CPU and switch paths connect these devices?
NVLinkNVIDIA processor interconnectWhich processors share a supported domain?
NVSwitchSwitching hardware connecting NVLink pathsHow is this fabric configured?
NICNetwork interface controllerWhich adapter and network carry communication between systems?
Ethernet / InfiniBandNetwork technologies used in clustersWhat bandwidth, latency and routing does this workload actually observe?
NCCLNVIDIA's GPU communication software libraryWhich supported transport paths does the runtime use?
Text example
Runtime uses NCCL for GPU communication (software, not a wire)

  [GPU 0 + memory]       [GPU 1 + memory]
          | NVLink       NVLink |
          +--[NVSwitch fabric]--+
       a supported domain may span nodes

  CPU / PCIe device paths depend on the system
  NIC <---- Ethernet or InfiniBand ----> other systems

This is a responsibility map, not a wiring plan for a named server. An NVLink domain is not necessarily one host: supported rack systems connect compute trays. The model runtime decides how to divide work; communication software and hardware make its exchanges possible.

Place weights before adding capacities

Weights are the model's learned numerical values. Our fictional model has four equally sized layers, A through D, totaling 32 GiB. A layer is a stage of model computation. Each device has 24 GiB and needs a supplied 4 GiB working reserve. GiB means 2³⁰ bytes. These are teaching numbers, not hardware specifications.

PlacementGPU 0 holdsGPU 1 holdsRequired per GPUConclusion
One GPUA, B, C, DUnused36 / 0 GiBGPU 0 exceeds 24 GiB
Two inference replicasA, B, C, DA, B, C, D36 / 36 GiBBoth exceed 24 GiB
Two-way tensor parallelHalf of each layerHalf of each layer20 / 20 GiBSimplified budget fits
Two-stage pipeline parallelA, BC, D20 / 20 GiBSimplified budget fits

Replicas can serve separate requests when each complete copy fits. Tensor parallelism divides operations and exchanges intermediate results. Pipeline parallelism divides the layer sequence into stages and passes activations between them. An activation is an intermediate value produced by model computation. The two split examples have the same weight arithmetic here; they do different work over the connections. Neither result predicts throughput.

Predict, run, change one input

Download gpu-placement-lab.py. Use a terminal in its folder. Python 3.11+ is sufficient; nothing is installed and no GPU or account is needed.

Code example
python3 gpu-placement-lab.py --check
python3 gpu-placement-lab.py --mode single
python3 gpu-placement-lab.py --mode replicas
python3 gpu-placement-lab.py --mode tensor
python3 gpu-placement-lab.py --mode pipeline

Before each run, write down the weights, reserve and total for each device. Check devices and fits_local_budgets in the output. A budget failure is an expected learning result, so it does not produce a failing process exit code. deployment_ready stays not established even when the arithmetic fits.

Now predict these changes before executing them:

Code example
python3 gpu-placement-lab.py --mode tensor --capacity-gib 16
python3 gpu-placement-lab.py --mode tensor --weights-gib 48
python3 gpu-placement-lab.py --mode replicas --capacity-gib 48
python3 gpu-placement-lab.py --mode pipeline --capacity-gib 20

The first needs 20 GiB on each 16 GiB device. The second needs 28 GiB on each 24 GiB device. The third fits 36 GiB on each 48 GiB device. The fourth reaches the 20 GiB boundary exactly including the supplied reserve. Explain why that boundary still needs real allocation evidence before deployment.

The model assumes even partitioning of weights and one fixed reserve per active device. Real deployments can have uneven stages, replicated tensors, communication buffers, key-value cache and other allocations. Replace the reserve with measurements for the exact runtime, model, precision, request lengths and concurrency. Offloading and remote allocation are outside this exercise.

Keep two outputs where adding capacities gives the wrong intuition, an annotated connection map, and a short decision: what fits, what compatibility evidence is missing, and which workload measurement you would collect next. In the GPU systems lesson, use the visual placement controls and three proposal checks to explain that decision.

Official references checked 21 October 2026:

2c. Combine the partial results

The placement budget explains where weights might fit. This additional 25-minute exercise explains why dividing the arithmetic creates a communication responsibility. Download the collective-results lab. It uses Python 3.11+ and the standard library, starts two actual CPU workers per case and exchanges messages through local pipes. No GPU, CUDA, NCCL, model, package installation or network service is used.

A collective is an operation performed by a defined group. A rank identifies one participant within that group; it is not universally a physical GPU number. With a sum AllReduce, corresponding values from the participants are summed and every participant obtains the result. The lab illustrates those semantics by reducing at a coordinator and broadcasting to both workers. Real communication libraries may select different algorithms and transports.

Calculate the answer before dividing the work

Use this two-row matrix and four-value input. Each output position is the sum of one row's element-by-element products with the input.

Text example
W = [1  0  2  0]     x = [2, 3, 5, 7]
    [0  1  0  2]

First output  = 1×2 + 0×3 + 2×5 + 0×7 = 12
Second output = 0×2 + 1×3 + 0×5 + 2×7 = 17
Full result   = [12,17]

Split the input features and the corresponding columns of the displayed matrix. Worker 0 uses positions 0 and 1. Worker 1 uses positions 2 and 3. Both contribute to the same two output positions; this is different from giving each worker its own independent request or a later layer.

ParticipantInput positionsContribution to the two outputs
Rank 00 and 1[1×2 + 0×3, 0×2 + 1×3] = [2,3]
Rank 12 and 3[2×5 + 0×7, 0×5 + 2×7] = [10,14]
SumCorresponding positions[2+10, 3+14] = [12,17]

Concatenation gives four positions. Averaging gives [6,8.5]. Neither is the required calculation. The correct collective depends on how the operation is partitioned; do not treat this single linear example as every model's parallel strategy. These small integer fixtures compare exactly. Floating-point reordering may need justified numerical tolerances and separate task-quality checks.

Code example
python3 --version
python3 gpu-collective-lab.py

Predict and inspect four actual process cases

CaseWork and communicationExpected observation
replicasEach worker computes the full productBoth independently return [12,17]; no reduction
partial-onlyEach worker computes its assigned contributionCorrect length, wrong full-output values
sum-allreduceValidate both contributions, sum and return the result to bothEach receiver independently matches [12,17]
mismatched-countRank 1 sends only one output positionExplicit refusal before combining; no numeric result broadcast

Read each case's contributions, reduction, workers and ipc_events. IPC means inter-process communication. Actual process IDs distinguish the workers from the coordinator. Each worker records what it sent, what it received, its independent full reference and its comparison. A coordinator's correct result alone does not establish delivery to both participants.

The coordinator checks the expected ranks, operation, step, count, numeric label and partition before combining. The python-number label describes this authored teaching protocol; it is not a hardware datatype or NCCL wire format. The mismatched-count case returns explicit refusal messages to let both workers finish. Real NCCL collective calls require compatible participation, ordering, counts and datatypes; a mismatch is not guaranteed to return this clear refusal and may hang, crash or corrupt a result. Follow the chosen runtime's documented error-handling model.

The outer program and workers can exit normally after reporting a deliberately incomplete result. Inspect comparison.shape_matches and comparison.values_match, not only process exit codes. A refused case has no output comparison to grade as correct. The program bounds waits, closes pipes and joins its owned workers; the report includes workers_finished, connections_closed and all_workers_finished.

Change one input and predict the receiving result

In a separate copy, change the top-level input to INPUT_VECTOR = [4, 3, 5, 7]. Keep the weights and partition unchanged. Predict rank 0's [4,3], rank 1's unchanged [10,14], and the full [14,17]. Run again and check both receivers. Source identity should change because you edited the supplied program; the protocol and correctness requirement remain the same.

The workers deliberately hold the full fictional fixture so each can compute a reference. This does not demonstrate distributed memory savings. The central coordinator is not an optimized NCCL algorithm. Keep local arithmetic and message observations separate from GPU throughput, interconnect bandwidth, placement support and procurement claims. The next authorized hardware experiment needs the exact model/runtime, topology, precision and representative workload.

Primary references checked 25 October 2026:

UNDERSTAND THE SYSTEM

Two partial vectors become one shared result

Splitting a calculation creates partial answers, not automatically a complete answer. Follow one matrix-vector product through two CPU workers and a coordinator. The arrows show the partition-and-sum path; the replica comparison needs no combination. This is actual local process communication, not GPU execution or an NCCL benchmark.

FOLLOW THE WORK

Watch one example, step by step.

4 authored stepsYou control the pace
01 / EXPLORE THE PARTSControls loading · written explanations below
Input-feature partitions → contributions → shared resultReturn / feedback

WHAT THIS PART DOES

Full calculation

Multiply each displayed matrix row by x and add its terms. W has rows [1,0,2,0] and [0,1,0,2]. With x=[2,3,5,7], the complete output is [12,17]. The reference calculation defines what the partitioned work must reproduce.

CONNECTED TO
  • First inputs: Participant 0
  • Other inputs: Participant 1
Read the full worked example
  1. 01
    Start from the full result

    The independent full calculation gives [12,17]. In the replica case, each worker computes that whole vector itself. Combining two full replicas by addition would double the answer. The diagram's sum path is for complementary contributions, not independently complete requests.

    REFERENCE CONTRACT: Full calculation: [12,17]

  2. 02
    Compute partial contributions

    Split the input features and matching weight columns. Both workers produce a two-position vector, but [2,3] and [10,14] are individually incomplete. The partial-only run returns these local vectors without combination; shape checks pass while the independent value checks fail.

    PARTIAL RESULTS: Correct shape · incomplete values

  3. 03
    Sum and return to both

    Add corresponding positions and send [12,17] to both participants. Their received values independently match the full calculation. Concatenating would produce four positions; averaging would change the mathematical operation. Sum is the required operation for this particular partition.

    COLLECTIVE RESULT: Both ranks receive [12,17]

  4. 04
    Refuse an incomplete contribution

    The final case deliberately sends only one position from participant 1. The coordinator refuses the incompatible count before reduction and returns refusal messages instead of a numeric result. It does not pad the missing value or invent a complete answer. This is an application-level teaching check, not a promise about NCCL failure recovery.

    GROUP CONTRACT: Count mismatch · no result broadcast

Read the connections in plain English
  1. 01
    Full calculation → Participant 0

    Assign the first input features and their matching matrix columns.

  2. 02
    Full calculation → Participant 1

    Assign the remaining input features and their matching columns.

  3. 03
    Participant 0 → Validate and sum

    Send the first two-position contribution through a real local IPC connection.

  4. 04
    Participant 1 → Validate and sum

    Send the second contribution for the same group and step.

  5. 05
    Validate and sum → Result at both ranks

    After validation and reduction, broadcast the complete result and collect both worker observations.

Check your understanding: Both workers returned vectors of the expected length. Why can the result still be wrong?

Shape does not establish completeness or correct arithmetic. In this input-feature split, each worker computes only its contribution to both output positions. Sum the corresponding contributions and return the complete result to the required participants. Compare independently with the full calculation; do not concatenate, average or treat a partial vector as the full answer.

3. Inspect an environment without pretending to have a GPU

First, trace what CUDA does

CUDA is NVIDIA's computing platform and programming model. A framework such as PyTorch can use it to execute numerical work on a GPU. It is not a model or an agent. Think of adding two spreadsheet columns: the operation is familiar, but we need to assign each row and make its data available to the processor.

Use these names to explain the diagram before reading kernel code:

NameMeaning in this example
HostCPU-side application and its memory
DeviceGPU and its memory
KernelThe function executed by GPU threads
ThreadOne execution of that function, assigned an index
BlockA group of threads
GridThe collection of blocks launched for the kernel
Text example
Host RAM                     Device memory
A and B -- copy inputs -->   A and B
                             kernel writes C
C       <-- copy result --  C
         after completion

This is an explicit-copy example with a discrete GPU. Unified Memory and other hardware arrangements change how memory is made accessible. A launch is not a completion signal: actual code must check errors and establish completion before consuming the result. Timing CPU submission alone is not a GPU benchmark.

Download cuda-execution-lab.py. The following runs entirely on your CPU, with Python's standard library:

Code example
python3 cuda-execution-lab.py --length 6 --block-size 4
python3 cuda-execution-lab.py --length 9 --block-size 8
python3 cuda-execution-lab.py --length 9 --block-size 4
python3 cuda-execution-lab.py --check

Before each run, calculate blocks = ceil(values / threads_per_block). Then use i = block * threads_per_block + thread to predict the last thread's index. The guard i < values must run before the thread accesses an array. Check your predictions against this original example:

  • Six values with four threads per block: two blocks, six writes, two skips. Block 1 / thread 1 writes index 5; block 1 / thread 2 has index 6 and skips. The result is [11, 22, 33, 44, 55, 66].
  • Nine values with eight threads per block: two blocks, nine writes, seven skips.
  • Nine values with four threads per block: three blocks, nine writes, three skips. Both nine-value runs produce [11, 22, 33, 44, 55, 66, 77, 88, 99].

The CPU model executes sequentially. Its tiny block sizes keep the trace readable; they are not performance recommendations. A logical thread is not a dedicated physical core. CUDA hardware groups threads into warps of 32 for scheduling. Keep the grid/block/thread map separate from the hardware diagram.

Produce a labeled memory path, one valid and one guarded thread assignment, and an explanation of why different grouping must preserve the result. State what this exercise does not prove: GPU execution, speed, or environment compatibility.

Official reading checked 21 October 2026: CUDA platform, programming model, CUDA C++, asynchronous execution.

Then, inspect an authorized environment

On a host you are authorized to inspect, nvidia-smi can show devices and driver information. Separately record the exact container digest, framework version and device execution check. If you do not have such a host, mark these observations as unverified. Do not install drivers, allocate resources or invent a transcript for this exercise.

The current CUDA guide and the chosen runtime's support matrix define compatibility. A host driver command does not prove that a framework inside a container is executing on the GPU.

4. Select a model and an improvement method

Use the Nemotron directory to choose a specific model card. Record the exact identifier/revision, modalities, context, license and runtime requirements. Leave performance unmeasured until it is actually measured.

Write five cases: an ordinary request, missing evidence, conflicting procedures, a foreign-tenant request and an adversarial instruction embedded in a document. Keep expected behavior and data boundaries fixed when comparing candidates.

What NeMo is, and why an FDE needs to understand it

NeMo is NVIDIA's modular software suite for developing and improving AI systems. It is distinct from Nemotron, a model family, and NIM, model-serving software. Think of the development tools, application code and deployed service in an ordinary software project: related things with different jobs.

A baseline is the current approach. A candidate is a proposed change. Your job is to show which problem the change addresses and what evidence could reject it.

Text example
Observe a failure → Choose one change → Compare on separate cases → Review the decision
       ↑                    |                    |
       └── Preserve the baseline ────────────────┘
FailureFirst useful interventionWhat changes
An outdated procedure is citedRepair the authorized source and retrieval pathInformation supplied at request time
A service permits an unauthorized actionEnforce caller, tenant and operation checks in that servicePermission to perform the operation
A recurring behavior remains unreliable after simpler changesDesign a controlled customization experimentPotentially the model's learned parameters

A prompt change alters instructions. Output validation checks a response against an application contract. Retrieval adds relevant context. Fine-tuning updates some or all learned parameters from examples. It does not provide a continuously current source of truth or enforce a user's permissions.

The official NeMo map identifies Curator for data preparation, training libraries for customization, Evaluator for comparison, and Guardrails for programmable interaction controls. Choose the component/version needed for the experiment; these are not all mandatory dependencies. Guardrails do not replace server authorization.

See how a test can become misleading

Separate training examples used to adjust parameters, development cases used to choose and tune an approach, and a held-out test reserved for comparison. Keep related examples together when their overlap would reveal the test answer.

Our eight fictional records describe four maintenance incidents. Each incident has two differently worded records. A row-by-row split looks tidy but shares incident families across partitions:

PartitionSplit rows independentlyKeep incident families together
TrainingM01, M03, M05, M07M01, M02: fan-01
DevelopmentM02, M04M03, M04: valve-02
Held-out testM06, M08M05, M06: pump-03; M07, M08: motor-04

All eight texts are unique. Exact-text overlap is zero in both splits, but four incident families cross partitions in the first. A unique string is not proof of an independent test. In the second split, those supplied families stay separate. Real projects also inspect duplicate content, source documents, customers and time boundaries. The correct split follows the generalization claim you need to test.

NeMo Curator distinguishes exact, fuzzy and semantic deduplication. This exercise only checks exact text and supplied family labels; it does not discover paraphrases or prove that every leakage route is absent.

Predict, run, then change the evidence

Download the model improvement lab. Requires Python 3.11+ standard library. It makes no network requests, installs no packages and writes no files. No GPU or vendor account is needed.

The four review outcomes for M05–M08 are authored fixtures, not generated model responses. Baseline: two passes. Candidate A: three passes, but it invents a procedure when the approved source is missing. That last case is explicitly critical.

For this exercise only, the decision rule requires no known family or exact-text overlap, all four cases reviewed, at least three passes, and a passing critical check. This rule is not a general model quality threshold. Even meeting it only supports broader review.

Predict each decision before running:

Code example
python3 model-improvement-lab.py --split leaky --candidate regression
python3 model-improvement-lab.py --split grouped --candidate regression
python3 model-improvement-lab.py --split grouped --candidate complete
python3 model-improvement-lab.py --split grouped --candidate incomplete
python3 model-improvement-lab.py --check
ConfigurationExpected evidenceDecision under this exercise's rule
Leaky + regressionFour families cross partitions; M08 failsHold
Grouped + regressionNo known family overlap; total improves from 2/4 to 3/4, but M08 failsHold
Grouped + completeNo known overlap; all four supplied outcomes passEligible for broader review
Grouped + incompleteThree passes and one unreviewed critical caseHold; the denominator remains four

Compare the printed reasons with your prediction. Switching a fixture selects different supplied evidence; it does not fix or rerun a model. A higher total cannot cancel a critical regression, and a missing result cannot disappear from the denominator.

Now make a copy of the script and change M08's text to exactly match M01's text, leaving its family label unchanged. Run --split grouped --candidate complete. Predict why the decision changes: the family check remains clear, but the exact-text check finds one crossing text. Restore the text before running --check again.

Turn the exercise into an experiment brief

Write one page with the observed failure, simplest alternative, candidate hypothesis, data provenance/rights, grouping rule, baseline version, comparison conditions, critical cases, and the evidence that would reject the change. Keep model, prompt, retrieval, runtime and scoring changes explicit so the comparison is interpretable.

Once you inspect held-out failures and use them to change the system, those cases become development evidence. Keep them as regression tests and obtain fresh, representative held-out cases. Eight fictional records cannot establish statistical significance, real model quality or production readiness. Repeated observations, representative slices and uncertainty analysis still matter.

For actual customization, choose a supported model and follow the current Megatron Bridge documentation. For measured comparisons, read NeMo Evaluator's comparison guide (nightly documentation). Pin versions and configuration before a real run. These references were checked 21 October 2026; this free lab is independent instruction, not a NeMo execution.

Continue in the NeMo lesson with the visual walkthrough and your own experiment brief.

5. Specify the private model service

Start with what serving means

You already use services that accept an API request and return a result. Model serving makes a trained model available that way. Inference is running the model to compute an output. Training changes its learned weights; an ordinary inference request uses those weights.

Think of a database service and its query engine. The service exposes a contract; the engine performs computation. In our model service, the application still owns the user's task, permitted sources and checks on the answer.

PartWhat it doesWhat it does not establish
ApplicationAuthenticates the caller, chooses context and checks the resultA convincing answer is not automatically correct
NVIDIA NIMPackages model inference as a deployable microservice with an APIEvery NIM does not use an identical engine or GPU profile
Model and inference engineLearned weights plus software that executes them; TensorRT LLM is one inference libraryA successful computation does not authorize a business action
GPU and memoryNumerical work, weight storage and request stateMore hardware does not repair every source of delay
NVIDIA DynamoCoordinates distributed inference, including supported separate prefill/decode worker poolsEvery endpoint does not need distributed serving

A model endpoint can be called by an agent. It is not the whole agent: an application loop chooses further steps and separately authorizes tools.

Follow the request before measuring it

A token is a model-specific text unit, often a word fragment. Prefill processes the input tokens. In this introductory autoregressive example it prepares attention state and the first output token. Decode continues the output using the input and previous output. The key-value (KV) cache retains intermediate attention data; it is working memory, not a database of approved facts.

Text example
APPLICATION              SERVING SYSTEM                         CLIENT
send prompt ──→ wait ──→ prefill / first token ──→ delivery ──→ token 1
                        attention state ───────→ decode ──────→ token 2
                                                decode ──────→ token 3
                                                decode ──────→ token 4

Streaming exposes partial output as it arrives. It does not establish successful completion, answer quality or permission to act. A real stream can combine tokens into a single chunk; counting chunks is not counting model tokens.

Run the offline timing lab

Download inference-serving-lab.py into a local exercise folder. Inspect it, then use Python 3.11 or later. It uses only the standard library, computes authored values and neither contacts a service nor loads a model. No GPU, account or package installation is needed.

Before running, predict the first-token time and the time to the last output token for the reference below. All values are synthetic milliseconds; none represent a hardware benchmark. The prompt-processing interval includes making the first token available; the later gaps are observed at the client.

TraceOutboundQueue waitPrompt processingFirst-token deliveryThree later token gaps
Reference20201202040, 40, 40
A: queue206201202040, 40, 40
B: prefill20207202040, 40, 40
C: delivery202012062040, 40, 40
Code example
python3 inference-serving-lab.py --case reference
python3 inference-serving-lab.py --case queue
python3 inference-serving-lab.py --case prefill
python3 inference-serving-lab.py --case delivery
python3 inference-serving-lab.py --check

The reference produces client arrival times [180, 220, 260, 300]. Its time to first token is 180 ms; the last output token arrives at 300 ms. The average later gap is (300 - 180) / (4 - 1) = 40 ms. The denominator is three gaps, not four tokens. This last-output timing excludes a later empty completion event.

Traces A, B and C all produce [780, 820, 860, 900]. A first-token timer alone cannot tell you which interval changed. A has more queue wait, B more prompt processing and C more delivery delay. This locates the extra interval; it does not identify its root cause. A queue may wait while the GPU serves other requests. Delivery delay may include proxy buffering. Compare server and client measurement boundaries and reconcile their clocks before interpreting a real trace.

Change one thing, then explain what stayed the same

  1. For Trace A, replace the queue wait with 120 ms. Predict both first and last token time before running the first command below.
  2. Change the gaps to 20,80,20. The average is still 40 ms, but the user now experiences a pause. Explain what the average hides.
  3. Try a single output token. There is no later gap to average; null means not applicable, not zero. Try a negative queue duration: the program should reject it.
Code example
python3 inference-serving-lab.py --case queue --queue-ms 120
python3 inference-serving-lab.py --gaps-ms 20,80,20
python3 inference-serving-lab.py --gaps-ms none
python3 inference-serving-lab.py --queue-ms -1

Keep your predictions, program output, one explanation of a changed interval and the next observation you would collect on an authorized deployment. For the queue case, inspect demand and admission; for prefill, input lengths and engine/cache state; for delivery, proxy and network behavior. Do not infer a hardware purchase from a slow first token.

This serial model omits cache reuse, overlapping requests, batching, speculative decoding and separate workers. It teaches measurement boundaries. It cannot predict a particular NIM/GPU combination or demonstrate production performance. Read the official NIM inference overview, latency definitions and Dynamo worker explanation before designing a real measurement. References checked 25 October 2026.

For the interactive system diagram, stepped request and three trace decisions, open the NIM lesson in Academy. It uses the existing training sign-in and access controls.

Turn the explanation into an acceptance contract

Use the current NIM documentation to record a model/runtime candidate. Identify the authenticated caller, source boundary, memory admission rule, queue limit, timeout, retry budget and cancellation behavior. Do not put secrets into the packet.

Name readiness checks separately from task-quality checks. Include a permitted ordinary request as well as a denial. Write what happens under overload and who owns rollback. TensorRT LLM, Dynamo and NIM have distinct responsibilities; verify the exact release's supported combination.

A service-level objective (SLO) is a target for a defined measure over a stated population and interval. A token-throughput number is not an SLO for useful work. Complete this measurement contract before testing an actual service:

DecisionRecord before the comparisonWhy it changes the interpretation
ConfigurationModel revision, container digest, engine/profile, hardware and settings for baseline and candidateA comparison needs reproducible identities
WorkloadAuthorized task cases, input/output token distributions, streaming settings and cache conditionsShort cached prompts and long uncached prompts do different work
TrafficArrival-rate or fixed-concurrency method, test duration, warm-up and bounded load limitWaiting for a response before sending more can hide an overloaded queue
PopulationAttempted and admitted counts; completed, rejected, timed-out, cancelled and unfinished dispositionsA fast subset cannot speak for the requests excluded from it
TimingClient first token, actual later arrivals, last output token and final completion; server intervals and clock relationshipA common symptom does not locate a component, and partial output is not completion
QualityExpected task behavior, critical failures and useful completed outcomesMore generated tokens can still mean fewer useful answers
ChangeAllowed callers, overload behavior, stop conditions and rollback ownerA proposed experiment needs boundaries before it receives traffic

Keep overlapping labels explicit: admitted is a stage, while completed or timed out describes what later happened to a request. Preserve request identity and an observation cutoff so an unfinished request is not quietly counted as successful. For percentiles, state the population, units and calculation method; report failure counts beside successful-request latency. Do not add independent p95 intervals and call their sum the p95 of the whole request.

Challenge a better-looking benchmark

Here is an invented review exercise, not an execution or NVIDIA result. Both versions receive the same ten attempted requests in the same fixed observation window. Every request has a final disposition by that cutoff; all completed outputs in this tiny fixture pass the supplied task checks.

VersionCompleted usefullyRejectedOutput throughput in the same window
Baseline821,000 tokens/second
Candidate641,300 tokens/second

Before revealing your reasoning, decide whether the candidate earned rollout. Its aggregate output throughput increased by 30%, but useful completions per attempt fell from 8/10 to 6/10. Additional output can be longer or less efficient; tokens are not tasks. The fixture does not supply first-token distributions, completion latency, resource consumption or performance under other loads. A specific SLO, a representative workload and more evidence are still required. Reject the argument that higher throughput alone justifies replacement; this small exercise also cannot prove that the baseline is ready.

Write a one-page proposed comparison. Include a permitted ordinary caller, a denied caller, bounded overload and cancellation. State which quality or timing failure would stop the test and who could roll back. A blanket refusal is not a working secure service. More batching can improve aggregate throughput while increasing waiting, so compare both. Separate prefill/decode worker pools can reduce interference but add routing and KV-transfer costs; they are a hypothesis to test, not an automatic improvement.

Current official reading, checked 25 October 2026:

The six-case visual below brings the timing exercise together. Use each frame to point to the observation that changed, then explain which evidence is still missing.

UNDERSTAND THE SYSTEM

The same waiting time can hide different work.

Six computed comparisons from the original offline timing lab. Durations are authored, not NVIDIA measurements. Every event uses the same client-send time origin, and each delivery represents one token only in this teaching model. No model or request is running.

FOLLOW THE WORK

Watch one example, step by step.

6 authored stepsYou control the pace
01 / EXPLORE THE PARTSControls loading · written explanations below
Direction of information or workReturn / feedback

WHAT THIS PART DOES

Send the request

The application sends permitted input. This simplified serial trace assigns 20 ms before the request reaches the server. Real clocks must be reconciled before comparing timestamps from different systems.

CONNECTED TO
  • Arrive: Wait for a slot
Read the full worked example
  1. 01
    Reference request

    The server makes its first token available at 160 ms since client send. The client receives tokens at 180, 220, 260 and 300 ms. The three later gaps average 40 ms; no later completion event is modeled.

    SYNTHETIC · REFERENCE: First 180 ms · last 300 ms · mean gap 40 ms

  2. 02
    The queue grows

    Queue wait changes from 20 to 620 ms. First server availability moves to 760 ms and client visibility to 780 ms. The same prompt-processing and later gaps remain. Inspect demand, admission and scheduling before blaming the model.

    SYNTHETIC · QUEUE: First 780 ms · last 900 ms · mean gap 40 ms

  3. 03
    Prompt processing grows

    Prefill changes from 120 to 720 ms. The first client token is again at 780 ms, but the longer interval is prompt processing. Compare input lengths, cache conditions and engine observations; the trace alone does not identify a particular kernel or root cause.

    SYNTHETIC · PREFILL: First 780 ms · last 900 ms · mean gap 40 ms

  4. 04
    Output waits after the server

    The server still makes its first token available at 160 ms. Delivery grows to 620 ms, so the client again waits until 780 ms. This locates a delivery interval; it does not prove which proxy or connection caused it.

    SYNTHETIC · DELIVERY: First 780 ms · last 900 ms · mean gap 40 ms

  5. 05
    An average hides a pause

    Return to the reference first-token timing. Gaps of 20, 80 and 20 ms yield arrivals at 180, 200, 280 and 300 ms. Their mean is still 40 ms, but the longest pause doubles. No server-side decode observation identifies the cause of that pause.

    SYNTHETIC · UNEVEN ARRIVALS: First 180 ms · last 300 ms · longest gap 80 ms

  6. 06
    Only one output token

    The one token arrives at 180 ms and is also the last output token. There are zero later intervals, so the mean later gap is null. Report not applicable instead of zero latency or infinite token speed. Final completion and task acceptance still need separate evidence.

    SYNTHETIC · ONE TOKEN: First 180 ms · last 180 ms · mean gap not applicable

Read the connections in plain English
  1. 01
    Send the request → Wait for a slot

    Outbound travel precedes the server's scheduling wait in this serial example.

  2. 02
    Wait for a slot → Process the prompt

    Start model work after the supplied queue interval.

  3. 03
    Process the prompt → First client output

    Server availability and client visibility are different events.

  4. 04
    First client output → Later arrivals

    Inspect actual later arrivals, not only their mean.

  5. 05
    Later arrivals → Check completion

    Observe completion and useful task evidence separately from partial output.

Check your understanding: Can a faster first token establish a faster, more useful service?

No. Compare later delivery, final completion, accepted-task quality and failures under a defined workload. This serial arithmetic omits batching, reuse and concurrent scheduling. It supports a diagnosis exercise, not a serving-capacity or NVIDIA performance claim.

6. Compare renting and owning

Code example
python3 nvidia-capacity-lab.py compare --hours 160
python3 nvidia-capacity-lab.py compare --hours 600

These hypothetical equivalent-capacity bundles use a rate of 8 currency units per hour, an 80,000-unit purchase over 36 months, and 800 units of monthly operation. Rental is 1,280 at 160 hours and 4,800 at 600 hours. The ownership estimate is 3,022.22 per month; the arithmetic crossover is approximately 377.78 hours. This is not a current NVIDIA price.

Replace assumptions only with comparable, dated evidence. Include storage, networking, software, support, electricity, cooling and staff in the operating-cost assumption. The simple formula excludes taxes, financing, residual value, migration and unmodeled downtime. Unknown costs stay unknown in the decision packet; they are not evidence of zero cost.

Add a managed endpoint and a smaller pilot as alternatives. State one change in usage or operating requirements that would reverse your recommendation.

7. Prepare a complete quote and acceptance request

Use the official where-to-buy directory and certified-system information as research starting points. Do not place an order as part of this lab.

Ask for exact SKU, GPU count and memory, CPU/RAM, interconnect, NICs, storage, rack/power/cooling, software entitlement, warranty, support, installation, delivery date and acceptance conditions. Distinguish a chip/card quote from a server or rack quote. Confirm provider region and capacity terms for rental. A product announcement is not a local availability guarantee.

Current-generation references checked 19 October 2026: Blackwell and Blackwell Ultra and Vera Rubin. Compare supported precision, memory, bandwidth, topology and the complete system. Recheck documentation and supplier availability before making a purchase decision.

End with a one-page recommendation: workload, chosen option, alternatives, estimated costs, observed evidence, unresolved assumptions, acceptance workload, receiving owner and next decision. The evidence should be understandable without the presenter supplying missing facts.

Before you move on

Keep the evidence of your work.

  • A CPU-to-GPU memory path and a checked thread assignment.
  • A labeled model, service and hardware architecture.
  • Two capacity boundaries and a hypothetical cost comparison.
  • A procurement brief with dated evidence and an acceptance workload.

Keep these in your own working copy. Reading this page does not save work or record completion.

Suggested next free session

Control AI traffic with a gateway

Put an explicit identity, routing and token budget boundary in front of the model service. This is a suggested sequence; choose the practice that addresses your current gap.

Open the next free guide

Free account

Give your practice a home.

Try a role exercise with account drafts and a downloadable worksheet. Keep the files you made in this guide in your own working copy.

Create a free learning account

Guided training · by application

Build toward a program.

Request structured lessons and a training seat. Scope, schedule, feedback arrangements and tuition are confirmed in writing before you commit.

Explore a training application
Have Academy access?

Use your existing training seat to open worked explanations and practice in the related lesson. Creating a free account does not grant a seat.

Open the related Academy lesson →
Back to top ↑