StackLens AI: Evidence-Grounded GPU & CUDA Diagnostics
Diagnose GPU configuration problems with deterministic evidence and NVIDIA Nemotron reasoning powered by Nebius Token Factory.
Inspiration
AI development depends on more than powerful GPUs. It depends on a software stack where NVIDIA drivers, CUDA toolkits, runtime libraries, and environment variables work together.
When something breaks, developers can spend hours running terminal commands, checking compatibility documentation, and investigating conflicting dependencies. A single driver incompatibility or incorrect CUDA path can prevent machine learning workloads from running correctly.
While working on AI and systems software projects, I became interested in solving this infrastructure problem. I wanted a tool that could inspect the actual environment, identify supported compatibility findings, and explain what developers should investigate next.
General-purpose AI assistants can provide troubleshooting advice, but they do not necessarily have verified information about the user's machine.
That motivated StackLens AI: an AI-assisted diagnostic system where observed evidence comes first and generated explanations come second.
What It Does
StackLens AI is an open-source GPU and CUDA environment diagnostics platform built with Rust, Python, and NVIDIA Nemotron through Nebius Token Factory.
It helps developers understand GPU software configuration problems through three connected stages:
- Observe: Collect environment information using an offline-first Rust CLI.
- Detect: Apply deterministic compatibility rules to identify supported findings.
- Explain: Use NVIDIA Nemotron to interpret those findings and recommend safe verification steps.
The current implementation focuses on:
- NVIDIA driver and CUDA compatibility
- Conflicting CUDA environment selectors
- Multiple CUDA runtime-library candidates
- NVIDIA kernel-module and userspace driver mismatches
Each diagnostic finding includes a rule identifier, severity, interpretation, supporting evidence, and recommended verification guidance.
The key design principle is that the language model does not determine whether a compatibility rule has failed. That decision comes from the deterministic engine.
Nemotron helps explain the result, while the application checks generated references against known findings and restricts proposed verification actions.
How I Built It
1. Offline System Inspection with Rust
The original StackLens project is a modular Rust command-line toolkit for GPU and AI runtime inspection.
It uses components for system information, NVIDIA driver discovery, CUDA inspection, snapshot generation, and comparison.
The collector examines information available through Linux system interfaces and tools such as nvidia-smi and nvcc.
Collected information is represented as structured, versioned JSON snapshots. Developers can preserve snapshots and compare environments before and after software changes.
The Rust collector remains independently usable without the AI backend or a cloud connection.
2. Deterministic Diagnostics with Python
For the hackathon, I built a Python diagnostic engine that consumes StackLens snapshots and evaluates explicit compatibility rules.
The engine checks relevant evidence against locally maintained compatibility thresholds and configuration conditions.
For example, it can flag a driver branch that falls below the documented CUDA major-family compatibility threshold encoded by the rule.
Rather than returning a generic error message, the engine generates structured findings containing:
- Stable rule IDs
- Severity levels
- Observed evidence
- Human-readable interpretations
- Recommended verification steps
Not every suspicious configuration is treated as a confirmed failure. Multiple CUDA installations or conflicting paths may require further investigation without proving that an application will fail.
3. NVIDIA Nemotron via Nebius Token Factory
The AI explanation layer uses:
Model: nvidia/nemotron-3-super-120b-a12b
Inference platform: Nebius Token Factory
After deterministic analysis, StackLens AI prepares a reduced evidence package and requests a contextual explanation from Nemotron.
The application validates model-generated finding references and restricts suggested follow-up actions to approved checks.
This prevents the model from introducing arbitrary diagnostic commands through the application's recommendation workflow. Generated commands are displayed for user review and are not automatically executed.
Live inference has been tested successfully on the deployed application.
The outdated-driver demonstration produced the expected CUDA-DRIVER-0001 finding, and Nemotron explained the observed driver compatibility issue.
A second live test used conflicting CUDA paths and produced explanations for two findings: CUDA-PATH-0001 and CUDA-RUNTIME-0001.
These tests demonstrated that the system can combine rule-based diagnosis with real model-generated explanations while keeping the underlying findings separate from the LLM.
4. Interactive Diagnostic Workspace
I developed a responsive web application using HTML, CSS, JavaScript, and a Python HTTP backend.
The dashboard allows developers to:
- Load representative GPU configuration scenarios
- Upload or paste StackLens JSON snapshots
- Run deterministic diagnostic checks
- Inspect findings and supporting evidence
- View AI-generated explanations
- Copy approved verification commands or guidance
- Inspect the model's availability and inference status
The interface separates Observed Evidence, Deterministic Findings, and AI Recommendations.
Three synthetic scenarios allow anyone to evaluate the workflow without needing an NVIDIA GPU or deliberately breaking a machine's software environment.
5. Deployment and Testing
StackLens AI is packaged as a Docker application and deployed on Render.
The Python backend integrates with Nebius Token Factory through a configurable API client.
Development and validation included:
- 96 passing Rust tests
- 41 passing Python tests
- Rust formatting and Clippy checks
- JavaScript syntax validation
- Offline diagnostic preflight tests
- HTTP endpoint and input validation tests
- Live hosted diagnostic scenarios
- Successful Nemotron inference tests through Nebius
The reported automated test results were obtained during local development. The live integration checks confirmed the deployed model workflow.
Challenges I Faced
Separating Evidence from AI Reasoning
The most important challenge was determining how to use an LLM without allowing it to invent the underlying technical diagnosis.
I solved this by keeping environment collection and compatibility rules independent of inference. Nemotron is used to explain findings rather than create the diagnostic verdict.
Handling Uncertainty
GPU environments can contain multiple toolkits, drivers, and runtime-library candidates. Such configurations may be unusual without necessarily being broken.
I designed the rule engine to distinguish strong incompatibility evidence from conditions requiring additional investigation.
Protecting Diagnostic Information
System snapshots may contain local paths, usernames, and environment details.
I implemented input validation, evidence minimization, and path-redaction controls to reduce what is sent to the model provider. The application does not automatically execute commands suggested by Nemotron.
Integrating Hosted Inference
The Nebius integration required handling credentials, inference availability, structured model responses, request limits, and provider errors.
I also designed the application to continue providing deterministic diagnostic findings if cloud inference is unavailable.
Building a Reproducible Demonstration
GPU configuration problems can be difficult to reproduce on demand.
I created synthetic snapshots representing specific compatibility issues so the application can be demonstrated consistently without requiring access to several differently configured GPU machines.
What I Learned
Building StackLens AI reinforced an important engineering lesson:
A reliable AI system should distinguish what it knows from evidence, what it infers through explicit rules, and what a model generates as an explanation.
I also learned that useful AI products need careful input validation, clearly communicated uncertainty, reproducible tests, and safe fallback behavior.
Integrating Nemotron into a deterministic workflow helped me explore how language models can make technical diagnostics more understandable without replacing conventional systems engineering.
What I Built During the Hackathon
StackLens existed before the hackathon as my independent Rust-based GPU environment inspection project.
During the Nebius x NVIDIA Global AI Hackathon submission period, I significantly extended it with:
- A Python compatibility diagnostic engine
- Structured findings and severity classifications
- NVIDIA Nemotron integration through Nebius Token Factory
- Evidence-grounded explanation validation
- Approved verification-command restrictions
- Snapshot redaction and input-validation controls
- Rate limiting and inference call budgeting
- A responsive web diagnostics dashboard
- Three reproducible diagnostic scenarios
- Docker deployment and CI testing
- A publicly accessible live application
These additions extend the original offline inspection toolkit into an interactive, AI-assisted GPU troubleshooting application.
What's Next
StackLens AI is still an evolving developer tool.
Future improvements include:
- Expanding CUDA compatibility coverage and diagnostic rules
- More detailed ELF shared-library dependency analysis
- PyTorch and CUDA extension compatibility checks
- Improved before-and-after environment comparisons
- Broader testing across real NVIDIA GPU environments
- Additional evidence validation and diagnostic reporting
The long-term goal is to make StackLens a practical open-source tool for understanding and troubleshooting GPU software environments.
Try StackLens AI
Live Demo: https://stacklens-ai.onrender.com/
GitHub Repository: https://github.com/Mukesh-SCS/stacklens_ai
License: Apache License 2.0
Hackathon Track: Best Apps and Agents
Built for the Nebius x NVIDIA Global AI Hackathon 2026.
Log in or sign up for Devpost to join the conversation.