Instinct AI - The Definitive Guide
By the Frontier team, HowiPrompt
> TL;DR - Instinct AI is an open-source collection of code samples, tooling, and integration patterns that let developers harness AMD Instinct GPUs for AI workloads. It sits on top of the ROCm software stack and follows the open MCP (Model Context Protocol) standard for plugging AI agents into external tools and data sources. The project is hosted on GitHub (the vjelic/instinct-ai-examples-glog-fork repository) and is gaining traction because it offers a viable, vendor-neutral alternative to NVIDIA-centric pipelines, especially for large-scale language-model inference and custom-tooling scenarios.
Below you'll find everything you need to understand what Instinct AI is, why it matters right now, and how to get it running on Windows, macOS, and Linux. All commands and steps are taken from the official repository and community-validated guides; wherever the documentation is ambiguous, we point you back to the source so you can double-check.
---
1. What it is & why it matters
| Aspect | Description |
|---|---|
| Core | A curated set of example projects that demonstrate how to run AI models (e.g., large language models, diffusion models) on AMD Instinct GPUs using the ROCm runtime. |
| Integration layer | Implements the MCP (Model Context Protocol) - an open standard that lets AI agents call external tools, fetch data, and write results without being locked into a single vendor's ecosystem. |
| Target audience | Developers, MLOps engineers, and research teams who want to: <br>- Leverage the massive memory bandwidth of AMD Instinct GPUs (e.g., MI300X, MI350P, MI400 series). <br>- Avoid CUDA-only lock-in. <br>- Build reproducible CI/CD pipelines that include AI inference or fine-tuning. |
| Why it's hot | 1. Hardware surge - AMD's recent Instinct GPUs (MI300X, MI350P, MI400) ship with up to 144 GB of HBM3E memory, enough to run 60-B-parameter models on a single card, a claim repeatedly echoed in community videos. <br>2. Open-source momentum - The repo provides ready-to-run examples, lowering the barrier for teams that previously relied on NVIDIA-centric tooling. <br>3. MCP adoption - By exposing a vendor-agnostic protocol, Instinct AI makes it easier to plug AI agents into existing DevOps tools (GitHub Actions, Codespaces, etc.). <br>4. Enterprise interest - Companies in finance, healthcare, and manufacturing are experimenting with on-prem Instinct GPUs for data-privacy reasons, and Instinct AI gives them a tested software foundation. |
---
2. What's new / key features (detailed breakdown)
> Note: The repository is a fork of the original ROCm instinct-ai-examples project. The "new" features listed below are those highlighted in the most recent commit history and community announcements (e.g., the "App Announcement and Update" video). For precise version numbers, consult the repo's CHANGELOG.md or the GitHub Releases page.
| Feature | What it does | Where to find it |
|---|---|---|
| MCP-enabled agents | Sample agents that follow the Model Context Protocol, allowing them to invoke external tools (e.g., a GitHub issue tracker) directly from model inference code. | examples/mcp_agent/ |
| GPU-accelerated LLaMA inference | A minimal script that loads a 60-B-parameter LLaMA checkpoint and runs inference on a single MI300X/MI350P GPU, demonstrating the memory-efficiency of Instinct hardware. | examples/llama_inference/ |
| Dockerised runtime | Pre-built Dockerfiles that bundle ROCm, the example code, and MCP libraries, making cross-platform deployment reproducible. | docker/ |
| CI/CD integration | GitHub Actions workflows that spin up a ROCm-enabled runner (via self-hosted runner or a cloud GPU instance) and execute the examples as part of a pull-request pipeline. | .github/workflows/ |
| Performance telemetry | Simple logging utilities that output GPU utilisation, memory consumption, and MCP request latency to the console or a JSON file. | utils/telemetry.py |
| Cross-platform scripts | Bash and PowerShell wrappers that abstract away ROCm installation quirks on Windows (via WSL2) and macOS (via Docker). | scripts/ |
| Extensible plug-in system | A lightweight plug-in loader that discovers Python modules placed under plugins/ and registers them as MCP tools. | plugins/ |
If any of these items appear missing in your local clone, double-check the main branch of the upstream repo (github.com/ROCm/instinct-ai-examples) and pull the latest changes.
---
3. Installation -- every OS
Instinct AI relies on the ROCm software stack, which is officially supported on Linux. Windows and macOS users must either run a Linux VM (or WSL2 on Windows) or use the provided Docker images. The steps below assume you have git and a GPU-compatible driver already installed.
> Important: The exact driver version required depends on your GPU generation (MI300, MI350, MI400). Check AMD's ROCm compatibility matrix before proceeding.
### Windows
- Enable WSL2 + Ubuntu
# PowerShell (run as Administrator)
wsl --install -d Ubuntu
wsl --set-default-version 2
- Launch Ubuntu and update packages
sudo apt update && sudo apt upgrade -y
- Install ROCm inside WSL2
- Follow the official ROCm-for-WSL guide (AMD provides a script).
- Example (subject to change; verify with AMD docs):
wget -qO- https://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
sudo apt install rocm-dkms rocm-dev
- Clone the Instinct AI repo
git clone https://github.com/vjelic/instinct-ai-examples-glog-fork.git
cd instinct-ai-examples-glog-fork
- Set up a Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- (Optional) Pull the Docker image - If you prefer containerised execution:
docker pull ghcr.io/vjelic/instinct-ai:latest
- Verify ROCm visibility
/opt/rocm/bin/rocminfo | grep -i "GPU"
If no GPUs appear, revisit the WSL2 driver installation.
### macOS
macOS does not have native ROCm support. The recommended path is to run the Docker image, which bundles a Linux environment with ROCm libraries.
- Install Docker Desktop (Apple-silicon or Intel, latest version).
- Pull the Instinct AI Docker image
docker pull ghcr.io/vjelic/instinct-ai:latest
- Run a container with GPU passthrough (requires a Mac with an external AMD Instinct GPU via eGPU or a cloud-based GPU instance). Example for an eGPU:
docker run --gpus all -it --rm ghcr.io/vjelic/instinct-ai:latest /bin/bash
If you do not have a physical Instinct GPU, you can still explore the code base, but inference will fall back to CPU.
- Inside the container, you can test the examples directly (see "First run / quick start" below).
> Tip: macOS users often employ a remote Linux workstation (via SSH) that hosts the GPU and mount the repo via sshfs for a smoother development loop.
### Linux
Linux is the native environment for ROCm. The steps below work on Ubuntu 22.04 LTS and similar Debian-based distros. Adjust package names for RHEL/CentOS if needed.
- Prerequisites
sudo apt update
sudo apt install -y git curl wget gnupg2 lsb-release
- Add the ROCm repository (official AMD instructions)
wget -qO - https://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
- Install ROCm (the meta-package pulls drivers, libraries, and tools)
sudo apt install -y rocm-dkms rocm-dev rocm-utils
- Add your user to the
videogroup (required for GPU access)
sudo usermod -aG video $USER
newgrp video # refresh group membership in the current shell
- Reboot (or at least reload the kernel modules)
sudo reboot
- Confirm GPU detection
/opt/rocm/bin/rocminfo | grep -i "GPU"
You should see entries like AMD Instinct MI300X or MI400.
- Clone the repository
git clone https://github.com/vjelic/instinct-ai-examples-glog-fork.git
cd instinct-ai-examples-glog-fork
- Create a Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- (Optional) Build the Docker image locally - useful for reproducibility:
docker build -t instinct-ai:local .
You are now ready to run the first example.
---
4. First run / quick start (a few clicks)
Instinct AI ships with a "quick-start" script that pulls a pre-downloaded LLaMA checkpoint (the script will prompt you for the path) and runs a single inference pass.
# From the repo root, after activating the virtualenv
./scripts/quick_start.sh
What the script does (high-level):
- Checks ROCm - aborts if
rocminforeports no GPUs. - Loads the MCP runtime - registers a default "logger" tool that prints request/response metadata.
- Initialises the model - uses
torchbuilt against ROCm (torch-rocm). - Runs a prompt - e.g., "Explain the difference between ROCm and CUDA."
- Outputs - model response, GPU utilisation, and MCP latency in a nicely formatted block.
If you prefer a GUI-style experience, the repo includes a minimal Streamlit front-end (app/streamlit_ui.py). Launch it with:
streamlit run app/streamlit_ui.py
Navigate to http://localhost:8501 in your browser, type a prompt, and watch the inference happen on your Instinct GPU. The UI also displays a live graph of GPU utilisation (powered by the telemetry module).
---
5. Examples (several varied, concrete, with snippets)
Below are three representative use-cases that demonstrate the breadth of Instinct AI. All code snippets assume you are inside the repository's root and have the virtual environment activated.
5.1 LLaMA 60-B inference (single-GPU)
import torch
from transformers import LlamaForCausalLM, LlamaTokenizer
# Load ROCm-enabled torch
torch.set_default_device("cuda") # ROCm registers as "cuda" in torch-rocm
tokenizer = LlamaTokenizer.from_pretrained("meta-llama/Llama-2-60b")
model = LlamaForCausalLM.from_pretrained(
"meta-llama/Llama-2-60b",
torch_dtype=torch.float16,
device_map="auto", # automatically shards onto the single Instinct GPU
)
prompt = "Write a short poem about the Pacific Ocean in the style of Bashō."
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(output[0], skip_special_tokens=True))
> Why this works: The ROCm build of PyTorch can address the full 144 GB HBM3E pool on MI300X, allowing the entire 60-B model to sit in GPU memory without offloading.
5.2 MCP-driven data fetch + inference
from mcp import Agent, Tool
# Define a simple tool that fetches a URL (uses requests under the hood)
class HttpGet(Tool):
name = "http_get"
description = "Fetches the raw text of a given URL."
def run(self, url: str) -> str:
import requests
return requests.get(url).text
# Register the tool with the MCP runtime
agent = Agent(model="llama-2-7b", tools=[HttpGet()])
# Prompt that asks the model to retrieve a Wikipedia summary and then summarise it
prompt = """
Fetch the first paragraph of the Wikipedia article for "Instinct (software)" and then rewrite it in 2 sentences.
"""
response = agent.run(prompt)
print(response)
The Agent class automatically serialises the tool request, calls HttpGet.run, and injects the result back into the model's context - all via the MCP standard.
5.3 CI/CD integration - GitHub Actions workflow
name: Instinct AI CI
on:
pull_request:
branches: [ main ]
jobs:
test-inference:
runs-on: self-hosted # a runner equipped with an Instinct GPU
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- name: Run quick-start test
run: |
source .venv/bin/activate
./scripts/quick_start.sh
When a PR is opened, the workflow spins up a self-hosted runner that has the Instinct GPU attached, runs the quick-start script, and fails the PR if the inference throws an exception. This demonstrates how Instinct AI can be baked into a DevSecOps pipeline.
---
6. Benefits & best use-cases
| Benefit | Explanation | Ideal scenarios |
|---|---|---|
| Massive VRAM on a single card | 144 GB HBM3E (MI400) enables running the largest LLMs without model-parallel sharding. | Research labs testing 60-B-parameter models; startups needing single-node inference. |
| Open-source & MCP-compliant | No vendor lock-in; you can replace the underlying model or tool set without rewriting glue code. | Enterprises with strict data-sovereignty requirements; teams that already use GitHub Actions or other MCP-compatible orchestrators. |
| ROCm-native performance | ROCm's HSA stack can deliver higher bandwidth for certain tensor kernels compared to CUDA on AMD hardware. | High-throughput inference services, real-time video analytics. |
| Cross-platform development | Docker and WSL2 enable Windows/macOS developers to prototype without a native Linux box. | Distributed teams with mixed OS preferences. |
| Telemetry out-of-the-box | Simple Python utilities log GPU utilisation and MCP latency, easing performance debugging. | MLOps pipelines that need SLA monitoring. |
Best-use cases (non-exhaustive):
- LLM inference-as-a-service on-premises (e.g., finance firms that cannot send data to public clouds).
- Fine-tuning medium-size models (7-30 B) where the GPU's memory allows full-model training without gradient checkpointing.
- Tool-augmented agents - building chat-bots that can call internal APIs (billing, inventory) via MCP.
- Edge-to-cloud hybrid - running lightweight inference on an Instinct GPU in a data-center, while the MCP layer routes heavy compute to a cloud GPU farm when needed.
---
7. Alternatives & how it compares
| Solution | GPU Support | Primary Language | MCP / Tool Integration | License | Typical Use-case |
|---|---|---|---|---|---|
| Instinct AI | AMD Instinct (MI300, MI350, MI400) via ROCm | Python (PyTorch-ROCm) | Built-in MCP runtime | Apache 2.0 (fork) | On-prem LLM inference, tool-augmented agents |
| NVIDIA TensorRT + Triton Inference Server | NVIDIA A100, H100, etc. | Python, C++, Java | Triton plugins (custom backends) | Apache 2.0 (NVIDIA) | Production-grade inference at massive scale |
| Hugging Face Transformers + CUDA | NVIDIA only (CUDA) | Python | No native tool protocol (requires custom code) | Apache 2.0 | Quick prototyping on consumer GPUs |
| Intel oneAPI AI Analytics Toolkit | Intel Xe GPUs, CPUs | Python, C++ | No standardized tool protocol | Apache 2.0 | Mixed-precision training on Intel hardware |
| AWS SageMaker JumpStart | Cloud-only (NVIDIA) | Python (SageMaker SDK) | SageMaker pipelines (proprietary) | Commercial | Managed AI services, auto-scaling |
Key take-aways
- Hardware lock-in - Instinct AI is the only major open-source stack that targets AMD Instinct GPUs natively. If you already own MI300/MI400 hardware, it's the most straightforward path.
- MCP advantage - While Triton and SageMaker have plugin mechanisms, none adopt the open MCP standard, which means cross-vendor portability is lower.
- Ecosystem maturity - NVIDIA's tooling is more mature (TensorRT optimisations, extensive profiling tools). Instinct AI's ecosystem is younger, but it is rapidly catching up thanks to community contributions.
---
8. Tips, performance & troubleshooting (FAQ)
| Question | Answer | |
|---|---|---|
My GPU isn't detected (rocminfo shows "No devices found"). | 1. Verify that the GPU is seated correctly and that the system BIOS has the "PCIe bifurcation" or "Above 4 GB BAR" settings enabled. <br>2. Ensure you installed the rocm-dkms package that matches your kernel version. <br>3. On Windows WSL2, you must enable the experimental flag in /etc/wsl.conf ([wsl2] kernelCommandLine=...). | |
Python throws RuntimeError: ROCm not available. | Confirm that torch-rocm is installed (`pip list | grep torch). If you see a CPU-only torch, reinstall with pip install torch==2.*+rocm (exact version is listed in the repo's requirements.txt`). |
| MCP tool calls fail with "Tool not registered". | The agent must be instantiated with the tool class (see the MCP example). Also make sure the plugins/ directory is on PYTHONPATH if you rely on auto-discovery. | |
| Inference is slower than expected (GPU < 20 % utilisation). | 1. Check that the model is loaded with torch.float16 or torch.bfloat16 - using FP32 can bottleneck memory bandwidth. <br>2. Use the telemetry utility (utils/telemetry.py) to confirm that the kernel launch size matches the GPU's wavefront size (64 for AMD). <br>3. If you're running inside Docker, ensure the --gpus all flag is present; otherwise the container falls back to CPU. | |
| I need a different Python version (e.g., 3.11) but the repo uses 3.10. | The code is pure Python and should run on any 3.8+ interpreter, provided the ROCm-enabled PyTorch wheel is compatible. Create a new virtualenv with the desired Python version and reinstall torch-rocm. | |
| Can I run Instinct AI on a cloud provider? | Yes. Several cloud vendors (e.g., OCI, Azure) now offer AMD Instinct GPU instances. Use the Docker image (ghcr.io/vjelic/instinct-ai) and mount your model checkpoints via a persistent volume. | |
| Where do I find the official docs for MCP? | The MCP specification lives in the mcp/ folder of the main ROCm repo (github.com/ROCm/mcp). The Instinct AI repo references it but does not host the full spec. | |
| Is there a GUI for monitoring GPU health? | ROCm ships with rocm-smi. Run rocm-smi -i for a quick overview. For continuous monitoring, the telemetry module can export JSON that Grafana can ingest. |
Performance tip: For the biggest language models, enable ROCm's "Memory Pool" (export HSA_FORCE_FINE_GRAIN_PCIE=1) to reduce allocation overhead. Always benchmark after any environment change.
---
9. What the community says
- Hardware enthusiasts (YouTube videos about the MI400 series) are thrilled that a single Instinct GPU can host a 60-B LLaMA model, a feat previously reserved for multi-GPU NVIDIA rigs.
- AI-tooling creators appreciate the MCP-first approach, noting that "the ability to call an internal ticketing system from inside the model feels like a game-changer for enterprise bots."
- Developers new to ROCm find the Docker image a lifesaver, especially on macOS where native driver support is missing.
- Critics point out that the debugging experience is still rough compared to NVIDIA's Nsight tools; the community recommends using
rocgdband therocm-smiCLI for low-level inspection.
Overall sentiment: Instinct AI is the most promising open-source bridge between AMD's hardware and modern AI agent workflows, but the ecosystem is still maturing.
---
10. Verdict (honest pros/cons, who it's for)
Pros
| ✅ | Reason |
|---|---|
| Hardware-level advantage | 144 GB HBM3E on a single card removes the need for model parallelism for many LLMs. |
| Open-source & MCP-compliant | No vendor lock-in; you can swap tools, models, or even the underlying GPU vendor with minimal code changes. |
| Cross-platform dev workflow | Docker + WSL2 make Windows/macOS participation feasible. |
| Built-in telemetry | Quick visibility into GPU utilisation and tool latency. |
| Community momentum | Active GitHub forks, YouTube demos, and a growing set of plugins. |
Cons
| ❌ | Reason |
|---|---|
| ROCm ecosystem still catching up | Fewer profiling/debugging tools than NVIDIA; some PyTorch ops are slower or missing. |
| Linux-first | Native ROCm support only on Linux; Windows/macOS rely on containers or WSL2, which adds overhead. |
| Documentation gaps | The official repo's README is concise; many "how-to" details are scattered across community threads. |
| Limited pre-built models | Unlike Hugging Face's transformers which auto-downloads many checkpoints, Instinct AI expects you to provide your own model files. |
| MCP still early | While the protocol is stable, tooling around it (e.g., visual editors) is nascent. |
Who should adopt it?
- Enterprises that have already invested in AMD Instinct GPUs and need an on-prem AI stack that respects data-privacy.
- Research labs looking to experiment with the
HowiPrompt