Using old parts to run local AI - new to this, advice appreciated

The point of this thread is to ask for advice on what I can do with my available hardware.

I can’t believe I didn’t think of this before.

My old system:

  • CPU: Ryzen 5800X3D
  • GPU: Sapphire Radeon RX Vega 64, 8 GB HBM2
    • GPU driver: amdgpu, using Mesa RADV/Vulkan
  • RAM: 64GB DDR4 at 2133 MT/s (I seem to recall it being 2666 at some point…)
  • Motherboard: x470 aorus gaming wifi 7
    • bios version F65
  • Storage: 500 GB WD Black NVMe SSD

Running ubuntu server 24.04

And the GPU is nicely working at x16, Pcie3:

$ sudo lspci -vv -s 0c:00.0 | grep -E 'LnkCap:|LnkSta:'
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkSta: Speed 8GT/s, Width x16

After asking some instructions, I got llama.cpp set up and getting results like this:

~/llama.cpp$ ~/llama.cpp/build/bin/llama-cli   -hf bartowski/Qwen2.5-Coder-3B-Instruct-GGUF:Q4_K_M   -ngl 99   -c 4096   -p "Write a Bash script that prints the 10 largest files in my home directory."   -n 256


Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b11639-a0e6dc738
model      : bartowski/Qwen2.5-Coder-3B-Instruct-GGUF:Q4_K_M
ftype      : Q4_K - Medium
modalities : text

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern



> Write a Bash script that prints the 10 largest files in my home directory.
Certainly! Below is a Bash script that prints the 10 largest files in your home directory. This script uses the `ls`, `sort`, and `head` commands to achieve the desired output.

```bash
#!/bin/bash

# Get the home directory of the current user
home_dir="$HOME"

# Find all files in the home directory and sort them by size in descending order
# Use 'head' to get the top 10 files
find "$home_dir" -type f -print0 | xargs -0 du -h | sort -rh | head -n 10
```

### How the Script Works:
1. **`find` Command**:
   - `find "$home_dir" -type f -print0` searches for all files (`-type f`) in the specified home directory (`"$HOME"`). The `-print0` option ensures that filenames with spaces or special characters are handled correctly.

