DGX Spark gpt-oss-120b QLoRA OOM: What to Do?

Unsloth documents approximately 68 GB of unified memory for 4-bit QLoRA with gpt-oss-120b on DGX Spark (Unsloth’s DGX Spark guide). That is a documented configuration, not a guarantee that every checkpoint, container, or loading path will fit. If the run fails, first verify that the checkpoint and quantization settings match the supported 4-bit path; then diagnose model loading separately from the first training step. Do not treat the machine’s 128 GB of unified memory as a promise that every setup will run.

Suitable: This guide is for teams already attempting gpt-oss-120b QLoRA on DGX Spark and needing to locate an OOM without changing several variables at once.

Not suitable: It is not a performance benchmark, a promise of training time, or a general CUDA installation recipe for other systems.

Identify the failing stage before changing settings

An OOM is a symptom, not a diagnosis. The point where the process stops determines which layer we should inspect. A container that cannot start points to a different problem than a process killed while reading checkpoint shards; neither is the same as memory exhaustion during the first forward or backward pass.

Record the first failing action and its full error output before retrying. In particular, preserve the container image or build source, model repository and exact weight variant, loading arguments, sequence length, batch settings, and the last visible log line. The gpt-oss-120b model card identifies the model artifacts; compare the exact artifact being loaded against the route described in the Unsloth guide.

First failure point What it usually directs us to check What to capture before retrying
Container does not start or cannot see a GPU Container runtime, GPU access, image architecture, and dependencies Container command, startup output, and CUDA visibility result
Checkpoint shard loading is interrupted Weight format, quantization configuration, kernels, and memory allocation Repository and artifact name, loading arguments, last shard message, and available memory
Model loads but the first training step fails Training-time activations and configuration, including sequence length and batch size Training configuration, sample length, and the complete first-step error

Why does loading the model OOM before training begins? Loading may fail because the selected checkpoint or loading path does not use the expected quantization route, or because required support is missing and the process takes a different path. A repository name that includes “4-bit” is not proof that the runtime actually loaded 4-bit weights. Check the artifact and the loading log, not just the label.

Check the weight format and runtime before starting a large load

Separate the native MXFP4 weights associated with gpt-oss from a checkpoint prepared for a bitsandbytes 4-bit loading path. They are not interchangeable labels for one universal format. The OpenAI release information and model card are the references for the model’s published artifacts. The Transformers bitsandbytes documentation describes the options and requirements for that quantization route.

Use the exact checkpoint and loading example specified by the current Unsloth tutorial. Do not combine a model artifact from one route with quantization flags copied from another, and do not infer compatibility from the file name alone. If the tutorial uses a particular converted 4-bit checkpoint, verify the repository and revision before a run that will load large shards.

We also separate documented setup from local modifications. The official tutorial and its DGX Spark Dockerfile provide the baseline to compare against. If a package, build step, or kernel has been changed locally, record that as a local change rather than presenting it as part of the documented configuration.

Before a large load, inspect the startup logs for evidence of a missing quantization kernel, a fallback to a higher-precision path, or unexpected CPU or disk placement. Do not keep retrying with the same configuration if the logs show that the intended loading path was not selected. Correct the mismatch first, then restart from a clean process.

Which 4-bit weights should be used for gpt-oss-120b on DGX Spark? Use the specific checkpoint linked or named by the current Unsloth instructions for its QLoRA workflow, and verify that the loading arguments enable that route. Do not substitute an artifact merely because its name contains “4-bit”; confirm the model card, tutorial, and runtime logs agree.

Verify GPU access at the container boundary

A container that starts successfully may still lack usable GPU access. Check this before downloading or loading the large model. Docker’s GPU container documentation and NVIDIA’s Container Toolkit installation guide explain the runtime requirements. The tutorial’s current command and image should remain the authority for its specific DGX Spark setup.

The command below is a launch pattern for a locally built image based on the Unsloth DGX Spark Dockerfile. It includes GPU access, host networking, host IPC, memory-lock limits, and a working-directory mount. Replace the image placeholder with the image built according to the current tutorial; do not treat the placeholder as an official image tag or assume that this generic pattern guarantees a working training environment.

docker run -it --rm \
  --gpus all \
  --network host \
  --ipc=host \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  -v "$PWD:/workspace" \
  --workdir /workspace \
  <IMAGE_BUILT_FROM_UNSLOTH_DGX_SPARK_DOCKERFILE> \
  bash

Once inside, test CUDA visibility before invoking the model loader:

python - <<'PY'
import torch
print("cuda_available:", torch.cuda.is_available())
if torch.cuda.is_available():
    print("device_count:", torch.cuda.device_count())
    print("device_name:", torch.cuda.get_device_name(0))
PY

