Skip to content

feat(inference): qualify llama.cpp on generic NVIDIA GPUs - #8615

Merged
cv merged 25 commits into
mainfrom
feat/llamacpp-generic-gpu-e2e-8144
Aug 8, 2026
Merged

feat(inference): qualify llama.cpp on generic NVIDIA GPUs#8615
cv merged 25 commits into
mainfrom
feat/llamacpp-generic-gpu-e2e-8144

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add one declarative Linux amd64 NVIDIA GPU preset for the existing Nemotron llama.cpp recipe and qualify it through a dedicated live E2E lane. The test uses the real installer and proves full GPU offload, authenticated host and sandbox inference, an OpenClaw agent turn, and owned-resource teardown.

Support remains experimental. The exact-head RTX PRO 6000 run must pass before merge.

Related Issue

Refs #8144

Changes

  • Add the explicit generic-NVIDIA-GPU Nemotron llama.cpp YAML preset.
  • Let the existing recipe select exactly one hardware preset from current host readiness so the new preset can coexist with the DGX Spark preset.
  • Add a dedicated live GPU E2E target and the workflow/test validation needed to execute it against the exact PR head.
  • Keep model, image, runtime, and serving values authoritative in the existing recipe plus the new YAML preset.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This slice adds an experimental qualification setting and test only; it does not activate or document support.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Exact-head live NVIDIA GPU qualification and maintainer review are required before merge.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — catalog compilation/check plus managed selection, catalog loading, GPU bridge, workflow, and invocation tests: 119 passed; the dedicated live test is collected by the e2e-live project.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Additional validation:

  • npm run validate:pr: passed at 0bdd8082a6485c17eca6ecb51370e266be20ce65.
  • Exact-head NVIDIA GPU E2E: pending; this PR must not merge until its qualification artifact is reviewed.

Signed-off-by: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • New Features

    • Added an experimental, explicit-only llama.cpp serving option for Nemotron 3 Nano 30B-A3B on a single Linux NVIDIA GPU.
    • Added managed llama.cpp deployment and validation for generic NVIDIA GPU systems.
    • Added comprehensive live checks for installation, GPU offload, model availability, API health, authentication, and inference.
  • Bug Fixes

    • Improved preset selection to detect and clearly reject ambiguous matches.
    • Added compatibility handling for GPU environments and architecture naming variations.

Add a declarative Linux amd64 NVIDIA GPU preset.

Exercise the managed llama.cpp installer through exact-head live E2E coverage. Refs #8144.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds a generic Linux amd64 NVIDIA llama.cpp preset, explicit host-aware preset selection, a dedicated GPU qualification test, and workflow validation and orchestration.

Changes

Generic NVIDIA GPU llama.cpp

Layer / File(s) Summary
Preset and host selection
managed-inference/presets/..., src/lib/inference/llama-cpp/..., src/lib/inference/serving/...
Adds the Nemotron serving preset, normalizes x64 architecture matching, and validates explicit preset resolution against host readiness. Ambiguous matches include all matching preset IDs.
Generic GPU qualification flow
test/e2e/live/..., test/e2e/support/...
Adds conditional GPU bootstrapping and a live test covering installation, runtime metadata, GPU offload, APIs, sandbox routing, agent inference, evidence, and cleanup.
Dedicated workflow integration
.github/workflows/e2e.yaml, tools/e2e/..., test/e2e/mock-parity.json
Adds the dedicated GPU job, artifact handling, lane coordination, workflow-boundary checks, parity mapping, and a workflow test timeout.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as llama-cpp-generic-gpu job
  participant LiveTest as llama-cpp-generic-gpu.test.ts
  participant Installer as managed llama.cpp installer
  participant Runtime as llama.cpp runtime
  participant Sandbox as OpenShell sandbox
  Workflow->>LiveTest: run generic GPU qualification
  LiveTest->>Installer: install managed llama.cpp
  Installer->>Runtime: create managed runtime
  LiveTest->>Runtime: validate GPU offload and APIs
  LiveTest->>Sandbox: route chat and agent inference
  Sandbox-->>LiveTest: return inference results
  LiveTest->>Runtime: destroy managed resources
Loading

Possibly related PRs

  • NVIDIA/NemoClaw#8448: Both changes modify managed llama.cpp preset selection and catalog integration.

Suggested labels: area: inference, v0.0.105