2. **`xargs` Command**:
   - `xargs -0 du -h` calculates the size of each file found by `find`. The `-0` option tells `xargs` to expect input files separated by null characters, which is the default output format for `find -print

[ Prompt: 415.0 t/s | Generation: 109.1 t/s ]

And for a larger model:

~/llama.cpp$ ~/llama.cpp/build/bin/llama-cli \
  -hf Jackrong/Qwopus3.6-27B-Coder-GGUF:Q4_K_M \
  -ngl 16 \
  -c 4096 \
  -p "Write a Bash script that finds the 10 largest files in my home directory. Explain each part of the script." \
  -n 512
Downloading mmproj-F32.gguf ──────────────────────────────────────── 100%
Downloading Qwopus3.6-27B-Coder-Q4_K_M.gguf ──────────────────────── 100%


Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b11639-a0e6dc738
model      : Jackrong/Qwopus3.6-27B-Coder-GGUF:Q4_K_M
ftype      : Q4_K - Medium
modalities : text, vision, video

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern
  /image <file>       add an image file
  /video <file>       add a video file



> Write a Bash script that finds the 10 largest files in my home directory. Explain each part of the script.

[Start thinking]

1.  **Understand the Goal:** The user wants a Bash script to find the 10 largest files within their home directory and an explanation of how the script works.

2.  **Identify the Core Command:** The `find` command is the standard Unix tool for locating files. To sort by size and take the top 10, we need to combine it with `sort` and `head`.
    *   *Find files:* `find ~`
    *   *Only files, not directories:* `-type f`
    *   *Print with size in a readable format (or bytes):* `-printf '%s %p\n'` (where `%s` is size in bytes, `%p` is the file path). *Alternative:* `ls -lhS` is often used but has issues with filenames containing spaces and doesn't recurse as cleanly as `find`. Let's stick to `find` for robustness, or `find ... -exec ls -lh {} + | sort ...`. Actually, the most robust and standard way is `find ~ -type f -exec ls -lh {} + | sort -k5 -rh | head -n 10`.
    *   *Wait, let's evaluate the `find -printf` vs `find + ls` approach:*
        *   `find ~ -type f -printf '%s %p\n' | sort -rn | head -n 10` -> This is very efficient. It prints the size in bytes, then the path. Then sort numerically in reverse, then take the top 10.
        *   However, showing the size in *bytes* might not be user-friendly (e.g., 1073741824 bytes).
        *   Let's use `find ~ -type f -exec ls -lhS {} + | sort -k5 -rh | head -n 10`. Wait, `ls -lhS` sorts by size already, but sorting across multiple files from different directories can be tricky with `ls` because `ls` sorts within its arguments, but `find` passes batches. Actually, `find ~ -type f -exec ls -lh {} + | sort -k5 -rh | head -n 10` works perfectly.
        *   Let's check the sorting column for `ls -lh`: The 5th column is size. `-rh`

[ Prompt: 14.0 t/s | Generation: 2.2 t/s ]

This seems awesome. Self-hosted LLM and it’s working pretty decent. Who would have thought this old Vega64 would still be useful for something.

Cloned llama.cpp and compiled locally.

Compile commands used:

cmake -B build -DGGML_VULKAN=1 -DLLAMA_OPENSSL=ON
cmake --build build --config Release -j2

Although it seems I compiled against the latest commit on the master branch, a0e6dc7 …

But, I’m pretty new to this. I’m wondering what the recommended tools there are to use. Things to enhance the experience, maybe have a local gui, quality of life things, etc…

Or maybe realize how limited I am?

Any advice is appreciated.

I’m told this is important information:

~$ env -u DISPLAY -u WAYLAND_DISPLAY vulkaninfo --summary
'DISPLAY' environment variable not set... skipping surface info
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.275


Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_headless_surface                : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 5
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 3
--------------------------
VK_LAYER_INTEL_nullhw       INTEL NULL HW                1.1.73   version 1
VK_LAYER_MESA_device_select Linux device selection layer 1.4.303  version 1
VK_LAYER_MESA_overlay       Mesa Overlay layer           1.4.303  version 1

Devices:
========
GPU0:
        apiVersion         = 1.4.318
        driverVersion      = 25.2.8
        vendorID           = 0x1002
        deviceID           = 0x687f
        deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
        deviceName         = AMD Radeon RX Vega (RADV VEGA10)
        driverID           = DRIVER_ID_MESA_RADV
        driverName         = radv
        driverInfo         = Mesa 25.2.8-0ubuntu0.24.04.4
        conformanceVersion = 1.4.0.0
        deviceUUID         = 00000000-0c00-0000-0000-000000000000
        driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU1:
        apiVersion         = 1.4.318
        driverVersion      = 25.2.8
        vendorID           = 0x10005
        deviceID           = 0x0000
        deviceType         = PHYSICAL_DEVICE_TYPE_CPU
        deviceName         = llvmpipe (LLVM 20.1.2, 256 bits)
        driverID           = DRIVER_ID_MESA_LLVMPIPE
        driverName         = llvmpipe
        driverInfo         = Mesa 25.2.8-0ubuntu0.24.04.4 (LLVM 20.1.2)
        conformanceVersion = 1.3.1.1
        deviceUUID         = 6d657361-3235-2e32-2e38-2d3075627500
        driverUUID         = 6c6c766d-7069-7065-5555-494400000000

And this:

~/llama.cpp$ ./build/bin/llama-cli --list-devices
Available devices:
  Vulkan0: AMD Radeon RX Vega (RADV VEGA10) (8192 MiB, 8180 MiB free)
1 Like

As fair as UI, the first thing that comes to mind is Open Web UI, which gives a “chatgpt like” web UI for your models.

Here is the Ollama Docs on open web UI

I am also running some older stuff, and planning to update later on if the cost of time is worth the reward

edit: see below for a much more thoughtful and thorough answer.

1 Like

You’re starting off on the right foot with llama.cpp, as it’s the only tool that uses Vulkan - and Vulkan is the only engine that supports the Vega series. I stuffed quad Vega64s into my ThreadRipper 2950X rig earlier in the year and ran llama.cpp across them (32GB). It wasn’t too optimized, but I quickly found that MoE models are far more efficient on this platform with the limited VRAM.

Qwen2.5 is a very fast set of models - a bit too fast for their own good. It’s only really useful for small things like intellisense and small tasks. I used to run qwen2.5 Coder 1.5B on my CPU+DRAM only, leaving the GPUs free for full models and context.

You should load up Qwen3.8 35B A3B @ Q4. Read up on how Mixture of Experts (MoE) works for this type of model, and the exact llama.cpp parameters to offload MoE. In short, only 3B parameters are active which easily fits within the 8GB VRAM - the rest of the layers will be offloaded to system DRAM. I think you must have offloaded layers in order to get 27B to work anyways, right? The Qwen 27B model is what we call a “Dense” model which is the worse model to use with very limited VRAM - dense models must fit completely into VRAM in order to get speed out of it. However, MoE can be offloaded.

You have a rare motherboard there - it supports native x8 + x8 direct to the CPU. You could pickup another Vega64 for $100 to have 16GB VRAM with layers split.

After playing with Open WebUI, I recommend setting up llama-swap in a docker image. And then configure multiple models to “swap out” when requested. Like Gemma E4B @ Q4 for writing prompts, while switching to Qwen3.8 35B A3B for coding tasks.

Oh, and try to use Docker from now on. You don’t have to compile anything, just run the long commends (by sticking in a bash file).

That 64 GB system ram is what is saving you here to overcome the small 8GB VRAM. Anything you can do to increase that to 16GB, or really 24GB is what you want to target, will blow your mind in what will fit with full context windows. Then it’s a matter of how much you want to pay to increase VRAM even more.

You may also consider upgrading that ram to 2933 or 3200, when you can afford to, as it’s basically 50% faster. Which directly translates to 50% faster tokens, regardless of your setup.

Just don’t spend too much on this setup. No matter how to slice it, you’ll be stuck on Q4 quants and while those work pretty damn well, especially with an agent harness that has a closed loop to analyze its own results and make corrections, will get you pretty far. You can fit Qwen3.8 35B A3B @ Q8 in that DRAM + VRAM for context and any other layers you can fit.

However, if you want more quality and/or less divergence, you really want to plan on larger GPUs with 24-32GB VRAM - two of them - in order to get to the level of running FP8 and FP16 variants for some solid coding tasks. But that’s $2500, minimal, to get started. $1000 for Intel B65 32GB, $1500 AMD R9700 32GB, etc. You can then reserve this Vega64 strictly for image generation using image models as most of those fit. You can also run Qwen2.5 Coder solely on this GPU as well for really fast intellisense, class refactoring, and similar small dedicated tasks. Just remember to turn down Temperature to 0.2 or even 0.0.

1 Like

You might want to check what happens when you use the environment variable HSA_OVERRIDE_GFX_VERSION=9.0.0 to use ROCm restricted for Vega. I’ve had slow but not-failing tokens-per-second from this.

Noted, will look into this.

I asked chatgpt what to do, it gave me different commands, saying this:

I’ve started with -ngl 16 rather than -ngl 99 so we don’t try to cram the entire 27B model into your GPU’s 8 GB of VRAM. The rest can run from system RAM.

Oh that’s a cool thought. I’ll have to look into that, because the first card is a rather bulky one, but I have used the 2nd slot in the past for a 10GB card.

I’ll have a look at these other suggestions as well. But from what I’m reading, my dreams of locally running something as competent as Claude’s top model is not gonna happen on 1 or 2 vega64’s :stuck_out_tongue:

Asking chatgpt, I’m told my best choice is 2x AMD instinct Mi50 32GB, which I should be able to find at 400 to 520 each, used.

I’d have to check my PSU for that though…

But I’ll look into toying around with this 1 card a bit first. Thanks for the advice.

EDIT: Or perhaps Intel Arc Pro B65 Creator? Intel is jamming a lot of vram into gpus these days it seems

EDIT2: Oh dear, reading this about those instincts:

You’re not just buying a GPU — you’re buying into a Linux-only, ROCm-workaround-dependent setup that needs “Above 4G Decoding” enabled in your motherboard’s BIOS, a manually installed fan (most MI50s ship as bare blower cards with no fan attached, expecting a server’s forced airflow), and acceptance that official driver support could lapse further at some point. None of that is a dealbreaker if you’re comfortable with Linux and hardware tinkering. All of it is a dealbreaker if you wanted plug-and-play.

Seems like a lot of work.

1 Like

@eduncan911 Update, after the help.

I now have 2 RX 9060 XT 16GB and they seem to be working fine on ubuntu server 26.04

Getting outputs like this:

~/llama.cpp# ./build/bin/llama-cli \
>   -hf Qwen/Qwen3-30B-A3B-GGUF:Q6_K \
>   --device Vulkan0,Vulkan1 \
>   --split-mode layer \
>   --reasoning off \
>   -ngl all -c 4096 -n 512 \
>   -p "Can entropy be reversed? Distinguish thermodynamic entropy from information entropy. Give one practical example."
WARNING: radv is not a conformant Vulkan implementation, testing use only.
WARNING: radv is not a conformant Vulkan implementation, testing use only.


Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b11887-6050b467c
model      : Qwen/Qwen3-30B-A3B-GGUF:Q6_K
ftype      : Q6_K
modalities : text

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern



> Can entropy be reversed? Distinguish thermodynamic entropy from information entropy. Give one practical example.
Entropy is a concept that appears in different contexts, most notably in **thermodynamics** and **information theory**. The question of whether entropy can be **reversed** depends on the context. Let’s break this down and distinguish the two types of entropy, then provide a practical example.

---

### 1. **Thermodynamic Entropy**

**Definition**:
Thermodynamic entropy is a measure of the **disorder** or **unavailability of a system’s energy to do work**. It is a central concept in the **Second Law of Thermodynamics**, which states that in an isolated system, entropy tends to increase over time.

**Can it be reversed?**
In an **isolated system**, **entropy cannot be reversed**. The Second Law implies that the total entropy of an isolated system can only increase or stay the same (in a reversible process).
However, **in open systems**, entropy can **locally decrease** if there is an **input of energy** (e.g., a refrigerator cools its interior while increasing entropy in the environment).

**Example of Local Reversal**:
A refrigerator reduces the entropy of its interior (cools it) by moving heat to the exterior, which increases the entropy of the surroundings. The total entropy of the universe still increases.

---

### 2. **Information Entropy**

**Definition**:
Information entropy (also called **Shannon entropy**) is a measure of **uncertainty** or **information content** in a system. It was introduced by **Claude Shannon** in the context of information theory.

**Can it be reversed?**
In information theory, **entropy can be reduced** by **adding information** or **reducing uncertainty**. For example, when you receive more data, the entropy (uncertainty) of a message decreases.

**Example of Reversal**:
Suppose you have a message with high entropy (i.e., it’s very uncertain or random). If you gain additional information that reduces that uncertainty, the entropy decreases.

---

### 3. **Key Differences**

| Aspect | Thermodynamic Entropy | Information Entropy |
|--------|------------------------|---------------------|
| **Definition** | Measure of energy dispersal or disorder | Measure of uncertainty or information content |
| **Units** | Joules per Kelvin (J/K) | Bits or nats |
| **Second Law** | Always increases in an isolated system | Can decrease with new information |
| **Reversibility** | Not reversible

[ Prompt: 244.2 t/s | Generation: 77.9 t/s ]

So now probably going to look up standardized testing for llama

Very nice!

Since you upgraded RDNA4 GPUs, you may want to look into switching to the Radiance LLM Engine. It seems to be kicking ass, especially if you have additional 64GB of DRAM.

Radiance works on a single 32GB GPU (dual 9070XTs in your case).

Tip: don’t try to build and load it yourself. Use the supplied docker image in the first post.

@educatedfool I went ahead and tried that and it failed. Looks like radiance is built only for gfx1201 , which is the 9700 and not gfx1200, which is the 9060 xt

Logs saying this:

W kernel plugin ‘libr4d’ has no device code for device 0: the fat binary has code objects for [gfx1201] and this card runs [gfx1200, gfx12-generic]. Its 476 device kernel(s) are left out of selection here.
W kernel plugin ‘spechub’ has no device code for device 0: the fat binary has code objects for [gfx1201] and this card runs [gfx1200, gfx12-generic]. Its 2 device kernel(s) are left out of selection here and its 2 host kernel(s) stay.

So guess that doesn’t work.

1 Like

I think you meant me to @ me. Ah, I thought you had the 9070s. I misread that.

Oh damn, I only just noticed. Woopsiedoodle

Glad you got it working! This gives me hope for my 4070 Ti SUPER + 256 GB RAM system.