A complete package that provides you with all the components needed to get started of dive deeper into Machine Learning Workloads on Consumer AMD cards, providing CUDA functionality through fully leveraging HIP and ROCm!
Rust
54
390 commits
updated Aug 24, 2026
Rusty Stack is a comprehensive machine learning environment optimized for AMD GPUs. It provides a complete set of tools and libraries for training and deploying machine learning models, with a focus on large language models (LLMs) and deep learning.
Formerly known as "Stan's ML Stack", this project has been fully migrated to Rusty Stack β a native Rust CLI and TUI installer that replaces the original shell scripts and Python UIs. The primary package is published on crates.io as rusty-stack, enabling cargo install rusty-stack --locked. The Python package (Rusty-Stack) remains available on PyPI as a compatibility wrapper. See MIGRATION.md for the complete migration guide.
This stack is designed to work with AMD's ROCm platform, providing CUDA compatibility through HIP, allowing you to run most CUDA-based machine learning code on AMD GPUs with minimal modifications.
For a detailed guide to help you get started from the ground up, head over to Beginners Guide and you'll find all the resources you need!
π 2.10Γ TurboQuant prefill speedup on MoE models Β· 153 t/s decode on RX 7900 XTX
Rusty Llama is our optimized llama.cpp runtime featuring TurboQuant compression, RDNA3 WMMA flash attention, pre-built binary distribution for AMD GPUs, and Rusty Stack-enforced CUDA isolation. Benchmarked on real hardware β see docs/BENCHMARK_RESULTS.md for full results.
Rusty Llama installation is only supported through Rusty Stack. The installer explicitly configures GGML_HIP=ON, GGML_CUDA=OFF, GGML_VULKAN=OFF, and GGML_METAL=OFF, validates CMakeCache.txt, warns when NVIDIA toolkits are present, and rejects binaries that do not show ROCm/HIP linkage.
Docs: https://github.com/scooter-lacroix/rusty-llama-docs
Install Rusty Stack first with cargo install rusty-stack --locked, then install Rusty Llama with rusty update llama-cpp.
Windows support is in ALPHA testing. We are openly accepting testers! The easiest way to become a tester is to test on your system/hardware, and when issues are encountered, open an issue following the issue template.
This stack has been tested and optimized for the following hardware:
RDNA 4
RDNA 3
RDNA 2
Rusty Stack (Stan's ML Stack) is now part of the Kilo OSS Sponsorship Program. Your support helps maintain and optimize this stack for the AMD GPU community!
The ML Stack consists of the following core components:
| Component | Description | Version |
|---|---|---|
| ROCm | AMD's open software platform for GPU computing | 7.2.4 |
| PyTorch | Deep learning framework with ROCm support | 2.13.0+rocm7.2 |
| ONNX Runtime | Cross-platform inference accelerator | 1.23.2 |
| MIGraphX | AMD's graph optimization library | 7.2.4 |
| Flash Attention (Triton) | High-performance Triton-based kernels | 2.8.4 |
| Flash Attention CK | Composable Kernel variant (Pre-release) | Latest |
| RCCL | ROCm Collective Communication Library | Latest |
| MPI | Message Passing Interface for distributed computing | Open MPI 5.0.10 |
| Megatron-LM | Framework for training large language models | Latest |
Rusty installs the distribution's RCCL package normally. On systems with at least two discrete AMD GPUs, it then runs a real two-process PyTorch all_reduce probe across both GPUs. Remediation triggers only when that probe matches known ROCm/RCCL collective failure fingerprints: operation cannot be performed in present state (ROCm issue #6074) or the distributed invalid device pointer/ncclUnhandledCudaError form seen from RCCL 2.27.7. Other failures remain visible instead of being masked.
For the matching failure, Rusty selects a repair profile by ROCm channel and version. The current latest/ROCm 7.2.x profile builds a pinned RCCL source commit for every detected gfx architecture with checksum-pinned ROCm 7.2.0 compiler and HIPIFY tools extracted into Rusty's cache. This path invokes no apt, dnf, or other package install and adds no NVIDIA/CUDA dependencies. The result is an immutable, versioned overlay under ~/.mlstack/components/rccl/, activated with an atomic symlink.
The activation shim dynamically locates PyTorch, verifies the overlay manifest and library hash before torch imports, then uses the glibc loader with inhibited PyTorch RPATHs, not LD_PRELOAD. It never modifies or replaces PyTorch or files under /opt/rocm. A valid active overlay is sealed against later component installs; replacement requires the explicit MLSTACK_UNSEAL_CORE=1 recovery override. Installation completes only after the two-process probe passes on both GPUs.
For the 7.2.x repair profile, Rusty also exports NCCL_P2P_DISABLE=1/RCCL_P2P_DISABLE=1 with the overlay. This avoids the broken direct P2P/IPC path seen on mixed consumer RDNA multi-GPU systems while preserving two-GPU collectives through the working shared-memory/socket path.
| Component | Description | Version |
|---|---|---|
| Triton | Compiler for parallel programming | 3.7.0 |
| BITSANDBYTES | Efficient quantization for deep learning models | 0.49.2 |
| vLLM | High-throughput inference engine for LLMs | 0.16.0 |
| vLLM Studio | Web UI for vLLM model management and deployment | Latest |
| ROCm SMI | System monitoring and management for AMD GPUs | Latest |
| ComfyUI | Node-based UI for AI image generation with ROCm support | Latest |
| DeepSpeed | Optimized training for large models with AMD GPU support | 0.18.6 |
| PyTorch Profiler | Performance analysis for PyTorch models | Latest |
| Weights & Biases | Experiment tracking and visualization | 0.26.1 |
The Rusty Stack engine is organized into five layered modules that handle the full component lifecycle β from detection through planning, execution, verification, and reporting.
rusty-stack/src/
βββ core/ # Shared types, manifest schema, validation state machine
βββ platform/ # Hardware/distro detection, component registry, environment normalization
βββ orchestrator/ # Update planner, apply engine, verify runner, upgrade orchestration
βββ adapter/ # Adapter registry with Rust and legacy script executors
βββ telemetry/ # Stability benchmark, anonymous payload, HTTPS submission, opt-in gate
| Module | Files | Description |
|---|---|---|
core/ | types.rs, manifest.rs, validation.rs, plan.rs, verification.rs, telemetry_types.rs | Shared types, manifest schema with baseline + remote overlay + fallback chain, validation state machine (validated β candidate β experimental β blocked), plan/verification/telemetry types |
platform/ | detection.rs, linux.rs, windows.rs, wsl.rs, registry.rs, environment.rs, path_bridge.rs, service.rs, control_shell.rs | Hardware detection, distro detection, component registry, environment normalization, Windows/WSL2 support with path bridging and service management |
orchestrator/ | planner.rs, apply.rs, verify.rs, upgrade.rs, migration.rs | Update planner with risk classification (safe/guarded/blocked), apply engine with dependency-safe execution ordering and failure isolation, verify runner, upgrade orchestration, shell parity migration logic |
adapter/ | mod.rs, rust_adapter.rs, legacy_adapter.rs | Adapter registry with Rust-native and legacy script executors, enabling gradual migration from shell to Rust |
telemetry/ | benchmark.rs, payload.rs, submit.rs, opt_in.rs | 180-second stability benchmark, anonymous payload construction, HTTPS submission client with fire-and-forget, opt-in gate |
Rusty Stack exposes a unified rusty CLI with subcommands:
# Interactive TUI installer (default)
rusty
# Component and manifest update (scan β plan β apply β verify)
rusty update [--scan-only] [--all-safe] [--include-experimental] [--json] [COMPONENT...]
# Rusty Stack application/runtime upgrade
rusty upgrade [--yes] [--dry-run]
# Installation verification
rusty verify --full # Full component verification
rusty verify --enhanced # Enhanced verification (all components)
rusty verify --build # Verify and rebuild failed components
# Stability benchmark runner
rusty bench --all # Run full benchmark suite
rusty bench --rocm # ROCm benchmarks
rusty bench --json <name> # JSON output for a specific benchmark
# Build the unified rusty CLI + TUI installer
cd rusty-stack && cargo build --release
# Run the full test suite
cargo test
# Run without TUI features
cargo check --no-default-features
# Windows cross-compilation
cargo build --target x86_64-pc-windows-msvc
Rusty Stack installer now offers three ROCm channels so you can balance stability against cutting-edge features:
You can select the desired channel directly from the interactive installer or pre-seed the choice via the INSTALL_ROCM_PRESEEDED_CHOICE environment variable (values: 1-3). See docs/MULTI_CHANNEL_GUIDE.md for helper scripts covering PyTorch, Triton, Flash Attention, vLLM, ONNX Runtime, MIGraphX, bitsandbytes, and RCCL.
The ML Stack provides several installation options to suit your needs.
cargo install rusty-stack --locked
rusty-stack
The recommended way to install Rusty Stack is using the crates.io package:
# Install from crates.io
cargo install rusty-stack --locked
# Launch the interactive TUI installer
rusty-stack
# Or use the CLI-only binary
rusty update --scan-only
This will:
The TUI provides a responsive, interactive experience with real-time feedback during the installation process.
Rusty-Stack includes an integrated benchmarking screen for ROCm, PyTorch, vLLM, DeepSpeed, Megatron-LM, and Flash Attention validation.
After installation:
E to export a full HTML benchmark report.E export behavior:
~/.mlstack/reports/benchmark_report_<timestamp>.html.This export is designed for performance validation, regression comparison, and shareable install verification evidence.
Install via PyPI only when you need the backward-compatible Python entrypoints. The PyPI package installs the matching crates.io rusty-stack binary through Cargo:
pip install Rusty-Stack
ml-stack-install
For direct use, prefer cargo install rusty-stack --locked.
Migrating from a legacy installer? See MIGRATION.md for the complete migration guide, including command mappings, architecture changes, and rollback instructions.
The Python curses-based installer is deprecated. Use the unified rusty CLI instead:
cd rusty-stack && cargo build --release
./target/release/rusty
The deprecated script is still available at scripts/install_ml_stack_curses.py for backward compatibility.
Note: This installer is deprecated. Please use the rusty CLI instead.
The Go-based installer in mlstack-installer/ is deprecated and no longer maintained.
If you prefer to install components manually, follow these steps:
Clone the repository:
git clone https://github.com/scooter-lacroix/Stan-s-ML-Stack.git
cd Stan-s-ML-Stack
Build the rusty CLI:
cd rusty-stack
cargo build --release
Run the TUI installer:
./target/release/rusty
Set up the environment:
source ~/.mlstack_env
For fish shell:
source ~/.mlstack_env
Verify the installation:
./target/release/rusty verify --full
β οΈ Docker support is deprecated and no longer maintained. We recommend using the Rust TUI installer or CLI instead.
The ML Stack includes a comprehensive environment setup script that automatically detects your hardware and configures the environment accordingly.
To set up the environment automatically:
# bash / zsh
source ~/.mlstack_env
# fish
source ~/.mlstack_env
The environment is configured during installation by the rusty CLI bootstrap module. This will:
~/.mlstack_env for bash/zsh, ~/.config/fish/conf.d/mlstack_env.fish for fish).bashrc / .config/fish/conf.d/)If you prefer to set up the environment manually, add the following to your .bashrc or .zshrc:
# ROCm Setup
export ROCM_PATH=/opt/rocm
export PATH=$PATH:$ROCM_PATH/bin:$ROCM_PATH/hip/bin
export LD_LIBRARY_PATH=$ROCM_PATH/lib:$ROCM_PATH/hip/lib:$ROCM_PATH/opencl/lib:$LD_LIBRARY_PATH
# GPU Selection
export HIP_VISIBLE_DEVICES=0,1 # Adjust based on your GPU count
export CUDA_VISIBLE_DEVICES=0,1 # Adjust based on your GPU count
export PYTORCH_ROCM_DEVICE=0,1 # Adjust based on your GPU count
# Performance Settings
export HSA_OVERRIDE_GFX_VERSION=11.0.0
export HSA_ENABLE_SDMA=0
export GPU_MAX_HEAP_SIZE=100
export GPU_MAX_ALLOC_PERCENT=100
export HSA_TOOLS_LIB=1
# CUDA Compatibility
export ROCM_HOME=$ROCM_PATH
export CUDA_HOME=$ROCM_PATH
# ONNX Runtime
export PYTHONPATH=/HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release:$PYTHONPATH
For fish shell, add the following to ~/.config/fish/config.fish:
# ROCm Setup
set -gx ROCM_PATH /opt/rocm
set -gx PATH $PATH $ROCM_PATH/bin $ROCM_PATH/hip/bin
set -gx LD_LIBRARY_PATH $ROCM_PATH/lib $ROCM_PATH/hip/lib $ROCM_PATH/opencl/lib $LD_LIBRARY_PATH
# GPU Selection
set -gx HIP_VISIBLE_DEVICES 0,1 # Adjust based on your GPU count
set -gx CUDA_VISIBLE_DEVICES 0,1 # Adjust based on your GPU count
set -gx PYTORCH_ROCM_DEVICE 0,1 # Adjust based on your GPU count
# Performance Settings
set -gx HSA_OVERRIDE_GFX_VERSION 11.0.0
set -gx HSA_ENABLE_SDMA 0
set -gx GPU_MAX_HEAP_SIZE 100
set -gx GPU_MAX_ALLOC_PERCENT 100
set -gx HSA_TOOLS_LIB 1
# CUDA Compatibility
set -gx ROCM_HOME $ROCM_PATH
set -gx CUDA_HOME $ROCM_PATH
# ONNX Runtime
set -gx PYTHONPATH /HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release $PYTHONPATH
Note: The rusty CLI bootstrap module generates both
~/.mlstack_env(bash/zsh) and~/.config/fish/conf.d/mlstack_env.fish(fish) automatically during installation. Manual setup is only needed if you're configuring the environment without using the installer.
To ensure environment variables and symlinks persist across system reboots, the rusty CLI bootstrap module handles this automatically during installation. The environment file is created at ~/.mlstack_env.
After installation, the environment will be automatically loaded on system boot, and all necessary symlinks will be created. You may need to log out and log back in for all changes to take effect.
Here's a description of the key environment variables:
| Variable | Description |
|---|---|
ROCM_PATH | Path to ROCm installation |
HIP_VISIBLE_DEVICES | Comma-separated list of GPU indices to use with HIP |
CUDA_VISIBLE_DEVICES | Comma-separated list of GPU indices to use with CUDA |
PYTORCH_ROCM_DEVICE | Comma-separated list of GPU indices to use with PyTorch |
HSA_OVERRIDE_GFX_VERSION | Override for GPU architecture version |
HSA_ENABLE_SDMA | Control SDMA usage (0 = disabled) |
GPU_MAX_HEAP_SIZE | Maximum heap size for GPU memory allocation |
GPU_MAX_ALLOC_PERCENT | Maximum percentage of GPU memory to allocate |
HSA_TOOLS_LIB | Enable HSA tools library |
ROCM_HOME | Path to ROCm installation (for compatibility) |
CUDA_HOME | Path to CUDA installation (set to ROCm path for compatibility) |
Issue: When running PyTorch or other ROCm applications, you may see a warning message: "Tool lib '1' failed to load".
Solution: This warning is harmless and doesn't affect functionality. It's related to ROCm's profiling tools. To fix it, set the following environment variable:
# bash / zsh
export HSA_TOOLS_LIB=1
# fish
set -gx HSA_TOOLS_LIB 1
Issue: Some applications fail because CUDA_HOME is not set, even though you're using ROCm.
Solution: For compatibility with CUDA-based applications, set CUDA_HOME to point to your ROCm installation:
# bash / zsh
export CUDA_HOME=/opt/rocm
# fish
set -gx CUDA_HOME /opt/rocm
Issue: Python reports that a module cannot be found, even though it's installed.
Solution: Check your PYTHONPATH and ensure it includes the necessary directories:
# bash / zsh
export PYTHONPATH=/path/to/module:$PYTHONPATH
# fish
set -gx PYTHONPATH /path/to/module $PYTHONPATH
For ONNX Runtime specifically:
# bash / zsh
export PYTHONPATH=/HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release:$PYTHONPATH
# fish
set -gx PYTHONPATH /HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release $PYTHONPATH
Issue: Applications cannot detect your AMD GPU.
Solution:
Ensure ROCm is properly installed
Check that your user is in the video and render groups:
sudo usermod -a -G video,render $USER
Set the appropriate environment variables:
# bash / zsh
export HIP_VISIBLE_DEVICES=0,1
export CUDA_VISIBLE_DEVICES=0,1
export PYTORCH_ROCM_DEVICE=0,1
# fish
set -gx HIP_VISIBLE_DEVICES 0,1
set -gx CUDA_VISIBLE_DEVICES 0,1
set -gx PYTORCH_ROCM_DEVICE 0,1
Issue: You encounter out of memory errors when running models.
Solution:
# bash / zsh
export GPU_MAX_HEAP_SIZE=100
export GPU_MAX_ALLOC_PERCENT=100
# fish
set -gx GPU_MAX_HEAP_SIZE 100
set -gx GPU_MAX_ALLOC_PERCENT 100
# bash / zsh
export PYTORCH_CUDA_ALLOC_CONF="max_split_size_mb:512"
export PYTORCH_HIP_ALLOC_CONF="max_split_size_mb:512"
# fish
set -gx PYTORCH_CUDA_ALLOC_CONF "max_split_size_mb:512"
set -gx PYTORCH_HIP_ALLOC_CONF "max_split_size_mb:512"
The ML Stack includes several diagnostic tools to help troubleshoot issues:
Run the enhanced verification via the rusty CLI:
./target/release/rusty verify --enhanced
This will:
Get detailed information about your ROCm installation and GPUs:
rocminfo
Monitor GPU usage and performance:
rocm-smi
Some components, like vLLM, don't officially support Python 3.13 yet. We've implemented workarounds to make them compatible.
We've created a custom version of vLLM that works with Python 3.13. Install via the rusty CLI:
./target/release/rusty
The vLLM installer:
ONNX Runtime needs to be built from source to support ROCm. The rusty CLI handles this automatically:
./target/release/rusty
The installer:
BITSANDBYTES shows CUDA setup warnings with ROCm, but still functions correctly. Install via the rusty CLI.
Some builds require ninja-build, but the executable might be named differently. Our scripts create the necessary symlinks:
sudo ln -sf /usr/bin/ninja /usr/bin/ninja-build
To verify that your ML Stack installation is working correctly:
# Using the unified rusty CLI
cd rusty-stack && cargo build --release
./target/release/rusty verify --full
# Or the enhanced verification
./target/release/rusty verify --enhanced
The custom verification script is designed to detect components installed in non-standard locations or with different module names. It's particularly useful for custom installations where components like Flash Attention, RCCL, or Megatron-LM are installed in different locations.
=== ML Stack Verification Summary ===
Core Components:
β ROCm: Successfully installed (version 7.2.4)
β PyTorch: Successfully installed (version 2.13.0+rocm7.2)
β ONNX Runtime: Successfully installed (version 1.23.2)
β MIGraphX: Successfully installed (version 7.2.4)
β Flash Attention: Successfully installed (version 2.8.4)
β RCCL: Successfully installed
β MPI: Successfully installed (version Open MPI 5.0.10)
β Megatron-LM: Successfully installed
Extension Components:
β Triton: Successfully installed (version 3.7.0)
β BITSANDBYTES: Successfully installed (version 0.49.2)
β vLLM: Successfully installed (version 0.16.0)
β ROCm SMI: Successfully installed
β ComfyUI: Successfully installed (ROCm edition)
β DeepSpeed: Successfully installed (version 0.18.6)
β PyTorch Profiler: Successfully installed
β Weights & Biases: Successfully installed (version 0.26.1)
To test your installation with a simple PyTorch example:
import torch
# Check if CUDA (ROCm) is available
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU count: {torch.cuda.device_count()}")
print(f"Current device: {torch.cuda.current_device()}")
print(f"Device name: {torch.cuda.get_device_name(0)}")
# Create a tensor on GPU
x = torch.ones(10, device='cuda')
y = x + 1
print(y)
Contributions to Rusty Stack are welcome! Please follow these steps:
Rusty Stack (formerly Stan's ML Stack) is licensed under the MIT License. See the LICENSE file for details.
If this code saved you time, consider supporting the project! β
Rust
46.5%
Shell
30.8%
Python
22.4%
A complete package that provides you with all the components needed to get started of dive deeper into Machine Learning Workloads on Consumer AMD cards, providing CUDA functionality through fully leveraging HIP and ROCm!
Rust
54
390 commits
updated Aug 24, 2026
Rusty Stack is a comprehensive machine learning environment optimized for AMD GPUs. It provides a complete set of tools and libraries for training and deploying machine learning models, with a focus on large language models (LLMs) and deep learning.
Formerly known as "Stan's ML Stack", this project has been fully migrated to Rusty Stack β a native Rust CLI and TUI installer that replaces the original shell scripts and Python UIs. The primary package is published on crates.io as rusty-stack, enabling cargo install rusty-stack --locked. The Python package (Rusty-Stack) remains available on PyPI as a compatibility wrapper. See MIGRATION.md for the complete migration guide.
This stack is designed to work with AMD's ROCm platform, providing CUDA compatibility through HIP, allowing you to run most CUDA-based machine learning code on AMD GPUs with minimal modifications.
For a detailed guide to help you get started from the ground up, head over to Beginners Guide and you'll find all the resources you need!
π 2.10Γ TurboQuant prefill speedup on MoE models Β· 153 t/s decode on RX 7900 XTX
Rusty Llama is our optimized llama.cpp runtime featuring TurboQuant compression, RDNA3 WMMA flash attention, pre-built binary distribution for AMD GPUs, and Rusty Stack-enforced CUDA isolation. Benchmarked on real hardware β see docs/BENCHMARK_RESULTS.md for full results.
Rusty Llama installation is only supported through Rusty Stack. The installer explicitly configures GGML_HIP=ON, GGML_CUDA=OFF, GGML_VULKAN=OFF, and GGML_METAL=OFF, validates CMakeCache.txt, warns when NVIDIA toolkits are present, and rejects binaries that do not show ROCm/HIP linkage.
Docs: https://github.com/scooter-lacroix/rusty-llama-docs
Install Rusty Stack first with cargo install rusty-stack --locked, then install Rusty Llama with rusty update llama-cpp.
Windows support is in ALPHA testing. We are openly accepting testers! The easiest way to become a tester is to test on your system/hardware, and when issues are encountered, open an issue following the issue template.
This stack has been tested and optimized for the following hardware:
RDNA 4
RDNA 3
RDNA 2
Rusty Stack (Stan's ML Stack) is now part of the Kilo OSS Sponsorship Program. Your support helps maintain and optimize this stack for the AMD GPU community!
The ML Stack consists of the following core components:
| Component | Description | Version |
|---|---|---|
| ROCm | AMD's open software platform for GPU computing | 7.2.4 |
| PyTorch | Deep learning framework with ROCm support | 2.13.0+rocm7.2 |
| ONNX Runtime | Cross-platform inference accelerator | 1.23.2 |
| MIGraphX | AMD's graph optimization library | 7.2.4 |
| Flash Attention (Triton) | High-performance Triton-based kernels | 2.8.4 |
| Flash Attention CK | Composable Kernel variant (Pre-release) | Latest |
| RCCL | ROCm Collective Communication Library | Latest |
| MPI | Message Passing Interface for distributed computing | Open MPI 5.0.10 |
| Megatron-LM | Framework for training large language models | Latest |
Rusty installs the distribution's RCCL package normally. On systems with at least two discrete AMD GPUs, it then runs a real two-process PyTorch all_reduce probe across both GPUs. Remediation triggers only when that probe matches known ROCm/RCCL collective failure fingerprints: operation cannot be performed in present state (ROCm issue #6074) or the distributed invalid device pointer/ncclUnhandledCudaError form seen from RCCL 2.27.7. Other failures remain visible instead of being masked.
For the matching failure, Rusty selects a repair profile by ROCm channel and version. The current latest/ROCm 7.2.x profile builds a pinned RCCL source commit for every detected gfx architecture with checksum-pinned ROCm 7.2.0 compiler and HIPIFY tools extracted into Rusty's cache. This path invokes no apt, dnf, or other package install and adds no NVIDIA/CUDA dependencies. The result is an immutable, versioned overlay under ~/.mlstack/components/rccl/, activated with an atomic symlink.
The activation shim dynamically locates PyTorch, verifies the overlay manifest and library hash before torch imports, then uses the glibc loader with inhibited PyTorch RPATHs, not LD_PRELOAD. It never modifies or replaces PyTorch or files under /opt/rocm. A valid active overlay is sealed against later component installs; replacement requires the explicit MLSTACK_UNSEAL_CORE=1 recovery override. Installation completes only after the two-process probe passes on both GPUs.
For the 7.2.x repair profile, Rusty also exports NCCL_P2P_DISABLE=1/RCCL_P2P_DISABLE=1 with the overlay. This avoids the broken direct P2P/IPC path seen on mixed consumer RDNA multi-GPU systems while preserving two-GPU collectives through the working shared-memory/socket path.
| Component | Description | Version |
|---|---|---|
| Triton | Compiler for parallel programming | 3.7.0 |
| BITSANDBYTES | Efficient quantization for deep learning models | 0.49.2 |
| vLLM | High-throughput inference engine for LLMs | 0.16.0 |
| vLLM Studio | Web UI for vLLM model management and deployment | Latest |
| ROCm SMI | System monitoring and management for AMD GPUs | Latest |
| ComfyUI | Node-based UI for AI image generation with ROCm support | Latest |
| DeepSpeed | Optimized training for large models with AMD GPU support | 0.18.6 |
| PyTorch Profiler | Performance analysis for PyTorch models | Latest |
| Weights & Biases | Experiment tracking and visualization | 0.26.1 |
The Rusty Stack engine is organized into five layered modules that handle the full component lifecycle β from detection through planning, execution, verification, and reporting.
rusty-stack/src/
βββ core/ # Shared types, manifest schema, validation state machine
βββ platform/ # Hardware/distro detection, component registry, environment normalization
βββ orchestrator/ # Update planner, apply engine, verify runner, upgrade orchestration
βββ adapter/ # Adapter registry with Rust and legacy script executors
βββ telemetry/ # Stability benchmark, anonymous payload, HTTPS submission, opt-in gate
| Module | Files | Description |
|---|---|---|
core/ | types.rs, manifest.rs, validation.rs, plan.rs, verification.rs, telemetry_types.rs | Shared types, manifest schema with baseline + remote overlay + fallback chain, validation state machine (validated β candidate β experimental β blocked), plan/verification/telemetry types |
platform/ | detection.rs, linux.rs, windows.rs, wsl.rs, registry.rs, environment.rs, path_bridge.rs, service.rs, control_shell.rs | Hardware detection, distro detection, component registry, environment normalization, Windows/WSL2 support with path bridging and service management |
orchestrator/ | planner.rs, apply.rs, verify.rs, upgrade.rs, migration.rs | Update planner with risk classification (safe/guarded/blocked), apply engine with dependency-safe execution ordering and failure isolation, verify runner, upgrade orchestration, shell parity migration logic |
adapter/ | mod.rs, rust_adapter.rs, legacy_adapter.rs | Adapter registry with Rust-native and legacy script executors, enabling gradual migration from shell to Rust |
telemetry/ | benchmark.rs, payload.rs, submit.rs, opt_in.rs | 180-second stability benchmark, anonymous payload construction, HTTPS submission client with fire-and-forget, opt-in gate |
Rusty Stack exposes a unified rusty CLI with subcommands:
# Interactive TUI installer (default)
rusty
# Component and manifest update (scan β plan β apply β verify)
rusty update [--scan-only] [--all-safe] [--include-experimental] [--json] [COMPONENT...]
# Rusty Stack application/runtime upgrade
rusty upgrade [--yes] [--dry-run]
# Installation verification
rusty verify --full # Full component verification
rusty verify --enhanced # Enhanced verification (all components)
rusty verify --build # Verify and rebuild failed components
# Stability benchmark runner
rusty bench --all # Run full benchmark suite
rusty bench --rocm # ROCm benchmarks
rusty bench --json <name> # JSON output for a specific benchmark
# Build the unified rusty CLI + TUI installer
cd rusty-stack && cargo build --release
# Run the full test suite
cargo test
# Run without TUI features
cargo check --no-default-features
# Windows cross-compilation
cargo build --target x86_64-pc-windows-msvc
Rusty Stack installer now offers three ROCm channels so you can balance stability against cutting-edge features:
You can select the desired channel directly from the interactive installer or pre-seed the choice via the INSTALL_ROCM_PRESEEDED_CHOICE environment variable (values: 1-3). See docs/MULTI_CHANNEL_GUIDE.md for helper scripts covering PyTorch, Triton, Flash Attention, vLLM, ONNX Runtime, MIGraphX, bitsandbytes, and RCCL.
The ML Stack provides several installation options to suit your needs.
cargo install rusty-stack --locked
rusty-stack
The recommended way to install Rusty Stack is using the crates.io package:
# Install from crates.io
cargo install rusty-stack --locked
# Launch the interactive TUI installer
rusty-stack
# Or use the CLI-only binary
rusty update --scan-only
This will:
The TUI provides a responsive, interactive experience with real-time feedback during the installation process.
Rusty-Stack includes an integrated benchmarking screen for ROCm, PyTorch, vLLM, DeepSpeed, Megatron-LM, and Flash Attention validation.
After installation:
E to export a full HTML benchmark report.E export behavior:
~/.mlstack/reports/benchmark_report_<timestamp>.html.This export is designed for performance validation, regression comparison, and shareable install verification evidence.
Install via PyPI only when you need the backward-compatible Python entrypoints. The PyPI package installs the matching crates.io rusty-stack binary through Cargo:
pip install Rusty-Stack
ml-stack-install
For direct use, prefer cargo install rusty-stack --locked.
Migrating from a legacy installer? See MIGRATION.md for the complete migration guide, including command mappings, architecture changes, and rollback instructions.
The Python curses-based installer is deprecated. Use the unified rusty CLI instead:
cd rusty-stack && cargo build --release
./target/release/rusty
The deprecated script is still available at scripts/install_ml_stack_curses.py for backward compatibility.
Note: This installer is deprecated. Please use the rusty CLI instead.
The Go-based installer in mlstack-installer/ is deprecated and no longer maintained.
If you prefer to install components manually, follow these steps:
Clone the repository:
git clone https://github.com/scooter-lacroix/Stan-s-ML-Stack.git
cd Stan-s-ML-Stack
Build the rusty CLI:
cd rusty-stack
cargo build --release
Run the TUI installer:
./target/release/rusty
Set up the environment:
source ~/.mlstack_env
For fish shell:
source ~/.mlstack_env
Verify the installation:
./target/release/rusty verify --full
β οΈ Docker support is deprecated and no longer maintained. We recommend using the Rust TUI installer or CLI instead.
The ML Stack includes a comprehensive environment setup script that automatically detects your hardware and configures the environment accordingly.
To set up the environment automatically:
# bash / zsh
source ~/.mlstack_env
# fish
source ~/.mlstack_env
The environment is configured during installation by the rusty CLI bootstrap module. This will:
~/.mlstack_env for bash/zsh, ~/.config/fish/conf.d/mlstack_env.fish for fish).bashrc / .config/fish/conf.d/)If you prefer to set up the environment manually, add the following to your .bashrc or .zshrc:
# ROCm Setup
export ROCM_PATH=/opt/rocm
export PATH=$PATH:$ROCM_PATH/bin:$ROCM_PATH/hip/bin
export LD_LIBRARY_PATH=$ROCM_PATH/lib:$ROCM_PATH/hip/lib:$ROCM_PATH/opencl/lib:$LD_LIBRARY_PATH
# GPU Selection
export HIP_VISIBLE_DEVICES=0,1 # Adjust based on your GPU count
export CUDA_VISIBLE_DEVICES=0,1 # Adjust based on your GPU count
export PYTORCH_ROCM_DEVICE=0,1 # Adjust based on your GPU count
# Performance Settings
export HSA_OVERRIDE_GFX_VERSION=11.0.0
export HSA_ENABLE_SDMA=0
export GPU_MAX_HEAP_SIZE=100
export GPU_MAX_ALLOC_PERCENT=100
export HSA_TOOLS_LIB=1
# CUDA Compatibility
export ROCM_HOME=$ROCM_PATH
export CUDA_HOME=$ROCM_PATH
# ONNX Runtime
export PYTHONPATH=/HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release:$PYTHONPATH
For fish shell, add the following to ~/.config/fish/config.fish:
# ROCm Setup
set -gx ROCM_PATH /opt/rocm
set -gx PATH $PATH $ROCM_PATH/bin $ROCM_PATH/hip/bin
set -gx LD_LIBRARY_PATH $ROCM_PATH/lib $ROCM_PATH/hip/lib $ROCM_PATH/opencl/lib $LD_LIBRARY_PATH
# GPU Selection
set -gx HIP_VISIBLE_DEVICES 0,1 # Adjust based on your GPU count
set -gx CUDA_VISIBLE_DEVICES 0,1 # Adjust based on your GPU count
set -gx PYTORCH_ROCM_DEVICE 0,1 # Adjust based on your GPU count
# Performance Settings
set -gx HSA_OVERRIDE_GFX_VERSION 11.0.0
set -gx HSA_ENABLE_SDMA 0
set -gx GPU_MAX_HEAP_SIZE 100
set -gx GPU_MAX_ALLOC_PERCENT 100
set -gx HSA_TOOLS_LIB 1
# CUDA Compatibility
set -gx ROCM_HOME $ROCM_PATH
set -gx CUDA_HOME $ROCM_PATH
# ONNX Runtime
set -gx PYTHONPATH /HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release $PYTHONPATH
Note: The rusty CLI bootstrap module generates both
~/.mlstack_env(bash/zsh) and~/.config/fish/conf.d/mlstack_env.fish(fish) automatically during installation. Manual setup is only needed if you're configuring the environment without using the installer.
To ensure environment variables and symlinks persist across system reboots, the rusty CLI bootstrap module handles this automatically during installation. The environment file is created at ~/.mlstack_env.
After installation, the environment will be automatically loaded on system boot, and all necessary symlinks will be created. You may need to log out and log back in for all changes to take effect.
Here's a description of the key environment variables:
| Variable | Description |
|---|---|
ROCM_PATH | Path to ROCm installation |
HIP_VISIBLE_DEVICES | Comma-separated list of GPU indices to use with HIP |
CUDA_VISIBLE_DEVICES | Comma-separated list of GPU indices to use with CUDA |
PYTORCH_ROCM_DEVICE | Comma-separated list of GPU indices to use with PyTorch |
HSA_OVERRIDE_GFX_VERSION | Override for GPU architecture version |
HSA_ENABLE_SDMA | Control SDMA usage (0 = disabled) |
GPU_MAX_HEAP_SIZE | Maximum heap size for GPU memory allocation |
GPU_MAX_ALLOC_PERCENT | Maximum percentage of GPU memory to allocate |
HSA_TOOLS_LIB | Enable HSA tools library |
ROCM_HOME | Path to ROCm installation (for compatibility) |
CUDA_HOME | Path to CUDA installation (set to ROCm path for compatibility) |
Issue: When running PyTorch or other ROCm applications, you may see a warning message: "Tool lib '1' failed to load".
Solution: This warning is harmless and doesn't affect functionality. It's related to ROCm's profiling tools. To fix it, set the following environment variable:
# bash / zsh
export HSA_TOOLS_LIB=1
# fish
set -gx HSA_TOOLS_LIB 1
Issue: Some applications fail because CUDA_HOME is not set, even though you're using ROCm.
Solution: For compatibility with CUDA-based applications, set CUDA_HOME to point to your ROCm installation:
# bash / zsh
export CUDA_HOME=/opt/rocm
# fish
set -gx CUDA_HOME /opt/rocm
Issue: Python reports that a module cannot be found, even though it's installed.
Solution: Check your PYTHONPATH and ensure it includes the necessary directories:
# bash / zsh
export PYTHONPATH=/path/to/module:$PYTHONPATH
# fish
set -gx PYTHONPATH /path/to/module $PYTHONPATH
For ONNX Runtime specifically:
# bash / zsh
export PYTHONPATH=/HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release:$PYTHONPATH
# fish
set -gx PYTHONPATH /HOME/usr/onnxruntime_build/onnxruntime/build/Linux/Release $PYTHONPATH
Issue: Applications cannot detect your AMD GPU.
Solution:
Ensure ROCm is properly installed
Check that your user is in the video and render groups:
sudo usermod -a -G video,render $USER
Set the appropriate environment variables:
# bash / zsh
export HIP_VISIBLE_DEVICES=0,1
export CUDA_VISIBLE_DEVICES=0,1
export PYTORCH_ROCM_DEVICE=0,1
# fish
set -gx HIP_VISIBLE_DEVICES 0,1
set -gx CUDA_VISIBLE_DEVICES 0,1
set -gx PYTORCH_ROCM_DEVICE 0,1
Issue: You encounter out of memory errors when running models.
Solution:
# bash / zsh
export GPU_MAX_HEAP_SIZE=100
export GPU_MAX_ALLOC_PERCENT=100
# fish
set -gx GPU_MAX_HEAP_SIZE 100
set -gx GPU_MAX_ALLOC_PERCENT 100
# bash / zsh
export PYTORCH_CUDA_ALLOC_CONF="max_split_size_mb:512"
export PYTORCH_HIP_ALLOC_CONF="max_split_size_mb:512"
# fish
set -gx PYTORCH_CUDA_ALLOC_CONF "max_split_size_mb:512"
set -gx PYTORCH_HIP_ALLOC_CONF "max_split_size_mb:512"
The ML Stack includes several diagnostic tools to help troubleshoot issues:
Run the enhanced verification via the rusty CLI:
./target/release/rusty verify --enhanced
This will:
Get detailed information about your ROCm installation and GPUs:
rocminfo
Monitor GPU usage and performance:
rocm-smi
Some components, like vLLM, don't officially support Python 3.13 yet. We've implemented workarounds to make them compatible.
We've created a custom version of vLLM that works with Python 3.13. Install via the rusty CLI:
./target/release/rusty
The vLLM installer:
ONNX Runtime needs to be built from source to support ROCm. The rusty CLI handles this automatically:
./target/release/rusty
The installer:
BITSANDBYTES shows CUDA setup warnings with ROCm, but still functions correctly. Install via the rusty CLI.
Some builds require ninja-build, but the executable might be named differently. Our scripts create the necessary symlinks:
sudo ln -sf /usr/bin/ninja /usr/bin/ninja-build
To verify that your ML Stack installation is working correctly:
# Using the unified rusty CLI
cd rusty-stack && cargo build --release
./target/release/rusty verify --full
# Or the enhanced verification
./target/release/rusty verify --enhanced
The custom verification script is designed to detect components installed in non-standard locations or with different module names. It's particularly useful for custom installations where components like Flash Attention, RCCL, or Megatron-LM are installed in different locations.
=== ML Stack Verification Summary ===
Core Components:
β ROCm: Successfully installed (version 7.2.4)
β PyTorch: Successfully installed (version 2.13.0+rocm7.2)
β ONNX Runtime: Successfully installed (version 1.23.2)
β MIGraphX: Successfully installed (version 7.2.4)
β Flash Attention: Successfully installed (version 2.8.4)
β RCCL: Successfully installed
β MPI: Successfully installed (version Open MPI 5.0.10)
β Megatron-LM: Successfully installed
Extension Components:
β Triton: Successfully installed (version 3.7.0)
β BITSANDBYTES: Successfully installed (version 0.49.2)
β vLLM: Successfully installed (version 0.16.0)
β ROCm SMI: Successfully installed
β ComfyUI: Successfully installed (ROCm edition)
β DeepSpeed: Successfully installed (version 0.18.6)
β PyTorch Profiler: Successfully installed
β Weights & Biases: Successfully installed (version 0.26.1)
To test your installation with a simple PyTorch example:
import torch
# Check if CUDA (ROCm) is available
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU count: {torch.cuda.device_count()}")
print(f"Current device: {torch.cuda.current_device()}")
print(f"Device name: {torch.cuda.get_device_name(0)}")
# Create a tensor on GPU
x = torch.ones(10, device='cuda')
y = x + 1
print(y)
Contributions to Rusty Stack are welcome! Please follow these steps:
Rusty Stack (formerly Stan's ML Stack) is licensed under the MIT License. See the LICENSE file for details.
If this code saved you time, consider supporting the project! β
Rust
46.5%
Shell
30.8%
Python
22.4%