This commit is contained in:
Pascal
2026-07-04 22:47:51 +02:00
parent 4057d0331f
commit f84fc05292
12 changed files with 638 additions and 536 deletions
+54 -52
View File
@@ -1,19 +1,17 @@
[Qwen] qwentts.cpp 199a658 (2026-05-31)
[Qwen] qwentts.cpp 3e3b6c1 (2026-07-04)
ggml_cuda_init: found 1 CUDA devices (Total VRAM: 97247 MiB):
Device 0: NVIDIA RTX PRO 6000 Blackwell Workstation Edition, compute capability 12.0, VMM: yes, VRAM: 97247 MiB
load_backend: loaded CUDA backend from /mnt/workspace/qwentts.cpp/build/libggml-cuda.so
load_backend: loaded CUDA backend from /mnt/workspace/git/qwentts.cpp/build/libggml-cuda.so
ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = NVIDIA RTX PRO 6000 Blackwell Workstation Edition (NVIDIA) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 32 | shared memory: 49152 | int dot: 1 | matrix cores: NV_coopmat2
load_backend: loaded Vulkan backend from /mnt/workspace/qwentts.cpp/build/libggml-vulkan.so
load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-cpu-zen4.so
load_backend: loaded Vulkan backend from /mnt/workspace/git/qwentts.cpp/build/libggml-vulkan.so
load_backend: loaded CPU backend from /mnt/workspace/git/qwentts.cpp/build/libggml-cpu-zen4.so
[Load] Talker backend: Vulkan0 (CPU threads: 16)
[GGUF] ../models/qwen-talker-1.7b-base-BF16.gguf: 480 tensors, data at offset 5954496
[WeightCtx] Loaded 316 tensors, 3322.0 MB into backend
[Talker] Loaded: 28 layers, hidden 2048, heads 16/8, head_dim 128, FFN 6144, RoPE theta 1000000, mrope sections [24,20,20] interleaved=0
[WeightCtx] Loaded 88 tensors, 334.1 MB into backend
[CodePredictor] Loaded: 5 layers, hidden 1024, heads 16/8, head_dim 128, FFN 3072, RoPE theta 1000000, 15 acoustic codebooks (vocab 2048 each), mtp_proj linear
[WeightCtx] Loaded 76 tensors, 34.9 MB into backend
[SpeakerEncoder] Loaded: enc_dim=2048 sr=24000 mel_dim=128 hidden=512 mfa=1536 asp_attn=128 se=128 scale=8
[GGUF] ../models/qwen-tokenizer-12hz-BF16.gguf: 398 tensors, data at offset 29760
[WeightCtx] Loaded 18 tensors, 33.0 MB into backend
[Quantizer] Loaded: 16 codebooks (1 semantic + 15 acoustic), 2048 entries x 256 dim, hidden 512
@@ -24,6 +22,27 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[WeightCtx] Loaded 118 tensors, 142.9 MB into backend
[DAC] Loaded: 4 blocks (strides 8/5/4/3), 24 kHz mono out, weights 142.9 MB
[WeightCtx] Loaded 2 tensors, 3.0 MB into backend
[Pipeline] Ready: hop 1920 samples @ 24000 Hz mono, 16 codebooks @ 12.5 Hz
[KVCache] Allocated: 28 layers, 8 KV heads, head_dim 128, max_seq_len 4096 -> 896 MB
[KVCache] Allocated: 5 layers, 8 KV heads, head_dim 128, max_seq_len 16 -> 0 MB
[Pipeline] Loaded: arch=1b7 variant=base tokenizer=qwen3_tts_tokenizer_12hz codebooks=16 speaker_encoder=deferred speakers=0 fa=on clamp_fp16=off
[BPE] Loaded from GGUF: 151676 vocab, 151291 merges, eos_id=151643
[BPE] Registered 5 arch special tokens (total specials=6)
[WAV] Read buffer: 380672 samples, 22050 Hz, 1 ch, 16 bit
[Audio-Resample] 22050 Hz -> 24000 Hz, 380672 samples...
[Audio-Resample] Done: 380672 -> 414337 samples
[WeightCtx] Loaded 76 tensors, 34.9 MB into backend
[SpeakerEncoder] Loaded: enc_dim=2048 sr=24000 mel_dim=128 hidden=512 mfa=1536 asp_attn=128 se=128 scale=8
[Pipeline] Speaker encoder lazy loaded in 4 ms
[Debug] mel-spk: [1618, 128] first4: -6.330339 -6.170074 -6.011195 -6.243161
[Debug] mel-hann: [1024] first4: 0.000000 0.000009 0.000038 0.000085
[Debug] mel-basis: [128, 513] first4: 0.000000 0.033550 0.008569 0.000000
[Debug] mel-mag: [1618, 513] first4: 0.047604 0.042322 0.042187 0.066630
[Debug] spk-frontend: [1618, 512] first4: 0.000000 0.099754 0.858150 0.000000
[Debug] spk-block3: [1618, 512] first4: 1.962617 0.099754 1.239126 0.246363
[Debug] spk-mfa: [1618, 1536] first4: 0.000000 0.923592 0.609606 0.000000
[Debug] spk-asp: [1, 3072] first4: 0.067514 0.118921 0.240827 0.344086
[SpkExtract] Extracted 2048-dim embedding (414337 samples, padded 415105)
[WeightCtx] Loaded 28 tensors, 24.1 MB into backend
[SEANet] Loaded: 4 stages (ratios 4/5/6/8), 64 -> 512 channels, weights 24.1 MB
[WeightCtx] Loaded 96 tensors, 48.1 MB into backend
@@ -32,24 +51,7 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[EncDownsample] Loaded: k=4 stride=2, 512 -> 512 channels, weights 2.0 MB
[WeightCtx] Loaded 20 tensors, 34.0 MB into backend
[EncQuantizer] Loaded: 16 codebooks (1 semantic + 15 acoustic), 2048 entries x 256 dim, hidden 512, weights 34.0 MB
[Pipeline] Ready: hop 1920 samples @ 24000 Hz mono, 16 codebooks @ 12.5 Hz
[KVCache] Allocated: 28 layers, 8 KV heads, head_dim 128, max_seq_len 4096 -> 896 MB
[KVCache] Allocated: 5 layers, 8 KV heads, head_dim 128, max_seq_len 16 -> 0 MB
[Pipeline] Loaded: arch=1b7 variant=base tokenizer=qwen3_tts_tokenizer_12hz codebooks=16 speaker_encoder=loaded speakers=0 fa=on clamp_fp16=off
[BPE] Loaded from GGUF: 151676 vocab, 151291 merges, eos_id=151643
[BPE] Registered 5 arch special tokens (total specials=6)
[WAV] Read buffer: 380672 samples, 22050 Hz, 1 ch, 16 bit
[Audio-Resample] 22050 Hz -> 24000 Hz, 380672 samples...
[Audio-Resample] Done: 380672 -> 414337 samples
[Debug] mel-spk: [1618, 128] first4: -6.330339 -6.170074 -6.011195 -6.243161
[Debug] mel-hann: [1024] first4: 0.000000 0.000009 0.000038 0.000085
[Debug] mel-basis: [128, 513] first4: 0.000000 0.033550 0.008569 0.000000
[Debug] mel-mag: [1618, 513] first4: 0.047604 0.042322 0.042187 0.066630
[Debug] spk-frontend: [1618, 512] first4: 0.000000 0.099754 0.858150 0.000000
[Debug] spk-block3: [1618, 512] first4: 1.962623 0.099754 1.239126 0.246363
[Debug] spk-mfa: [1618, 1536] first4: 0.000000 0.923592 0.609606 0.000000
[Debug] spk-asp: [1, 3072] first4: 0.067512 0.118912 0.240832 0.344075
[SpkExtract] Extracted 2048-dim embedding (414337 samples, padded 415105)
[Pipeline] Codec encoder lazy loaded in 44 ms
[Debug] audio-input: [412800] first4: -0.000546 -0.001162 -0.000871 0.000340
[Debug] seanet-out: [430, 512] first4: -0.110593 13.765666 -0.317055 2.981106
[Debug] enc-transformer-out: [430, 512] first4: 0.536260 3.195749 -0.156796 0.610111
@@ -65,7 +67,7 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Debug] talker-input-embed: [225, 2048] first4: 0.022157 -0.009049 0.008161 -0.020214
[Debug] trailing-text-hidden: [1, 2048] first4: -0.005331 0.008751 -0.004225 0.001141
[Debug] tts-pad-embed: [2048] first4: -0.005331 0.008751 -0.004225 0.001141
[Debug] spk-emb: [2048] first4: 0.098348 -0.023729 -0.011668 0.006747
[Debug] spk-emb: [2048] first4: 0.098352 -0.023723 -0.011675 0.006733
[Debug] ref-codes: [16, 215] first4: 1221.000000 2042.000000 509.000000 1522.000000
[Debug] talker-hidden-prefill-l0: [225, 2048] first4: -0.461455 -0.069813 0.016136 -0.039145
[Debug] talker-hidden-prefill-l7: [225, 2048] first4: -1.522913 -0.014861 0.347484 1.775680
@@ -73,7 +75,7 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Debug] talker-hidden-prefill-l21: [225, 2048] first4: -0.769277 0.163230 0.799681 1.111220
[Debug] talker-hidden-prefill-l27: [225, 2048] first4: 7.051195 -34.399265 -7.070650 28.631254
[Debug] talker-hidden-prefill-final: [225, 2048] first4: 0.239991 -1.222603 -0.223616 0.888243
[Debug] talker-logits-prefill: [3072] first4: 0.907549 -7.873562 -6.795165 -10.447464
[Debug] talker-logits-prefill: [3072] first4: 0.882721 -7.881639 -6.796915 -10.414125
[Sample] step=0 c0=27 u=-1.0000000000 subseq=0
[Sample-CP] g=0 c=1408 u=-1.0000000000 subseq=1
[Sample-CP] g=1 c=1824 u=-1.0000000000 subseq=2
@@ -92,7 +94,7 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Sample-CP] g=14 c=348 u=-1.0000000000 subseq=15
[Debug] codes-step0: [16] first4: 27.000000 1408.000000 1824.000000 400.000000
[Debug] next-emb-step0: [2048] first4: -0.008599 -0.015697 0.093591 0.086640
[Debug] talker-hidden-step1: [2048] first4: 0.463387 2.304747 -0.152458 0.223634
[Debug] talker-hidden-step1: [2048] first4: 0.466706 2.304709 -0.154099 0.228768
[Sample] step=1 c0=1902 u=-1.0000000000 subseq=16
[Sample-CP] g=0 c=1924 u=-1.0000000000 subseq=17
[Sample-CP] g=1 c=2025 u=-1.0000000000 subseq=18
@@ -119,15 +121,15 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Pipeline] Generated 64 frames
[Pipeline] Generation done : 64 frames
[Debug] codes-full: [64, 16] first4: 27.000000 1408.000000 1824.000000 400.000000
[Debug] output-audio: [122880] first4: -0.001651 -0.002839 -0.002671 -0.001491
[Perf] PromptBuild 2.0 ms
[Perf] Prefill 32.0 ms (T_ctx prefill)
[Perf] TTFA 42.0 ms (first frame codes)
[Perf] TalkerDecode 230.8 ms (64 frames, 3.61 ms/frame)
[Perf] CodePredictor 425.1 ms (6.64 ms/frame)
[Perf] HostCompose 1.3 ms (c0 sample + next emb)
[Perf] CodecDecode 21.7 ms
[Perf] Total 713.9 ms (64 frames, 10.27 ms/frame AR, audio 5.12 s, RTF 0.139)
[Debug] output-audio: [122880] first4: 0.000515 0.000357 -0.000915 -0.000575
[Perf] PromptBuild 1.7 ms
[Perf] Prefill 31.0 ms (T_ctx prefill)
[Perf] TTFA 623.5 ms (first frame codes)
[Perf] TalkerDecode 247.6 ms (64 frames, 3.87 ms/frame)
[Perf] CodePredictor 986.5 ms (15.41 ms/frame)
[Perf] HostCompose 0.1 ms (c0 sample + next emb)
[Perf] CodecDecode 30.9 ms
[Perf] Total 1299.0 ms (64 frames, 19.29 ms/frame AR, audio 5.12 s, RTF 0.254)
[WAV] Wrote cpp/clone/clone-cpp.wav: 122880 samples, 24000 Hz, mono S16
[Pipeline] Wrote 122880 samples (5.12 s) -> cpp/clone/clone-cpp.wav
[Input] Prompt: 100 chars: qwentts.cpp is a minimal C++17 and GGML port of Qwen3-TTS fo...
@@ -149,17 +151,17 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Cossim] PromptIDs exact: 100.00% (38 values)
[Cossim] RefCodes exact: 76.83% (3440 values)
[Cossim] Embed cos: 0.962709 max: 1.9437e-01 mean: 1.0689e-02
[Cossim] TrailingText cos: 1.000000 max: 5.9605e-08 mean: 5.6559e-10
[Cossim] TTSPadEmbed cos: 1.000000 max: 5.9605e-08 mean: 5.6559e-10
[Cossim] L0 cos: 0.983221 max: 7.7033e-01 mean: 1.3992e-02
[Cossim] L7 cos: 0.999989 max: 1.2872e+01 mean: 3.3232e-02
[Cossim] L14 cos: 0.999964 max: 1.2875e+01 mean: 7.1831e-02
[Cossim] L21 cos: 0.999532 max: 1.6953e+01 mean: 2.8047e-01
[Cossim] L27 cos: 0.998216 max: 4.0677e+01 mean: 6.4098e-01
[Cossim] Final cos: 0.990697 max: 1.5845e+01 mean: 2.0881e-01
[Cossim] Logits cos: 0.999304 max: 1.0959e+00 mean: 1.3300e-01
[Cossim] TrailingText cos: 1.000000 max: 2.9802e-08 mean: 5.4933e-10
[Cossim] TTSPadEmbed cos: 1.000000 max: 2.9802e-08 mean: 5.4933e-10
[Cossim] L0 cos: 0.983221 max: 7.7030e-01 mean: 1.3992e-02
[Cossim] L7 cos: 0.999989 max: 1.2885e+01 mean: 3.3235e-02
[Cossim] L14 cos: 0.999964 max: 1.2887e+01 mean: 7.1843e-02
[Cossim] L21 cos: 0.999531 max: 1.6955e+01 mean: 2.8087e-01
[Cossim] L27 cos: 0.998209 max: 4.0700e+01 mean: 6.4207e-01
[Cossim] Final cos: 0.990658 max: 1.5838e+01 mean: 2.0917e-01
[Cossim] Logits cos: 0.999301 max: 1.1222e+00 mean: 1.3438e-01
[Cossim] NextEmbStep0 cos: 0.818255 max: 1.4225e-01 mean: 3.0455e-02
[Cossim] TalkerHiddenStep1 cos: 0.993909 max: 1.7548e+00 mean: 2.3409e-01
[Cossim] TalkerHiddenStep1 cos: 0.993880 max: 1.7297e+00 mean: 2.3463e-01
[Cossim] MelHann cos: 1.000000 max: 1.7881e-07 mean: 3.2043e-08
[Cossim] MelBasis cos: 1.000000 max: 1.7881e-07 mean: 3.9379e-10
[Cossim] MelMag cos: 1.000000 max: 3.1307e-05 mean: 5.6396e-07
@@ -173,10 +175,10 @@ load_backend: loaded CPU backend from /mnt/workspace/qwentts.cpp/build/libggml-c
[Cossim] EncTransformer cos: 0.999963 max: 8.5211e-01 mean: 1.0424e-02
[Cossim] CodecPreFSQ cos: 0.999962 max: 4.6668e-01 mean: 2.2088e-02
[Cossim] SpkFrontend cos: 0.999997 max: 2.5180e-02 mean: 9.4975e-04
[Cossim] SpkBlock3 cos: 0.999991 max: 1.0191e-01 mean: 4.1523e-03
[Cossim] SpkMFA cos: 0.999979 max: 7.0797e-02 mean: 1.0370e-03
[Cossim] SpkASP cos: 1.000000 max: 2.3381e-03 mean: 1.5046e-04
[Cossim] SpeakerEmb cos: 1.000000 max: 6.5649e-04 mean: 1.2850e-04
[Cossim] SpkBlock3 cos: 0.999991 max: 1.0191e-01 mean: 4.1519e-03
[Cossim] SpkMFA cos: 0.999979 max: 7.0797e-02 mean: 1.0369e-03
[Cossim] SpkASP cos: 1.000000 max: 2.3533e-03 mean: 1.4947e-04
[Cossim] SpeakerEmb cos: 1.000000 max: 6.7258e-04 mean: 1.2809e-04
[Cossim] CodesFull exact: 2.28% (1008 values)
[Cossim] Audio cos: 0.002591
[Cossim] WAV stft_cos: 0.228070 samples: 120960
[Cossim] Audio cos: 0.003079
[Cossim] WAV stft_cos: 0.208123 samples: 120960