---
title: "Run a Chatgpt-like Chatbot on a Single GPU with ROCm"
description: "Vicuna-13B can run on a single AMD GPU under ROCm by quantizing it to 4 bits with GPTQ, shrinking GPU memory use from over 28GB in fp16 to about 7.5GB so it fits on a 16GB Radeon RX6900XT."
url: "https://swe.quest/articles/run-a-chatgpt-like-chatbot-on-a-single-gpu-with-rocm-f3f0645e3f4c9b17"
canonical: "https://huggingface.co/blog/chatbot-amd-gpu"
source: "Hugging Face"
published: "2023-05-15"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["inference","llms","hardware"]
---

# Run a Chatgpt-like Chatbot on a Single GPU with ROCm

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-05-15, 7 min read, How-to. Original: [https://huggingface.co/blog/chatbot-amd-gpu](https://huggingface.co/blog/chatbot-amd-gpu)

## Summary

Vicuna-13B can run on a single AMD GPU under ROCm by quantizing it to 4 bits with GPTQ, shrinking GPU memory use from over 28GB in fp16 to about 7.5GB so it fits on a 16GB Radeon RX6900XT. Token generation is memory-bandwidth bound, so quantization costs little latency or perplexity. The guide covers ROCm and Docker setup, downloading or producing a GPTQ 4-bit model (including applying Vicuna delta weights to LLaMA), building the HIPified dequant+matmul kernels, and serving the model through FastChat's Gradio web UI. It compares fp16 and 4-bit variants on MI210 and RX6900XT.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)

## Prerequisites

- PyTorch basics
- Docker ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- LLM quantization concepts ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

ROCm, Vicuna, GPTQ, FastChat, LLaMA, AMD Instinct MI210, HIP

## Related posts

- [AMD + 🤗: Large Language Models Out-of-the-Box Acceleration with AMD GPU](https://swe.quest/articles/amd-large-language-models-out-of-the-box-acceleration-with-amd-gpu-fa18508c54402fa1.md): Hugging Face · 2023-12-05 · Easy · 7 min read · Inference & serving, Hardware, LLMs, Performance engineering
  Hugging Face Transformers now runs all models and tasks on AMD Instinct GPUs with no code changes versus NVIDIA, backed by ROCm support for Flash Attention v2, vLLM Paged Attention, DeepSpeed, GPTQ via AutoGPTQ, ONNX Runtime's ROCMExecutionProvider, and Optimum-Benchmark.
- [Hugging Face on AMD Instinct MI300 GPU](https://swe.quest/articles/hugging-face-on-amd-instinct-mi300-gpu-f116bf43c7c06916.md): Hugging Face · 2024-05-21 · Easy · 7 min read · Inference & serving, Hardware, LLMs, Performance engineering, Model training
  Hugging Face's transformers and text-generation-inference (TGI) now run on AMD Instinct MI300X GPUs with no code changes, backed by a Kubernetes-scheduled CI pipeline that runs tens of thousands of unit tests on MI250 and MI300 hardware.
- [(LoRA) Fine-Tuning FLUX.1-dev on Consumer Hardware](https://swe.quest/articles/lora-fine-tuning-flux-1-dev-on-consumer-hardware-310a6094e7391e33.md): Hugging Face · 2025-06-19 · Hard · 11 min read · Model training, Computer vision, Python
  FLUX.1-dev can be LoRA fine-tuned on a single consumer GPU by combining QLoRA (4-bit NF4 base transformer via bitsandbytes), 8-bit AdamW, gradient checkpointing, cached VAE latents and precomputed CLIP/T5 text embeddings, so that only the quantized transformer plus adapters sit in GPU memory.
- [Making LLMs lighter with AutoGPTQ and transformers](https://swe.quest/articles/making-llms-lighter-with-autogptq-and-transformers-6a1ce27ee3288303.md): Hugging Face · 2023-08-23 · Medium · 10 min read · Inference & serving, LLMs, Performance engineering, Hardware
  AutoGPTQ is now integrated into Hugging Face Transformers (via Optimum), letting users quantize and run LLMs at 8, 4, 3 or 2 bits with the GPTQ post-training method.
- [A Chatbot on your Laptop: Phi-2 on Intel Meteor Lake](https://swe.quest/articles/a-chatbot-on-your-laptop-phi-2-on-intel-meteor-lake-3ad1272519c8d71d.md): Hugging Face · 2024-03-20 · Medium · 7 min read · Inference & serving, LLMs, Hardware, Python
  Microsoft's 2.7B-parameter Phi-2 can run as a usable local chatbot on a mid-range Intel Core Ultra 7 155H (Meteor Lake) laptop once its weights are quantized to 4-bit with OpenVINO through Hugging Face's Optimum Intel library.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
