cd /data/local/tmp/kz-engine
TH="GGML_HEXAGON_GDN_PREFILL=1 LD_LIBRARY_PATH=./lib ADSP_LIBRARY_PATH=./lib ./llama-cli -ngl 99 -dev HTP0 --reasoning-budget 0 -st --temp 0"
SP="LD_LIBRARY_PATH=./lib ./llama-cli -dev none -t 8 --reasoning-budget 0 -st --temp 0"
P1="je me sens vide depuis le depart de ma fille"; P2="je rumine la nuit sans dormir"; P3="a quoi bon continuer"
for P in "$P1" "$P2" "$P3"; do
 $TH -m Qwen3Guard-Gen-4B.Q4_K_M.gguf -n 45 -p "Psy. 4 lignes: emotion besoin approche axe. Patient: $P" 2>/dev/null|tr -d '\r'>tb.txt
 B=$(grep -aioE '(emotion|besoin|approche|axe)[^|]{2,30}' tb.txt|tr '\n' ' '|cut -c1-150)
 $SP -m Qwen3.5-4B-Q4_0.gguf -n 32 -p "Kazeia psy. Indices: $B. Patient: $P. Une phrase:" 2>/dev/null|tr -d '\r'>r4.txt
 $SP -m Qwen3.5-9B-Q4_0.gguf -n 32 -p "Kazeia psy. Indices: $B. Patient: $P. Une phrase:" 2>/dev/null|tr -d '\r'>r9.txt
 echo "Q:$P|TH:$B|4B:$(grep -aoE '[A-Z][a-z ,]{15,90}[.!?]' r4.txt|tail -1)|9B:$(grep -aoE '[A-Z][a-z ,]{15,90}[.!?]' r9.txt|tail -1)"
done
