Skip to content

Running LLMs on PyTorch with ROCm#44

Merged
iswaryaalex merged 21 commits intomainfrom
iswarya/rocm-inference-pytorch
Jan 29, 2026
Merged

Running LLMs on PyTorch with ROCm#44
iswaryaalex merged 21 commits intomainfrom
iswarya/rocm-inference-pytorch

Conversation

@iswaryaalex
Copy link
Copy Markdown
Collaborator

@iswaryaalex iswaryaalex commented Jan 19, 2026

This tutorial is to quickly bringup user using a super easy example

  1. Setup user environment with Rocm and Pytorch on windows/Linux
  2. Run LLMs locally. We have tried GPT-OSS-20B and Mistral 7B. Script is straightforward to run
  3. Building on that, create a Doc Summarization tool using the LLMs

I have run these examples on my STRX Halo environment.

Need to check if the setup instructions are suitable for Halo Box

@danielholanda danielholanda changed the title Iswarya/rocm inference pytorch Running LLMs on PyTorch with ROCm Jan 19, 2026
@danielholanda
Copy link
Copy Markdown
Collaborator

@bbrosenba , @ChineduN for visibility

@jammm
Copy link
Copy Markdown
Collaborator

jammm commented Jan 20, 2026

I have run these examples on my STRX environment.

A test in strix halo would be good.

Copy link
Copy Markdown
Collaborator

@jammm jammm left a comment

Choose a reason for hiding this comment

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

Looks good overall. Check my comments re. environment setup for README.md.
Please test on strix halo for both Windows and Linux.

Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/assets/run_llm.py
@iswaryaalex
Copy link
Copy Markdown
Collaborator Author

I have run these examples on my STRX environment.

A test in strix halo would be good.

Done, Strix Halo Windows and Linux Tested.

Comment thread playbooks/core/pytorch-rocm-llms/platform.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/platform.md Outdated
@iswaryaalex
Copy link
Copy Markdown
Collaborator Author

@danielholanda The team reviewed and clearly highlighted the installation clarity needed in pytorch installs for ROCm.
I used builds based on this doc here https://rocm.docs.amd.com/en/7.10.0-preview/rocm-for-ai/pytorch-comfyui.html#install-pytorch that highlights python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio for Windows and Linux

@DavidPerryamd
Copy link
Copy Markdown
Collaborator

@danielholanda The team reviewed and clearly highlighted the installation clarity needed in pytorch installs for ROCm. I used builds based on this doc here https://rocm.docs.amd.com/en/7.10.0-preview/rocm-for-ai/pytorch-comfyui.html#install-pytorch that highlights python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio for Windows and Linux

This string is correct here^
but the snippet in platform.md references a pytorch.org repo, is this a mistake?

@iswaryaalex
Copy link
Copy Markdown
Collaborator Author

@danielholanda The team reviewed and clearly highlighted the installation clarity needed in pytorch installs for ROCm. I used builds based on this doc here https://rocm.docs.amd.com/en/7.10.0-preview/rocm-for-ai/pytorch-comfyui.html#install-pytorch that highlights python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio for Windows and Linux

This string is correct here^ but the snippet in platform.md references a pytorch.org repo, is this a mistake?

@DavidPerryamd, to avoid duplication, we have this for https://github.com/amd/halo_playbooks/blob/e4aa27c81e43a0f411288d28b65a827ab594531b/playbooks/dependencies/pytorch.md pytorch installation

image

@iswaryaalex iswaryaalex requested a review from jammm January 21, 2026 21:23
Comment thread playbooks/core/pytorch-rocm-llms/README.md
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/platform.md Outdated
Comment thread playbooks/dependencies/pytorch.md Outdated
Copy link
Copy Markdown
Collaborator

@adamlam2-amd adamlam2-amd left a comment

Choose a reason for hiding this comment

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

Hey - I'm Adam from the solutions team, and I'll be helping with UX Review.

Good job overall - just a couple more minor things that I commented.

The main question I have is: do users have access to the full files in assets/? If not, we need to provide them the full code on the website. This can be provided either by: 1 long code snippet (with copy button), or, preferably, several code snippets that guide the user through each important learning goal.
- ex. run_llm.py is pretty simple and straightforward. Maybe we can shorten the code (lines-wise) and put it all in one big code block.
- summarizer.py is more complex - we could separate it into a couple sections with comments, and explain key parts, like the system prompt,

Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
Comment thread playbooks/core/pytorch-rocm-llms/README.md Outdated
@iswaryaalex
Copy link
Copy Markdown
Collaborator Author

iswaryaalex commented Jan 28, 2026

The main question I have is: do users have access to the full files in assets/? If not, we need to provide them the full code on the website. This can be provided either by: 1 long code snippet (with copy button), or, preferably, several code snippets that guide the user through each important learning goal. - ex. run_llm.py is pretty simple and straightforward. Maybe we can shorten the code (lines-wise) and put it all in one big code block. - summarizer.py is more complex - we could separate it into a couple sections with comments, and explain key parts, like the system prompt,

@adamlam2-amd To give valuable learning and one click try to the user, would be great to retain the code snippet as short as it already is
Do you think we can embed the code snippet like this in my screenrecording? To allow user to copy/download

Recording.2026-01-23.154156.mp4

@danielholanda
Copy link
Copy Markdown
Collaborator

@jammm We are likely merging very soon. Please let us know if you have any additional recommendations or if this looks good.

@danielholanda
Copy link
Copy Markdown
Collaborator

@adamlam2-amd @iswaryaalex Added the code preview feature directly to this PR
image

Copy link
Copy Markdown
Collaborator

@jammm jammm left a comment

Choose a reason for hiding this comment

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

LGTM after the feedback is addressed. The part about screenshots would be nice to have but not critical for initial release so is optional.

Comment thread playbooks/core/pytorch-rocm-llms/assets/run_llm.py Outdated
Comment thread playbooks/core/pytorch-rocm-llms/assets/run_llm.py Outdated
Comment thread playbooks/core/pytorch-rocm-llms/platform.md
Comment thread playbooks/core/pytorch-rocm-llms/README.md
Comment thread playbooks/core/pytorch-rocm-llms/README.md
Copy link
Copy Markdown
Collaborator

@adamlam2-amd adamlam2-amd left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work @iswaryaalex . Thanks @danielholanda for the code preview addition.

@iswaryaalex
Copy link
Copy Markdown
Collaborator Author

All feedback comments are addressed. Merging this playbook

@iswaryaalex iswaryaalex merged commit 2c99c08 into main Jan 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants