Kazeia-engine/dist/jni
Richard Loyer 746bbe77cd chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact)
cp_inference.h/cpp : extrait de cp_runner.cpp standalone (kazeia-tts-decoder-ggml/),
adapté en module réutilisable. Architecture identique (qwen3 5L, GQA 16/8, head_dim
128, RoPE NEOX theta=1e6, q/k-norm AVANT RoPE, recompute T<=16 sans KV cache).
API : cp_load() + cp_predict(hidden[1024], cb0_emb[1024]) -> int32[15] = CB1..CB15.

cp_validate.cpp : reproduit sur tablette les conditions du standalone cp_runner
-> 495/495 codes match (33/33 frames parfaits) vs cp.generate(do_sample=False)
greedy golden, sur les 33 frames du dump 'Bonjour' historique. CP intégré =
bit-exact au standalone, qui est lui-même bit-exact à PyTorch.

tts_orchestrate.cpp mis à jour : si cp_f16.gguf/cp_heads/cp_codec_embs présents
dans <dump_dir>, le CP est ENABLED et remplace le teacher-forcing CB1..15.
Hidden state Talker capturé via llama_get_embeddings_ith(ctx,-1) après chaque
decode_embeds (pas besoin de re-instrumenter le forward Talker).

Mesure sur 'Bonjour je m'appelle Kazeia' (N=26 frames, audio 2.17s) tablette CPU 4t :
  Talker prefill (T=19) : 0.124 s
  Loop (N=26 steps)     : 7.705 s   talker_decode=0.763, cp=6.942
    per-step talker     : 29.3 ms
    per-step CP (15 pass): 267.0 ms
  Total Talker+CP       : 7.829 s -> RTF talker+cp = 3.61

Le CP est le nouveau goulot (267ms × 15 passes/step). Levier P3.5 = KV cache CP
(recompute -> incremental), threads 8, ou Q8_0 du CP.

CB0 match golden = 3/26 = trajectoire stochastique Python diverge rapidement vs
notre greedy ; PAS un bug CP (cp_validate prouve la conformité bit-exact).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:11:07 +02:00
..
EngineLlmEngine.kt chantier B TTS #1: API JNI embeds-only + M-RoPE qwen3 dense 2026-05-28 13:37:17 +02:00
build_prefill.cpp chantier B TTS #4: P3.1+P3.2 = x_vector + prefill_embeds depuis input_ids (bit-exact) 2026-05-28 15:05:23 +02:00
cp_inference.cpp chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact) 2026-05-28 15:11:07 +02:00
cp_inference.h chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact) 2026-05-28 15:11:07 +02:00
cp_validate.cpp chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact) 2026-05-28 15:11:07 +02:00
dual_ctx.cpp dist: prefill HTP = CASSÉ (sortie charabia), prefill obligatoirement CPU 2026-05-27 09:42:59 +02:00
dual_ctx_mt.cpp dist: JNI option C câblé (prefill HTP / decode CPU), validé multi-tour 2026-05-27 10:24:55 +02:00
kazeia_engine_jni.cpp chantier B TTS #2: fix M-RoPE positions en embeds-mode + validation bit-exact 2026-05-28 13:54:03 +02:00
test_engine.c Valide device: generate() bout-en-bout OK (test_native), bridge pret integration 2026-05-24 22:05:44 +02:00
test_engine.cpp Valide device: generate() bout-en-bout OK (test_native), bridge pret integration 2026-05-24 22:05:44 +02:00
test_jni_native.cpp dist: multi-tour propre (generateRaw + ChatSession) + JNI validé end-to-end natif 2026-05-27 11:18:20 +02:00
test_native.cpp v4 fix #277: ngl0 CPU decode 14tok/s, 4s/tour, usable 2026-05-25 10:18:31 +02:00
test_talker.cpp chantier B TTS #1: API JNI embeds-only + M-RoPE qwen3 dense 2026-05-28 13:37:17 +02:00
test_talker_replay.cpp chantier B TTS #2: fix M-RoPE positions en embeds-mode + validation bit-exact 2026-05-28 13:54:03 +02:00
tts_orchestrate.cpp chantier B TTS #5: P3.3 = vrai CP runner intégré (bit-exact) 2026-05-28 15:11:07 +02:00