Repository navigation
Releases
Releases · julianmb/ds4fa
v0.7 — 32 GB Swap & Memory Protection Safeguards
What's new in v0.7
🛡️ Out-Of-Memory (OOM) & Kernel Freeze Prevention
Added three system safeguards to prevent out-of-memory kernel page-fault freezes on Strix Halo systems:
- 32 GB System Swapfile: Created and enabled
/swapfile_32g(added to/etc/fstab), providing 33 GB total swap space to absorb virtual memory spikes without starving the AMD KFD driver. - 115 GB Virtual Memory Cap: Enforced
ulimit -v 123480320inrun-deepseek-v4.shso any process exceeding 115 GB is terminated safely in user space before affecting the kernel. - Automated Pre-Flight Model Fit Check: Integrated
rocm_model_fitdirectly intorun-deepseek-v4.shto automatically verify GTT/TTM memory limits prior to model load.
v0.6 — DeepSeek-V4-Flash-0731 Full Model Deployment
What's new in v0.6
🚀 Official DeepSeek-V4-Flash-0731 Full Deployment
- Vocabulary Fallback Fix: Updated
ds4.cwith automatic vocabulary size fallback (general.vocab_size/m->n_vocab) to seamlessly load the official July 31 release GGUFs. - Model Verification: Validated 100% complete
DeepSeek-V4-Flash-0731-UD-IQ2_XXSmodel (~85 GB total across 3 shards) withmake rocm-model-fit. - Standalone Shard Quantization Tool: Added
misc/make_standalone_shard.pyfor flexible single-shard ROCmFPX quantization. - Release Ready: All 43 transformer layers, 256 MoE experts, and 1,048,576 token context window validated for Strix Halo (
gfx1151).
v0.5 — DeepSeek-V4-Flash-0731 Quantization & ROCmFPX Integration
What's new in v0.5
🆕 DeepSeek-V4-Flash-0731 Support (July 31 Official Release)
Support and quantization pipeline for the official release of DeepSeek-V4-Flash-0731 (TerminalBench 82.7, DeepSWE 54.4):
- Automated Pipeline: Added
misc/convert_and_quantize_0731.shand./download_model.sh v4-flash-0731to automatically download, convert, and quantize the model to ROCmFP2 (Q2_0_ROCMFPX~98 GB). - ROCmFPX Integration: Built and validated the
ROCmFPXtoolkit (build-strix-rocmfp4) for Strix Halo (gfx1151). - Memory Efficiency:
Q2_0_ROCMFPX(2.50 bpw) produces a ~98 GB file that fits in 120 GiB usable memory with ~22 GB headroom.
v0.4 — run-deepseek-v4.sh launcher & persistent boot clock lock
What's new in v0.4
🚀 Top-Level Launcher Script
run-deepseek-v4.sh: Single-command launcher for DeepSeek V4 Flash on Strix Halo (./run-deepseek-v4.sh [--server|--cli] [--top-k 4|6] [--port 8000]). Automatically sets up all environment flags (DFLASH_DS4_SPEC=1 DFLASH_DS4_FUSED_VERIFY=1 DFLASH_DS4_SPEC_Q=4 LUCE_MMVQ_MAX_NCOLS=4) for the 32.0 tok/s LocalMaxxing profile.
🔒 Persistent Boot Clock Locking
strix-halo-performance.service:strix-halo-setup.shnow installs and enables a systemd service that automatically locks GPU clocks at 2.9 GHz (rocm-smi -d 0 --setperflevel high) and sets ACPIplatform_profiletoperformanceon every system boot.
⚡ Compiler Optimizations
- Wave32 Flag: Added
-DDFLASH_WAVE_SIZE=32toROCM_CFLAGSin Makefile for gfx1151 Wave32 execution path.
v0.3 — Lucebox ROCmFPX 32.0 tok/s LocalMaxxing Profile
What's new in v0.3
⚡ Reaching 32.0 tok/s on Strix Halo (LocalMaxxing record)
Integrated the high-throughput Lucebox ROCmFPX 2.88-bit block quantization route and DSpark speculative decoding profile on 128 GB Strix Halo (Radeon 8060S / Ryzen AI MAX+ 395):
- ROCmFPX Model Support:
./download_model.sh rocmfpx-strixdownloads the 102.3 GBDeepSeek-V4-Flash-ROCMFP2-STRIX.gguf(2.88 bits/param average). - DSpark Drafter Support:
./download_model.sh dspark-drafterdownloads the 11.3 GBDeepSeek-V4-Flash-DSpark-draft-Q4RMFP4-denseF16.gguf. - GPU Clock Lock & Power Tuning:
strix-halo-setup.shandrocm-doctor.shnow lock Radeon GPU clocks at 2.9 GHz (rocm-smi -d 0 --setperflevel high) and set ACPI platform profile toperformanceto prevent frequency throttling. - Sparse Prefill: Reaches ~250 tok/s prefill using DeepSeek V4 learned indexer (
--ds4-prefill sparse). - Fused DSpark Verification: Enables
DFLASH_DS4_SPEC=1 DFLASH_DS4_FUSED_VERIFY=1 DFLASH_DS4_SPEC_Q=4 LUCE_MMVQ_MAX_NCOLS=4with--ds4-fused-decode --ds4-expert-top-k 4for 32.0 tok/s decode.
🛠️ Script & Doctor Updates
misc/strix-halo-setup.sh: automatically locks GPU clocks to high performance level and sets ACPI platform profile to performance.misc/rocm-doctor.sh: verifies ACPI platform profile and GPU clock performance level in step 6.download_model.sh: addedrocmfpx-strixanddspark-draftertargets.
v0.2 — Strix Halo diagnostics & setup automation
What's new since v0.1
Hardware diagnostics
- Startup profile — prints gfx1151 arch, HIP/ROCm versions, memory flags, TTM/GTT limit on every model load
- Misconfiguration warnings — detects non-gfx1151, old HIP, low TTM limit, model too close to limit, gttsize boot param mismatch
- Actionable fix — prints exact
sudo amd-ttm --set-pages Ncommand when TTM is too low - Per-model fit verdict —
make rocm-model-fitreports whether a GGUF fits the GTT limit - Machine-readable diagnostics —
DS4_ROCM_DIAGwrites key=value or JSON for CI and bug reports
Tooling
make rocm-smoke— allocation/copy/mapping smoke test (no weights needed)make rocm-bench-quick— confirms gfx1151 kernels execute; reports bandwidthmake rocm-doctor— 10-step triage (OS, permissions, arch, ROCm, TTM, tuned, bench, model-fit)make rocm-verify— doctor + strict smoke + bench + model-fit in one passmake ci— strict smoke + bench + upstream sync check
Setup automation
misc/strix-halo-setup.sh— one-shot Ubuntu 24.04 setup (GRUB, modprobe, udev, tuned, ROCm install)misc/99-amd-kfd.rules— GPU-access udev rulesmisc/rocm-doctor.sh— 10-step hardware triage script
Configuration
DS4_ROCM_TTM_PAGES— override TTM/GTT limit per-runDS4_ROCM_TTM_AUTORAISE— auto-raise limit via amd-ttm when model wouldn't fitDS4_ROCM_AUTO_RAISE_ONCE— bound autoraise to one call per processDS4_ROCM_DIAG_FIELDS— basic/full/all scope control
Validation
- Built and tested on 128 GB Strix Halo (Ryzen AI MAX+ 395 / Radeon 8060S)
- ROCm 7.2.3 (7.2.53211), Ubuntu 24.04 HWE kernel 7.0.0-28
- DeepSeek V4 Flash UD-IQ2_XXS verified as capacity proof (~13 t/s)
Breaking changes
- Requires Ubuntu 24.04 HWE (not 26.04)
- ROCm 7.2.x baseline (not 6.x)
- Targets DeepSeek V4 Flash on 128 GB systems
0.1
Summary
- Align ROCm/HIP backend with the ROCm 7.2.3 / HIP 7.2.x baseline.
- Add runtime HIP build/runtime/driver/device reporting for Strix Halo and RDNA3.5 APUs.
- Detect HIP memory-pool/SOMA support before using hipMallocAsync, with a hipMalloc fallback.
- Validate mmap model registration with hipHostRegisterMapped and hipHostGetDevicePointer before kernels use host pointers.
- Report RDNA3.5 TTM/GTT shared-memory limits and warn for oversized model maps.
- Update README/paper wording and retire the stale q4_guard.py patch helper.
Validation
- Built with hipcc 7.2.53211 from ROCm 7.2.3.
- make
- make test