Suggested reviewers: cv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: qualifying llama.cpp on generic NVIDIA GPUs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/llamacpp-generic-gpu-e2e-8144

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit e219f37 in the feat/llamacpp-generi... branch remains at 96%, unchanged from commit a816474 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit e219f37 in the feat/llamacpp-generi... branch remains at 81%, unchanged from commit a816474 in the main branch.

Show a code coverage summary of the most impacted files.
File main a816474 feat/llamacpp-generi... e219f37 +/-
src/lib/onboard...shared-state.ts 90% 73% -17%
src/lib/onboard.../docker-spec.ts 74% 65% -9%
src/lib/onboard...strap/docker.ts 72% 64% -8%
src/lib/onboard...ne-authority.ts 91% 84% -7%
src/lib/onboard...cker-journal.ts 75% 70% -5%
src/lib/onboard...ed-lifecycle.ts 79% 77% -2%
src/lib/onboard...an-lifecycle.ts 79% 95% +16%
src/lib/onboard...idge-process.ts 0% 47% +47%
src/lib/onboard...ivate-bridge.ts 0% 68% +68%
src/lib/onboard...test-support.ts 0% 100% +100%

Updated August 08, 2026 17:08 UTC

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/e2e.yaml:
- Line 1984: The workflow uses the unregistered custom runner label
linux-amd64-gpu-rtxpro6000-latest-1. Register this label in the repository’s
actionlint configuration, or replace the runs-on value with an already
registered runner label while preserving the required GPU runner selection.

In `@docs/inference/choose-inference-provider.mdx`:
- Line 65: Update the managed llama.cpp description at the earlier
provider-support table entry to mention both supported experimental hardware
presets: DGX Spark and Linux amd64 NVIDIA GPU hosts. Preserve the existing
caveat that support is experimental and limited to these explicit presets,
keeping the descriptions at the other table entries consistent.

In `@test/e2e/live/llama-cpp-generic-gpu.test.ts`:
- Around line 136-143: Remove the three inline precondition if-statements from
the test body. Move the recipe, preset, and model-file validation into a focused
helper outside the test, or express the conditions through the appropriate
Vitest conditional API while keeping the test body linear.
- Around line 198-207: Update the Docker inspection assertions in the live
llama-cpp E2E test to parse the successful inspect result and verify the running
container’s Config.Image equals recipe.spec.runtime.image. Preserve the existing
exit-code assertion and real Docker boundary, using the inspect payload rather
than only checking command success.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9588dcda-aa5c-4362-998a-3407c9e6015c

📥 Commits

Reviewing files that changed from the base of the PR and between a76e297 and 85c23cf.

📒 Files selected for processing (19)
  • .github/workflows/e2e.yaml
  • docs/inference/choose-inference-provider.mdx
  • docs/inference/choose-local-inference-server.mdx
  • docs/inference/set-up-llama-cpp.mdx
  • docs/reference/commands.mdx
  • managed-inference/presets/llama-cpp.linux-amd64-nvidia.single.nemotron-3-nano-30b-a3b.yaml
  • src/lib/inference/llama-cpp/managed-selection.test.ts
  • src/lib/inference/llama-cpp/managed-selection.ts
  • src/lib/inference/serving/catalog-loader.test.ts
  • src/lib/onboard/provider-menu.ts
  • test/e2e/README.md
  • test/e2e/live/gpu-e2e-helpers.ts
  • test/e2e/live/gpu-e2e.test.ts
  • test/e2e/live/llama-cpp-generic-gpu.test.ts
  • test/e2e/mock-parity.json
  • test/e2e/support/e2e-workflow.test.ts
  • test/e2e/support/gpu-e2e-helpers.test.ts
  • tools/e2e/cli-artifact-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

llama-cpp-generic-gpu:
needs: generate-matrix
if: ${{ (github.event_name != 'workflow_dispatch' || (inputs.jobs == '' && inputs.targets == '')) || contains(format(',{0},', inputs.jobs), ',llama-cpp-generic-gpu,') || contains(format(',{0},', inputs.targets), ',llama-cpp-generic-gpu,') }}
runs-on: linux-amd64-gpu-rtxpro6000-latest-1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Register the custom runner label with actionlint.

linux-amd64-gpu-rtxpro6000-latest-1 is a custom label. Actionlint reports it as unknown. Add the label to the repository actionlint configuration, or use a registered runner label.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 1984-1984: label "linux-amd64-gpu-rtxpro6000-latest-1" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/e2e.yaml at line 1984, The workflow uses the unregistered
custom runner label linux-amd64-gpu-rtxpro6000-latest-1. Register this label in
the repository’s actionlint configuration, or replace the runs-on value with an
already registered runner label while preserving the required GPU runner
selection.

