Logo Apu Memory Tuner

Apu Memory Tuner

Tổ chức
amd
apu-memory-tuner

Inspects and tunes the shared-vs-dedicated memory split on AMD Ryzen APUs with unified memory (UMA) so larger LLMs and image-gen models fit on the iGPU, or so reserved GPU memory is returned to the CPU. Use when the user mentions Ryzen AI, Strix Halo / Strix Point / Krackan / Phoenix / Hawk Point, Ryzen AI Max, gfx1150 / gfx1151 / gfx1152, integrated Radeon, iGPU memory, UMA Frame Buffer Size, AMD Variable Graphics Memory, VGM, GTT, GART, TTM, pages_limit, amd-ttm, amd-debug-tools, "shared GPU memory", "dedicated GPU memory", carve-out, "not enough VRAM", "out of VRAM", "GPU OOM", llama.cpp on iGPU, ROCm on APU; or asks how much memory the iGPU can use, how to give the iGPU more memory, how to balance memory between CPU and GPU on UMA, or how to change the BIOS UMA reservation. Read-only diagnostics work everywhere; tuning runs automatically on Linux via `amd-ttm` and prints guided BIOS steps on Windows. Do not use for discrete Radeon cards, Intel iGPUs, or Apple Silicon -- it is APU-only.

Tổng quan

Nhà phát hànhamd
Kho mãskills
Tên kỹ năngapu-memory-tuner
Sao
465
Bản fork
44
Tệp đi kèm
5
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được amd công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Apu Memory Tuner trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/amd/skills/tree/main/staging/apu-memory-tuner
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amd/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/staging/apu-memory-tuner .claude/skills/apu-memory-tuner
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Apu Memory Tuner trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Apu Memory Tuner ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Apu Memory Tuner không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

APU Memory Tuner

Help the user inspect and tune the shared-vs-dedicated memory split on AMD Ryzen APUs with unified memory architecture (UMA). The user states intent ("I want to run a 70B model", "I just want my games to be smooth"); this skill picks the numbers, explains the trade-offs, and applies the change where it can.

What's actually going on

On a UMA APU (Strix Halo, Strix Point, Krackan, Phoenix, Hawk Point, etc.) the CPU and integrated Radeon share one physical pool of DRAM. There is no separate VRAM chip. Two logical knobs cut that pool up:

KnobWhere setWhat it doesReversible?
Dedicated VRAM (a.k.a. UMA Frame Buffer / carve-out / GART)BIOS, requires rebootPermanently reserves DRAM for the GPU. CPU can't see it.Only via BIOS.
Shared GPU memory (a.k.a. GTT)Kernel/driver-managedDynamic, OS-reclaimable cap on how much system RAM the GPU may map at a time.Yes; Linux: amd-ttm. Windows: no user knob.

Key insight the rest of this skill rests on: "VRAM" and shared RAM run at the same speed on UMA, because they're the same DRAM. So the right default for AI workloads is small VRAM + large GTT, not the other way around.

When to use

Use this skill when the user wants to:

  • Run a model that doesn't fit ("out of VRAM", "GPU OOM" on an iGPU).
  • Inspect the current memory split before changing anything.
  • Move the slider toward more shared memory (LLMs, large image gen) or toward more dedicated VRAM (gaming, predictable framebuffer).
  • Revert any prior changes.

Do not use it for: discrete Radeon cards (no GTT/UMA on those), Apple Silicon (different architecture entirely), or NVIDIA/Intel GPUs.

Prerequisites

State these to the user up front so a missing one doesn't surface as a mystery script error halfway through:

  • GPU architecture: AMD APU with integrated Radeon. Officially tuned for RDNA3.5 (gfx1150 / gfx1151 / gfx1152); RDNA3 / RDNA2 APUs work but with conservative profile numbers.
  • OS: Linux (kernel + amd-ttm path) or Windows (guided BIOS path). macOS is not supported.
  • Linux kernel: see the live AMD matrix linked from reference.md. The detection script enforces a conservative floor (mainline 6.18.4 / Ubuntu HWE 6.17.0 / Ubuntu OEM 6.14.0).
  • Linux extras: pipx install amd-debug-tools for the amd-ttm CLI. The skill prints this command but never installs it silently. Reading the BIOS carve-out from dmesg typically requires sudo.
  • Windows extras: AMD Adrenalin Software 25.x or newer if the user wants the Variable Graphics Memory slider as an alternative to BIOS.
  • Reboot tolerance: any tuning change requires a reboot. Don't propose this skill mid-workload.

Silent footguns to surface when relevant:

  • HSA_OVERRIDE_GFX_VERSION — users running ROCm/PyTorch on an APU often set this to convince ROCm the iGPU is a supported target. It does not affect memory tuning, but if the user reports HIP error: invalid device after raising GTT, this env var is usually the cause, not the GTT change.
  • Windows Win32_VideoController.AdapterRAM is a 32-bit field capped at 4 GiB. If the user's reported "dedicated VRAM" is exactly 4096 MB, that's the WDDM truncation, not the real BIOS reservation. The real value lives in Task Manager > Performance > GPU.

The four-step flow

Run these in order. Each one is read-only until step 4.

[ ] 1. Detect platform and support level
[ ] 2. Show current configuration
[ ] 3. Pick a profile from the user's intent
[ ] 4. Apply (Linux) or print BIOS guidance (Windows); verify after reboot

Step 1: detect platform

bash
python scripts/detect_platform.py

Add --json for parseable output. Exit codes:

ExitMeaningNext action
0Supported AMD APU.Continue to Step 2.
2Wrong hardware (not an AMD APU, or unclassifiable).Stop. Tell the user this skill can't help them.
3AMD APU but a hard prerequisite is missing (Linux kernel too old).Stop. Tell the user the prereq and stop. Do not attempt to upgrade the kernel from this skill.

