Run this model with HF Jobs

Run Roland2531/CosyVoice3-2512-RDNA-HIP on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Roland2531/CosyVoice3-2512-RDNA-HIP. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Roland2531/CosyVoice3-2512-RDNA-HIP on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
File size: 14,094 Bytes
eb2e393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9190bbf
eb2e393
6eb1a8e
eb2e393
4e284a9
eb2e393
4e284a9
 
9190bbf
4e284a9
 
9190bbf
 
 
ab34fdb
4e284a9
 
 
eb2e393
 
 
4e284a9
eb2e393
6eb1a8e
eb2e393
6eb1a8e
 
9190bbf
6eb1a8e
 
 
 
 
 
 
9190bbf
6eb1a8e
 
 
 
 
 
9190bbf
6eb1a8e
 
 
 
9190bbf
6eb1a8e
 
4e284a9
 
 
 
eb2e393
4e284a9
 
 
 
9190bbf
 
4e284a9
9190bbf
4e284a9
9190bbf
eb2e393
 
 
4e284a9
 
 
6eb1a8e
9190bbf
eb2e393
4e284a9
9190bbf
4e284a9
 
9190bbf
4e284a9
 
 
 
eb2e393
 
 
9190bbf
a8a406c
9190bbf
 
 
 
a8a406c
 
 
4e284a9
eb2e393
4e284a9
eb2e393
 
 
9190bbf
eb2e393
 
9190bbf
eb2e393
9190bbf
 
 
 
 
 
 
 
 
1244835
 
 
 
 
 
 
 
 
 
 
eb2e393
4e284a9
eb2e393
4e284a9
 
eb2e393
4e284a9
eb2e393
 
 
4e284a9
eb2e393
4e284a9
a8a406c
4e284a9
1244835
9190bbf
eb2e393
 
 
 
 
4e284a9
 
ab34fdb
9190bbf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
license: apache-2.0
license_link: https://www.apache.org/licenses/LICENSE-2.0
language:
- zh
- en
- ja
- ko
- de
- es
- fr
- it
- ru
tags:
- tts
- cosyvoice
- cosyvoice3
- amd
- rocm
- hip
- rdna4
- rdna3
- audio-super-resolution
- ap-bwe
library_name: rdna-cosyvoice
---

# CosyVoice3-2512 Native AMD RDNA 4 / RDNA 3 HIP (`v1.2`)

Prebuilt **Windows x64** native AMD ROCm HIP engine (both a plug-and-play **RX 9070 `gfx1201` portable bundle with ROCm 10.2 DLLs** and a **standalone 6-arch binary**) plus pre-converted standard weights (`.rcv3` & optional 48 kHz `.rbwe`) for **CosyVoice3-2512**.

## Version & Release Summary

| Field | Value |
|---|---|
| **Release** | `rdna-hip v1.2` (`2026-12-01`) |
| **Base TTS Model** | [FunAudioLLM/CosyVoice3-2512](https://github.com/FunAudioLLM/CosyVoice) (24 kHz native, Apache-2.0) |
| **Optional 48 kHz BWE** | [AP-BWE 24k→48k](https://github.com/yxlu-0102/AP-BWE) (separate optional `.rbwe`, MIT) |
| **Portable Bundle (RX 9070 `gfx1201`, No ROCm SDK Needed)** | [`bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip`](bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip) (`214.65 MiB` β€” includes `rdna_cosyvoice.exe` + ROCm 10.2 `gfx1201` runtime DLLs & libraries) |
| **Standalone Binary (All 6 RDNA 4/3 Archs)** | [`bin/rdna_cosyvoice.exe`](bin/rdna_cosyvoice.exe) (`3.27 MiB` β€” `gfx1200`, `gfx1201`, `gfx1100`, `gfx1101`, `gfx1102`, `gfx1103`; bring your own ROCm runtime) |
| **Hardware Verification** | **AMD Radeon RX 9070 (`gfx1201`) real-silicon verified** (including clean-`PATH` portable ZIP test); `gfx1200` & RDNA 3 (`gfx1100–1103`) compiled + 87/87 zero-spill ISA audited only (not hardware-run) |
| **Source Code & Docs** | [GitHub: `ruina37520198-a11y/cosyvoice.cpp` (`main` β†’ `rdna-hip/`)](https://github.com/ruina37520198-a11y/cosyvoice.cpp/tree/main/rdna-hip) |
| **Vulkan / GGML Edition** | Looking for the GGML Vulkan build instead? See [Windows x64 Vulkan Build on Hugging Face](https://huggingface.co/Roland2531/cosyvoice.cpp-AiTable-Vulkan-Windows-x64) |

> **Unofficial community build & conversion:** Independent native HIP engine and weight conversion; not affiliated with FunAudioLLM / Alibaba. Only standard base weights are hosted here (no private voice prompts or character LoRAs).

---

## Quick Pick β€” Which Files Should I Download?

### Step 1: Pick Your Engine Package (Windows x64)

| Your GPU / Setup | Download | Extra Requirements |
|---|---|---|
| **AMD Radeon RX 9070 series (`gfx1201`) β€” Plug-and-Play (Recommended)** | `bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip` | Unzip and run β€” **no ROCm SDK install required**. Needs AMD Adrenalin driver + Microsoft VC++ 2015–2022 Redistributable (x64). |
| **Other RDNA 4 (`gfx1200`) / RDNA 3 (`gfx1100–1103`), or existing ROCm install** | `bin/rdna_cosyvoice.exe` | Requires your system ROCm runtime `bin` directory on `PATH` matching your GPU's `gfx` architecture (see DLL list below). |

### Step 2: Pick Your Standard Weights

| Goal | Main TTS Weight (24 kHz) | Optional 48 kHz BWE |
|---|---|---|
| **Maximum Fidelity (48 kHz, Audio-Lossless F16)** | `CosyVoice3_RDNA_F16.rcv3` | `AP_BWE_24k48k_F16.rbwe` |
| **Lower VRAM Footprint (48 kHz, Q8I-G64)** | `CosyVoice3_RDNA_Q8I.rcv3` | `AP_BWE_24k48k_Q8I.rbwe` |
| **24 kHz Native Only (No BWE)** | Either `.rcv3` above | *(not needed; omit `--bwe`)* |

---

## Runtime DLL Dependencies Explained

`rdna_cosyvoice.exe` has **zero** `rocfft.dll`, GGML, or FFmpeg dependencies. Besides standard Windows libraries (`KERNEL32.dll`, `WS2_32.dll`, `SHELL32.dll`) and VC++ Runtime (`MSVCP140.dll`, `VCRUNTIME140.dll`), the required **AMD ROCm 10.2 runtime files** (all pre-bundled inside `bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip` for `gfx1201`) are:

- **Direct imports (2 DLLs):** `amdhip64_7.dll`, `rocblas.dll`
- **Dynamic / transitive dependencies (5 DLLs):** `amd_comgr.dll` (loaded at runtime by `amdhip64_7.dll`), `rocm_kpack.dll`, `libhipblaslt.dll`, `libtensilelite-host.dll`, `origami.dll`
- **GPU kernel libraries (architecture-specific):** `rocblas/library/`, `hipblaslt/library/<gfx>/`, `.kpack/blas_lib_<gfx>.kpack`
- **Third-party licenses:** Included in `licenses/` and `THIRD_PARTY_NOTICES.md` inside the portable ZIP (`amd_comgr`, `rocblas`, `hipblaslt`, `origami`, `rocm-core`, etc.).

> **Important architecture note:** The portable ZIP bundles **`gfx1201` (RX 9070)** kernel libraries verified under a stripped system-only `PATH` (`CLI_EXIT=0`, zero stderr warnings). Users on `gfx1200` or RDNA 3 (`gfx1100–1103`) should use the standalone `bin/rdna_cosyvoice.exe` with ROCm libraries matching their GPU.

---

## File Manifest & SHA-256 Checksums

All checksums are listed in [`SHA256SUMS.txt`](SHA256SUMS.txt).

| File | Category | Precision / Details | Size | License | SHA-256 |
|---|---|---|---:|---|---|
| `bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip` | Portable Bundle | `rdna_cosyvoice.exe` + 7 ROCm 10.2 DLLs + `gfx1201` libraries + licenses | 225,079,541 B (214.65 MiB) | MIT + AMD ROCm | `6d3c6f2e636f2509ee24182d22450400b0186c4b3b175197adbba8e6b6e7dfe5` |
| `bin/rdna_cosyvoice.exe` | Standalone Binary | Windows x64 HIP fat binary (`gfx1200/1201/1100–1103`, no DLLs bundled) | 3,425,280 B (3.27 MiB) | MIT | `39119803d741bd61a962e075f29d64b04f488b943884298ab89e169831baf27a` |
| `CosyVoice3_RDNA_F16.rcv3` | Main TTS (24 kHz) | Audio-Lossless `F16` LLM & DiT + native FP32 HiFT/F0/norms/LM-head | 1,512,917,952 B (1.41 GiB) | Apache-2.0 | `a2139736fcc3e85eafa86bce56f4daacfa7987206ad34efa915512a16d384d3f` |
| `CosyVoice3_RDNA_Q8I.rcv3` | Main TTS (24 kHz) | Wave32-SoA `Q8I-G64` LLM & DiT + native FP32 HiFT/F0/norms/LM-head | 1,004,440,512 B (957.9 MiB) | Apache-2.0 | `437cbdc81678c105dc2274c188a0b92441f984ba46196ddee4d389458e4b6b32` |
| `AP_BWE_24k48k_F16.rbwe` | Optional 48 kHz BWE | `F16` ConvNeXt pwconv + FP32 pre/post/depthwise/norms | 68,720,644 B (65.5 MiB) | MIT | `dea41d7fea55da58be6eca87800402d04b1ac27f4935ec83ec7b235f185b4653` |
| `AP_BWE_24k48k_Q8I.rbwe` | Optional 48 kHz BWE | `Q8I-G64` ConvNeXt pwconv + FP32 pre/post/depthwise/norms | 45,127,684 B (43.0 MiB) | MIT | `237f82221ef174f3fc43d3d80926be4ec70ffaf306722d1e23c2214f3999881a` |

---

## Quick Start (CLI & OpenAI-Compatible HTTP Server)

```powershell
# 24 kHz CLI (from unzipped portable folder)
.\rdna_cosyvoice.exe --model CosyVoice3_RDNA_F16.rcv3 --prompt-speech voice_ref.gguf --text "Hello world." --output out_24k.wav

# 48 kHz CLI with optional AP-BWE (lossless 0–10.5 kHz low-band preservation)
.\rdna_cosyvoice.exe --model CosyVoice3_RDNA_F16.rcv3 --bwe AP_BWE_24k48k_F16.rbwe --prompt-speech voice_ref.gguf --text "Hello world." --stream --chunk-tokens 125 --output out_48k.wav

# OpenAI-compatible HTTP server (/v1/audio/speech, /v1/models, /healthz)
.\rdna_cosyvoice.exe --api --model CosyVoice3_RDNA_F16.rcv3 --bwe AP_BWE_24k48k_F16.rbwe --voice-prompt "speaker=voice_ref.gguf" --host 127.0.0.1 --port 9880 --stream --chunk-tokens 125
```

- **LoRA / Voice Overlays:** Both `F16` and `Q8I` `.rcv3` weights support startup `cosyvoice3-voice-overlay-v1` GGUF merging (`--voice-adapter`, `--voice-adapter-scale`) and dynamic per-request rank-4 LoRA hot-toggling (`--asmr-lora`).
- **Voice Prompts:** `rdna_cosyvoice.exe` expects pre-encoded `*_ref.gguf` voice prompts (create them from `.wav` recordings via `cosyvoice-cli --frontend-only` with `campplus.onnx` + `speech_tokenizer_v3.onnx`).

---

## What's New in `v1.2` (`2026-12-01`)

- **`+41%` F16 LLM Decode & `1.36×–1.70Γ—` Faster Flow DiT:** 56-CU Split-KV FlashDecoding, LDS softmax/Top-K, 256-thread parallel RAS fallback (with fresh RNG draw), 9-launch fused DiT blocks, 8-warp contiguous FP16 WMMA FlashAttention-2, division-free LDS-transposed FP32 ConvPos, and a 4-entry 1-step GPU-indexed DiT HIP Graph cache (`F16` `--bench` LLM `503–581 tok/s`, whole-file RTF **`0.063–0.081`** @ 24 kHz / **`0.066–0.085`** @ 48 kHz + BWE).
- **Zero-Stall HTTP Server (`-15% to -21%` Warm Streaming Latency):** `TCP_NODELAY`, coalesced chunk/response framing, and 2 ms `DisconnectMonitor` polling eliminate ~30–40 ms per-request loopback stalls (short 1.8 s warm streaming down to `221 ms / RTF 0.114`, `TTFA 212 ms`).
- **Automatic Corrupted-Prompt & Cross-Language Fallback:** Automatically detects mojibake/PUA prompt transcripts and cross-language prompt-vs-input mismatches in `auto` mode and falls back safely to `cross_lingual` (explicit `--mode zero_shot` still overrides), eliminating ZH generation failures/hallucinations (`60/60` clean in FireRedASR2-AED automated screening).
- **Full Init Tensor Validation & `--bench` Hardening:** Validates all LLM/DiT tensor shapes, dtypes, uniform quantization, VRAM/host residency, and Flow noise sizing before launch; fixes `--bench` warmup on corrupted prompts.

---

## Measured Benchmarks & Precision (AMD Radeon RX 9070 `gfx1201`)

### Footprint & Cold Load (24 kHz Base)

| Model | Cold Load | Weight VRAM | Shared Scratch | Total Init VRAM |
|---|---:|---:|---:|---:|
| `CosyVoice3_RDNA_F16.rcv3` | 660.6 ms | 1,178.9 MB | 281.1 MB | 1,614.1 MB |
| `CosyVoice3_RDNA_Q8I.rcv3` | 890.1 ms | 694.0 MB | 281.1 MB | 1,129.1 MB |

### Built-in Warm `--bench` Suite (`v1.2` F16, Lower RTF is Better)

| Test Case | `F16` LLM tok/s | `F16` 24 kHz RTF | `F16` 48 kHz (+BWE) RTF |
|---|---:|---:|---:|
| `zh_short` (7.08 s) | 503.0 tok/s | **0.071** | **0.074** |
| `zh_medium` (18.04 s) | 548.8 tok/s | **0.063** | **0.066** |
| `zh_long_stream` (`ct=125`, 23.24 s) | 537.6 tok/s | **0.098** | **0.100** |
| `ja_medium` (7.48 s) | 556.3 tok/s | **0.067** | **0.069** |
| `zh_instruct_leak` (3.12 s) | 581.3 tok/s | **0.081** | **0.085** |
| `zh_speed_120` (`speed=1.2`, 5.90 s) | 554.6 tok/s | **0.077** | **0.079** |

### Independent Warm HTTP Comparison: RDNA-HIP `v1.2` vs Vulkan F16 (`stream=true, chunk_tokens=125`, 20 Seeds Γ— 2 Reversed Rounds)

- **Strict Same-Mode Comparison (Japanese `zero_shot` on Both Engines, Kana-Preprocessed):** Mean request time **`0.66 s`** (24 kHz) / **`0.69 s`** (48 kHz+BWE) vs Vulkan **`0.94 s`** (**~30% faster**); voiced-audio RTF **`0.203`** / **`0.211`** vs **`0.292`**; median TTFA **`0.42 s`** / **`0.44 s`** vs **`0.55 s`**.
- **Full 5-Sentence Multilingual Warm Suite (Mode Note: RDNA `auto` uses `cross_lingual` on ZH/EN with a JA prompt while Vulkan uses `zero_shot`):**
  - Overall RTF: **`0.099–0.101`** (24 kHz) / **`0.103–0.104`** (48 kHz+BWE) vs Vulkan `0.147–0.150`; median TTFA **`0.38–0.39 s`** / **`0.40 s`** vs `0.54–0.55 s`.
  - Startup to `/healthz`: **`1.0–1.5 s`** vs Vulkan `2.1–3.2 s`.
  - Resources: Peak Host System RAM **`474–491 MiB`** vs Vulkan **`2,397 MiB`** (**~5Γ— lower**); active single-core CPU **`19–20%`** vs **`31–33%`**; peak VRAM/Shared `1,917–1,983 / 116 MiB` vs `1,924 / 44 MiB`.
  - ZH/EN ASR Screening (80 HTTP runs, FireRedASR2-AED): **`79/80` clean** (`0` wrong, `1` partial) vs Vulkan `34/80` errors (`9` wrong, `25` partial); CLI `auto` ZH/EN **`120/120` clean**.
  - Slow-Speed Stress (`speed=0.25`, 100 s+ audio): VRAM flat `2,099 MiB`, `3.91 s` (down from `4.89 s` in `v1.1`), post-stress probe `0.68–0.82 s`.
- **Cold 1st Request vs Warm (`v1.1` vs `v1.2`, Same `instruct` Mode):** Cold 1st request `540–656 ms` (one-time ROCm/rocBLAS lazy init); warm `v1.2` is `15–21%` faster than `v1.1` across every sentence length (`S1_short 297 -> 250 ms`, `S3_med2 1028 -> 867 ms`, `S5_xlong 2532 -> 2116 ms`; 5.6 s prompt `S1_short 221 ms / RTF 0.114`).
- **Note on `--bench` streaming:** `0.063–0.081` (24 kHz) / `0.066–0.085` (48 kHz+BWE) covers the 5 whole-file cases; streaming `zh_long_stream` (`ct=125`) measures `0.098–0.108` depending on prompt length and process priority.

### Precision & Quantization Audit

- **DiT Mel SNR vs Pure FP32:** `50.87 dB` (`F16`), `42.93 dB` (`Q8I`) β€” vs `33.71 dB` on the Vulkan F16 baseline.
- **HiFT Vocoder SNR vs PyTorch FP32:** `105.07 dB` (decoder + iSTFT), `59.88 dB` (full E2E incl. F0 + SineGen); 100% native FP32 in both `.rcv3` packs.
- **Q8I-G64 Matrix Audit:** LLM 96 matrices avg `44.19 dB` (min `43.48 dB`); DiT 88 matrices avg `42.95 dB` (min `38.71 dB`).
- **AP-BWE 24kβ†’48k (`--bwe`):** RX 9070 latency `4.7–21.0 ms` on short/medium utterances (~13–19 ms for 4–6 s audio, ~53 ms for 15 s audio); Q8I 32 pwconv matrices avg `42.94 dB` (min `40.02 dB`); live SNR vs PyTorch FP32 AP-BWE `40.25–40.28 dB` (`zh_short`) and `37.20–37.43 dB` (`zh_instruct_leak`). Default `lossless_low` preserves 0–10.5 kHz and applies a `-100 dB` silence floor gate.

---

## Known Limitations

- **Windows x64 + ROCm HIP only** (Linux build not yet implemented).
- **HTTP output formats:** `wav` and `pcm` only (`mp3`/`opus`/`aac`/`flac`/`m4a`/`ogg` return HTTP `400 unsupported_format`).
- **GPU fast-sampler PRNG:** Deterministic `SplitMix64` by default (pass `--exact-cpu-rng` for `std::mt19937` parity).
- **Japanese kanji frontend:** Upstream CosyVoice3-2512 weights frequently misread raw Japanese kanji without kana conversion; convert kanji to hiragana/katakana in the caller frontend before synthesis.
- **RDNA 3 (`gfx1100–1103`) & `gfx1200`:** Compiled into `rdna_cosyvoice.exe` with zero register spills (`87/87` kernels), but not yet verified on real RDNA 3 / `gfx1200` hardware, and not covered by the `gfx1201`-specific ROCm libraries inside the portable ZIP.

---

## Attribution & Licenses

- **CosyVoice3-2512 weights (`*.rcv3`):** [FunAudioLLM/CosyVoice](https://github.com/FunAudioLLM/CosyVoice) β€” **Apache-2.0**
- **AP-BWE weights (`*.rbwe`):** [yxlu-0102/AP-BWE](https://github.com/yxlu-0102/AP-BWE) β€” **MIT**
- **RDNA-HIP engine binary & source (`bin/rdna_cosyvoice.exe`, GitHub `rdna-hip/`):** [ruina37520198-a11y/cosyvoice.cpp (`main`)](https://github.com/ruina37520198-a11y/cosyvoice.cpp/tree/main/rdna-hip) β€” **MIT**
- **Bundled AMD ROCm 10.2 runtime libraries (`bin/rdna_cosyvoice-v1.2-win64-rocm10.2-gfx1201.zip`):** Subject to their respective AMD ROCm component licenses included in `licenses/` inside the archive.