Repository navigation
Report: the arm64 Studio Docker image runs llama.cpp on the CPU on a DGX Spark (no code changes) - #10491
Report: the arm64 Studio Docker image runs llama.cpp on the CPU on a DGX Spark (no code changes)#10491danielhanchen wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Follow-ups from this report:
Still open: whether to route Spark users to |
…onical docs link (#10492) * Docker Hub README: xformers is amd64 only, GB10 runs through PTX, canonical docs link The Hub page claimed xformers in every image; the arm64 images carry none because there is no cu128 aarch64 wheel. It also listed GB10 among the compiled targets while TORCH_CUDA_ARCH_LIST stops at 12.0+PTX, so sm_121 runs through PTX JIT. The docs link now points at the canonical Docker page. Reported in #10491. * Docker Hub README: GB10 runs sm_120 SASS through forward compatibility, only JIT paths need CUDA 13
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The red check on this PR is It was not a failure. The job log shows rust extraction completing normally: it found Why it was cancelled. The run was created at Not pre-existing, and not supersession. It cannot be re-run. This is CodeQL default setup ( The only way to clear it is a new commit, and this PR is deliberately an empty diff, so there is nothing to push. Nothing is blocked. Reopening would fire roughly two dozen workflows into an already saturated queue to turn a cosmetic red green on a PR that gates nothing, so it is not worth it. The durable fix is unrelated to this PR: the Actions queue is oversubscribed enough to push a default-setup CodeQL run past its deadline while it waits, and rust is always the job that pays for it. |
|
checked the amd64 side of this on docker desktop (windows, rtx 5060 ti), cant do the arm64 half without a spark. leaving an update, will test more later
|
|
Reconciling this report against what has actually shipped since. Keeping the PR open deliberately: two of the four items are still open and this is the tracker for them. 1. CPU-only llama.cpp in the arm64 Studio layer: fixed and published
That build cannot ship without the CUDA bundle, because So the whiteouts this report found ( 2. Spark image strategy: still openNothing merged decides which image a Spark user should be pointed at. 3. The 404 documentation link: fixed and live on Hub
The published description is otherwise identical to 4. Missing xformers and flash-attn on arm64: still open
Summary
Leaving this open as the tracker for items 2 and 4. |
Empty diff. This is a report on running the published
unsloth/unslothimages on a DGX Spark, followingdocker/DOCKERHUB.mdas written. Two machines, GB10 / sm_121a / aarch64, driver 580.173.02, CUDA 13, 121.69 GiB unified. All runtime work on one node under a GPU lock; images and containers cleaned up afterwards.The headline: the arm64
latestandstudioimages ship a CPU-only llama.cpp, and Studio does not say soFour independent proofs, in order of how hard they are to argue with.
find / -name "libggml-cuda*"insidelatestreturns nothing.corehas it, 206 MB.latest's ownUNSLOTH_PREBUILT_INFO.jsonreadsbackend: cpu,supported_sms: [],force_cpu: false. Nobody asked for CPU; it is what shipped.llama-server --list-deviceswith--gpus all:coreprintsCUDA0: NVIDIA GB10,latestprintsAvailable devices: (none).-ngl 99, both images:coreholds 1524 MiB on the GPU and runs at 135.35 tok/s;latestshows no GPU process at all and runs at 60.54 tok/s. A 2.2x loss.Hardware detected: CUDA -- NVIDIA GB10, returns"backend": "cuda"from its API, reportsGPUs free: [(0, 81760)], selects GPU 0 and passes-ngl -1. The engine it then launches takes zero GPU memory. A real chat generated 128 tokens with GPU utilisation flat at 0 percent across 25 consecutive samples.So on the tag the README points most users to, GGUF inference and Studio chat on a Spark run on the CPU while the UI reports CUDA. It is silent, which is the part that makes it worth fixing rather than documenting.
The mechanism is visible in the layers:
core's base records"platform": "linux-arm64-cuda","bundle_profile": "cuda13-portable",supported_smsincluding121, all correct. The Studio layer then installs alinux-arm64-cpubundle over the same path and carries explicit whiteouts foropt/unsloth/llama.cpp/.wh.libggml-cuda.soandbuild/bin/.wh.libggml-cuda.so, leaving onlylibggml-cpu-armv8*andarmv9*.Dockerfile.studioline 84 comments that build time "would land on cpu/cu126". Training is unaffected.What does work
coreGPU detection:sm_121 bf16=True, torch reportsNVIDIA GB10at capability(12,1), andmem_get_infogives the correct 121.69 GiB total even thoughnvidia-smi --query-gpu=memory.*returns[N/A]on this part, which is a property of the hardware rather than a container fault.Llama3.2_(1B_and_3B)-Conversational.ipynbran end to end under nbconvert, 21 cells, 0 errors, the 3B model doing 60 steps in 17.87 minutes at 5110 MiB resident, with correct inference afterwards.docker run.cuda-nvrtc-13-0andcuda-nvcc-13-0, andentrypoint.sh'sselect_cuda_jit_tools()matches compute capability 12.1 and switches to CUDA 13 ptxas andlibnvrtc.so.12.cu13. Two things I expected to break did not:NVIDIA_REQUIRE_CUDAstopping atdriver<566does not block on driver 580, andinstall_nvidia_toolkit.shis not needed for--gpus all, since the container hook works without thenvidiaruntime being registered with the daemon.dgxspark-latestexists, is better here, and nothing points to itIt is arm64-only, built
TORCH_CUDA_ARCH_LIST=12.1a, so native sm_121a rather than PTX JIT, plusPYTORCH_CUDA_ALLOC_CONF=expandable_segments:True. The same 5-step LoRA ran roughly 3x faster per step than oncore, 0.08 s against 0.24 s. Indicative rather than a benchmark, but the direction is not subtle.The string
dgxsparkappears zero times inDOCKERHUB.mdand zero times in the 1.77 MB docs export. The DGX Spark blog page tells readers to build their own image fromnvcr.io/nvidia/pytorch:25.09-py3instead. So a Spark user has three published routes and none of them is the Spark image that already exists on the registry. It is also about seven months behindlatest(pt2.10.0 and transformers 4.57.1 against 2.11 and 5.5.0).Two rough edges on that tag: its entrypoint ignores an appended command, so a container sat up for 15 minutes doing nothing, and it runs as uid 1001, which makes the documented cache mount fail.
Smaller findings
coreorlatest. Both raiseModuleNotFoundError, and Unsloth's own banner printsFA [Xformers = None. FA2 = False]. The README lists xformers in every image.dgxspark-latesthas xformers 0.0.33.post1 and flash_attn 2.7.4.post1.TORCH_CUDA_ARCH_LISTtops out at12.0+PTX, so sm_121 runs by PTX JIT and never a native cubin. The README's "Compiled for ... GB10 (DGX Spark)" overstates that.UNSLOTH_SKIP_NOTEBOOK_SYNC=1. Every notebook's first cell then runs!pip install unslothover the image's pinned venv.DOCKERHUB.mdredirects to a 404 (docs.unsloth.ai/get-started/install-and-update/docker), so the Hub README is the only working guide.latestandstudioare byte-identical, indexsha256:981740e0..., arm64 childsha256:967df570..., 13.1 GB over 41 layers.coreissha256:12bbd7c0..., 7.8 GB over 20 layers, and those 20 are exactly the first 20 oflatest. Both configs reportarchitecture: arm64.latestalso carries a second, divergent Studio venv: same torch and transformers, but TRL 0.23.1 and PEFT 0.18.1 against the main venv's 0.24.0 and 0.20.0.Suggested order of fixing
dgxspark-latest, or fold its12.1aarch and its xformers and flash-attn into the generic arm64 image and retire the separate tag. Three published routes and none of them the right one is the real problem.Happy to re-run any of this, or to test a fix on this hardware.