Source: Linters/SAST tools

| Local vLLM managed install | The host matches a supported GPU profile and any required opt-in is present. | [Set Up vLLM](../local-inference/set-up-vllm) |
| Local llama.cpp already running | You explicitly select an authenticated server on loopback port `8081`. | [Set Up llama.cpp](../local-inference/set-up-llama-cpp) |
| Local llama.cpp managed install | A qualified DGX Spark host satisfies the declarative recipe requirements. | [Set Up llama.cpp](../local-inference/set-up-llama-cpp) |
| Local llama.cpp managed install | A DGX Spark or Linux `amd64` NVIDIA GPU host matches one explicit experimental hardware preset. | [Set Up llama.cpp](../local-inference/set-up-llama-cpp) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the provider-support table consistent with the new host scope.

Line 65 and Line 75 advertise managed llama.cpp on Linux amd64 NVIDIA GPU hosts. Line 32 still describes the managed option as DGX Spark-only. Update Line 32 to describe both explicit presets. Keep the experimental and unqualified-status caveat if it remains current.

Proposed documentation correction
-| Local llama.cpp (managed DGX Spark) | Experimental | Local OpenAI-compatible | ... qualified DGX Spark host. |
+| Local llama.cpp (managed NVIDIA GPU) | Experimental | Local OpenAI-compatible | ... DGX Spark or Linux `amd64` NVIDIA GPU host matching one explicit hardware preset. |

Also applies to: 75-75

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/inference/choose-inference-provider.mdx` at line 65, Update the managed
llama.cpp description at the earlier provider-support table entry to mention
both supported experimental hardware presets: DGX Spark and Linux amd64 NVIDIA
GPU hosts. Preserve the existing caveat that support is experimental and limited
to these explicit presets, keeping the descriptions at the other table entries
consistent.

Comment thread test/e2e/live/llama-cpp-generic-gpu.test.ts Outdated
Comment thread test/e2e/live/llama-cpp-generic-gpu.test.ts
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · medium confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 1 blocker · 2 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections match; Nemotron reported 1 more blocker, 2 more warnings, the same number of suggestions.
6 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • private sandbox bridge at src/lib/onboard/runtime-provider/docker-llama-cpp-managed-lifecycle.ts:1022: selected only by the second-opinion lane as justified.
  • Docker llama.cpp private bridge at src/lib/onboard/runtime-provider/docker-llama-cpp-private-bridge.ts:40: selected only by the second-opinion lane as justified.
  • private bridge at src/lib/onboard/runtime-provider/docker-llama-cpp-private-bridge-process.ts:42: selected only by the second-opinion lane as justified.
  • private loopback bridge at src/lib/onboard/runtime-provider/docker-llama-cpp-managed-lifecycle.ts:1002: selected only by the second-opinion lane as justified.
  • generic GPU at .github/workflows/e2e.yaml:1981: selected only by the second-opinion lane as conflict.
  • host bridge port at src/lib/inference/llama-cpp/host-local-runtime.ts:85: selected only by the second-opinion lane as justified.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — private bridge at src/lib/onboard/runtime-provider/docker-llama-cpp-private-bridge.ts:221: Keep "private bridge". Its modifier identifies the restricted listener topology.
  • justified — generic NVIDIA GPU at .github/workflows/pr-self-hosted.yaml:84: Keep "generic NVIDIA GPU" where the distinction from DGX Spark hardware matters.
  • justified — dedicated lane at test/e2e/live/gpu-e2e.test.ts:42: Keep "dedicated lane" in this comment because it distinguishes the separate E2E target from the compatibility path.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: cloud-inference, cloud-onboard, managed-image-multiarch-startup, managed-image-protected-runtime, security-posture, gpu-e2e, inference-routing, network-policy, onboard-repair, onboard-resume

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@copy-pr-bot

copy-pr-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread test/e2e/support/gpu-e2e-helpers.test.ts Fixed
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa
ericksoa force-pushed the feat/llamacpp-generic-gpu-e2e-8144 branch from 743c375 to e219f37 Compare August 8, 2026 16:56
@ericksoa

ericksoa commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test e219f37

@cv
cv merged commit 9f7c4a4 into main Aug 8, 2026
66 of 67 checks passed
@cv
cv deleted the feat/llamacpp-generic-gpu-e2e-8144 branch August 8, 2026 18:58
@github-actions github-actions Bot added the v0.0.106 Release target label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.106 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants