24/7 ML-Driven DeFi Infrastructure on a Single Gigabyte RX 6900 XT

Running a production ML pipeline on a consumer RDNA 2 card — 24 hours a day, 7 days a week, since January 2026.

The setup:

  • Gigabyte RX 6900 XT (16GB VRAM)
  • Ubuntu, ROCm 7.2 (upgraded from 7.0 yesterday — huge improvement)
  • PyTorch with continuous training and inference running in parallel
  • AMD AI Developer Program member

What it does:

  • Ensemble machine learning engine for DeFi risk management on Base L2
  • Continuous model training loop: fetch market data → train → evaluate challenger models against production champion → auto-promote if better
  • Parallel inference serving live signals to an autonomous on-chain vault
  • Multi-source data fusion from on-chain and off-chain feeds

By the numbers:

  • Months of continuous uptime
  • Thousands of training cycles completed
  • Multiple model horizons running simultaneously on a single card
  • VRAM management was the hardest constraint to solve — 16GB gets tight with parallel training + inference

ROCm journey:
Started on ROCm 7.0, which worked but required some persistence. HIP kernel compilation failures, PyTorch ops silently falling back to CPU, memory allocation issues under sustained multi-hour load. Most problems traced to version mismatches between ROCm, PyTorch, and the kernel driver. Once locked in, it’s been rock solid.

Upgraded to ROCm 7.2 yesterday on a community recommendation and the difference is noticeable — smoother power management (coil whine completely gone under load), more consistent training cycle times, and PyTorch compatibility is cleaner out of the box.

What I learned:

  • Consumer RDNA 2 can absolutely run production ML workloads if you’re willing to optimize
  • VRAM is the bottleneck, not compute — design your pipeline around memory constraints
  • ROCm stability has improved dramatically through the 7.x series
  • The community here makes a real difference — the 7.2 upgrade tip alone doubled my available daily compute time

Happy to answer questions about running sustained ML workloads on consumer AMD hardware. This card owes me nothing at this point.

1 Like

Already moved to 7.2.1 since the last post. The sanded-down release lives up to the name — all the rough edges we hit on 7.2 are gone.

The big ones that landed for us with the 7.2 → 7.2.1 polish:

torch.compile is stable now. reduce-overhead mode kept segfaulting on RDNA 2 in 7.2. On 7.2.1 with PyTorch 2.8 it just runs. First compilation pass is slow (Triton cache building) but after that we’re seeing ~25% faster training loops. Worth the wait.

BF16 instead of FP16. Dropped GradScaler entirely. BF16 has a wider dynamic range so you don’t need the loss scaling dance. Simpler code, fewer NaN explosions during training, roughly the same throughput. If you’re still wrestling with GradScaler on ROCm — try BF16, it might just solve it.

TF32 matmul precision. Set torch.set_float32_matmul_precision("high") and got another ~10% on matrix-heavy operations. The 19-bit mantissa vs FP32’s 23-bit hasn’t hurt our model quality at all.

Numbers across the whole journey:

                            ROCm 7.0                 ROCm 7.2.1
Forward pass (2048 batch)   ~1.3ms                   ~1.0ms
Training loop overhead      baseline                 ~20-30% faster
GradScaler required         yes                      no (BF16)
torch.compile               unstable                 stable
Coil whine                  bad enough to schedule   gone
                            around

That last row isn’t a joke. The card whined loud enough at full load that we had to throttle overnight. Silent now at sustained 100% utilization — went from scheduling training around sleep to running the pipeline 24/7.

HIP kernel coverage on RDNA 2 is better but still not complete. Some custom ops fall back to CPU. Standard PyTorch stuff (nn.Linear, attention, conv) is fine. Triton hits a few edge cases with non-standard tensor shapes but nothing that blocked production.

7.2.1 is where it started feeling like a mature platform for us. If you’re on 7.2 and dealing with the rough edges — the patch release fixes most of them.

Happy to share configs if anyone’s running something similar.

1 Like

Getting a 25% speed boost just from torch.compile and switching to BF16 are huge wins for a 24/7 setup.

Also, it’s still incredible that the update made the card quiet enough to sleep next to, that’s a serious life upgrade. If you’re willing to share those configs you mentioned, we’d love to see them, as they would be a huge help to the rest of the community.

1 Like

Sure thing! Been meaning to share these anyway.

So on our 6900 XT with ROCm 7.2 + PyTorch 2.11, the biggest win was honestly just switching from FP16 to BF16 autocast:

with torch.amp.autocast(“cuda”, dtype=torch.bfloat16):
output = model(X)
loss = criterion(output, target)
loss.backward()

You don’t need GradScaler anymore which is the nice part. We were getting random NaN explosions on long training runs with FP16 — like it’d be fine for 6 hours and then just blow up. BF16’s wider exponent range handles the value spikes way better. Just works.

We also set torch.set_float32_matmul_precision(“high”) but honestly that’s a no-op on ROCm right now (it’s a CUDA Tensor Core thing). Doesn’t hurt to have it in there for when AMD adds support though.

torch.compile is a funny one — we actually had to turn it OFF. We’re training 15 seeds concurrently with different hyperparameters and torch.compile wants to recompile for each config. The Triton cache thrashing killed us worse than the speedup helped. If you’re running one architecture over and over you’ll definitely see gains, just make sure you pin the cache dir:

os.environ[“TORCHINDUCTOR_CACHE_DIR”] = “/path/to/persistent/cache”

For the noise — this was the life changer honestly. The 6900 XT defaults to ~300W and the VRM coil whine at full load was brutal, could hear it from across the room. Capping to 264W made it basically silent:

import glob
from pathlib import Path

caps = glob.glob(“/sys/class/drm/card*/device/hwmon/hwmon*/power1_cap”)
if caps:
Path(caps[0]).write_text(str(264 * 1_000_000))

Needs root. To make it stick across reboots, udev rule:

/etc/udev/rules.d/99-gpu-powercap.rules

ACTION==“add”, SUBSYSTEM==“hwmon”, ATTR{power1_cap_max}==“*”, ATTR{power1_cap}=“264000000”

Cost us maybe 5% throughput. Card sits at 89°C junction running 24/7 at 99% util, totally within spec. Worth the trade.

Update — Week 2: GPU utilization shifted

Quick update on how the workload profile changed since the config post.

Parallel process management on 16GB VRAM:

The training pipeline now shares the card with multiple real-time inference and data processing tasks. At any given moment:

  • Continuous champion/challenger training (15-seed ensemble, BF16)
  • Live inference loop serving predictions every 60 seconds
  • Feature engineering pipeline consuming streaming market data
  • Stress scoring model feeding downstream decision systems

The trick was staggering GPU memory allocation. Training grabs ~10-12GB during active runs, so inference and feature pipelines are designed to fit in the remaining 4-6GB with small batch sizes. No OOM kills in 11 days — but it required being deliberate about when each process allocates and releases.

Where the bottleneck actually is now:

Not the GPU. We’re running 6 concurrent Python processes doing high-frequency network I/O (batch-reading external APIs, ~500 requests every 2 seconds) alongside the ML workload. GPU utilization sits at 40-60% most of the time because the CPU and network are the constraint.

Built an automatic endpoint rotation system — 14 API sources with silent failover on rate limits or bad responses. The interesting part: the failure modes aren’t crashes, they’re silent degradation. An endpoint starts returning stale data or takes 3 seconds instead of 200ms. Had to add health tracking per endpoint, not just “did it respond.”

torch.compile follow-up:

Mentioned last time we turned it off due to Triton cache thrashing with 15 concurrent configs. Found a middle ground — compile only the inference models (which don’t change shape) and leave training in eager mode. Inference got the ~25% speedup, training avoids the recompilation overhead. Best of both.

# Inference model — stable shapes, compile once
model_infer = torch.compile(model, mode="reduce-overhead")

# Training models — variable configs, keep eager
model_train = model  # no compile

ROCm 7.2.1 at 11 days uptime:

Zero issues. The 264W cap + BF16 combo is unchanged. Card sits at 88-90°C junction, silent, 99% utilization when training is active. Haven’t needed to touch any GPU config since the last post.

The main learning: once you solve the GPU side (which ROCm 7.2.1 basically did for us), the real engineering challenge moves to orchestrating everything else around it. Memory budgeting across processes, network resilience, and making sure a flaky API endpoint doesn’t cascade into a stalled training run.

Update — public telemetry for the allocator is now live

A piece I wanted to add to this project was a clearer public observability layer once the system moved beyond model development and into live decision-making.

The compute side remains local: continuous ML workloads running on a single Radeon RX 6900 XT, feeding downstream decision systems in real time. What is new is that the Morpho vault allocator on Base now has a public, read-only telemetry surface rather than existing only through internal logs and private dashboards.

Dune:

https://dune.com/vaara/vaara-usdc-vault-ml-strategy-intelligence-base

The goal with this was not simply to publish a dashboard, but to make allocator behavior inspectable from the outside. The public view tracks how the system operates over time, including decision-cycle count, rebalance frequency, hold discipline, predicted alpha, and error rate.

For me, that is an important part of what makes 24/7 ML infrastructure on consumer AMD hardware interesting in practice. It is one thing to run inference and training continuously on a local GPU. It is another to connect that compute layer to a live onchain allocation system and expose the resulting behavior through a public audit surface.

So this feels like a meaningful step in the stack:

local AMD GPU
→ continuous ML inference and training
→ live allocator logic on Base
→ public telemetry layer

There is still a lot to refine, but the allocator is now visible externally rather than operating as a black box.