The script reports the OS, CPU, GPU LLVM target (e.g. gfx1151), the generation bucket (RDNA3.5 / RDNA3 / RDNA2 / older), total RAM, and on Linux the kernel version vs. the minimums in the AMD doc.

Step 2: show current configuration

bash
python scripts/show_config.py

Reports current dedicated VRAM, current shared-GPU cap, total RAM, and on Linux the raw pages_limit value plus a rocminfo sanity-check of what the runtime actually sees. Note any messages it prints — Linux often needs sudo for the dmesg read of the BIOS carve-out, and Windows' AdapterRAM field is capped at 4 GiB by WDDM (real value lives in Task Manager).

Step 3: pick a profile

Ask the user what they want, in workload terms, not numbers. Map their answer to one of these:

ProfileWhat it doesUse when the user says...
large-models (default)GTT to ~75% of RAM, BIOS VRAM at the floor (0.5 GB)."Run a big model", "fit Llama 70B", "I keep getting OOM on the iGPU", "give the GPU as much memory as possible".
balancedGTT at the kernel default (~50%), 1 GB BIOS VRAM."I just do mixed dev work", "back to defaults", "don't waste RAM on the GPU".
graphicsGTT at default; BIOS VRAM raised to the larger of 8 GB or 25% of RAM."I'm gaming", "I want a predictable framebuffer", "stuttering in games".
resetRevert all changes this skill made."Undo it", "go back to stock".
customUse the explicit --gtt-gb / --vram-gb the user passed."I want exactly N GB".

Default: if the user is here at all and didn't specify, they almost always want large-models -- that's the only profile that meaningfully changes the experience for the workload that brought them here (running a model that didn't fit). Use it unless they explicitly said gaming, said they want defaults, or said an exact number.

If you still can't tell, use the AskQuestion tool with the five options above labeled in plain English; do not invent a sixth.

Step 4: apply or guide

bash
python scripts/apply_profile.py --profile <choice>

Add --dry-run first if the user wants to see the planned change before committing.

What happens on each OS:

  • Linux: writes the new GTT cap via amd-ttm --set <N> (which persists to /etc/modprobe.d/ttm.conf). Reboot is required; the script tells the user but never reboots automatically. If amd-ttm is missing, the script exits with a clear install hint (pipx install amd-debug-tools) — do not install it yourself without confirming with the user.
  • Windows: prints step-by-step BIOS instructions for the UMA Frame Buffer Size, plus a note about AMD Adrenalin's "Variable Graphics Memory" slider as an alternative on supported laptops. Nothing is written to disk or registry. The script never modifies BIOS for the user.

Then re-run python scripts/show_config.py after reboot to verify.

OS-specific reality check

CapabilityLinuxWindows
Inspect dedicated VRAMYes (dmesg/journalctl, may need sudo)Yes (Task Manager / dxdiag; AdapterRAM is truncated)
Inspect shared capYes (/sys/module/ttm/parameters/pages_limit)Yes (dxdiag "Shared Memory")
Change shared cap automaticallyYes (amd-ttm)No — WDDM-managed, not user-tunable
Change dedicated VRAM automaticallyNo (BIOS only)No (BIOS only; VGM via Adrenalin is the closest UI)

Net effect: on Windows, raising the BIOS UMA Frame Buffer Size is the only real way to give the GPU more memory. On Linux you almost always want to lower BIOS VRAM and raise GTT instead.

Safety rules

  • Never auto-reboot. Always tell the user the reboot is needed and let them do it.
  • Never touch BIOS programmatically. The script prints instructions; the user navigates the firmware menu.
  • Never silently install amd-debug-tools. Print the pipx install line and ask before running it.
  • Never set a profile whose validation fails. The script refuses GTT targets above 95% of RAM or VRAM targets above 50% of RAM.
  • Never claim a change took effect before the user has rebooted and re-verified with show_config.py.

Verification checklist

Mark this skill complete only when all are true:

  • python scripts/detect_platform.py exits 0.
  • python scripts/show_config.py reports the new values after the reboot following Step 4.
  • The user has tried the workload that motivated the change (loaded the model, launched the game) and confirmed the new headroom helps.
  • On Linux, cat /sys/module/ttm/parameters/pages_limit matches what apply_profile.py reported.

If any box is unchecked the change either didn't take effect or the user hasn't validated it yet — say so out loud rather than declaring success.

Reference

For the full glossary, the link to AMD's authoritative kernel-version / ROCm-compatibility matrix, per-OEM BIOS notes, profile math, and troubleshooting, see reference.md.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Apu Memory Tuner làm được gì?

Inspects and tunes the shared-vs-dedicated memory split on AMD Ryzen APUs with unified memory (UMA) so larger LLMs and image-gen models fit on the iGPU, or so reserved GPU memory is returned to the CPU. Use when the user mentions Ryzen AI, Strix Halo / Strix Point / Krackan / Phoenix / Hawk Point, Ryzen AI Max, gfx1150 / gfx1151 / gfx1152, integrated Radeon, iGPU memory, UMA Frame Buffer Size, AMD Variable Graphics Memory, VGM, GTT, GART, TTM, pages_limit, amd-ttm, amd-debug-tools, "shared GPU memory", "dedicated GPU memory", carve-out, "not enough VRAM", "out of VRAM", "GPU OOM", llama.cpp...

Vì sao nên dùng Apu Memory Tuner trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Apu Memory Tuner là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Apu Memory Tuner trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/amd/skills/tree/main/staging/apu-memory-tuner. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Apu Memory Tuner?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Apu Memory Tuner với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Apu Memory Tuner với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Apu Memory Tuner có miễn phí không?

Có. Kỹ năng này được amd phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