The PyTorch CUDA availability interface reports whether CUDA is available to PyTorch. A False result means we should stop at the container and dependency layer. It does not diagnose model memory use; no large checkpoint load should begin until the container can see the device.

If visibility fails, compare the runtime, image build, and launch options with the current tutorial. Avoid changing the model configuration to compensate for a container that does not expose CUDA. Keep the exact command and the first startup error in the run record so that the next attempt tests a specific correction.

A successful CUDA visibility check confirms access to a CUDA device; it does not prove that the checkpoint, quantization kernels, or training workload will fit.

Separate checkpoint loading from first-step training

Once CUDA is visible, retry model loading with the tutorial’s supported checkpoint and arguments, changing only one item if a correction is needed. Watch for shard progress, quantization-related messages, and any indication of placement outside the expected path. If the process is killed during loading, do not start by reducing the training sequence length: training has not started, so that change does not test the failure being observed.

If the model loads completely but OOM occurs on the first training step, treat that as a separate problem. At that point, inspect the training configuration and sample dimensions. A longer sequence can increase activation memory; batch size affects how much work is active together; LoRA rank changes adapter size and related computation; gradient checkpointing changes the memory-versus-computation tradeoff. These are diagnostic factors, not universal fixes, and their effects depend on the exact software and workload.

Start with a minimal, valid sample and a short sequence, using the smallest batch configuration supported by the training script. Confirm that the model reaches a training step, then restore the intended settings one at a time. If the failure returns after a particular change, keep that setting fixed and test the remaining variables separately. Do not change sequence length, batch size, rank, and checkpointing together; a successful run would not reveal which change mattered.

What should be adjusted when loading succeeds but the first training step OOMs? First reduce the training workload, beginning with sequence length and batch configuration, while keeping the loaded checkpoint and environment unchanged. Then test other training settings individually. This distinguishes training-time activation pressure from a weight-loading problem.

Use the decision branches to choose the next test

Unsloth’s documented estimate of approximately 68 GB is useful for deciding whether this workflow is plausible, but it is not a complete memory budget for every runtime. DGX Spark’s product specifications describe 128 GB of unified memory (NVIDIA DGX Spark specifications); that total does not mean every byte is available to model weights. The active software, loading behavior, and training workload still matter. We use the estimate as a reference point, then rely on the observed failure stage and actual memory readings to guide the next action.

Record a reproducible result before deciding to continue

A run is useful even when it fails, provided the failure can be reproduced. Save the following with each attempt:

Record field What to write down
Environment DGX Spark setup, container image or build source, and relevant package versions
Model artifact Repository, revision if available, and exact checkpoint or weight format
Loading path Quantization options, placement settings, and whether loading completed
Training configuration Sequence length, batch settings, LoRA rank, checkpointing status, and sample characteristics
Failure evidence Stage, peak memory if measured, last visible log line, and complete error summary
Change from prior run The single variable changed and the observed result

A compact record prevents a common troubleshooting loop: changing the image, checkpoint, and training settings together, then not knowing which change affected the outcome. If an exact peak memory value is unavailable, mark it as unmeasured rather than estimating it. Do not turn a single successful or failed run into a claim about general success rates or training duration.

Can Unsloth run gpt-oss-120b QLoRA on DGX Spark? The Unsloth guide documents a 4-bit QLoRA route and an approximate unified-memory requirement for its setup. That supports trying the documented path; it does not establish that every checkpoint, container build, or set of training parameters will work. A reproducible local run is the evidence that matters for a specific environment.

When a workload needs a machine occupied continuously, first confirm that the current environment can complete the intended run and inspect actual availability and pricing before making a rental decision. The mbpscloud DGX Spark checkout page is the place to verify whether a matching configuration is currently listed; we do not infer a configuration, price, or rental period from this guide. Billing terms should likewise be checked on the mbpscloud billing information page.

For the adjacent CPU-side work—dataset staging, preprocessing, transcoding, or collection—mbpscloud’s direct-NVMe AMD bare-metal servers, monthly rental, and unmetered traffic may fit a sustained pipeline. That is a different role: an AMD EPYC physical server is not a DGX Spark and should not be presented as a CUDA training device. Shared cloud instances can introduce resource contention or variable billing, while a local DGX Spark avoids uploading the working dataset but still requires a verified software and memory path. Choose the dedicated AMD server only for the CPU-side workload it can actually serve; keep gpt-oss-120b QLoRA on a verified CUDA-capable system.

Run Your Next QLoRA Test on a Dedicated DGX Spark

Rent a dedicated DGX Spark from mbpscloud for $16.5 per day and reproduce your workload on a single system.

Configure an Mbps Dedicated Server View Mbps rental pricing

Clear paths to configuration and access

Rental pricing lists the hardware and options, while the connection guide explains SSH and RDP access after delivery.